(self["webpackChunkdapp_wallet"]=self["webpackChunkdapp_wallet"]||[]).push([[998],{19662:function(e,t,r){var n=r(17854),a=r(60614),i=r(66330),c=n.TypeError;e.exports=function(e){if(a(e))return e;throw c(i(e)+" is not a function")}},96077:function(e,t,r){var n=r(17854),a=r(60614),i=n.String,c=n.TypeError;e.exports=function(e){if("object"==typeof e||a(e))return e;throw c("Can't set "+i(e)+" as a prototype")}},51223:function(e,t,r){var n=r(5112),a=r(70030),i=r(3070),c=n("unscopables"),o=Array.prototype;void 0==o[c]&&i.f(o,c,{configurable:!0,value:a(null)}),e.exports=function(e){o[c][e]=!0}},25787:function(e,t,r){var n=r(17854),a=r(47976),i=n.TypeError;e.exports=function(e,t){if(a(t,e))return e;throw i("Incorrect invocation")}},19670:function(e,t,r){var n=r(17854),a=r(70111),i=n.String,c=n.TypeError;e.exports=function(e){if(a(e))return e;throw c(i(e)+" is not an object")}},24019:function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},90260:function(e,t,r){"use strict";var n,a,i,c=r(24019),o=r(19781),f=r(17854),d=r(60614),s=r(70111),u=r(92597),b=r(70648),h=r(66330),l=r(68880),p=r(31320),x=r(3070).f,m=r(47976),v=r(79518),g=r(27674),y=r(5112),w=r(69711),_=f.Int8Array,M=_&&_.prototype,k=f.Uint8ClampedArray,A=k&&k.prototype,E=_&&v(_),S=M&&v(M),T=Object.prototype,C=f.TypeError,P=y("toStringTag"),O=w("TYPED_ARRAY_TAG"),R=w("TYPED_ARRAY_CONSTRUCTOR"),I=c&&!!g&&"Opera"!==b(f.opera),B=!1,L={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},N={BigInt64Array:8,BigUint64Array:8},U=function(e){if(!s(e))return!1;var t=b(e);return"DataView"===t||u(L,t)||u(N,t)},j=function(e){if(!s(e))return!1;var t=b(e);return u(L,t)||u(N,t)},D=function(e){if(j(e))return e;throw C("Target is not a typed array")},F=function(e){if(d(e)&&(!g||m(E,e)))return e;throw C(h(e)+" is not a typed array constructor")},H=function(e,t,r,n){if(o){if(r)for(var a in L){var i=f[a];if(i&&u(i.prototype,e))try{delete i.prototype[e]}catch(c){try{i.prototype[e]=t}catch(d){}}}S[e]&&!r||p(S,e,r?t:I&&M[e]||t,n)}},q=function(e,t,r){var n,a;if(o){if(g){if(r)for(n in L)if(a=f[n],a&&u(a,e))try{delete a[e]}catch(i){}if(E[e]&&!r)return;try{return p(E,e,r?t:I&&E[e]||t)}catch(i){}}for(n in L)a=f[n],!a||a[e]&&!r||p(a,e,t)}};for(n in L)a=f[n],i=a&&a.prototype,i?l(i,R,a):I=!1;for(n in N)a=f[n],i=a&&a.prototype,i&&l(i,R,a);if((!I||!d(E)||E===Function.prototype)&&(E=function(){throw C("Incorrect invocation")},I))for(n in L)f[n]&&g(f[n],E);if((!I||!S||S===T)&&(S=E.prototype,I))for(n in L)f[n]&&g(f[n].prototype,S);if(I&&v(A)!==S&&g(A,S),o&&!u(S,P))for(n in B=!0,x(S,P,{get:function(){return s(this)?this[O]:void 0}}),L)f[n]&&l(f[n],O,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:I,TYPED_ARRAY_CONSTRUCTOR:R,TYPED_ARRAY_TAG:B&&O,aTypedArray:D,aTypedArrayConstructor:F,exportTypedArrayMethod:H,exportTypedArrayStaticMethod:q,isView:U,isTypedArray:j,TypedArray:E,TypedArrayPrototype:S}},41318:function(e,t,r){var n=r(45656),a=r(51400),i=r(26244),c=function(e){return function(t,r,c){var o,f=n(t),d=i(f),s=a(c,d);if(e&&r!=r){while(d>s)if(o=f[s++],o!=o)return!0}else for(;d>s;s++)if((e||s in f)&&f[s]===r)return e||s||0;return!e&&-1}};e.exports={includes:c(!0),indexOf:c(!1)}},50206:function(e,t,r){var n=r(1702);e.exports=n([].slice)},84326:function(e,t,r){var n=r(1702),a=n({}.toString),i=n("".slice);e.exports=function(e){return i(a(e),8,-1)}},70648:function(e,t,r){var n=r(17854),a=r(51694),i=r(60614),c=r(84326),o=r(5112),f=o("toStringTag"),d=n.Object,s="Arguments"==c(function(){return arguments}()),u=function(e,t){try{return e[t]}catch(r){}};e.exports=a?c:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=u(t=d(e),f))?r:s?c(t):"Object"==(n=c(t))&&i(t.callee)?"Arguments":n}},77741:function(e,t,r){var n=r(1702),a=n("".replace),i=function(e){return String(Error(e).stack)}("zxcasd"),c=/\n\s*at [^:]*:[^\n]*/,o=c.test(i);e.exports=function(e,t){if(o&&"string"==typeof e)while(t--)e=a(e,c,"");return e}},99920:function(e,t,r){var n=r(92597),a=r(53887),i=r(31236),c=r(3070);e.exports=function(e,t,r){for(var o=a(t),f=c.f,d=i.f,s=0;s0&&n[0]<4?1:+(n[0]+n[1])),!a&&c&&(n=c.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=c.match(/Chrome\/(\d+)/),n&&(a=+n[1]))),e.exports=a},80748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},22914:function(e,t,r){var n=r(47293),a=r(79114);e.exports=!n((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",a(1,7)),7!==e.stack)}))},82109:function(e,t,r){var n=r(17854),a=r(31236).f,i=r(68880),c=r(31320),o=r(83505),f=r(99920),d=r(54705);e.exports=function(e,t){var r,s,u,b,h,l,p=e.target,x=e.global,m=e.stat;if(s=x?n:m?n[p]||o(p,{}):(n[p]||{}).prototype,s)for(u in t){if(h=t[u],e.noTargetGet?(l=a(s,u),b=l&&l.value):b=s[u],r=d(x?u:p+(m?".":"#")+u,e.forced),!r&&void 0!==b){if(typeof h==typeof b)continue;f(h,b)}(e.sham||b&&b.sham)&&i(h,"sham",!0),c(s,u,h,e)}}},47293:function(e){e.exports=function(e){try{return!!e()}catch(t){return!0}}},22104:function(e,t,r){var n=r(34374),a=Function.prototype,i=a.apply,c=a.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?c.bind(i):function(){return c.apply(i,arguments)})},49974:function(e,t,r){var n=r(1702),a=r(19662),i=r(34374),c=n(n.bind);e.exports=function(e,t){return a(e),void 0===t?e:i?c(e,t):function(){return e.apply(t,arguments)}}},34374:function(e,t,r){var n=r(47293);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},46916:function(e,t,r){var n=r(34374),a=Function.prototype.call;e.exports=n?a.bind(a):function(){return a.apply(a,arguments)}},76530:function(e,t,r){var n=r(19781),a=r(92597),i=Function.prototype,c=n&&Object.getOwnPropertyDescriptor,o=a(i,"name"),f=o&&"something"===function(){}.name,d=o&&(!n||n&&c(i,"name").configurable);e.exports={EXISTS:o,PROPER:f,CONFIGURABLE:d}},1702:function(e,t,r){var n=r(34374),a=Function.prototype,i=a.bind,c=a.call,o=n&&i.bind(c,c);e.exports=n?function(e){return e&&o(e)}:function(e){return e&&function(){return c.apply(e,arguments)}}},35005:function(e,t,r){var n=r(17854),a=r(60614),i=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(n[e]):n[e]&&n[e][t]}},58173:function(e,t,r){var n=r(19662);e.exports=function(e,t){var r=e[t];return null==r?void 0:n(r)}},17854:function(e,t,r){var n=function(e){return e&&e.Math==Math&&e};e.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")()},92597:function(e,t,r){var n=r(1702),a=r(47908),i=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(a(e),t)}},3501:function(e){e.exports={}},60490:function(e,t,r){var n=r(35005);e.exports=n("document","documentElement")},64664:function(e,t,r){var n=r(19781),a=r(47293),i=r(80317);e.exports=!n&&!a((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},68361:function(e,t,r){var n=r(17854),a=r(1702),i=r(47293),c=r(84326),o=n.Object,f=a("".split);e.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"==c(e)?f(e,""):o(e)}:o},79587:function(e,t,r){var n=r(60614),a=r(70111),i=r(27674);e.exports=function(e,t,r){var c,o;return i&&n(c=t.constructor)&&c!==r&&a(o=c.prototype)&&o!==r.prototype&&i(e,o),e}},42788:function(e,t,r){var n=r(1702),a=r(60614),i=r(5465),c=n(Function.toString);a(i.inspectSource)||(i.inspectSource=function(e){return c(e)}),e.exports=i.inspectSource},58340:function(e,t,r){var n=r(70111),a=r(68880);e.exports=function(e,t){n(t)&&"cause"in t&&a(e,"cause",t.cause)}},29909:function(e,t,r){var n,a,i,c=r(68536),o=r(17854),f=r(1702),d=r(70111),s=r(68880),u=r(92597),b=r(5465),h=r(6200),l=r(3501),p="Object already initialized",x=o.TypeError,m=o.WeakMap,v=function(e){return i(e)?a(e):n(e,{})},g=function(e){return function(t){var r;if(!d(t)||(r=a(t)).type!==e)throw x("Incompatible receiver, "+e+" required");return r}};if(c||b.state){var y=b.state||(b.state=new m),w=f(y.get),_=f(y.has),M=f(y.set);n=function(e,t){if(_(y,e))throw new x(p);return t.facade=e,M(y,e,t),t},a=function(e){return w(y,e)||{}},i=function(e){return _(y,e)}}else{var k=h("state");l[k]=!0,n=function(e,t){if(u(e,k))throw new x(p);return t.facade=e,s(e,k,t),t},a=function(e){return u(e,k)?e[k]:{}},i=function(e){return u(e,k)}}e.exports={set:n,get:a,has:i,enforce:v,getterFor:g}},60614:function(e){e.exports=function(e){return"function"==typeof e}},54705:function(e,t,r){var n=r(47293),a=r(60614),i=/#|\.prototype\./,c=function(e,t){var r=f[o(e)];return r==s||r!=d&&(a(t)?n(t):!!t)},o=c.normalize=function(e){return String(e).replace(i,".").toLowerCase()},f=c.data={},d=c.NATIVE="N",s=c.POLYFILL="P";e.exports=c},70111:function(e,t,r){var n=r(60614);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},31913:function(e){e.exports=!1},52190:function(e,t,r){var n=r(17854),a=r(35005),i=r(60614),c=r(47976),o=r(43307),f=n.Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=a("Symbol");return i(t)&&c(t.prototype,f(e))}},26244:function(e,t,r){var n=r(17466);e.exports=function(e){return n(e.length)}},30133:function(e,t,r){var n=r(7392),a=r(47293);e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},68536:function(e,t,r){var n=r(17854),a=r(60614),i=r(42788),c=n.WeakMap;e.exports=a(c)&&/native code/.test(i(c))},56277:function(e,t,r){var n=r(41340);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},70030:function(e,t,r){var n,a=r(19670),i=r(36048),c=r(80748),o=r(3501),f=r(60490),d=r(80317),s=r(6200),u=">",b="<",h="prototype",l="script",p=s("IE_PROTO"),x=function(){},m=function(e){return b+l+u+e+b+"/"+l+u},v=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){var e,t=d("iframe"),r="java"+l+":";return t.style.display="none",f.appendChild(t),t.src=String(r),e=t.contentWindow.document,e.open(),e.write(m("document.F=Object")),e.close(),e.F},y=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}y="undefined"!=typeof document?document.domain&&n?v(n):g():v(n);var e=c.length;while(e--)delete y[h][c[e]];return y()};o[p]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(x[h]=a(e),r=new x,x[h]=null,r[p]=e):r=y(),void 0===t?r:i.f(r,t)}},36048:function(e,t,r){var n=r(19781),a=r(3353),i=r(3070),c=r(19670),o=r(45656),f=r(81956);t.f=n&&!a?Object.defineProperties:function(e,t){c(e);var r,n=o(t),a=f(t),d=a.length,s=0;while(d>s)i.f(e,r=a[s++],n[r]);return e}},3070:function(e,t,r){var n=r(17854),a=r(19781),i=r(64664),c=r(3353),o=r(19670),f=r(34948),d=n.TypeError,s=Object.defineProperty,u=Object.getOwnPropertyDescriptor,b="enumerable",h="configurable",l="writable";t.f=a?c?function(e,t,r){if(o(e),t=f(t),o(r),"function"===typeof e&&"prototype"===t&&"value"in r&&l in r&&!r[l]){var n=u(e,t);n&&n[l]&&(e[t]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:b in r?r[b]:n[b],writable:!1})}return s(e,t,r)}:s:function(e,t,r){if(o(e),t=f(t),o(r),i)try{return s(e,t,r)}catch(n){}if("get"in r||"set"in r)throw d("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},31236:function(e,t,r){var n=r(19781),a=r(46916),i=r(55296),c=r(79114),o=r(45656),f=r(34948),d=r(92597),s=r(64664),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(e,t){if(e=o(e),t=f(t),s)try{return u(e,t)}catch(r){}if(d(e,t))return c(!a(i.f,e,t),e[t])}},8006:function(e,t,r){var n=r(16324),a=r(80748),i=a.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},25181:function(e,t){t.f=Object.getOwnPropertySymbols},79518:function(e,t,r){var n=r(17854),a=r(92597),i=r(60614),c=r(47908),o=r(6200),f=r(49920),d=o("IE_PROTO"),s=n.Object,u=s.prototype;e.exports=f?s.getPrototypeOf:function(e){var t=c(e);if(a(t,d))return t[d];var r=t.constructor;return i(r)&&t instanceof r?r.prototype:t instanceof s?u:null}},47976:function(e,t,r){var n=r(1702);e.exports=n({}.isPrototypeOf)},16324:function(e,t,r){var n=r(1702),a=r(92597),i=r(45656),c=r(41318).indexOf,o=r(3501),f=n([].push);e.exports=function(e,t){var r,n=i(e),d=0,s=[];for(r in n)!a(o,r)&&a(n,r)&&f(s,r);while(t.length>d)a(n,r=t[d++])&&(~c(s,r)||f(s,r));return s}},81956:function(e,t,r){var n=r(16324),a=r(80748);e.exports=Object.keys||function(e){return n(e,a)}},55296:function(e,t){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,a=n&&!r.call({1:2},1);t.f=a?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},27674:function(e,t,r){var n=r(1702),a=r(19670),i=r(96077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(r,[]),t=r instanceof Array}catch(c){}return function(r,n){return a(r),i(n),t?e(r,n):r.__proto__=n,r}}():void 0)},92140:function(e,t,r){var n=r(17854),a=r(46916),i=r(60614),c=r(70111),o=n.TypeError;e.exports=function(e,t){var r,n;if("string"===t&&i(r=e.toString)&&!c(n=a(r,e)))return n;if(i(r=e.valueOf)&&!c(n=a(r,e)))return n;if("string"!==t&&i(r=e.toString)&&!c(n=a(r,e)))return n;throw o("Can't convert object to primitive value")}},53887:function(e,t,r){var n=r(35005),a=r(1702),i=r(8006),c=r(25181),o=r(19670),f=a([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=i.f(o(e)),r=c.f;return r?f(t,r(e)):t}},31320:function(e,t,r){var n=r(17854),a=r(60614),i=r(92597),c=r(68880),o=r(83505),f=r(42788),d=r(29909),s=r(76530).CONFIGURABLE,u=d.get,b=d.enforce,h=String(String).split("String");(e.exports=function(e,t,r,f){var d,u=!!f&&!!f.unsafe,l=!!f&&!!f.enumerable,p=!!f&&!!f.noTargetGet,x=f&&void 0!==f.name?f.name:t;a(r)&&("Symbol("===String(x).slice(0,7)&&(x="["+String(x).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(r,"name")||s&&r.name!==x)&&c(r,"name",x),d=b(r),d.source||(d.source=h.join("string"==typeof x?x:""))),e!==n?(u?!p&&e[t]&&(l=!0):delete e[t],l?e[t]=r:c(e,t,r)):l?e[t]=r:o(t,r)})(Function.prototype,"toString",(function(){return a(this)&&u(this).source||f(this)}))},84488:function(e,t,r){var n=r(17854),a=n.TypeError;e.exports=function(e){if(void 0==e)throw a("Can't call method on "+e);return e}},83505:function(e,t,r){var n=r(17854),a=Object.defineProperty;e.exports=function(e,t){try{a(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},6200:function(e,t,r){var n=r(72309),a=r(69711),i=n("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},5465:function(e,t,r){var n=r(17854),a=r(83505),i="__core-js_shared__",c=n[i]||a(i,{});e.exports=c},72309:function(e,t,r){var n=r(31913),a=r(5465);(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.1",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"})},20261:function(e,t,r){var n,a,i,c,o=r(17854),f=r(22104),d=r(49974),s=r(60614),u=r(92597),b=r(47293),h=r(60490),l=r(50206),p=r(80317),x=r(48053),m=r(6833),v=r(35268),g=o.setImmediate,y=o.clearImmediate,w=o.process,_=o.Dispatch,M=o.Function,k=o.MessageChannel,A=o.String,E=0,S={},T="onreadystatechange";try{n=o.location}catch(I){}var C=function(e){if(u(S,e)){var t=S[e];delete S[e],t()}},P=function(e){return function(){C(e)}},O=function(e){C(e.data)},R=function(e){o.postMessage(A(e),n.protocol+"//"+n.host)};g&&y||(g=function(e){x(arguments.length,1);var t=s(e)?e:M(e),r=l(arguments,1);return S[++E]=function(){f(t,void 0,r)},a(E),E},y=function(e){delete S[e]},v?a=function(e){w.nextTick(P(e))}:_&&_.now?a=function(e){_.now(P(e))}:k&&!m?(i=new k,c=i.port2,i.port1.onmessage=O,a=d(c.postMessage,c)):o.addEventListener&&s(o.postMessage)&&!o.importScripts&&n&&"file:"!==n.protocol&&!b(R)?(a=R,o.addEventListener("message",O,!1)):a=T in p("script")?function(e){h.appendChild(p("script"))[T]=function(){h.removeChild(this),C(e)}}:function(e){setTimeout(P(e),0)}),e.exports={set:g,clear:y}},51400:function(e,t,r){var n=r(19303),a=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?a(r+t,0):i(r,t)}},45656:function(e,t,r){var n=r(68361),a=r(84488);e.exports=function(e){return n(a(e))}},19303:function(e){var t=Math.ceil,r=Math.floor;e.exports=function(e){var n=+e;return n!==n||0===n?0:(n>0?r:t)(n)}},17466:function(e,t,r){var n=r(19303),a=Math.min;e.exports=function(e){return e>0?a(n(e),9007199254740991):0}},47908:function(e,t,r){var n=r(17854),a=r(84488),i=n.Object;e.exports=function(e){return i(a(e))}},84590:function(e,t,r){var n=r(17854),a=r(73002),i=n.RangeError;e.exports=function(e,t){var r=a(e);if(r%t)throw i("Wrong offset");return r}},73002:function(e,t,r){var n=r(17854),a=r(19303),i=n.RangeError;e.exports=function(e){var t=a(e);if(t<0)throw i("The argument can't be less than 0");return t}},57593:function(e,t,r){var n=r(17854),a=r(46916),i=r(70111),c=r(52190),o=r(58173),f=r(92140),d=r(5112),s=n.TypeError,u=d("toPrimitive");e.exports=function(e,t){if(!i(e)||c(e))return e;var r,n=o(e,u);if(n){if(void 0===t&&(t="default"),r=a(n,e,t),!i(r)||c(r))return r;throw s("Can't convert object to primitive value")}return void 0===t&&(t="number"),f(e,t)}},34948:function(e,t,r){var n=r(57593),a=r(52190);e.exports=function(e){var t=n(e,"string");return a(t)?t:t+""}},51694:function(e,t,r){var n=r(5112),a=n("toStringTag"),i={};i[a]="z",e.exports="[object z]"===String(i)},41340:function(e,t,r){var n=r(17854),a=r(70648),i=n.String;e.exports=function(e){if("Symbol"===a(e))throw TypeError("Cannot convert a Symbol value to a string");return i(e)}},66330:function(e,t,r){var n=r(17854),a=n.String;e.exports=function(e){try{return a(e)}catch(t){return"Object"}}},69711:function(e,t,r){var n=r(1702),a=0,i=Math.random(),c=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+c(++a+i,36)}},43307:function(e,t,r){var n=r(30133);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(e,t,r){var n=r(19781),a=r(47293);e.exports=n&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},48053:function(e,t,r){var n=r(17854),a=n.TypeError;e.exports=function(e,t){if(ex&&u(n,arguments[x]),n}));if(_.prototype=y,"Error"!==v&&(o?o(_,w):f(_,w,{name:!0})),f(_,g),!l)try{y.name!==v&&i(y,"name",v),y.constructor=_}catch(M){}return _}}},32120:function(e,t,r){var n=r(82109),a=r(35005),i=r(22104),c=r(47293),o=r(89191),f="AggregateError",d=a(f),s=!c((function(){return 1!==d([1]).errors[0]}))&&c((function(){return 7!==d([1],f,{cause:7}).cause}));n({global:!0,forced:s},{AggregateError:o(f,(function(e){return function(t,r){return i(e,this,arguments)}}),s,!0)})},52262:function(e,t,r){"use strict";var n=r(82109),a=r(47908),i=r(26244),c=r(19303),o=r(51223);n({target:"Array",proto:!0},{at:function(e){var t=a(this),r=i(t),n=c(e),o=n>=0?n:r+n;return o<0||o>=r?void 0:t[o]}}),o("at")},21703:function(e,t,r){var n=r(82109),a=r(17854),i=r(22104),c=r(89191),o="WebAssembly",f=a[o],d=7!==Error("e",{cause:7}).cause,s=function(e,t){var r={};r[e]=c(e,t,d),n({global:!0,forced:d},r)},u=function(e,t){if(f&&f[e]){var r={};r[e]=c(o+"."+e,t,d),n({target:o,stat:!0,forced:d},r)}};s("Error",(function(e){return function(t){return i(e,this,arguments)}})),s("EvalError",(function(e){return function(t){return i(e,this,arguments)}})),s("RangeError",(function(e){return function(t){return i(e,this,arguments)}})),s("ReferenceError",(function(e){return function(t){return i(e,this,arguments)}})),s("SyntaxError",(function(e){return function(t){return i(e,this,arguments)}})),s("TypeError",(function(e){return function(t){return i(e,this,arguments)}})),s("URIError",(function(e){return function(t){return i(e,this,arguments)}})),u("CompileError",(function(e){return function(t){return i(e,this,arguments)}})),u("LinkError",(function(e){return function(t){return i(e,this,arguments)}})),u("RuntimeError",(function(e){return function(t){return i(e,this,arguments)}}))},46314:function(e,t,r){var n=r(82109),a=r(92597);n({target:"Object",stat:!0},{hasOwn:a})},24506:function(e,t,r){"use strict";var n=r(82109),a=r(1702),i=r(84488),c=r(19303),o=r(41340),f=r(47293),d=a("".charAt),s=f((function(){return"\ud842"!=="𠮷".at(-2)}));n({target:"String",proto:!0,forced:s},{at:function(e){var t=o(i(this)),r=t.length,n=c(e),a=n>=0?n:r+n;return a<0||a>=r?void 0:d(t,a)}})},48675:function(e,t,r){"use strict";var n=r(90260),a=r(26244),i=r(19303),c=n.aTypedArray,o=n.exportTypedArrayMethod;o("at",(function(e){var t=c(this),r=a(t),n=i(e),o=n>=0?n:r+n;return o<0||o>=r?void 0:t[o]}))},3462:function(e,t,r){"use strict";var n=r(17854),a=r(46916),i=r(90260),c=r(26244),o=r(84590),f=r(47908),d=r(47293),s=n.RangeError,u=n.Int8Array,b=u&&u.prototype,h=b&&b.set,l=i.aTypedArray,p=i.exportTypedArrayMethod,x=!d((function(){var e=new Uint8ClampedArray(2);return a(h,e,{length:1,0:3},1),3!==e[1]})),m=x&&i.NATIVE_ARRAY_BUFFER_VIEWS&&d((function(){var e=new u(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));p("set",(function(e){l(this);var t=o(arguments.length>1?arguments[1]:void 0,1),r=f(e);if(x)return a(h,this,r,t);var n=this.length,i=c(r),d=0;if(i+t>n)throw s("Wrong length");while(d=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.chains=t._getInitializedChains=void 0;var i=a(r(87295)),c=a(r(31227)),o=a(r(40439)),f=a(r(37098)),d=a(r(17687)),s=a(r(49422));function u(e){var t,r,a={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli",11155111:"sepolia"},u={mainnet:i.default,ropsten:c.default,rinkeby:o.default,kovan:f.default,goerli:d.default,sepolia:s.default};if(e)try{for(var b=n(e),h=b.next();!h.done;h=b.next()){var l=h.value,p=l.name;a[l.chainId.toString()]=p,u[p]=l}}catch(x){t={error:x}}finally{try{h&&!h.done&&(r=b.return)&&r.call(b)}finally{if(t)throw t.error}}return u["names"]=a,u}t._getInitializedChains=u,t.chains=u()},38158:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIPs=void 0,t.EIPs={1559:r(77523),2315:r(83339),2537:r(26769),2565:r(17897),2718:r(62170),2929:r(88436),2930:r(96213),3198:r(25491),3529:r(20070),3541:r(21871),3554:r(47225),3607:r(3968),3675:r(98571),3855:r(64551),4345:r(74818)}},86625:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=void 0,t.hardforks=[["chainstart",r(60114)],["homestead",r(62800)],["dao",r(7197)],["tangerineWhistle",r(22302)],["spuriousDragon",r(90716)],["byzantium",r(26985)],["constantinople",r(35993)],["petersburg",r(4064)],["istanbul",r(83166)],["muirGlacier",r(42946)],["berlin",r(20015)],["london",r(61250)],["shanghai",r(5553)],["arrowGlacier",r(51971)],["merge",r(88648)]]},82099:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703);var a=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsensusAlgorithm=t.ConsensusType=t.Hardfork=t.Chain=t.CustomChain=void 0;var o,f,d=r(43793),s=r(88913),u=r(64466),b=r(20455),h=r(86625),l=r(38158);(function(e){e["PolygonMainnet"]="polygon-mainnet",e["PolygonMumbai"]="polygon-mumbai",e["ArbitrumRinkebyTestnet"]="arbitrum-rinkeby-testnet",e["xDaiChain"]="x-dai-chain",e["OptimisticKovan"]="optimistic-kovan",e["OptimisticEthereum"]="optimistic-ethereum"})(o=t.CustomChain||(t.CustomChain={})),function(e){e[e["Mainnet"]=1]="Mainnet",e[e["Ropsten"]=3]="Ropsten",e[e["Rinkeby"]=4]="Rinkeby",e[e["Kovan"]=42]="Kovan",e[e["Goerli"]=5]="Goerli",e[e["Sepolia"]=11155111]="Sepolia"}(t.Chain||(t.Chain={})),function(e){e["Chainstart"]="chainstart",e["Homestead"]="homestead",e["Dao"]="dao",e["TangerineWhistle"]="tangerineWhistle",e["SpuriousDragon"]="spuriousDragon",e["Byzantium"]="byzantium",e["Constantinople"]="constantinople",e["Petersburg"]="petersburg",e["Istanbul"]="istanbul",e["MuirGlacier"]="muirGlacier",e["Berlin"]="berlin",e["London"]="london",e["ArrowGlacier"]="arrowGlacier",e["Shanghai"]="shanghai",e["Merge"]="merge"}(f=t.Hardfork||(t.Hardfork={})),function(e){e["ProofOfStake"]="pos",e["ProofOfWork"]="pow",e["ProofOfAuthority"]="poa"}(t.ConsensusType||(t.ConsensusType={})),function(e){e["Ethash"]="ethash",e["Clique"]="clique",e["Casper"]="casper"}(t.ConsensusAlgorithm||(t.ConsensusAlgorithm={}));var p=function(e){function t(t){var r,n,a,i,o=e.call(this)||this;o._supportedHardforks=[],o._eips=[],o._customChains=null!==(a=t.customChains)&&void 0!==a?a:[],o._chainParams=o.setChain(t.chain),o.DEFAULT_HARDFORK=null!==(i=o._chainParams.defaultHardfork)&&void 0!==i?i:f.Istanbul;try{for(var d=c(o._chainParams.hardforks),s=d.next();!s.done;s=d.next()){var u=s.value;u.forkHash||(u.forkHash=o._calcForkHash(u.name))}}catch(b){r={error:b}}finally{try{s&&!s.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}return o._hardfork=o.DEFAULT_HARDFORK,t.supportedHardforks&&(o._supportedHardforks=t.supportedHardforks),t.hardfork&&o.setHardfork(t.hardfork),t.eips&&o.setEIPs(t.eips),o}return a(t,e),t.custom=function(e,r){var n;void 0===r&&(r={});var a=null!==(n=r.baseChain)&&void 0!==n?n:"mainnet",c=i({},t._getChainParams(a));if(c["name"]="custom-chain","string"!==typeof e)return new t(i({chain:i(i({},c),e)},r));if(e===o.PolygonMainnet)return t.custom({name:o.PolygonMainnet,chainId:137,networkId:137});if(e===o.PolygonMumbai)return t.custom({name:o.PolygonMumbai,chainId:80001,networkId:80001});if(e===o.ArbitrumRinkebyTestnet)return t.custom({name:o.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611});if(e===o.xDaiChain)return t.custom({name:o.xDaiChain,chainId:100,networkId:100});if(e===o.OptimisticKovan)return t.custom({name:o.OptimisticKovan,chainId:69,networkId:69},{hardfork:f.Berlin});if(e===o.OptimisticEthereum)return t.custom({name:o.OptimisticEthereum,chainId:10,networkId:10},{hardfork:f.Berlin});throw new Error("Custom chain ".concat(e," not supported"))},t.forCustomChain=function(e,r,n,a){var c=t._getChainParams(e);return new t({chain:i(i({},c),r),hardfork:n,supportedHardforks:a})},t.isSupportedChainId=function(e){var t=(0,b._getInitializedChains)();return Boolean(t["names"][e.toString()])},t._getChainParams=function(e,t){var r=(0,b._getInitializedChains)(t);if("number"===typeof e||u.BN.isBN(e)){if(e=e.toString(),r["names"][e]){var n=r["names"][e];return r[n]}throw new Error("Chain with ID ".concat(e," not supported"))}if(r[e])return r[e];throw new Error("Chain with name ".concat(e," not supported"))},t.prototype.setChain=function(e){var r,n;if("number"===typeof e||"string"===typeof e||u.BN.isBN(e)){var a=void 0;a=this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0])?this._customChains.map((function(e){return e[0]})):this._customChains,this._chainParams=t._getChainParams(e,a)}else{if("object"!==typeof e)throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");var i=["networkId","genesis","hardforks","bootstrapNodes"];try{for(var o=c(i),f=o.next();!f.done;f=o.next()){var d=f.value;if(void 0===e[d])throw new Error("Missing required chain parameter: ".concat(d))}}catch(s){r={error:s}}finally{try{f&&!f.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}this._chainParams=e}return this._chainParams},t.prototype.setHardfork=function(e){var t,r;if(!this._isSupportedHardfork(e))throw new Error("Hardfork ".concat(e," not set as supported in supportedHardforks"));var n=!1;try{for(var a=c(h.hardforks),i=a.next();!i.done;i=a.next()){var o=i.value;o[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),n=!0)}}catch(f){t={error:f}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}if(!n)throw new Error("Hardfork with name ".concat(e," not supported"))},t.prototype.getHardforkByBlockNumber=function(e,t){var r,n;e=(0,u.toType)(e,u.TypeOutput.BN),t=(0,u.toType)(t,u.TypeOutput.BN);var a,i,o,d=f.Chainstart;try{for(var s=c(this.hardforks()),b=s.next();!b.done;b=s.next()){var h=b.value;if(null!==h.block)e.gte(new u.BN(h.block))&&(d=h.name),t&&h.td&&(t.gte(new u.BN(h.td))?a=h.name:i=o),o=h.name;else if(void 0!==t&&null!==t&&void 0!==h.td&&null!==h.td&&t.gte(new u.BN(h.td)))return h.name}}catch(x){r={error:x}}finally{try{b&&!b.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}if(t){var l="block number: ".concat(e," (-> ").concat(d,"), ");if(a&&!this.hardforkGteHardfork(d,a)){var p="HF determined by block number is lower than the minimum total difficulty HF";throw l+="total difficulty: ".concat(t," (-> ").concat(a,")"),new Error("".concat(p,": ").concat(l))}if(i&&!this.hardforkGteHardfork(i,d)){p="Maximum HF determined by total difficulty is lower than the block number HF";throw l+="total difficulty: ".concat(t," (-> ").concat(i,")"),new Error("".concat(p,": ").concat(l))}}return d},t.prototype.setHardforkByBlockNumber=function(e,t){var r=this.getHardforkByBlockNumber(e,t);return this.setHardfork(r),r},t.prototype._chooseHardfork=function(e,t){if(void 0===t&&(t=!0),e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork ".concat(e," not set as supported in supportedHardforks"))}else e=this._hardfork;return e},t.prototype._getHardfork=function(e){var t,r,n=this.hardforks();try{for(var a=c(n),i=a.next();!i.done;i=a.next()){var o=i.value;if(o["name"]===e)return o}}catch(f){t={error:f}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}throw new Error("Hardfork ".concat(e," not defined for chain ").concat(this.chainName()))},t.prototype._isSupportedHardfork=function(e){var t,r;if(!(this._supportedHardforks.length>0))return!0;try{for(var n=c(this._supportedHardforks),a=n.next();!a.done;a=n.next()){var i=a.value;if(e===i)return!0}}catch(o){t={error:o}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.setEIPs=function(e){var t,r,n=this;void 0===e&&(e=[]);var a=function(t){if(!(t in l.EIPs))throw new Error("".concat(t," not supported"));var r=i.gteHardfork(l.EIPs[t]["minimumHardfork"]);if(!r)throw new Error("".concat(t," cannot be activated on hardfork ").concat(i.hardfork(),", minimumHardfork: ").concat(r));l.EIPs[t].requiredEIPs&&l.EIPs[t].requiredEIPs.forEach((function(r){if(!e.includes(r)&&!n.isActivatedEIP(r))throw new Error("".concat(t," requires EIP ").concat(r,", but is not included in the EIP list"))}))},i=this;try{for(var o=c(e),f=o.next();!f.done;f=o.next()){var d=f.value;a(d)}}catch(s){t={error:s}}finally{try{f&&!f.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}this._eips=e},t.prototype.param=function(e,t){var r,n,a=null;try{for(var i=c(this._eips),o=i.next();!o.done;o=i.next()){var f=o.value;if(a=this.paramByEIP(e,t,f),null!==a)return a}}catch(d){r={error:d}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this.paramByHardfork(e,t,this._hardfork)},t.prototype.paramByHardfork=function(e,t,r){var n,a,i,o;r=this._chooseHardfork(r);var f=null;try{for(var d=c(h.hardforks),s=d.next();!s.done;s=d.next()){var u=s.value;if("eips"in u[1]){var b=u[1]["eips"];try{for(var l=(i=void 0,c(b)),p=l.next();!p.done;p=l.next()){var x=p.value,m=this.paramByEIP(e,t,x);f=null!==m?m:f}}catch(v){i={error:v}}finally{try{p&&!p.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}else{if(!u[1][e])throw new Error("Topic ".concat(e," not defined"));void 0!==u[1][e][t]&&(f=u[1][e][t].v)}if(u[0]===r)break}}catch(g){n={error:g}}finally{try{s&&!s.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}return f},t.prototype.paramByEIP=function(e,t,r){if(!(r in l.EIPs))throw new Error("".concat(r," not supported"));var n=l.EIPs[r];if(!(e in n))throw new Error("Topic ".concat(e," not defined"));if(void 0===n[e][t])return null;var a=n[e][t].v;return a},t.prototype.paramByBlock=function(e,t,r){var n=this.activeHardforks(r),a=n[n.length-1]["name"];return this.paramByHardfork(e,t,a)},t.prototype.isActivatedEIP=function(e){var t,r;if(this.eips().includes(e))return!0;try{for(var n=c(h.hardforks),a=n.next();!a.done;a=n.next()){var i=a.value,o=i[1];if(this.gteHardfork(o["name"])&&"eips"in o&&o["eips"].includes(e))return!0}}catch(f){t={error:f}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.hardforkIsActiveOnBlock=function(e,t,r){var n;void 0===r&&(r={}),t=(0,u.toType)(t,u.TypeOutput.BN);var a=null!==(n=r.onlySupported)&&void 0!==n&&n;e=this._chooseHardfork(e,a);var i=this.hardforkBlockBN(e);return!(!i||!t.gte(i))},t.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},t.prototype.hardforkGteHardfork=function(e,t,r){var n,a;void 0===r&&(r={});var i,o=void 0!==r.onlyActive&&r.onlyActive;e=this._chooseHardfork(e,r.onlySupported),i=o?this.activeHardforks(null,r):this.hardforks();var f=-1,d=-1,s=0;try{for(var u=c(i),b=u.next();!b.done;b=u.next()){var h=b.value;h["name"]===e&&(f=s),h["name"]===t&&(d=s),s+=1}}catch(l){n={error:l}}finally{try{b&&!b.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}return f>=d&&-1!==d},t.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},t.prototype.hardforkIsActiveOnChain=function(e,t){var r,n,a;void 0===t&&(t={});var i=null!==(a=t.onlySupported)&&void 0!==a&&a;e=this._chooseHardfork(e,i);try{for(var o=c(this.hardforks()),f=o.next();!f.done;f=o.next()){var d=f.value;if(d["name"]===e&&null!==d["block"])return!0}}catch(s){r={error:s}}finally{try{f&&!f.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1},t.prototype.activeHardforks=function(e,t){var r,n;void 0===t&&(t={});var a=[],i=this.hardforks();try{for(var o=c(i),f=o.next();!f.done;f=o.next()){var d=f.value;if(null!==d["block"]){if(void 0!==e&&null!==e&&e0)return r[r.length-1]["name"];throw new Error("No (supported) active hardfork found")},t.prototype.hardforkBlock=function(e){var t=this.hardforkBlockBN(e);return(0,u.toType)(t,u.TypeOutput.Number)},t.prototype.hardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e)["block"];return void 0===t||null===t?null:new u.BN(t)},t.prototype.hardforkTD=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e)["td"];return void 0===t||null===t?null:new u.BN(t)},t.prototype.isHardforkBlock=function(e,t){e=(0,u.toType)(e,u.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.hardforkBlockBN(t);return!!r&&r.eq(e)},t.prototype.nextHardforkBlock=function(e){var t=this.nextHardforkBlockBN(e);return(0,u.toType)(t,u.TypeOutput.Number)},t.prototype.nextHardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this.hardforkBlockBN(e);if(null===t)return null;var r=this.hardforks().reduce((function(e,r){var n=new u.BN(r.block);return n.gt(t)&&null===e?n:e}),null);return r},t.prototype.isNextHardforkBlock=function(e,t){e=(0,u.toType)(e,u.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.nextHardforkBlockBN(t);return null!==r&&r.eq(e)},t.prototype._calcForkHash=function(e){var t,r,a=n.from(this.genesis().hash.substr(2),"hex"),i=n.alloc(0),o=0;try{for(var f=c(this.hardforks()),d=f.next();!d.done;d=f.next()){var b=d.value,h=b.block;if(0!==h&&null!==h&&h!==o){var l=n.from(h.toString(16).padStart(16,"0"),"hex");i=n.concat([i,l])}if(b.name===e)break;null!==h&&(o=h)}}catch(m){t={error:m}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}var p=n.concat([a,i]),x=(0,u.intToBuffer)((0,s.buf)(p)>>>0).toString("hex");return"0x".concat(x)},t.prototype.forkHash=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e);if(null===t["block"]&&void 0===t["td"]){var r="No fork hash calculation possible for future hardfork";throw new Error(r)}return void 0!==t["forkHash"]?t["forkHash"]:this._calcForkHash(e)},t.prototype.hardforkForForkHash=function(e){var t=this.hardforks().filter((function(t){return t.forkHash===e}));return t.length>=1?t[t.length-1]:null},t.prototype.genesis=function(){return this._chainParams["genesis"]},t.prototype.genesisState=function(){var e,t;switch(this.chainName()){case"mainnet":return r(31617);case"ropsten":return r(53712);case"rinkeby":return r(3023);case"kovan":return r(28777);case"goerli":return r(15382);case"sepolia":return r(81847)}if(this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0]))try{for(var n=c(this._customChains),a=n.next();!a.done;a=n.next()){var i=a.value;if(i[0].name===this.chainName())return i[1]}}catch(o){e={error:o}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return{}},t.prototype.hardforks=function(){return this._chainParams["hardforks"]},t.prototype.bootstrapNodes=function(){return this._chainParams["bootstrapNodes"]},t.prototype.dnsNetworks=function(){return this._chainParams["dnsNetworks"]},t.prototype.hardfork=function(){return this._hardfork},t.prototype.chainId=function(){return(0,u.toType)(this.chainIdBN(),u.TypeOutput.Number)},t.prototype.chainIdBN=function(){return new u.BN(this._chainParams["chainId"])},t.prototype.chainName=function(){return this._chainParams["name"]},t.prototype.networkId=function(){return(0,u.toType)(this.networkIdBN(),u.TypeOutput.Number)},t.prototype.networkIdBN=function(){return new u.BN(this._chainParams["networkId"])},t.prototype.eips=function(){return this._eips},t.prototype.consensusType=function(){var e,t,r,n=this.hardfork();try{for(var a=c(h.hardforks),i=a.next();!i.done;i=a.next()){var o=i.value;if("consensus"in o[1]&&(r=o[1]["consensus"]["type"]),o[0]===n)break}}catch(f){e={error:f}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return r||this._chainParams["consensus"]["type"]},t.prototype.consensusAlgorithm=function(){var e,t,r,n=this.hardfork();try{for(var a=c(h.hardforks),i=a.next();!i.done;i=a.next()){var o=i.value;if("consensus"in o[1]&&(r=o[1]["consensus"]["algorithm"]),o[0]===n)break}}catch(f){e={error:f}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return r||this._chainParams["consensus"]["algorithm"]},t.prototype.consensusConfig=function(){var e,t,r,n=this.hardfork();try{for(var a=c(h.hardforks),i=a.next();!i.done;i=a.next()){var o=i.value;if("consensus"in o[1]&&(r=o[1]["consensus"][o[1]["consensus"]["algorithm"]]),o[0]===n)break}}catch(d){e={error:d}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}if(r)return r;var f=this.consensusAlgorithm();return this._chainParams["consensus"][f]},t.prototype.copy=function(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this)},t}(d.EventEmitter);t["default"]=p},30302:function(e,t,r){e=r.nmd(e),r(21703),function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var c;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{c="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(62859).Buffer}catch(P){}function o(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function f(e,t,r){var n=o(e,r);return r-1>=t&&(n|=o(e,r-1)<<4),n}function d(e,t,r,a){for(var i=0,c=0,o=Math.min(e.length,r),f=t;f=49?d-49+10:d>=17?d-17+10:d,n(d>=0&&c0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&(a++,this.negative=1),a=0;a-=3)c=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=c<>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=f(e,t,n)<=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8;else{var o=e.length-t;for(n=o%2===0?t+1:t;n=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8}this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,c=i%n,o=Math.min(i,i-c)+r,f=0,s=r;s1&&0===this.words[this.length-1])this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(P){i.prototype.inspect=u}else i.prototype.inspect=u;function u(){return(this.red?""}var b=["","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];i.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var a=0,i=0,c=0;c>>24-a&16777215,r=0!==i||c!==this.length-1?b[6-f.length]+f+r:f+r,a+=2,a>=26&&(a-=26,c--)}0!==i&&(r=i.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=h[e],s=l[e];r="";var u=this.clone();u.negative=0;while(!u.isZero()){var p=u.modrn(s).toString(e);u=u.idivn(s),r=u.isZero()?p+r:b[d-p.length]+p+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},c&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(c,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var p=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};function x(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],c=a*i,o=67108863&c,f=c/67108864|0;r.words[0]=o;for(var d=1;d>>26,u=67108863&f,b=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=b;h++){var l=d-h|0;a=0|e.words[l],i=0|t.words[h],c=a*i+u,s+=c/67108864|0,u=67108863&c}r.words[d]=0|u,f=0|s}return 0!==f?r.words[d]=0|f:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var c=p(e,i),o="le"===t?"LE":"BE";return this["_toArrayLike"+o](c,a),c},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=c>>>24,i+=2)}if(r=0&&(e[r--]=c>>8&255),r>=0&&(e[r--]=c>>16&255),6===i?(r>=0&&(e[r--]=c>>24&255),n=0,i=0):(n=c>>>24,i+=2)}if(r>=0){e[r--]=n;while(r>=0)e[r--]=0}},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,c=0;c>26,this.words[c]=67108863&t;for(;0!==i&&c>26,this.words[c]=67108863&t;if(0===i&&c>>13,h=0|c[1],l=8191&h,p=h>>>13,x=0|c[2],m=8191&x,v=x>>>13,g=0|c[3],y=8191&g,w=g>>>13,_=0|c[4],M=8191&_,k=_>>>13,A=0|c[5],E=8191&A,S=A>>>13,T=0|c[6],C=8191&T,P=T>>>13,O=0|c[7],R=8191&O,I=O>>>13,B=0|c[8],L=8191&B,N=B>>>13,U=0|c[9],j=8191&U,D=U>>>13,F=0|o[0],H=8191&F,q=F>>>13,z=0|o[1],K=8191&z,$=z>>>13,G=0|o[2],V=8191&G,W=G>>>13,Z=0|o[3],J=8191&Z,Y=Z>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ae=0|o[6],ie=8191&ae,ce=ae>>>13,oe=0|o[7],fe=8191&oe,de=oe>>>13,se=0|o[8],ue=8191&se,be=se>>>13,he=0|o[9],le=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(u,H),a=Math.imul(u,q),a=a+Math.imul(b,H)|0,i=Math.imul(b,q);var xe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(l,H),a=Math.imul(l,q),a=a+Math.imul(p,H)|0,i=Math.imul(p,q),n=n+Math.imul(u,K)|0,a=a+Math.imul(u,$)|0,a=a+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0;var me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,H),a=Math.imul(m,q),a=a+Math.imul(v,H)|0,i=Math.imul(v,q),n=n+Math.imul(l,K)|0,a=a+Math.imul(l,$)|0,a=a+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(u,V)|0,a=a+Math.imul(u,W)|0,a=a+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ve=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(y,H),a=Math.imul(y,q),a=a+Math.imul(w,H)|0,i=Math.imul(w,q),n=n+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(l,V)|0,a=a+Math.imul(l,W)|0,a=a+Math.imul(p,V)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(u,J)|0,a=a+Math.imul(u,Y)|0,a=a+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ge=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(M,H),a=Math.imul(M,q),a=a+Math.imul(k,H)|0,i=Math.imul(k,q),n=n+Math.imul(y,K)|0,a=a+Math.imul(y,$)|0,a=a+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,n=n+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0,a=a+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,n=n+Math.imul(u,Q)|0,a=a+Math.imul(u,ee)|0,a=a+Math.imul(b,Q)|0,i=i+Math.imul(b,ee)|0;var ye=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,H),a=Math.imul(E,q),a=a+Math.imul(S,H)|0,i=Math.imul(S,q),n=n+Math.imul(M,K)|0,a=a+Math.imul(M,$)|0,a=a+Math.imul(k,K)|0,i=i+Math.imul(k,$)|0,n=n+Math.imul(y,V)|0,a=a+Math.imul(y,W)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,a=a+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,n=n+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0,a=a+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(u,re)|0,a=a+Math.imul(u,ne)|0,a=a+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var we=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,H),a=Math.imul(C,q),a=a+Math.imul(P,H)|0,i=Math.imul(P,q),n=n+Math.imul(E,K)|0,a=a+Math.imul(E,$)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(M,V)|0,a=a+Math.imul(M,W)|0,a=a+Math.imul(k,V)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,a=a+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,n=n+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,a=a+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0,a=a+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(u,ie)|0,a=a+Math.imul(u,ce)|0,a=a+Math.imul(b,ie)|0,i=i+Math.imul(b,ce)|0;var _e=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,H),a=Math.imul(R,q),a=a+Math.imul(I,H)|0,i=Math.imul(I,q),n=n+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,a=a+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,n=n+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,a=a+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,a=a+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,a=a+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,a=a+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(l,ie)|0,a=a+Math.imul(l,ce)|0,a=a+Math.imul(p,ie)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(u,fe)|0,a=a+Math.imul(u,de)|0,a=a+Math.imul(b,fe)|0,i=i+Math.imul(b,de)|0;var Me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,H),a=Math.imul(L,q),a=a+Math.imul(N,H)|0,i=Math.imul(N,q),n=n+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,a=a+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(C,V)|0,a=a+Math.imul(C,W)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(E,J)|0,a=a+Math.imul(E,Y)|0,a=a+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,n=n+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,a=a+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,a=a+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(m,ie)|0,a=a+Math.imul(m,ce)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(l,fe)|0,a=a+Math.imul(l,de)|0,a=a+Math.imul(p,fe)|0,i=i+Math.imul(p,de)|0,n=n+Math.imul(u,ue)|0,a=a+Math.imul(u,be)|0,a=a+Math.imul(b,ue)|0,i=i+Math.imul(b,be)|0;var ke=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,H),a=Math.imul(j,q),a=a+Math.imul(D,H)|0,i=Math.imul(D,q),n=n+Math.imul(L,K)|0,a=a+Math.imul(L,$)|0,a=a+Math.imul(N,K)|0,i=i+Math.imul(N,$)|0,n=n+Math.imul(R,V)|0,a=a+Math.imul(R,W)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(C,J)|0,a=a+Math.imul(C,Y)|0,a=a+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,n=n+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,a=a+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,a=a+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(y,ie)|0,a=a+Math.imul(y,ce)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(v,de)|0,n=n+Math.imul(l,ue)|0,a=a+Math.imul(l,be)|0,a=a+Math.imul(p,ue)|0,i=i+Math.imul(p,be)|0,n=n+Math.imul(u,le)|0,a=a+Math.imul(u,pe)|0,a=a+Math.imul(b,le)|0,i=i+Math.imul(b,pe)|0;var Ae=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),a=Math.imul(j,$),a=a+Math.imul(D,K)|0,i=Math.imul(D,$),n=n+Math.imul(L,V)|0,a=a+Math.imul(L,W)|0,a=a+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,n=n+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,a=a+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,a=a+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,a=a+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(M,ie)|0,a=a+Math.imul(M,ce)|0,a=a+Math.imul(k,ie)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(m,ue)|0,a=a+Math.imul(m,be)|0,a=a+Math.imul(v,ue)|0,i=i+Math.imul(v,be)|0,n=n+Math.imul(l,le)|0,a=a+Math.imul(l,pe)|0,a=a+Math.imul(p,le)|0,i=i+Math.imul(p,pe)|0;var Ee=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),a=Math.imul(j,W),a=a+Math.imul(D,V)|0,i=Math.imul(D,W),n=n+Math.imul(L,J)|0,a=a+Math.imul(L,Y)|0,a=a+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,n=n+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,a=a+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,a=a+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(E,ie)|0,a=a+Math.imul(E,ce)|0,a=a+Math.imul(S,ie)|0,i=i+Math.imul(S,ce)|0,n=n+Math.imul(M,fe)|0,a=a+Math.imul(M,de)|0,a=a+Math.imul(k,fe)|0,i=i+Math.imul(k,de)|0,n=n+Math.imul(y,ue)|0,a=a+Math.imul(y,be)|0,a=a+Math.imul(w,ue)|0,i=i+Math.imul(w,be)|0,n=n+Math.imul(m,le)|0,a=a+Math.imul(m,pe)|0,a=a+Math.imul(v,le)|0,i=i+Math.imul(v,pe)|0;var Se=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,J),a=Math.imul(j,Y),a=a+Math.imul(D,J)|0,i=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,a=a+Math.imul(N,Q)|0,i=i+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,a=a+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(C,ie)|0,a=a+Math.imul(C,ce)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,a=a+Math.imul(E,de)|0,a=a+Math.imul(S,fe)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(M,ue)|0,a=a+Math.imul(M,be)|0,a=a+Math.imul(k,ue)|0,i=i+Math.imul(k,be)|0,n=n+Math.imul(y,le)|0,a=a+Math.imul(y,pe)|0,a=a+Math.imul(w,le)|0,i=i+Math.imul(w,pe)|0;var Te=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Q),a=Math.imul(j,ee),a=a+Math.imul(D,Q)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,a=a+Math.imul(L,ne)|0,a=a+Math.imul(N,re)|0,i=i+Math.imul(N,ne)|0,n=n+Math.imul(R,ie)|0,a=a+Math.imul(R,ce)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(I,ce)|0,n=n+Math.imul(C,fe)|0,a=a+Math.imul(C,de)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(P,de)|0,n=n+Math.imul(E,ue)|0,a=a+Math.imul(E,be)|0,a=a+Math.imul(S,ue)|0,i=i+Math.imul(S,be)|0,n=n+Math.imul(M,le)|0,a=a+Math.imul(M,pe)|0,a=a+Math.imul(k,le)|0,i=i+Math.imul(k,pe)|0;var Ce=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),a=Math.imul(j,ne),a=a+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,a=a+Math.imul(L,ce)|0,a=a+Math.imul(N,ie)|0,i=i+Math.imul(N,ce)|0,n=n+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(I,de)|0,n=n+Math.imul(C,ue)|0,a=a+Math.imul(C,be)|0,a=a+Math.imul(P,ue)|0,i=i+Math.imul(P,be)|0,n=n+Math.imul(E,le)|0,a=a+Math.imul(E,pe)|0,a=a+Math.imul(S,le)|0,i=i+Math.imul(S,pe)|0;var Pe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,ie),a=Math.imul(j,ce),a=a+Math.imul(D,ie)|0,i=Math.imul(D,ce),n=n+Math.imul(L,fe)|0,a=a+Math.imul(L,de)|0,a=a+Math.imul(N,fe)|0,i=i+Math.imul(N,de)|0,n=n+Math.imul(R,ue)|0,a=a+Math.imul(R,be)|0,a=a+Math.imul(I,ue)|0,i=i+Math.imul(I,be)|0,n=n+Math.imul(C,le)|0,a=a+Math.imul(C,pe)|0,a=a+Math.imul(P,le)|0,i=i+Math.imul(P,pe)|0;var Oe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,fe),a=Math.imul(j,de),a=a+Math.imul(D,fe)|0,i=Math.imul(D,de),n=n+Math.imul(L,ue)|0,a=a+Math.imul(L,be)|0,a=a+Math.imul(N,ue)|0,i=i+Math.imul(N,be)|0,n=n+Math.imul(R,le)|0,a=a+Math.imul(R,pe)|0,a=a+Math.imul(I,le)|0,i=i+Math.imul(I,pe)|0;var Re=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,ue),a=Math.imul(j,be),a=a+Math.imul(D,ue)|0,i=Math.imul(D,be),n=n+Math.imul(L,le)|0,a=a+Math.imul(L,pe)|0,a=a+Math.imul(N,le)|0,i=i+Math.imul(N,pe)|0;var Ie=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,le),a=Math.imul(j,pe),a=a+Math.imul(D,le)|0,i=Math.imul(D,pe);var Be=(d+n|0)+((8191&a)<<13)|0;return d=(i+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=xe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=we,f[6]=_e,f[7]=Me,f[8]=ke,f[9]=Ae,f[10]=Ee,f[11]=Se,f[12]=Te,f[13]=Ce,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ie,f[18]=Be,0!==d&&(f[19]=d,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0,a+=c>>>26,c&=67108863}r.words[i]=o,n=c,c=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function y(e,t,r){return g(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(v=m),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?v(this,e,t):n<63?m(this,e,t):n<1024?g(this,e,t):y(this,e,t),r},w.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},w.prototype.permute=function(e,t,r,n,a,i){for(var c=0;c>>=1)a++;return 1<>>=13,r[2*c+1]=8191&i,i>>>=13;for(c=2*t;c>=26,r+=i/67108864|0,r+=c>>>26,this.words[a]=67108863&c}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=x(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var c=0;for(t=0;t>>26-r}c&&(this.words[t]=c,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,c=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<c)for(this.length-=c,d=0;d=0&&(0!==s||d>=a);d--){var u=0|this.words[d];this.words[d]=s<<26-i|u>>>i,s=u&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===o)return this._strip();for(n(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),a=e,c=0|a.words[a.length-1],o=this._countBits(c);r=26-o,0!==r&&(a=a.ushln(r),n.iushln(r),c=0|a.words[a.length-1]);var f,d=n.length-a.length;if("mod"!==t){f=new i(null),f.length=d+1,f.words=new Array(f.length);for(var s=0;s=0;b--){var h=67108864*(0|n.words[a.length+b])+(0|n.words[a.length+b-1]);h=Math.min(h/c|0,67108863),n._ishlnsubmul(a,h,b);while(0!==n.negative)h--,n.negative=0,n._ishlnsubmul(a,1,b),n.isZero()||(n.negative^=1);f&&(f.words[b]=h)}return f&&f._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.iadd(e)),{div:a,mod:c}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.isub(e)),{div:o.div,mod:c}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,c,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a=new i(1),c=new i(0),o=new i(0),f=new i(1),d=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++d;var s=r.clone(),u=t.clone();while(!t.isZero()){for(var b=0,h=1;0===(t.words[0]&h)&&b<26;++b,h<<=1);if(b>0){t.iushrn(b);while(b-- >0)(a.isOdd()||c.isOdd())&&(a.iadd(s),c.isub(u)),a.iushrn(1),c.iushrn(1)}for(var l=0,p=1;0===(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(u)),o.iushrn(1),f.iushrn(1)}t.cmp(r)>=0?(t.isub(r),a.isub(o),c.isub(f)):(r.isub(t),o.isub(a),f.isub(c))}return{a:o,b:f,gcd:r.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a,c=new i(1),o=new i(0),f=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var d=0,s=1;0===(t.words[0]&s)&&d<26;++d,s<<=1);if(d>0){t.iushrn(d);while(d-- >0)c.isOdd()&&c.iadd(f),c.iushrn(1)}for(var u=0,b=1;0===(r.words[0]&b)&&u<26;++u,b<<=1);if(u>0){r.iushrn(u);while(u-- >0)o.isOdd()&&o.iadd(f),o.iushrn(1)}t.cmp(r)>=0?(t.isub(r),c.isub(o)):(r.isub(t),o.isub(c))}return a=0===t.cmpn(1)?c:o,a.cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[c]=o}return 0!==i&&(this.words[c]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new T(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function M(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){M.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){M.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){M.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){M.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},M.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},M.prototype.split=function(e,t){e.iushrn(this.n,0,t)},M.prototype.imulK=function(e){return e.imul(this.k)},a(k,M),k.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=c}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new A;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return _[e]=t,t},T.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(s(e,e.umod(this.m)._forceRed(this)),e)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}var a=this.m.subn(1),c=0;while(!a.isZero()&&0===a.andln(1))c++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),f=o.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();s=new i(2*s*s).toRed(this);while(0!==this.pow(s,d).cmp(f))s.redIAdd(f);var u=this.pow(s,a),b=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),l=c;while(0!==h.cmp(o)){for(var p=h,x=0;0!==p.cmp(o);x++)p=p.redSqr();n(x=0;a--){for(var s=t.words[a],u=d-1;u>=0;u--){var b=s>>u&1;c!==n[0]&&(c=this.sqr(c)),0!==b||0!==o?(o<<=1,o|=b,f++,(f===r||0===a&&0===u)&&(c=this.mul(c,n[o]),f=0,o=0)):f=0}d=26}return c},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new C(e)},a(C,T),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),c=a;return a.cmp(this.m)>=0?c=a.isub(this.m):a.cmpn(0)<0&&(c=a.iadd(this.m)),c._forceRed(this)},C.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}(e,this)},6151:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703);var a=this&&this.__read||function(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),c=[];try{while((void 0===t||t-- >0)&&!(n=i.next()).done)c.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(a)throw a.error}}return c},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var c=i(r(57973)),o=r(36799),f=r(52010),d=r(16261),s=r(77002),u=r(80233),b=r(40032),h=r(26768),l=r(28651),p=function(){function e(e,t,r,n){void 0===e&&(e=new o.BN(0)),void 0===t&&(t=new o.BN(0)),void 0===r&&(r=s.KECCAK256_RLP),void 0===n&&(n=s.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,a=t.stateRoot,i=t.codeHash;return new e(r?new o.BN((0,u.toBuffer)(r)):void 0,n?new o.BN((0,u.toBuffer)(n)):void 0,a?(0,u.toBuffer)(a):void 0,i?(0,u.toBuffer)(i):void 0)},e.fromRlpSerializedAccount=function(e){var t=o.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=a(t,4),n=r[0],i=r[1],c=r[2],f=r[3];return new e(new o.BN(n),new o.BN(i),c,f)},e.prototype._validate=function(){if(this.nonce.lt(new o.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new o.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")},e.prototype.raw=function(){return[(0,l.bnToUnpaddedBuffer)(this.nonce),(0,l.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return o.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(s.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(s.KECCAK256_NULL)},e}();t.Account=p;var x=function(e){try{(0,h.assertIsString)(e)}catch(t){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};t.isValidAddress=x;var m=function(e,t){(0,h.assertIsHexString)(e);var r=(0,d.stripHexPrefix)(e).toLowerCase(),n="";if(t){var a=(0,l.toType)(t,l.TypeOutput.BN);n=a.toString()+"0x"}for(var i=(0,b.keccakFromString)(n+r).toString("hex"),c="0x",o=0;o=8?c+=r[o].toUpperCase():c+=r[o];return c};t.toChecksumAddress=m;var v=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e};t.isValidChecksumAddress=v;var g=function(e,t){(0,h.assertIsBuffer)(e),(0,h.assertIsBuffer)(t);var r=new o.BN(t);return r.isZero()?(0,b.rlphash)([e,null]).slice(-20):(0,b.rlphash)([e,n.from(r.toArray())]).slice(-20)};t.generateAddress=g;var y=function(e,t,r){(0,h.assertIsBuffer)(e),(0,h.assertIsBuffer)(t),(0,h.assertIsBuffer)(r),(0,c.default)(20===e.length),(0,c.default)(32===t.length);var a=(0,b.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,b.keccak256)(r)]));return a.slice(-20)};t.generateAddress2=y;var w=function(e){return(0,f.privateKeyVerify)(e)};t.isValidPrivate=w;var _=function(e,t){return void 0===t&&(t=!1),(0,h.assertIsBuffer)(e),64===e.length?(0,f.publicKeyVerify)(n.concat([n.from([4]),e])):!!t&&(0,f.publicKeyVerify)(e)};t.isValidPublic=_;var M=function(e,t){return void 0===t&&(t=!1),(0,h.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from((0,f.publicKeyConvert)(e,!1).slice(1))),(0,c.default)(64===e.length),(0,b.keccak)(e).slice(-20)};t.pubToAddress=M,t.publicToAddress=t.pubToAddress;var k=function(e){return(0,h.assertIsBuffer)(e),n.from((0,f.publicKeyCreate)(e,!1)).slice(1)};t.privateToPublic=k;var A=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))};t.privateToAddress=A;var E=function(e){return(0,h.assertIsBuffer)(e),64!==e.length&&(e=n.from((0,f.publicKeyConvert)(e,!1).slice(1))),e};t.importPublic=E;var S=function(){var e=20,t=(0,u.zeros)(e);return(0,u.bufferToHex)(t)};t.zeroAddress=S;var T=function(e){try{(0,h.assertIsString)(e)}catch(n){return!1}var r=(0,t.zeroAddress)();return r===e};t.isZeroAddress=T},96607:function(e,t,r){"use strict";var n=r(15361)["Buffer"],a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var i=a(r(57973)),c=r(36799),o=r(80233),f=r(6151),d=function(){function e(e){(0,i.default)(20===e.length,"Invalid address length"),this.buf=e}return e.zero=function(){return new e((0,o.zeros)(20))},e.fromString=function(t){return(0,i.default)((0,f.isValidAddress)(t),"Invalid address"),new e((0,o.toBuffer)(t))},e.fromPublicKey=function(t){(0,i.default)(n.isBuffer(t),"Public key should be Buffer");var r=(0,f.pubToAddress)(t);return new e(r)},e.fromPrivateKey=function(t){(0,i.default)(n.isBuffer(t),"Private key should be Buffer");var r=(0,f.privateToAddress)(t);return new e(r)},e.generate=function(t,r){return(0,i.default)(c.BN.isBN(r)),new e((0,f.generateAddress)(t.buf,r.toArrayLike(n)))},e.generate2=function(t,r,a){return(0,i.default)(n.isBuffer(r)),(0,i.default)(n.isBuffer(a)),new e((0,f.generateAddress2)(t.buf,r,a))},e.prototype.equals=function(e){return this.buf.equals(e.buf)},e.prototype.isZero=function(){return this.equals(e.zero())},e.prototype.isPrecompileOrSystemAddress=function(){var e=new c.BN(this.buf),t=new c.BN(0),r=new c.BN("ffff","hex");return e.gte(t)&&e.lte(r)},e.prototype.toString=function(){return"0x"+this.buf.toString("hex")},e.prototype.toBuffer=function(){return n.from(this.buf)},e}();t.Address=d},80233:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),r(48675),r(3462);var a=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),c=[];try{while((void 0===t||t-- >0)&&!(n=i.next()).done)c.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(a)throw a.error}}return c};Object.defineProperty(t,"__esModule",{value:!0}),t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var c=r(36799),o=r(16261),f=r(26768),d=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))};t.intToHex=d;var s=function(e){var r=(0,t.intToHex)(e);return n.from((0,o.padToEven)(r.slice(2)),"hex")};t.intToBuffer=s;var u=function(e){return n.allocUnsafe(e).fill(0)};t.zeros=u;var b=function(e,r,n){var a=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString())e=e.slice(1),t=e[0];return e},x=function(e){return(0,f.assertIsBuffer)(e),p(e)};t.unpadBuffer=x;var m=function(e){return(0,f.assertIsArray)(e),p(e)};t.unpadArray=m;var v=function(e){return(0,f.assertIsHexString)(e),e=(0,o.stripHexPrefix)(e),p(e)};t.unpadHexString=v;var g=function(e){if(null===e||void 0===e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"===typeof e){if(!(0,o.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return n.from((0,o.padToEven)((0,o.stripHexPrefix)(e)),"hex")}if("number"===typeof e)return(0,t.intToBuffer)(e);if(c.BN.isBN(e)){if(e.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(e));return e.toArrayLike(n)}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")};t.toBuffer=g;var y=function(e){return new c.BN((0,t.toBuffer)(e)).toNumber()};t.bufferToInt=y;var w=function(e){return e=(0,t.toBuffer)(e),"0x"+e.toString("hex")};t.bufferToHex=w;var _=function(e){return new c.BN(e).fromTwos(256)};t.fromSigned=_;var M=function(e){return n.from(e.toTwos(256).toArray())};t.toUnsigned=M;var k=function(e){return"string"!==typeof e||(0,o.isHexPrefixed)(e)?e:"0x"+e};t.addHexPrefix=k;var A=function(e){var t=/^(00)+|(00)+$/g;if(e=(0,o.stripHexPrefix)(e),e.length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");var r=n.from(e.replace(t,""),"hex");return r.toString("utf8")};t.toUtf8=A;var E=function(e){if(n.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var r=[],a=0;a0&&0===d[0])throw new Error("".concat(f," cannot have leading zeroes, received: ").concat(d.toString("hex")))}}catch(s){t={error:s}}finally{try{c&&!c.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}};function T(e){return Array.isArray(e)?e.map((function(e){return T(e)})):n.from(e)}function C(e){return Array.isArray(e)?e.map((function(e){return C(e)})):Uint8Array.from(null!==e&&void 0!==e?e:[])}t.validateNoLeadingZeroes=S,t.arrToBufArr=T,t.bufArrToArr=C},77002:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(15361),a=r(36799);t.MAX_UINT64=new a.BN("ffffffffffffffff",16),t.MAX_INTEGER=new a.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new a.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex")},36799:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e["default"]=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var o=c(r(30302));t.BN=o.default;var f=i(r(98217));t.rlp=f},40032:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160FromArray=t.ripemd160FromString=t.ripemd160=t.sha256FromArray=t.sha256FromString=t.sha256=t.keccakFromArray=t.keccakFromHexString=t.keccakFromString=t.keccak256=t.keccak=void 0;var a=r(92802),i=r(65443),c=r(36799),o=r(80233),f=r(26768),d=function(e,t){switch(void 0===t&&(t=256),(0,f.assertIsBuffer)(e),t){case 224:return(0,a.keccak224)(e);case 256:return(0,a.keccak256)(e);case 384:return(0,a.keccak384)(e);case 512:return(0,a.keccak512)(e);default:throw new Error("Invald algorithm: keccak".concat(t))}};t.keccak=d;var s=function(e){return(0,t.keccak)(e)};t.keccak256=s;var u=function(e,r){void 0===r&&(r=256),(0,f.assertIsString)(e);var a=n.from(e,"utf8");return(0,t.keccak)(a,r)};t.keccakFromString=u;var b=function(e,r){return void 0===r&&(r=256),(0,f.assertIsHexString)(e),(0,t.keccak)((0,o.toBuffer)(e),r)};t.keccakFromHexString=b;var h=function(e,r){return void 0===r&&(r=256),(0,f.assertIsArray)(e),(0,t.keccak)((0,o.toBuffer)(e),r)};t.keccakFromArray=h;var l=function(e){return e=(0,o.toBuffer)(e),i("sha256").update(e).digest()},p=function(e){return(0,f.assertIsBuffer)(e),l(e)};t.sha256=p;var x=function(e){return(0,f.assertIsString)(e),l(e)};t.sha256FromString=x;var m=function(e){return(0,f.assertIsArray)(e),l(e)};t.sha256FromArray=m;var v=function(e,t){e=(0,o.toBuffer)(e);var r=i("rmd160").update(e).digest();return!0===t?(0,o.setLengthLeft)(r,32):r},g=function(e,t){return(0,f.assertIsBuffer)(e),v(e,t)};t.ripemd160=g;var y=function(e,t){return(0,f.assertIsString)(e),v(e,t)};t.ripemd160FromString=y;var w=function(e,t){return(0,f.assertIsArray)(e),v(e,t)};t.ripemd160FromArray=w;var _=function(e){return(0,t.keccak)(c.rlp.encode(e))};t.rlphash=_},26768:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var a=r(16261),i=function(e){if(!(0,a.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}};t.assertIsHexString=i;var c=function(e){if(!n.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}};t.assertIsBuffer=c;var o=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}};t.assertIsArray=o;var f=function(e){if("string"!==typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}};t.assertIsString=f},64466:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,a(r(77002),t),a(r(6151),t),a(r(96607),t),a(r(40032),t),a(r(43292),t),a(r(80233),t),a(r(2364),t),a(r(36799),t),a(r(28651),t);var i=r(16261);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return i.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return i.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return i.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return i.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return i.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return i.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return i.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return i.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return i.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return i.isHexString}})},16261:function(e,t,r){"use strict";var n=r(15361)["Buffer"];function a(e){if("string"!==typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat(typeof e));return"0"===e[0]&&"x"===e[1]}r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=a;var i=function(e){if("string"!==typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat(typeof e));return a(e)?e.slice(2):e};function c(e){var t=e;if("string"!==typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat(typeof t));return t.length%2&&(t="0".concat(t)),t}function o(e){if("string"!==typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat(typeof e));return n.byteLength(e,"utf8")}function f(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat(typeof e,"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat(typeof t,"'"));return t[r?"some":"every"]((function(t){return e.indexOf(t)>=0}))}function d(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r=a.length,"The field ".concat(t.name," must not have more ").concat(t.length," bytes"))):t.allowZero&&0===a.length||!t.length||(0,i.default)(t.length===a.length,"The field ".concat(t.name," must have byte length of ").concat(t.length)),e.raw[r]=a}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:a,set:c}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:c,get:a})})),r)if("string"===typeof r&&(r=n.from((0,c.stripHexPrefix)(r),"hex")),n.isBuffer(r)&&(r=o.rlp.decode(r)),Array.isArray(r)){if(r.length>e._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(t,r){e[e._fields[r]]=(0,f.toBuffer)(t)}))}else{if("object"!==typeof r)throw new Error("invalid data");var a=Object.keys(r);t.forEach((function(t){-1!==a.indexOf(t.name)&&(e[t.name]=r[t.name]),-1!==a.indexOf(t.alias)&&(e[t.alias]=r[t.alias])}))}};t.defineProperties=d},43292:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var a=r(52010),i=r(36799),c=r(80233),o=r(40032),f=r(26768),d=r(28651);function s(e,t,r){var i=(0,a.ecdsaSign)(e,t),c=i.signature,o=i.recid,f=n.from(c.slice(0,32)),s=n.from(c.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 u=r?o+(2*r+35):o+27;return{r:f,s:s,v:u}}var b=(0,d.toType)(r,d.TypeOutput.BN),h=b.muln(2).addn(35).addn(o).toArrayLike(n);return{r:f,s:s,v:h}}function u(e,t){var r=(0,d.toType)(e,d.TypeOutput.BN);if(!t)return r.subn(27);var n=(0,d.toType)(t,d.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function b(e){var t=new i.BN(e);return t.eqn(0)||t.eqn(1)}t.ecsign=s;var h=function(e,t,r,i,o){var f=n.concat([(0,c.setLengthLeft)(r,32),(0,c.setLengthLeft)(i,32)],64),d=u(t,o);if(!b(d))throw new Error("Invalid signature v value");var s=(0,a.ecdsaRecover)(f,d.toNumber(),e);return n.from((0,a.publicKeyConvert)(s,!1).slice(1))};t.ecrecover=h;var l=function(e,t,r,a){var i=u(e,a);if(!b(i))throw new Error("Invalid signature v value");return(0,c.bufferToHex)(n.concat([(0,c.setLengthLeft)(t,32),(0,c.setLengthLeft)(r,32),(0,c.toBuffer)(e)]))};t.toRpcSig=l;var p=function(e,t,r,a){var i=u(e,a);if(!b(i))throw new Error("Invalid signature v value");var o=(0,d.toType)(e,d.TypeOutput.Number),f=r;return(o>28&&o%2===1||1===o||28===o)&&(f=n.from(r),f[0]|=128),(0,c.bufferToHex)(n.concat([(0,c.setLengthLeft)(t,32),(0,c.setLengthLeft)(f,32)]))};t.toCompactSig=p;var x=function(e){var t,r,n,a=(0,c.toBuffer)(e);if(a.length>=65)t=a.slice(0,32),r=a.slice(32,64),n=(0,c.bufferToInt)(a.slice(64));else{if(64!==a.length)throw new Error("Invalid signature length");t=a.slice(0,32),r=a.slice(32,64),n=(0,c.bufferToInt)(a.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}};t.fromRpcSig=x;var m=function(e,t,r,n,a){void 0===n&&(n=!0);var c=new i.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new i.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!b(u(e,a)))return!1;var f=new i.BN(t),d=new i.BN(r);return!(f.isZero()||f.gt(o)||d.isZero()||d.gt(o))&&(!n||1!==d.cmp(c))};t.isValidSignature=m;var v=function(e){(0,f.assertIsBuffer)(e);var t=n.from("Ethereum Signed Message:\n".concat(e.length),"utf-8");return(0,o.keccak)(n.concat([t,e]))};t.hashPersonalMessage=v},28651:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var a,i=r(36799),c=r(16261),o=r(80233);function f(e){return"0x".concat(e.toString(16))}function d(e){return(0,o.unpadBuffer)(e.toArrayLike(n))}function s(e){return d(e)}function u(e,t){if(null===e)return null;if(void 0!==e){if("string"===typeof e&&!(0,c.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(e));if("number"===typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,o.toBuffer)(e);if(t===a.Buffer)return r;if(t===a.BN)return new i.BN(r);if(t===a.Number){var n=new i.BN(r),f=new i.BN(Number.MAX_SAFE_INTEGER.toString());if(n.gt(f))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"))}}t.bnToHex=f,t.bnToUnpaddedBuffer=d,t.bnToRlp=s,function(e){e[e["Number"]=0]="Number",e[e["BN"]=1]="BN",e[e["Buffer"]=2]="Buffer",e[e["PrefixedHexString"]=3]="PrefixedHexString"}(a=t.TypeOutput||(t.TypeOutput={})),t.toType=u},78193:function(e,t,r){"use strict";r(21703);var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e["default"]=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t},c=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),c=[];try{while((void 0===t||t-- >0)&&!(n=i.next()).done)c.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(a)throw a.error}}return c};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTransaction=void 0;var f=i(r(82099)),d=r(25327),s=r(98829),u=function(){function e(e){this.cache={hash:void 0,dataFee:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=f.Chain.Mainnet,this.DEFAULT_HARDFORK=f.Hardfork.Istanbul;var t=e.nonce,r=e.gasLimit,n=e.to,a=e.value,i=e.data,c=e.v,o=e.r,s=e.s,u=e.type;this._type=new d.BN((0,d.toBuffer)(u)).toNumber();var b=(0,d.toBuffer)(""===n?"0x":n),h=(0,d.toBuffer)(""===c?"0x":c),l=(0,d.toBuffer)(""===o?"0x":o),p=(0,d.toBuffer)(""===s?"0x":s);this.nonce=new d.BN((0,d.toBuffer)(""===t?"0x":t)),this.gasLimit=new d.BN((0,d.toBuffer)(""===r?"0x":r)),this.to=b.length>0?new d.Address(b):void 0,this.value=new d.BN((0,d.toBuffer)(""===a?"0x":a)),this.data=(0,d.toBuffer)(""===i?"0x":i),this.v=h.length>0?new d.BN(h):void 0,this.r=l.length>0?new d.BN(l):void 0,this.s=p.length>0?new d.BN(p):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0)}return Object.defineProperty(e.prototype,"transactionType",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e.prototype.supports=function(e){return this.activeCapabilities.includes(e)},e.prototype.validate=function(e){void 0===e&&(e=!1);var t=[];return this.getBaseFee().gt(this.gasLimit)&&t.push("gasLimit is too low. given ".concat(this.gasLimit,", need at least ").concat(this.getBaseFee())),this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),e?t:0===t.length},e.prototype.getBaseFee=function(){var e=this.getDataFee().addn(this.common.param("gasPrices","tx"));return this.common.gteHardfork("homestead")&&this.toCreationAddress()&&e.iaddn(this.common.param("gasPrices","txCreation")),e},e.prototype.getDataFee=function(){for(var e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero"),r=0,n=0;n-1&&this.activeCapabilities.splice(u,1)}return f},e.prototype._getCommon=function(e,t){var r;if(t){var n=new d.BN((0,d.toBuffer)(t));if(e){if(!e.chainIdBN().eq(n)){var a=this._errorMsg("The chain ID does not match the chain ID of Common");throw new Error(a)}return e.copy()}return f.default.isSupportedChainId(n)?new f.default({chain:n,hardfork:this.DEFAULT_HARDFORK}):f.default.forCustomChain(this.DEFAULT_CHAIN,{name:"custom-chain",networkId:n,chainId:n},this.DEFAULT_HARDFORK)}return null!==(r=null===e||void 0===e?void 0:e.copy())&&void 0!==r?r:new f.default({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})},e.prototype._validateCannotExceedMaxInteger=function(e,t,r){var n,a;void 0===t&&(t=256),void 0===r&&(r=!1);try{for(var i=c(Object.entries(e)),f=i.next();!f.done;f=i.next()){var s=o(f.value,2),u=s[0],b=s[1];switch(t){case 64:if(r){if(null===b||void 0===b?void 0:b.gte(d.MAX_UINT64)){var h=this._errorMsg("".concat(u," cannot equal or exceed MAX_UINT64 (2^64-1), given ").concat(b));throw new Error(h)}}else if(null===b||void 0===b?void 0:b.gt(d.MAX_UINT64)){h=this._errorMsg("".concat(u," cannot exceed MAX_UINT64 (2^64-1), given ").concat(b));throw new Error(h)}break;case 256:if(r){if(null===b||void 0===b?void 0:b.gte(d.MAX_INTEGER)){h=this._errorMsg("".concat(u," cannot equal or exceed MAX_INTEGER (2^256-1), given ").concat(b));throw new Error(h)}}else if(null===b||void 0===b?void 0:b.gt(d.MAX_INTEGER)){h=this._errorMsg("".concat(u," cannot exceed MAX_INTEGER (2^256-1), given ").concat(b));throw new Error(h)}break;default:h=this._errorMsg("unimplemented bits value");throw new Error(h)}}}catch(l){n={error:l}}finally{try{f&&!f.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}},e.prototype._getSharedErrorPostfix=function(){var e="";try{e=this.isSigned()?(0,d.bufferToHex)(this.hash()):"not available (unsigned)"}catch(a){e="error"}var t="";try{t=this.isSigned().toString()}catch(a){e="error"}var r="";try{r=this.common.hardfork()}catch(a){r="error"}var n="tx type=".concat(this.type," hash=").concat(e," nonce=").concat(this.nonce," value=").concat(this.value," ");return n+="signed=".concat(t," hf=").concat(r),n},e}();t.BaseTransaction=u},95887:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703);var a=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=i.next()).done)c.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(a)throw a.error}}return c};Object.defineProperty(t,"__esModule",{value:!0});var o=r(25327),f=r(78193),d=r(98829),s=r(56903),u=2,b=n.from(u.toString(16).padStart(2,"0"),"hex"),h=function(e){function t(t,r){var n,a;void 0===r&&(r={});var c=e.call(this,i(i({},t),{type:u}))||this;c.DEFAULT_HARDFORK="london";var f=t.chainId,b=t.accessList,h=t.maxFeePerGas,l=t.maxPriorityFeePerGas;if(c.common=c._getCommon(r.common,f),c.chainId=c.common.chainIdBN(),!c.common.isActivatedEIP(1559))throw new Error("EIP-1559 not enabled on Common");c.activeCapabilities=c.activeCapabilities.concat([1559,2718,2930]);var p=s.AccessLists.getAccessListData(null!==b&&void 0!==b?b:[]);if(c.accessList=p.accessList,c.AccessListJSON=p.AccessListJSON,s.AccessLists.verifyAccessList(c.accessList),c.maxFeePerGas=new o.BN((0,o.toBuffer)(""===h?"0x":h)),c.maxPriorityFeePerGas=new o.BN((0,o.toBuffer)(""===l?"0x":l)),c._validateCannotExceedMaxInteger({maxFeePerGas:c.maxFeePerGas,maxPriorityFeePerGas:c.maxPriorityFeePerGas}),c.gasLimit.mul(c.maxFeePerGas).gt(o.MAX_INTEGER)){var x=c._errorMsg("gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)");throw new Error(x)}if(c.maxFeePerGas.lt(c.maxPriorityFeePerGas)){x=c._errorMsg("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)");throw new Error(x)}if(c.v&&!c.v.eqn(0)&&!c.v.eqn(1)){x=c._errorMsg("The y-parity of the transaction should either be 0 or 1");throw new Error(x)}if(c.common.gteHardfork("homestead")&&(null===(n=c.s)||void 0===n?void 0:n.gt(d.N_DIV_2))){x=c._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(x)}var m=null===(a=null===r||void 0===r?void 0:r.freeze)||void 0===a||a;return m&&Object.freeze(c),c}return a(t,e),Object.defineProperty(t.prototype,"senderR",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"senderS",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yParity",{get:function(){return this.v},enumerable:!1,configurable:!0}),t.fromTxData=function(e,r){return void 0===r&&(r={}),new t(e,r)},t.fromSerializedTx=function(e,r){if(void 0===r&&(r={}),!e.slice(0,1).equals(b))throw new Error("Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: ".concat(u,", received: ").concat(e.slice(0,1).toString("hex")));var n=o.rlp.decode(e.slice(1));if(!Array.isArray(n))throw new Error("Invalid serialized tx input: must be array");return t.fromValuesArray(n,r)},t.fromRlpSerializedTx=function(e,r){return void 0===r&&(r={}),t.fromSerializedTx(e,r)},t.fromValuesArray=function(e,r){if(void 0===r&&(r={}),9!==e.length&&12!==e.length)throw new Error("Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).");var n=c(e,12),a=n[0],i=n[1],f=n[2],d=n[3],s=n[4],u=n[5],b=n[6],h=n[7],l=n[8],p=n[9],x=n[10],m=n[11];return(0,o.validateNoLeadingZeroes)({nonce:i,maxPriorityFeePerGas:f,maxFeePerGas:d,gasLimit:s,value:b,v:p,r:x,s:m}),new t({chainId:new o.BN(a),nonce:i,maxPriorityFeePerGas:f,maxFeePerGas:d,gasLimit:s,to:u,value:b,data:h,accessList:null!==l&&void 0!==l?l:[],v:void 0!==p?new o.BN(p):void 0,r:x,s:m},r)},t.prototype.getDataFee=function(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;var t=e.prototype.getDataFee.call(this);return t.iaddn(s.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t},t.prototype.getUpfrontCost=function(e){void 0===e&&(e=new o.BN(0));var t=o.BN.min(this.maxPriorityFeePerGas,this.maxFeePerGas.sub(e)),r=t.add(e);return this.gasLimit.mul(r).add(this.value)},t.prototype.raw=function(){return[(0,o.bnToUnpaddedBuffer)(this.chainId),(0,o.bnToUnpaddedBuffer)(this.nonce),(0,o.bnToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,o.bnToUnpaddedBuffer)(this.maxFeePerGas),(0,o.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,o.bnToUnpaddedBuffer)(this.v):n.from([]),void 0!==this.r?(0,o.bnToUnpaddedBuffer)(this.r):n.from([]),void 0!==this.s?(0,o.bnToUnpaddedBuffer)(this.s):n.from([])]},t.prototype.serialize=function(){var e=this.raw();return n.concat([b,o.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,9),r=n.concat([b,o.rlp.encode(t)]);return e?(0,o.keccak256)(r):r},t.prototype.hash=function(){if(!this.isSigned()){var e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,o.keccak256)(this.serialize())),this.cache.hash):(0,o.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned()){var t=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(t)}var r=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(d.N_DIV_2))){t=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(t)}var n=this,a=n.v,i=n.r,c=n.s;try{return(0,o.ecrecover)(r,a.addn(27),(0,o.bnToUnpaddedBuffer)(i),(0,o.bnToUnpaddedBuffer)(c))}catch(f){t=this._errorMsg("Invalid Signature");throw new Error(t)}},t.prototype._processSignature=function(e,r,n){var a={common:this.common};return t.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new o.BN(e-27),r:new o.BN(r),s:new o.BN(n)},a)},t.prototype.toJSON=function(){var e=s.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,o.bnToHex)(this.chainId),nonce:(0,o.bnToHex)(this.nonce),maxPriorityFeePerGas:(0,o.bnToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,o.bnToHex)(this.maxFeePerGas),gasLimit:(0,o.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,o.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bnToHex)(this.s):void 0}},t.prototype.errorStr=function(){var e=this._getSharedErrorPostfix();return e+=" maxFeePerGas=".concat(this.maxFeePerGas," maxPriorityFeePerGas=").concat(this.maxPriorityFeePerGas),e},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(f.BaseTransaction);t["default"]=h},17562:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703);var a=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=i.next()).done)c.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(a)throw a.error}}return c};Object.defineProperty(t,"__esModule",{value:!0});var o=r(25327),f=r(78193),d=r(98829),s=r(56903),u=1,b=n.from(u.toString(16).padStart(2,"0"),"hex"),h=function(e){function t(t,r){var n,a;void 0===r&&(r={});var c=e.call(this,i(i({},t),{type:u}))||this;c.DEFAULT_HARDFORK="berlin";var f=t.chainId,b=t.accessList,h=t.gasPrice;if(c.common=c._getCommon(r.common,f),c.chainId=c.common.chainIdBN(),!c.common.isActivatedEIP(2930))throw new Error("EIP-2930 not enabled on Common");c.activeCapabilities=c.activeCapabilities.concat([2718,2930]);var l=s.AccessLists.getAccessListData(null!==b&&void 0!==b?b:[]);if(c.accessList=l.accessList,c.AccessListJSON=l.AccessListJSON,s.AccessLists.verifyAccessList(c.accessList),c.gasPrice=new o.BN((0,o.toBuffer)(""===h?"0x":h)),c._validateCannotExceedMaxInteger({gasPrice:c.gasPrice}),c.gasPrice.mul(c.gasLimit).gt(o.MAX_INTEGER)){var p=c._errorMsg("gasLimit * gasPrice cannot exceed MAX_INTEGER");throw new Error(p)}if(c.v&&!c.v.eqn(0)&&!c.v.eqn(1)){p=c._errorMsg("The y-parity of the transaction should either be 0 or 1");throw new Error(p)}if(c.common.gteHardfork("homestead")&&(null===(n=c.s)||void 0===n?void 0:n.gt(d.N_DIV_2))){p=c._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(p)}var x=null===(a=null===r||void 0===r?void 0:r.freeze)||void 0===a||a;return x&&Object.freeze(c),c}return a(t,e),Object.defineProperty(t.prototype,"senderR",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"senderS",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yParity",{get:function(){return this.v},enumerable:!1,configurable:!0}),t.fromTxData=function(e,r){return void 0===r&&(r={}),new t(e,r)},t.fromSerializedTx=function(e,r){if(void 0===r&&(r={}),!e.slice(0,1).equals(b))throw new Error("Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: ".concat(u,", received: ").concat(e.slice(0,1).toString("hex")));var n=o.rlp.decode(e.slice(1));if(!Array.isArray(n))throw new Error("Invalid serialized tx input: must be array");return t.fromValuesArray(n,r)},t.fromRlpSerializedTx=function(e,r){return void 0===r&&(r={}),t.fromSerializedTx(e,r)},t.fromValuesArray=function(e,r){if(void 0===r&&(r={}),8!==e.length&&11!==e.length)throw new Error("Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).");var n=c(e,11),a=n[0],i=n[1],f=n[2],d=n[3],s=n[4],u=n[5],b=n[6],h=n[7],l=n[8],p=n[9],x=n[10];(0,o.validateNoLeadingZeroes)({nonce:i,gasPrice:f,gasLimit:d,value:u,v:l,r:p,s:x});var m=[];return new t({chainId:new o.BN(a),nonce:i,gasPrice:f,gasLimit:d,to:s,value:u,data:b,accessList:null!==h&&void 0!==h?h:m,v:void 0!==l?new o.BN(l):void 0,r:p,s:x},r)},t.prototype.getDataFee=function(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;var t=e.prototype.getDataFee.call(this);return t.iaddn(s.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.raw=function(){return[(0,o.bnToUnpaddedBuffer)(this.chainId),(0,o.bnToUnpaddedBuffer)(this.nonce),(0,o.bnToUnpaddedBuffer)(this.gasPrice),(0,o.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,o.bnToUnpaddedBuffer)(this.v):n.from([]),void 0!==this.r?(0,o.bnToUnpaddedBuffer)(this.r):n.from([]),void 0!==this.s?(0,o.bnToUnpaddedBuffer)(this.s):n.from([])]},t.prototype.serialize=function(){var e=this.raw();return n.concat([b,o.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,8),r=n.concat([b,o.rlp.encode(t)]);return e?(0,o.keccak256)(r):r},t.prototype.hash=function(){if(!this.isSigned()){var e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,o.keccak256)(this.serialize())),this.cache.hash):(0,o.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned()){var t=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(t)}var r=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(d.N_DIV_2))){t=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(t)}var n=this,a=n.yParity,i=n.r,c=n.s;try{return(0,o.ecrecover)(r,a.addn(27),(0,o.bnToUnpaddedBuffer)(i),(0,o.bnToUnpaddedBuffer)(c))}catch(f){t=this._errorMsg("Invalid Signature");throw new Error(t)}},t.prototype._processSignature=function(e,r,n){var a={common:this.common};return t.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new o.BN(e-27),r:new o.BN(r),s:new o.BN(n)},a)},t.prototype.toJSON=function(){var e=s.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,o.bnToHex)(this.chainId),nonce:(0,o.bnToHex)(this.nonce),gasPrice:(0,o.bnToHex)(this.gasPrice),gasLimit:(0,o.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,o.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bnToHex)(this.s):void 0}},t.prototype.errorStr=function(){var e,t,r=this._getSharedErrorPostfix();return r+=" gasPrice=".concat(this.gasPrice," accessListCount=").concat(null!==(t=null===(e=this.accessList)||void 0===e?void 0:e.length)&&void 0!==t?t:0),r},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(f.BaseTransaction);t["default"]=h},89883:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FeeMarketEIP1559Transaction=t.TransactionFactory=t.AccessListEIP2930Transaction=t.Transaction=void 0;var c=r(69903);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return i(c).default}});var o=r(17562);Object.defineProperty(t,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return i(o).default}});var f=r(62607);Object.defineProperty(t,"TransactionFactory",{enumerable:!0,get:function(){return i(f).default}});var d=r(95887);Object.defineProperty(t,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return i(d).default}}),a(r(98829),t)},69903:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703);var a=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=i.next()).done)c.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(a)throw a.error}}return c};Object.defineProperty(t,"__esModule",{value:!0});var o=r(25327),f=r(98829),d=r(78193),s=0,u=function(e){function t(t,r){var n;void 0===r&&(r={});var a=e.call(this,i(i({},t),{type:s}))||this;if(a.common=a._validateTxV(a.v,r.common),a.gasPrice=new o.BN((0,o.toBuffer)(""===t.gasPrice?"0x":t.gasPrice)),a.gasPrice.mul(a.gasLimit).gt(o.MAX_INTEGER)){var c=a._errorMsg("gas limit * gasPrice cannot exceed MAX_INTEGER (2^256-1)");throw new Error(c)}if(a._validateCannotExceedMaxInteger({gasPrice:a.gasPrice}),a.common.gteHardfork("spuriousDragon"))if(a.isSigned()){var d=a.v,u=a.common.chainIdBN().muln(2);(d.eq(u.addn(35))||d.eq(u.addn(36)))&&a.activeCapabilities.push(f.Capability.EIP155ReplayProtection)}else a.activeCapabilities.push(f.Capability.EIP155ReplayProtection);var b=null===(n=null===r||void 0===r?void 0:r.freeze)||void 0===n||n;return b&&Object.freeze(a),a}return a(t,e),t.fromTxData=function(e,r){return void 0===r&&(r={}),new t(e,r)},t.fromSerializedTx=function(e,t){void 0===t&&(t={});var r=o.rlp.decode(e);if(!Array.isArray(r))throw new Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(r,t)},t.fromRlpSerializedTx=function(e,r){return void 0===r&&(r={}),t.fromSerializedTx(e,r)},t.fromValuesArray=function(e,r){if(void 0===r&&(r={}),6!==e.length&&9!==e.length)throw new Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");var n=c(e,9),a=n[0],i=n[1],f=n[2],d=n[3],s=n[4],u=n[5],b=n[6],h=n[7],l=n[8];return(0,o.validateNoLeadingZeroes)({nonce:a,gasPrice:i,gasLimit:f,value:s,v:b,r:h,s:l}),new t({nonce:a,gasPrice:i,gasLimit:f,to:d,value:s,data:u,v:b,r:h,s:l},r)},t.prototype.raw=function(){return[(0,o.bnToUnpaddedBuffer)(this.nonce),(0,o.bnToUnpaddedBuffer)(this.gasPrice),(0,o.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bnToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,o.bnToUnpaddedBuffer)(this.v):n.from([]),void 0!==this.r?(0,o.bnToUnpaddedBuffer)(this.r):n.from([]),void 0!==this.s?(0,o.bnToUnpaddedBuffer)(this.s):n.from([])]},t.prototype.serialize=function(){return o.rlp.encode(this.raw())},t.prototype._getMessageToSign=function(){var e=[(0,o.bnToUnpaddedBuffer)(this.nonce),(0,o.bnToUnpaddedBuffer)(this.gasPrice),(0,o.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bnToUnpaddedBuffer)(this.value),this.data];return this.supports(f.Capability.EIP155ReplayProtection)&&(e.push((0,o.toBuffer)(this.common.chainIdBN())),e.push((0,o.unpadBuffer)((0,o.toBuffer)(0))),e.push((0,o.unpadBuffer)((0,o.toBuffer)(0)))),e},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this._getMessageToSign();return e?(0,o.rlphash)(t):t},t.prototype.getDataFee=function(){return this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork()?this.cache.dataFee.value:(Object.isFrozen(this)&&(this.cache.dataFee={value:e.prototype.getDataFee.call(this),hardfork:this.common.hardfork()}),e.prototype.getDataFee.call(this))},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.hash=function(){return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,o.rlphash)(this.raw())),this.cache.hash):(0,o.rlphash)(this.raw())},t.prototype.getMessageToVerifySignature=function(){if(!this.isSigned()){var e=this._errorMsg("This transaction is not signed");throw new Error(e)}var t=this._getMessageToSign();return(0,o.rlphash)(t)},t.prototype.getSenderPublicKey=function(){var e,t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(f.N_DIV_2))){var r=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(r)}var n=this,a=n.v,i=n.r,c=n.s;try{return(0,o.ecrecover)(t,a,(0,o.bnToUnpaddedBuffer)(i),(0,o.bnToUnpaddedBuffer)(c),this.supports(f.Capability.EIP155ReplayProtection)?this.common.chainIdBN():void 0)}catch(d){r=this._errorMsg("Invalid Signature");throw new Error(r)}},t.prototype._processSignature=function(e,r,n){var a=new o.BN(e);this.supports(f.Capability.EIP155ReplayProtection)&&a.iadd(this.common.chainIdBN().muln(2).addn(8));var i={common:this.common};return t.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:a,r:new o.BN(r),s:new o.BN(n)},i)},t.prototype.toJSON=function(){return{nonce:(0,o.bnToHex)(this.nonce),gasPrice:(0,o.bnToHex)(this.gasPrice),gasLimit:(0,o.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),v:void 0!==this.v?(0,o.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bnToHex)(this.s):void 0}},t.prototype._validateTxV=function(e,t){var r;if(void 0!==e&&!e.eqn(0)&&(!t||t.gteHardfork("spuriousDragon"))&&!e.eqn(27)&&!e.eqn(28))if(t){var n=t.chainIdBN().muln(2),a=e.eq(n.addn(35))||e.eq(n.addn(36));if(!a)throw new Error("Incompatible EIP155-based V ".concat(e," and chain id ").concat(t.chainIdBN(),". See the Common parameter of the Transaction constructor to set the chain id."))}else{var i=void 0;i=e.subn(35).isEven()?35:36,r=e.subn(i).divn(2)}return this._getCommon(t,r)},t.prototype._unsignedTxImplementsEIP155=function(){return this.common.gteHardfork("spuriousDragon")},t.prototype._signedTxImplementsEIP155=function(){if(!this.isSigned()){var e=this._errorMsg("This transaction is not signed");throw new Error(e)}var t=this.common.gteHardfork("spuriousDragon"),r=this.v,n=this.common.chainIdBN().muln(2),a=r.eq(n.addn(35))||r.eq(n.addn(36));return a&&t},t.prototype.errorStr=function(){var e=this._getSharedErrorPostfix();return e+=" gasPrice=".concat(this.gasPrice),e},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(d.BaseTransaction);t["default"]=u},62607:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),Object.defineProperty(t,"__esModule",{value:!0});var a=r(25327),i=r(89883),c=function(){function e(){}return e.fromTxData=function(e,t){if(void 0===t&&(t={}),"type"in e&&void 0!==e.type){var r=new a.BN((0,a.toBuffer)(e.type)).toNumber();if(0===r)return i.Transaction.fromTxData(e,t);if(1===r)return i.AccessListEIP2930Transaction.fromTxData(e,t);if(2===r)return i.FeeMarketEIP1559Transaction.fromTxData(e,t);throw new Error("Tx instantiation with type ".concat(r," not supported"))}return i.Transaction.fromTxData(e,t)},e.fromSerializedData=function(e,t){if(void 0===t&&(t={}),e[0]<=127){var r=void 0;switch(e[0]){case 1:r=2930;break;case 2:r=1559;break;default:throw new Error("TypedTransaction with ID ".concat(e[0]," unknown"))}return 1559===r?i.FeeMarketEIP1559Transaction.fromSerializedTx(e,t):i.AccessListEIP2930Transaction.fromSerializedTx(e,t)}return i.Transaction.fromSerializedTx(e,t)},e.fromBlockBodyData=function(e,t){if(void 0===t&&(t={}),n.isBuffer(e))return this.fromSerializedData(e,t);if(Array.isArray(e))return i.Transaction.fromValuesArray(e,t);throw new Error("Cannot decode transaction: unknown type input")},e.getTransactionClass=function(e,t){void 0===e&&(e=0);var r=0==e||e>=128&&e<=255;if(r)return i.Transaction;switch(e){case 1:return i.AccessListEIP2930Transaction;case 2:return i.FeeMarketEIP1559Transaction;default:throw new Error("TypedTransaction with ID ".concat(e," unknown"))}},e}();t["default"]=c},98829:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.N_DIV_2=t.isAccessList=t.isAccessListBuffer=t.Capability=void 0;var n=r(25327);function a(e){if(0===e.length)return!0;var t=e[0];return!!Array.isArray(t)}function i(e){return!a(e)}(function(e){e[e["EIP155ReplayProtection"]=155]="EIP155ReplayProtection",e[e["EIP1559FeeMarket"]=1559]="EIP1559FeeMarket",e[e["EIP2718TypedTransaction"]=2718]="EIP2718TypedTransaction",e[e["EIP2930AccessLists"]=2930]="EIP2930AccessLists"})(t.Capability||(t.Capability={})),t.isAccessListBuffer=a,t.isAccessList=i,t.N_DIV_2=new n.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16)},56903:function(e,t,r){"use strict";r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.AccessLists=void 0;var n=r(25327),a=r(98829),i=function(){function e(){}return e.getAccessListData=function(e){var t,r;if(e&&(0,a.isAccessList)(e)){t=e;for(var i=[],c=0;c=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function f(e,t,r){var n=o(e,r);return r-1>=t&&(n|=o(e,r-1)<<4),n}function d(e,t,r,a){for(var i=0,c=0,o=Math.min(e.length,r),f=t;f=49?d-49+10:d>=17?d-17+10:d,n(d>=0&&c0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&(a++,this.negative=1),a=0;a-=3)c=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=c<>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=f(e,t,n)<=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8;else{var o=e.length-t;for(n=o%2===0?t+1:t;n=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8}this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,c=i%n,o=Math.min(i,i-c)+r,f=0,s=r;s1&&0===this.words[this.length-1])this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(P){i.prototype.inspect=u}else i.prototype.inspect=u;function u(){return(this.red?""}var b=["","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];i.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var a=0,i=0,c=0;c>>24-a&16777215,r=0!==i||c!==this.length-1?b[6-f.length]+f+r:f+r,a+=2,a>=26&&(a-=26,c--)}0!==i&&(r=i.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=h[e],s=l[e];r="";var u=this.clone();u.negative=0;while(!u.isZero()){var p=u.modrn(s).toString(e);u=u.idivn(s),r=u.isZero()?p+r:b[d-p.length]+p+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},c&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(c,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var p=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};function x(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],c=a*i,o=67108863&c,f=c/67108864|0;r.words[0]=o;for(var d=1;d>>26,u=67108863&f,b=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=b;h++){var l=d-h|0;a=0|e.words[l],i=0|t.words[h],c=a*i+u,s+=c/67108864|0,u=67108863&c}r.words[d]=0|u,f=0|s}return 0!==f?r.words[d]=0|f:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var c=p(e,i),o="le"===t?"LE":"BE";return this["_toArrayLike"+o](c,a),c},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=c>>>24,i+=2)}if(r=0&&(e[r--]=c>>8&255),r>=0&&(e[r--]=c>>16&255),6===i?(r>=0&&(e[r--]=c>>24&255),n=0,i=0):(n=c>>>24,i+=2)}if(r>=0){e[r--]=n;while(r>=0)e[r--]=0}},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,c=0;c>26,this.words[c]=67108863&t;for(;0!==i&&c>26,this.words[c]=67108863&t;if(0===i&&c>>13,h=0|c[1],l=8191&h,p=h>>>13,x=0|c[2],m=8191&x,v=x>>>13,g=0|c[3],y=8191&g,w=g>>>13,_=0|c[4],M=8191&_,k=_>>>13,A=0|c[5],E=8191&A,S=A>>>13,T=0|c[6],C=8191&T,P=T>>>13,O=0|c[7],R=8191&O,I=O>>>13,B=0|c[8],L=8191&B,N=B>>>13,U=0|c[9],j=8191&U,D=U>>>13,F=0|o[0],H=8191&F,q=F>>>13,z=0|o[1],K=8191&z,$=z>>>13,G=0|o[2],V=8191&G,W=G>>>13,Z=0|o[3],J=8191&Z,Y=Z>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ae=0|o[6],ie=8191&ae,ce=ae>>>13,oe=0|o[7],fe=8191&oe,de=oe>>>13,se=0|o[8],ue=8191&se,be=se>>>13,he=0|o[9],le=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(u,H),a=Math.imul(u,q),a=a+Math.imul(b,H)|0,i=Math.imul(b,q);var xe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(l,H),a=Math.imul(l,q),a=a+Math.imul(p,H)|0,i=Math.imul(p,q),n=n+Math.imul(u,K)|0,a=a+Math.imul(u,$)|0,a=a+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0;var me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,H),a=Math.imul(m,q),a=a+Math.imul(v,H)|0,i=Math.imul(v,q),n=n+Math.imul(l,K)|0,a=a+Math.imul(l,$)|0,a=a+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(u,V)|0,a=a+Math.imul(u,W)|0,a=a+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ve=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(y,H),a=Math.imul(y,q),a=a+Math.imul(w,H)|0,i=Math.imul(w,q),n=n+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(l,V)|0,a=a+Math.imul(l,W)|0,a=a+Math.imul(p,V)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(u,J)|0,a=a+Math.imul(u,Y)|0,a=a+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ge=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(M,H),a=Math.imul(M,q),a=a+Math.imul(k,H)|0,i=Math.imul(k,q),n=n+Math.imul(y,K)|0,a=a+Math.imul(y,$)|0,a=a+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,n=n+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0,a=a+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,n=n+Math.imul(u,Q)|0,a=a+Math.imul(u,ee)|0,a=a+Math.imul(b,Q)|0,i=i+Math.imul(b,ee)|0;var ye=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,H),a=Math.imul(E,q),a=a+Math.imul(S,H)|0,i=Math.imul(S,q),n=n+Math.imul(M,K)|0,a=a+Math.imul(M,$)|0,a=a+Math.imul(k,K)|0,i=i+Math.imul(k,$)|0,n=n+Math.imul(y,V)|0,a=a+Math.imul(y,W)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,a=a+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,n=n+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0,a=a+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(u,re)|0,a=a+Math.imul(u,ne)|0,a=a+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var we=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,H),a=Math.imul(C,q),a=a+Math.imul(P,H)|0,i=Math.imul(P,q),n=n+Math.imul(E,K)|0,a=a+Math.imul(E,$)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(M,V)|0,a=a+Math.imul(M,W)|0,a=a+Math.imul(k,V)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,a=a+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,n=n+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,a=a+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0,a=a+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(u,ie)|0,a=a+Math.imul(u,ce)|0,a=a+Math.imul(b,ie)|0,i=i+Math.imul(b,ce)|0;var _e=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,H),a=Math.imul(R,q),a=a+Math.imul(I,H)|0,i=Math.imul(I,q),n=n+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,a=a+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,n=n+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,a=a+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,a=a+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,a=a+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,a=a+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(l,ie)|0,a=a+Math.imul(l,ce)|0,a=a+Math.imul(p,ie)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(u,fe)|0,a=a+Math.imul(u,de)|0,a=a+Math.imul(b,fe)|0,i=i+Math.imul(b,de)|0;var Me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,H),a=Math.imul(L,q),a=a+Math.imul(N,H)|0,i=Math.imul(N,q),n=n+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,a=a+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(C,V)|0,a=a+Math.imul(C,W)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(E,J)|0,a=a+Math.imul(E,Y)|0,a=a+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,n=n+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,a=a+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,a=a+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(m,ie)|0,a=a+Math.imul(m,ce)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(l,fe)|0,a=a+Math.imul(l,de)|0,a=a+Math.imul(p,fe)|0,i=i+Math.imul(p,de)|0,n=n+Math.imul(u,ue)|0,a=a+Math.imul(u,be)|0,a=a+Math.imul(b,ue)|0,i=i+Math.imul(b,be)|0;var ke=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,H),a=Math.imul(j,q),a=a+Math.imul(D,H)|0,i=Math.imul(D,q),n=n+Math.imul(L,K)|0,a=a+Math.imul(L,$)|0,a=a+Math.imul(N,K)|0,i=i+Math.imul(N,$)|0,n=n+Math.imul(R,V)|0,a=a+Math.imul(R,W)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(C,J)|0,a=a+Math.imul(C,Y)|0,a=a+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,n=n+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,a=a+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,a=a+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(y,ie)|0,a=a+Math.imul(y,ce)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(v,de)|0,n=n+Math.imul(l,ue)|0,a=a+Math.imul(l,be)|0,a=a+Math.imul(p,ue)|0,i=i+Math.imul(p,be)|0,n=n+Math.imul(u,le)|0,a=a+Math.imul(u,pe)|0,a=a+Math.imul(b,le)|0,i=i+Math.imul(b,pe)|0;var Ae=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),a=Math.imul(j,$),a=a+Math.imul(D,K)|0,i=Math.imul(D,$),n=n+Math.imul(L,V)|0,a=a+Math.imul(L,W)|0,a=a+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,n=n+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,a=a+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,a=a+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,a=a+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(M,ie)|0,a=a+Math.imul(M,ce)|0,a=a+Math.imul(k,ie)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(m,ue)|0,a=a+Math.imul(m,be)|0,a=a+Math.imul(v,ue)|0,i=i+Math.imul(v,be)|0,n=n+Math.imul(l,le)|0,a=a+Math.imul(l,pe)|0,a=a+Math.imul(p,le)|0,i=i+Math.imul(p,pe)|0;var Ee=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),a=Math.imul(j,W),a=a+Math.imul(D,V)|0,i=Math.imul(D,W),n=n+Math.imul(L,J)|0,a=a+Math.imul(L,Y)|0,a=a+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,n=n+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,a=a+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,a=a+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(E,ie)|0,a=a+Math.imul(E,ce)|0,a=a+Math.imul(S,ie)|0,i=i+Math.imul(S,ce)|0,n=n+Math.imul(M,fe)|0,a=a+Math.imul(M,de)|0,a=a+Math.imul(k,fe)|0,i=i+Math.imul(k,de)|0,n=n+Math.imul(y,ue)|0,a=a+Math.imul(y,be)|0,a=a+Math.imul(w,ue)|0,i=i+Math.imul(w,be)|0,n=n+Math.imul(m,le)|0,a=a+Math.imul(m,pe)|0,a=a+Math.imul(v,le)|0,i=i+Math.imul(v,pe)|0;var Se=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,J),a=Math.imul(j,Y),a=a+Math.imul(D,J)|0,i=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,a=a+Math.imul(N,Q)|0,i=i+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,a=a+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(C,ie)|0,a=a+Math.imul(C,ce)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,a=a+Math.imul(E,de)|0,a=a+Math.imul(S,fe)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(M,ue)|0,a=a+Math.imul(M,be)|0,a=a+Math.imul(k,ue)|0,i=i+Math.imul(k,be)|0,n=n+Math.imul(y,le)|0,a=a+Math.imul(y,pe)|0,a=a+Math.imul(w,le)|0,i=i+Math.imul(w,pe)|0;var Te=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Q),a=Math.imul(j,ee),a=a+Math.imul(D,Q)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,a=a+Math.imul(L,ne)|0,a=a+Math.imul(N,re)|0,i=i+Math.imul(N,ne)|0,n=n+Math.imul(R,ie)|0,a=a+Math.imul(R,ce)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(I,ce)|0,n=n+Math.imul(C,fe)|0,a=a+Math.imul(C,de)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(P,de)|0,n=n+Math.imul(E,ue)|0,a=a+Math.imul(E,be)|0,a=a+Math.imul(S,ue)|0,i=i+Math.imul(S,be)|0,n=n+Math.imul(M,le)|0,a=a+Math.imul(M,pe)|0,a=a+Math.imul(k,le)|0,i=i+Math.imul(k,pe)|0;var Ce=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),a=Math.imul(j,ne),a=a+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,a=a+Math.imul(L,ce)|0,a=a+Math.imul(N,ie)|0,i=i+Math.imul(N,ce)|0,n=n+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(I,de)|0,n=n+Math.imul(C,ue)|0,a=a+Math.imul(C,be)|0,a=a+Math.imul(P,ue)|0,i=i+Math.imul(P,be)|0,n=n+Math.imul(E,le)|0,a=a+Math.imul(E,pe)|0,a=a+Math.imul(S,le)|0,i=i+Math.imul(S,pe)|0;var Pe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,ie),a=Math.imul(j,ce),a=a+Math.imul(D,ie)|0,i=Math.imul(D,ce),n=n+Math.imul(L,fe)|0,a=a+Math.imul(L,de)|0,a=a+Math.imul(N,fe)|0,i=i+Math.imul(N,de)|0,n=n+Math.imul(R,ue)|0,a=a+Math.imul(R,be)|0,a=a+Math.imul(I,ue)|0,i=i+Math.imul(I,be)|0,n=n+Math.imul(C,le)|0,a=a+Math.imul(C,pe)|0,a=a+Math.imul(P,le)|0,i=i+Math.imul(P,pe)|0;var Oe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,fe),a=Math.imul(j,de),a=a+Math.imul(D,fe)|0,i=Math.imul(D,de),n=n+Math.imul(L,ue)|0,a=a+Math.imul(L,be)|0,a=a+Math.imul(N,ue)|0,i=i+Math.imul(N,be)|0,n=n+Math.imul(R,le)|0,a=a+Math.imul(R,pe)|0,a=a+Math.imul(I,le)|0,i=i+Math.imul(I,pe)|0;var Re=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,ue),a=Math.imul(j,be),a=a+Math.imul(D,ue)|0,i=Math.imul(D,be),n=n+Math.imul(L,le)|0,a=a+Math.imul(L,pe)|0,a=a+Math.imul(N,le)|0,i=i+Math.imul(N,pe)|0;var Ie=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,le),a=Math.imul(j,pe),a=a+Math.imul(D,le)|0,i=Math.imul(D,pe);var Be=(d+n|0)+((8191&a)<<13)|0;return d=(i+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=xe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=we,f[6]=_e,f[7]=Me,f[8]=ke,f[9]=Ae,f[10]=Ee,f[11]=Se,f[12]=Te,f[13]=Ce,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ie,f[18]=Be,0!==d&&(f[19]=d,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0,a+=c>>>26,c&=67108863}r.words[i]=o,n=c,c=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function y(e,t,r){return g(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(v=m),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?v(this,e,t):n<63?m(this,e,t):n<1024?g(this,e,t):y(this,e,t),r},w.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},w.prototype.permute=function(e,t,r,n,a,i){for(var c=0;c>>=1)a++;return 1<>>=13,r[2*c+1]=8191&i,i>>>=13;for(c=2*t;c>=26,r+=i/67108864|0,r+=c>>>26,this.words[a]=67108863&c}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=x(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var c=0;for(t=0;t>>26-r}c&&(this.words[t]=c,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,c=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<c)for(this.length-=c,d=0;d=0&&(0!==s||d>=a);d--){var u=0|this.words[d];this.words[d]=s<<26-i|u>>>i,s=u&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===o)return this._strip();for(n(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),a=e,c=0|a.words[a.length-1],o=this._countBits(c);r=26-o,0!==r&&(a=a.ushln(r),n.iushln(r),c=0|a.words[a.length-1]);var f,d=n.length-a.length;if("mod"!==t){f=new i(null),f.length=d+1,f.words=new Array(f.length);for(var s=0;s=0;b--){var h=67108864*(0|n.words[a.length+b])+(0|n.words[a.length+b-1]);h=Math.min(h/c|0,67108863),n._ishlnsubmul(a,h,b);while(0!==n.negative)h--,n.negative=0,n._ishlnsubmul(a,1,b),n.isZero()||(n.negative^=1);f&&(f.words[b]=h)}return f&&f._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.iadd(e)),{div:a,mod:c}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.isub(e)),{div:o.div,mod:c}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,c,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a=new i(1),c=new i(0),o=new i(0),f=new i(1),d=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++d;var s=r.clone(),u=t.clone();while(!t.isZero()){for(var b=0,h=1;0===(t.words[0]&h)&&b<26;++b,h<<=1);if(b>0){t.iushrn(b);while(b-- >0)(a.isOdd()||c.isOdd())&&(a.iadd(s),c.isub(u)),a.iushrn(1),c.iushrn(1)}for(var l=0,p=1;0===(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(u)),o.iushrn(1),f.iushrn(1)}t.cmp(r)>=0?(t.isub(r),a.isub(o),c.isub(f)):(r.isub(t),o.isub(a),f.isub(c))}return{a:o,b:f,gcd:r.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a,c=new i(1),o=new i(0),f=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var d=0,s=1;0===(t.words[0]&s)&&d<26;++d,s<<=1);if(d>0){t.iushrn(d);while(d-- >0)c.isOdd()&&c.iadd(f),c.iushrn(1)}for(var u=0,b=1;0===(r.words[0]&b)&&u<26;++u,b<<=1);if(u>0){r.iushrn(u);while(u-- >0)o.isOdd()&&o.iadd(f),o.iushrn(1)}t.cmp(r)>=0?(t.isub(r),c.isub(o)):(r.isub(t),o.isub(c))}return a=0===t.cmpn(1)?c:o,a.cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[c]=o}return 0!==i&&(this.words[c]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new T(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function M(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){M.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){M.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){M.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){M.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},M.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},M.prototype.split=function(e,t){e.iushrn(this.n,0,t)},M.prototype.imulK=function(e){return e.imul(this.k)},a(k,M),k.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=c}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new A;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return _[e]=t,t},T.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(s(e,e.umod(this.m)._forceRed(this)),e)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}var a=this.m.subn(1),c=0;while(!a.isZero()&&0===a.andln(1))c++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),f=o.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();s=new i(2*s*s).toRed(this);while(0!==this.pow(s,d).cmp(f))s.redIAdd(f);var u=this.pow(s,a),b=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),l=c;while(0!==h.cmp(o)){for(var p=h,x=0;0!==p.cmp(o);x++)p=p.redSqr();n(x=0;a--){for(var s=t.words[a],u=d-1;u>=0;u--){var b=s>>u&1;c!==n[0]&&(c=this.sqr(c)),0!==b||0!==o?(o<<=1,o|=b,f++,(f===r||0===a&&0===u)&&(c=this.mul(c,n[o]),f=0,o=0)):f=0}d=26}return c},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new C(e)},a(C,T),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),c=a;return a.cmp(this.m)>=0?c=a.isub(this.m):a.cmpn(0)<0&&(c=a.iadd(this.m)),c._forceRed(this)},C.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}(e,this)},68031:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703);var a=this&&this.__read||function(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),c=[];try{while((void 0===t||t-- >0)&&!(n=i.next()).done)c.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(a)throw a.error}}return c},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var c=i(r(54185)),o=r(45928),f=r(52010),d=r(56019),s=r(48630),u=r(22025),b=r(9129),h=r(1397),l=r(52831),p=function(){function e(e,t,r,n){void 0===e&&(e=new o.BN(0)),void 0===t&&(t=new o.BN(0)),void 0===r&&(r=s.KECCAK256_RLP),void 0===n&&(n=s.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,a=t.stateRoot,i=t.codeHash;return new e(r?new o.BN((0,u.toBuffer)(r)):void 0,n?new o.BN((0,u.toBuffer)(n)):void 0,a?(0,u.toBuffer)(a):void 0,i?(0,u.toBuffer)(i):void 0)},e.fromRlpSerializedAccount=function(e){var t=o.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=a(t,4),n=r[0],i=r[1],c=r[2],f=r[3];return new e(new o.BN(n),new o.BN(i),c,f)},e.prototype._validate=function(){if(this.nonce.lt(new o.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new o.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")},e.prototype.raw=function(){return[(0,l.bnToUnpaddedBuffer)(this.nonce),(0,l.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return o.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(s.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(s.KECCAK256_NULL)},e}();t.Account=p;var x=function(e){try{(0,h.assertIsString)(e)}catch(t){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};t.isValidAddress=x;var m=function(e,t){(0,h.assertIsHexString)(e);var r=(0,d.stripHexPrefix)(e).toLowerCase(),n="";if(t){var a=(0,l.toType)(t,l.TypeOutput.BN);n=a.toString()+"0x"}for(var i=(0,b.keccakFromString)(n+r).toString("hex"),c="0x",o=0;o=8?c+=r[o].toUpperCase():c+=r[o];return c};t.toChecksumAddress=m;var v=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e};t.isValidChecksumAddress=v;var g=function(e,t){(0,h.assertIsBuffer)(e),(0,h.assertIsBuffer)(t);var r=new o.BN(t);return r.isZero()?(0,b.rlphash)([e,null]).slice(-20):(0,b.rlphash)([e,n.from(r.toArray())]).slice(-20)};t.generateAddress=g;var y=function(e,t,r){(0,h.assertIsBuffer)(e),(0,h.assertIsBuffer)(t),(0,h.assertIsBuffer)(r),(0,c.default)(20===e.length),(0,c.default)(32===t.length);var a=(0,b.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,b.keccak256)(r)]));return a.slice(-20)};t.generateAddress2=y;var w=function(e){return(0,f.privateKeyVerify)(e)};t.isValidPrivate=w;var _=function(e,t){return void 0===t&&(t=!1),(0,h.assertIsBuffer)(e),64===e.length?(0,f.publicKeyVerify)(n.concat([n.from([4]),e])):!!t&&(0,f.publicKeyVerify)(e)};t.isValidPublic=_;var M=function(e,t){return void 0===t&&(t=!1),(0,h.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from((0,f.publicKeyConvert)(e,!1).slice(1))),(0,c.default)(64===e.length),(0,b.keccak)(e).slice(-20)};t.pubToAddress=M,t.publicToAddress=t.pubToAddress;var k=function(e){return(0,h.assertIsBuffer)(e),n.from((0,f.publicKeyCreate)(e,!1)).slice(1)};t.privateToPublic=k;var A=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))};t.privateToAddress=A;var E=function(e){return(0,h.assertIsBuffer)(e),64!==e.length&&(e=n.from((0,f.publicKeyConvert)(e,!1).slice(1))),e};t.importPublic=E;var S=function(){var e=20,t=(0,u.zeros)(e);return(0,u.bufferToHex)(t)};t.zeroAddress=S;var T=function(e){try{(0,h.assertIsString)(e)}catch(n){return!1}var r=(0,t.zeroAddress)();return r===e};t.isZeroAddress=T},99034:function(e,t,r){"use strict";var n=r(15361)["Buffer"],a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var i=a(r(54185)),c=r(45928),o=r(22025),f=r(68031),d=function(){function e(e){(0,i.default)(20===e.length,"Invalid address length"),this.buf=e}return e.zero=function(){return new e((0,o.zeros)(20))},e.fromString=function(t){return(0,i.default)((0,f.isValidAddress)(t),"Invalid address"),new e((0,o.toBuffer)(t))},e.fromPublicKey=function(t){(0,i.default)(n.isBuffer(t),"Public key should be Buffer");var r=(0,f.pubToAddress)(t);return new e(r)},e.fromPrivateKey=function(t){(0,i.default)(n.isBuffer(t),"Private key should be Buffer");var r=(0,f.privateToAddress)(t);return new e(r)},e.generate=function(t,r){return(0,i.default)(c.BN.isBN(r)),new e((0,f.generateAddress)(t.buf,r.toArrayLike(n)))},e.generate2=function(t,r,a){return(0,i.default)(n.isBuffer(r)),(0,i.default)(n.isBuffer(a)),new e((0,f.generateAddress2)(t.buf,r,a))},e.prototype.equals=function(e){return this.buf.equals(e.buf)},e.prototype.isZero=function(){return this.equals(e.zero())},e.prototype.isPrecompileOrSystemAddress=function(){var e=new c.BN(this.buf),t=new c.BN(0),r=new c.BN("ffff","hex");return e.gte(t)&&e.lte(r)},e.prototype.toString=function(){return"0x"+this.buf.toString("hex")},e.prototype.toBuffer=function(){return n.from(this.buf)},e}();t.Address=d},22025:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),r(48675),r(3462);var a=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),c=[];try{while((void 0===t||t-- >0)&&!(n=i.next()).done)c.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(a)throw a.error}}return c};Object.defineProperty(t,"__esModule",{value:!0}),t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var c=r(45928),o=r(56019),f=r(1397),d=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))};t.intToHex=d;var s=function(e){var r=(0,t.intToHex)(e);return n.from((0,o.padToEven)(r.slice(2)),"hex")};t.intToBuffer=s;var u=function(e){return n.allocUnsafe(e).fill(0)};t.zeros=u;var b=function(e,r,n){var a=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString())e=e.slice(1),t=e[0];return e},x=function(e){return(0,f.assertIsBuffer)(e),p(e)};t.unpadBuffer=x;var m=function(e){return(0,f.assertIsArray)(e),p(e)};t.unpadArray=m;var v=function(e){return(0,f.assertIsHexString)(e),e=(0,o.stripHexPrefix)(e),p(e)};t.unpadHexString=v;var g=function(e){if(null===e||void 0===e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"===typeof e){if(!(0,o.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return n.from((0,o.padToEven)((0,o.stripHexPrefix)(e)),"hex")}if("number"===typeof e)return(0,t.intToBuffer)(e);if(c.BN.isBN(e)){if(e.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(e));return e.toArrayLike(n)}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")};t.toBuffer=g;var y=function(e){return new c.BN((0,t.toBuffer)(e)).toNumber()};t.bufferToInt=y;var w=function(e){return e=(0,t.toBuffer)(e),"0x"+e.toString("hex")};t.bufferToHex=w;var _=function(e){return new c.BN(e).fromTwos(256)};t.fromSigned=_;var M=function(e){return n.from(e.toTwos(256).toArray())};t.toUnsigned=M;var k=function(e){return"string"!==typeof e||(0,o.isHexPrefixed)(e)?e:"0x"+e};t.addHexPrefix=k;var A=function(e){var t=/^(00)+|(00)+$/g;if(e=(0,o.stripHexPrefix)(e),e.length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");var r=n.from(e.replace(t,""),"hex");return r.toString("utf8")};t.toUtf8=A;var E=function(e){if(n.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var r=[],a=0;a0&&0===d[0])throw new Error("".concat(f," cannot have leading zeroes, received: ").concat(d.toString("hex")))}}catch(s){t={error:s}}finally{try{c&&!c.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}};function T(e){return Array.isArray(e)?e.map((function(e){return T(e)})):n.from(e)}function C(e){return Array.isArray(e)?e.map((function(e){return C(e)})):Uint8Array.from(null!==e&&void 0!==e?e:[])}t.validateNoLeadingZeroes=S,t.arrToBufArr=T,t.bufArrToArr=C},48630:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(15361),a=r(45928);t.MAX_UINT64=new a.BN("ffffffffffffffff",16),t.MAX_INTEGER=new a.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new a.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex")},45928:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e["default"]=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var o=c(r(24660));t.BN=o.default;var f=i(r(98217));t.rlp=f},9129:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160FromArray=t.ripemd160FromString=t.ripemd160=t.sha256FromArray=t.sha256FromString=t.sha256=t.keccakFromArray=t.keccakFromHexString=t.keccakFromString=t.keccak256=t.keccak=void 0;var a=r(92802),i=r(65443),c=r(45928),o=r(22025),f=r(1397),d=function(e,t){switch(void 0===t&&(t=256),(0,f.assertIsBuffer)(e),t){case 224:return(0,a.keccak224)(e);case 256:return(0,a.keccak256)(e);case 384:return(0,a.keccak384)(e);case 512:return(0,a.keccak512)(e);default:throw new Error("Invald algorithm: keccak".concat(t))}};t.keccak=d;var s=function(e){return(0,t.keccak)(e)};t.keccak256=s;var u=function(e,r){void 0===r&&(r=256),(0,f.assertIsString)(e);var a=n.from(e,"utf8");return(0,t.keccak)(a,r)};t.keccakFromString=u;var b=function(e,r){return void 0===r&&(r=256),(0,f.assertIsHexString)(e),(0,t.keccak)((0,o.toBuffer)(e),r)};t.keccakFromHexString=b;var h=function(e,r){return void 0===r&&(r=256),(0,f.assertIsArray)(e),(0,t.keccak)((0,o.toBuffer)(e),r)};t.keccakFromArray=h;var l=function(e){return e=(0,o.toBuffer)(e),i("sha256").update(e).digest()},p=function(e){return(0,f.assertIsBuffer)(e),l(e)};t.sha256=p;var x=function(e){return(0,f.assertIsString)(e),l(e)};t.sha256FromString=x;var m=function(e){return(0,f.assertIsArray)(e),l(e)};t.sha256FromArray=m;var v=function(e,t){e=(0,o.toBuffer)(e);var r=i("rmd160").update(e).digest();return!0===t?(0,o.setLengthLeft)(r,32):r},g=function(e,t){return(0,f.assertIsBuffer)(e),v(e,t)};t.ripemd160=g;var y=function(e,t){return(0,f.assertIsString)(e),v(e,t)};t.ripemd160FromString=y;var w=function(e,t){return(0,f.assertIsArray)(e),v(e,t)};t.ripemd160FromArray=w;var _=function(e){return(0,t.keccak)(c.rlp.encode(e))};t.rlphash=_},1397:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var a=r(56019),i=function(e){if(!(0,a.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}};t.assertIsHexString=i;var c=function(e){if(!n.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}};t.assertIsBuffer=c;var o=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}};t.assertIsArray=o;var f=function(e){if("string"!==typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}};t.assertIsString=f},25327:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,a(r(48630),t),a(r(68031),t),a(r(99034),t),a(r(9129),t),a(r(41596),t),a(r(22025),t),a(r(69161),t),a(r(45928),t),a(r(52831),t);var i=r(56019);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return i.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return i.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return i.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return i.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return i.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return i.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return i.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return i.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return i.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return i.isHexString}})},56019:function(e,t,r){"use strict";var n=r(15361)["Buffer"];function a(e){if("string"!==typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat(typeof e));return"0"===e[0]&&"x"===e[1]}r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=a;var i=function(e){if("string"!==typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat(typeof e));return a(e)?e.slice(2):e};function c(e){var t=e;if("string"!==typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat(typeof t));return t.length%2&&(t="0".concat(t)),t}function o(e){if("string"!==typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat(typeof e));return n.byteLength(e,"utf8")}function f(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat(typeof e,"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat(typeof t,"'"));return t[r?"some":"every"]((function(t){return e.indexOf(t)>=0}))}function d(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r=a.length,"The field ".concat(t.name," must not have more ").concat(t.length," bytes"))):t.allowZero&&0===a.length||!t.length||(0,i.default)(t.length===a.length,"The field ".concat(t.name," must have byte length of ").concat(t.length)),e.raw[r]=a}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:a,set:c}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:c,get:a})})),r)if("string"===typeof r&&(r=n.from((0,c.stripHexPrefix)(r),"hex")),n.isBuffer(r)&&(r=o.rlp.decode(r)),Array.isArray(r)){if(r.length>e._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(t,r){e[e._fields[r]]=(0,f.toBuffer)(t)}))}else{if("object"!==typeof r)throw new Error("invalid data");var a=Object.keys(r);t.forEach((function(t){-1!==a.indexOf(t.name)&&(e[t.name]=r[t.name]),-1!==a.indexOf(t.alias)&&(e[t.alias]=r[t.alias])}))}};t.defineProperties=d},41596:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var a=r(52010),i=r(45928),c=r(22025),o=r(9129),f=r(1397),d=r(52831);function s(e,t,r){var i=(0,a.ecdsaSign)(e,t),c=i.signature,o=i.recid,f=n.from(c.slice(0,32)),s=n.from(c.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 u=r?o+(2*r+35):o+27;return{r:f,s:s,v:u}}var b=(0,d.toType)(r,d.TypeOutput.BN),h=b.muln(2).addn(35).addn(o).toArrayLike(n);return{r:f,s:s,v:h}}function u(e,t){var r=(0,d.toType)(e,d.TypeOutput.BN);if(!t)return r.subn(27);var n=(0,d.toType)(t,d.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function b(e){var t=new i.BN(e);return t.eqn(0)||t.eqn(1)}t.ecsign=s;var h=function(e,t,r,i,o){var f=n.concat([(0,c.setLengthLeft)(r,32),(0,c.setLengthLeft)(i,32)],64),d=u(t,o);if(!b(d))throw new Error("Invalid signature v value");var s=(0,a.ecdsaRecover)(f,d.toNumber(),e);return n.from((0,a.publicKeyConvert)(s,!1).slice(1))};t.ecrecover=h;var l=function(e,t,r,a){var i=u(e,a);if(!b(i))throw new Error("Invalid signature v value");return(0,c.bufferToHex)(n.concat([(0,c.setLengthLeft)(t,32),(0,c.setLengthLeft)(r,32),(0,c.toBuffer)(e)]))};t.toRpcSig=l;var p=function(e,t,r,a){var i=u(e,a);if(!b(i))throw new Error("Invalid signature v value");var o=(0,d.toType)(e,d.TypeOutput.Number),f=r;return(o>28&&o%2===1||1===o||28===o)&&(f=n.from(r),f[0]|=128),(0,c.bufferToHex)(n.concat([(0,c.setLengthLeft)(t,32),(0,c.setLengthLeft)(f,32)]))};t.toCompactSig=p;var x=function(e){var t,r,n,a=(0,c.toBuffer)(e);if(a.length>=65)t=a.slice(0,32),r=a.slice(32,64),n=(0,c.bufferToInt)(a.slice(64));else{if(64!==a.length)throw new Error("Invalid signature length");t=a.slice(0,32),r=a.slice(32,64),n=(0,c.bufferToInt)(a.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}};t.fromRpcSig=x;var m=function(e,t,r,n,a){void 0===n&&(n=!0);var c=new i.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new i.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!b(u(e,a)))return!1;var f=new i.BN(t),d=new i.BN(r);return!(f.isZero()||f.gt(o)||d.isZero()||d.gt(o))&&(!n||1!==d.cmp(c))};t.isValidSignature=m;var v=function(e){(0,f.assertIsBuffer)(e);var t=n.from("Ethereum Signed Message:\n".concat(e.length),"utf-8");return(0,o.keccak)(n.concat([t,e]))};t.hashPersonalMessage=v},52831:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var a,i=r(45928),c=r(56019),o=r(22025);function f(e){return"0x".concat(e.toString(16))}function d(e){return(0,o.unpadBuffer)(e.toArrayLike(n))}function s(e){return d(e)}function u(e,t){if(null===e)return null;if(void 0!==e){if("string"===typeof e&&!(0,c.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(e));if("number"===typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,o.toBuffer)(e);if(t===a.Buffer)return r;if(t===a.BN)return new i.BN(r);if(t===a.Number){var n=new i.BN(r),f=new i.BN(Number.MAX_SAFE_INTEGER.toString());if(n.gt(f))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"))}}t.bnToHex=f,t.bnToUnpaddedBuffer=d,t.bnToRlp=s,function(e){e[e["Number"]=0]="Number",e[e["BN"]=1]="BN",e[e["Buffer"]=2]="Buffer",e[e["PrefixedHexString"]=3]="PrefixedHexString"}(a=t.TypeOutput||(t.TypeOutput={})),t.toType=u},50534:function(e,t,r){"use strict";r.d(t,{RQ:function(){return ee},_R:function(){return p}});var n=r(72224),a=r(48737);const i="abi/5.0.7",c=new a.Yd(i),o={};let f={calldata:!0,memory:!0,storage:!0},d={calldata:!0,memory:!0};function s(e,t){if("bytes"===e||"string"===e){if(f[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&d[t])return!0;return(f[t]||"payable"===t)&&c.throwArgumentError("invalid modifier","name",t),!1}function u(e,t){let r=e;function n(t){c.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function a(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let i={type:"",name:"",state:{allowType:!0}},o=i;for(let c=0;cJSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==h.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===h.full?", ":",")+")"):t+=this.type,e!==h.sighash&&(!0===this.indexed&&(t+=" indexed"),e===h.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"===typeof e?p.fromString(e,t):p.fromObject(e)}static fromObject(e){return p.isParamType(e)?e:new p(o,{name:e.name||null,type:x(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(p.fromObject):null})}static fromString(e,t){function r(e){return p.fromObject({name:e.name,type:e.type,indexed:e.indexed,components:e.components})}return r(u(e,!!t))}static isParamType(e){return!(null==e||!e._isParamType)}}function x(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var m=r(36482),v=(r(48675),r(3462),r(83966));const g=new a.Yd(i);class y{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){g.throwArgumentError(e,this.localName,t)}}class w{constructor(e){(0,n.zG)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,m.xs)(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData((0,m.zo)(e._data))}writeBytes(e){let t=(0,m.lE)(e);const r=t.length%this.wordSize;return r&&(t=(0,m.zo)([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=(0,m.lE)(v.O$.from(e));return t.length>this.wordSize&&g.throwError("value out-of-bounds",a.Yd.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,m.zo)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class _{constructor(e,t,r,a){(0,n.zG)(this,"_data",(0,m.lE)(e)),(0,n.zG)(this,"wordSize",t||32),(0,n.zG)(this,"_coerceFunc",r),(0,n.zG)(this,"allowLoose",a),this._offset=0}get data(){return(0,m.Dv)(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):_.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:g.throwError("data out-of-bounds",a.Yd.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new _(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return v.O$.from(this.readBytes(this.wordSize))}}var M=r(80594);class k extends y{constructor(e){super("address","address",e,!1)}encode(e,t){try{(0,M.Kn)(t)}catch(r){this._throwError(r.message,t)}return e.writeValue(t)}decode(e){return(0,M.Kn)((0,m.$m)(e.readValue().toHexString(),20))}}r(21703);class A extends y{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const E=new a.Yd(i);function S(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||E.throwError("cannot encode object for signature with missing names",a.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&E.throwError("cannot encode object for signature with duplicate names",a.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else E.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&E.throwArgumentError("types/value length mismatch","tuple",r);let i=new w(e.wordSize),c=new w(e.wordSize),o=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=c.length;e.encode(c,r);let n=i.writeUpdatableValue();o.push((e=>{n(e+t)}))}else e.encode(i,r)})),o.forEach((e=>{e(i.length)}));let f=e.appendWriter(i);return f+=e.appendWriter(c),f}function T(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let r=e.readValue(),o=n.subReader(r.toNumber());try{i=t.decode(o)}catch(c){if(c.code===a.Yd.errors.BUFFER_OVERRUN)throw c;i=c,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(c){if(c.code===a.Yd.errors.BUFFER_OVERRUN)throw c;i=c,i.baseType=t.name,i.name=t.localName,i.type=t.type}void 0!=i&&r.push(i)}));const i=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const a=r[t];a instanceof Error?Object.defineProperty(r,n,{get:()=>{throw a}}):r[n]=a}));for(let a=0;a{throw e}})}return Object.freeze(r)}class C extends y{constructor(e,t,r){const n=e.type+"["+(t>=0?t:"")+"]",a=-1===t||e.dynamic;super("array",n,r,a),this.coder=e,this.length=t}encode(e,t){Array.isArray(t)||this._throwError("expected array value",t);let r=this.length;-1===r&&(r=t.length,e.writeValue(t.length)),E.checkArgumentCount(t.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let a=0;a>6!==2)break;e++}return e}return e===F.OVERRUN?r.length-t-1:0}function z(e,t,r,n,a){return e===F.OVERLONG?(n.push(a),0):(n.push(65533),q(e,t,r,n,a))}(function(e){e["current"]="",e["NFC"]="NFC",e["NFD"]="NFD",e["NFKC"]="NFKC",e["NFKD"]="NFKD"})(D||(D={})),function(e){e["UNEXPECTED_CONTINUE"]="unexpected continuation byte",e["BAD_PREFIX"]="bad codepoint prefix",e["OVERRUN"]="string overrun",e["MISSING_CONTINUE"]="missing continuation byte",e["OUT_OF_RANGE"]="out of UTF-8 range",e["UTF16_SURROGATE"]="UTF-16 surrogate",e["OVERLONG"]="overlong representation"}(F||(F={}));const K=Object.freeze({error:H,ignore:q,replace:z});function $(e,t){null==t&&(t=K.error),e=(0,m.lE)(e);const r=[];let n=0;while(n>7===0){r.push(a);continue}let i=null,c=null;if(192===(224&a))i=1,c=127;else if(224===(240&a))i=2,c=2047;else{if(240!==(248&a)){n+=t(128===(192&a)?F.UNEXPECTED_CONTINUE:F.BAD_PREFIX,n-1,e,r);continue}i=3,c=65535}if(n-1+i>=e.length){n+=t(F.OVERRUN,n-1,e,r);continue}let o=a&(1<<8-i-1)-1;for(let f=0;f1114111?n+=t(F.OUT_OF_RANGE,n-1-i,e,r,o):o>=55296&&o<=57343?n+=t(F.UTF16_SURROGATE,n-1-i,e,r,o):o<=c?n+=t(F.OVERLONG,n-1-i,e,r,o):r.push(o))}return r}function G(e,t=D.current){t!=D.current&&(j.checkNormalize(),e=e.normalize(t));let r=[];for(let n=0;n>6|192),r.push(63&t|128);else if(55296==(64512&t)){n++;const a=e.charCodeAt(n);if(n>=e.length||56320!==(64512&a))throw new Error("invalid utf-8 string");const i=65536+((1023&t)<<10)+(1023&a);r.push(i>>18|240),r.push(i>>12&63|128),r.push(i>>6&63|128),r.push(63&i|128)}else r.push(t>>12|224),r.push(t>>6&63|128),r.push(63&t|128)}return(0,m.lE)(r)}function V(e){return e.map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function W(e,t){return V($(e,t))}class Z extends O{constructor(e){super("string",e)}encode(e,t){return super.encode(e,G(t))}decode(e){return W(super.decode(e))}}class J extends y{constructor(e,t){let r=!1;const n=[];e.forEach((e=>{e.dynamic&&(r=!0),n.push(e.type)}));const a="tuple("+n.join(",")+")";super("tuple",a,t,r),this.coders=e}encode(e,t){return S(e,this.coders,t)}decode(e){return e.coerce(this.name,T(e,this.coders))}}const Y=new a.Yd(i),X=new RegExp(/^bytes([0-9]*)$/),Q=new RegExp(/^(u?int)([0-9]*)$/);class ee{constructor(e){Y.checkNew(new.target,ee),(0,n.zG)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new k(e.name);case"bool":return new P(e.name);case"string":return new Z(e.name);case"bytes":return new R(e.name);case"array":return new C(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new J((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new B(e.name)}let t=e.type.match(Q);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!==0)&&Y.throwArgumentError("invalid "+t[1]+" bit length","param",e),new N(r/8,"int"===t[1],e.name)}if(t=e.type.match(X),t){let r=parseInt(t[1]);return(0===r||r>32)&&Y.throwArgumentError("invalid bytes length","param",e),new I(r,e.name)}return Y.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new _(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new w(this._getWordSize())}encode(e,t){e.length!==t.length&&Y.throwError("types/values length mismatch",a.Yd.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(p.from(e)))),n=new J(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){const n=e.map((e=>this._getCoder(p.from(e)))),a=new J(n,"_");return a.decode(this._getReader((0,m.lE)(t),r))}}new ee,new a.Yd(i)},80594:function(e,t,r){"use strict";r.d(t,{Kn:function(){return p}});r(48675),r(3462);var n=r(36482),a=r(83966),i=r(76502),c=r(48737);const o="address/5.6.0",f=new c.Yd(o);function d(e){(0,n.A7)(e,20)||f.throwArgumentError("invalid address","address",e),e=e.toLowerCase();const t=e.substring(2).split(""),r=new Uint8Array(40);for(let n=0;n<40;n++)r[n]=t[n].charCodeAt(0);const a=(0,n.lE)((0,i.w)(r));for(let n=0;n<40;n+=2)a[n>>1]>>4>=8&&(t[n]=t[n].toUpperCase()),(15&a[n>>1])>=8&&(t[n+1]=t[n+1].toUpperCase());return"0x"+t.join("")}const s=9007199254740991;function u(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}const b={};for(let x=0;x<10;x++)b[String(x)]=String(x);for(let x=0;x<26;x++)b[String.fromCharCode(65+x)]=String(10+x);const h=Math.floor(u(s));function l(e){e=e.toUpperCase(),e=e.substring(4)+e.substring(0,2)+"00";let t=e.split("").map((e=>b[e])).join("");while(t.length>=h){let e=t.substring(0,h);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);while(r.length<2)r="0"+r;return r}function p(e){let t=null;if("string"!==typeof e&&f.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=d(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&f.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){e.substring(2,4)!==l(e)&&f.throwArgumentError("bad icap checksum","address",e),t=(0,a.g$)(e.substring(4));while(t.length<40)t="0"+t;t=d("0x"+t)}else f.throwArgumentError("invalid address","address",e);return t}},83966:function(e,t,r){"use strict";r.d(t,{O$:function(){return h},g$:function(){return v}});var n=r(92024),a=r.n(n),i=r(36482),c=r(48737);const o="bignumber/5.6.0";var f=a().BN;const d=new c.Yd(o),s={},u=9007199254740991;let b=!1;class h{constructor(e,t){d.checkNew(new.target,h),e!==s&&d.throwError("cannot call constructor directly; use BigNumber.from",c.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return p(x(this).fromTwos(e))}toTwos(e){return p(x(this).toTwos(e))}abs(){return"-"===this._hex[0]?h.from(this._hex.substring(1)):this}add(e){return p(x(this).add(x(e)))}sub(e){return p(x(this).sub(x(e)))}div(e){const t=h.from(e);return t.isZero()&&m("division-by-zero","div"),p(x(this).div(x(e)))}mul(e){return p(x(this).mul(x(e)))}mod(e){const t=x(e);return t.isNeg()&&m("division-by-zero","mod"),p(x(this).umod(t))}pow(e){const t=x(e);return t.isNeg()&&m("negative-power","pow"),p(x(this).pow(t))}and(e){const t=x(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","and"),p(x(this).and(t))}or(e){const t=x(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","or"),p(x(this).or(t))}xor(e){const t=x(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","xor"),p(x(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&m("negative-width","mask"),p(x(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&m("negative-width","shl"),p(x(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&m("negative-width","shr"),p(x(this).shrn(e))}eq(e){return x(this).eq(x(e))}lt(e){return x(this).lt(x(e))}lte(e){return x(this).lte(x(e))}gt(e){return x(this).gt(x(e))}gte(e){return x(this).gte(x(e))}isNegative(){return"-"===this._hex[0]}isZero(){return x(this).isZero()}toNumber(){try{return x(this).toNumber()}catch(e){m("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return d.throwError("this platform does not support BigInt",c.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?b||(b=!0,d.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?d.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",c.Yd.errors.UNEXPECTED_ARGUMENT,{}):d.throwError("BigNumber.toString does not accept parameters",c.Yd.errors.UNEXPECTED_ARGUMENT,{})),x(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof h)return e;if("string"===typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new h(s,l(e)):e.match(/^-?[0-9]+$/)?new h(s,l(new f(e))):d.throwArgumentError("invalid BigNumber string","value",e);if("number"===typeof e)return e%1&&m("underflow","BigNumber.from",e),(e>=u||e<=-u)&&m("overflow","BigNumber.from",e),h.from(String(e));const t=e;if("bigint"===typeof t)return h.from(t.toString());if((0,i._t)(t))return h.from((0,i.Dv)(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"===typeof e)return h.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"===typeof e&&((0,i.A7)(e)||"-"===e[0]&&(0,i.A7)(e.substring(1))))return h.from(e)}return d.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function l(e){if("string"!==typeof e)return l(e.toString(16));if("-"===e[0])return e=e.substring(1),"-"===e[0]&&d.throwArgumentError("invalid hex","value",e),e=l(e),"0x00"===e?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";e.length%2&&(e="0x0"+e.substring(2));while(e.length>4&&"0x00"===e.substring(0,4))e="0x"+e.substring(4);return e}function p(e){return h.from(l(e))}function x(e){const t=h.from(e).toHexString();return"-"===t[0]?new f("-"+t.substring(3),16):new f(t.substring(2),16)}function m(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),d.throwError(e,c.Yd.errors.NUMERIC_FAULT,n)}function v(e){return new f(e,36).toString(16)}},92024:function(e,t,r){e=r.nmd(e),r(21703),function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var c;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{c="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(88677).Buffer}catch(S){}function o(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function f(e,t,r){var n=o(e,r);return r-1>=t&&(n|=o(e,r-1)<<4),n}function d(e,t,r,n){for(var a=0,i=Math.min(e.length,r),c=t;c=49?o-49+10:o>=17?o-17+10:o}return a}i.isBN=function(e){return e instanceof i||null!==e&&"object"===typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&(a++,this.negative=1),a=0;a-=3)c=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=c<>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=f(e,t,n)<=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8;else{var o=e.length-t;for(n=o%2===0?t+1:t;n=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8}this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,c=i%n,o=Math.min(i,i-c)+r,f=0,s=r;s1&&0===this.words[this.length-1])this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var s=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e){for(var t=new Array(e.bitLength()),r=0;r>>a}return t}function l(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],c=a*i,o=67108863&c,f=c/67108864|0;r.words[0]=o;for(var d=1;d>>26,u=67108863&f,b=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=b;h++){var l=d-h|0;a=0|e.words[l],i=0|t.words[h],c=a*i+u,s+=c/67108864|0,u=67108863&c}r.words[d]=0|u,f=0|s}return 0!==f?r.words[d]=0|f:r.length--,r.strip()}i.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var a=0,i=0,c=0;c>>24-a&16777215,r=0!==i||c!==this.length-1?s[6-f.length]+f+r:f+r,a+=2,a>=26&&(a-=26,c--)}0!==i&&(r=i.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=u[e],h=b[e];r="";var l=this.clone();l.negative=0;while(!l.isZero()){var p=l.modn(h).toString(e);l=l.idivn(h),r=l.isZero()?p+r:s[d-p.length]+p+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n("undefined"!==typeof c),this.toArrayLike(c,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var c,o,f="le"===t,d=new e(i),s=this.clone();if(f){for(o=0;!s.isZero();o++)c=s.andln(255),s.iushrn(8),d[o]=c;for(;o=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,c=0;c>26,this.words[c]=67108863&t;for(;0!==i&&c>26,this.words[c]=67108863&t;if(0===i&&c>>13,h=0|c[1],l=8191&h,p=h>>>13,x=0|c[2],m=8191&x,v=x>>>13,g=0|c[3],y=8191&g,w=g>>>13,_=0|c[4],M=8191&_,k=_>>>13,A=0|c[5],E=8191&A,S=A>>>13,T=0|c[6],C=8191&T,P=T>>>13,O=0|c[7],R=8191&O,I=O>>>13,B=0|c[8],L=8191&B,N=B>>>13,U=0|c[9],j=8191&U,D=U>>>13,F=0|o[0],H=8191&F,q=F>>>13,z=0|o[1],K=8191&z,$=z>>>13,G=0|o[2],V=8191&G,W=G>>>13,Z=0|o[3],J=8191&Z,Y=Z>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ae=0|o[6],ie=8191&ae,ce=ae>>>13,oe=0|o[7],fe=8191&oe,de=oe>>>13,se=0|o[8],ue=8191&se,be=se>>>13,he=0|o[9],le=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(u,H),a=Math.imul(u,q),a=a+Math.imul(b,H)|0,i=Math.imul(b,q);var xe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(l,H),a=Math.imul(l,q),a=a+Math.imul(p,H)|0,i=Math.imul(p,q),n=n+Math.imul(u,K)|0,a=a+Math.imul(u,$)|0,a=a+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0;var me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,H),a=Math.imul(m,q),a=a+Math.imul(v,H)|0,i=Math.imul(v,q),n=n+Math.imul(l,K)|0,a=a+Math.imul(l,$)|0,a=a+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(u,V)|0,a=a+Math.imul(u,W)|0,a=a+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ve=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(y,H),a=Math.imul(y,q),a=a+Math.imul(w,H)|0,i=Math.imul(w,q),n=n+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(l,V)|0,a=a+Math.imul(l,W)|0,a=a+Math.imul(p,V)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(u,J)|0,a=a+Math.imul(u,Y)|0,a=a+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ge=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(M,H),a=Math.imul(M,q),a=a+Math.imul(k,H)|0,i=Math.imul(k,q),n=n+Math.imul(y,K)|0,a=a+Math.imul(y,$)|0,a=a+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,n=n+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0,a=a+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,n=n+Math.imul(u,Q)|0,a=a+Math.imul(u,ee)|0,a=a+Math.imul(b,Q)|0,i=i+Math.imul(b,ee)|0;var ye=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,H),a=Math.imul(E,q),a=a+Math.imul(S,H)|0,i=Math.imul(S,q),n=n+Math.imul(M,K)|0,a=a+Math.imul(M,$)|0,a=a+Math.imul(k,K)|0,i=i+Math.imul(k,$)|0,n=n+Math.imul(y,V)|0,a=a+Math.imul(y,W)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,a=a+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,n=n+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0,a=a+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(u,re)|0,a=a+Math.imul(u,ne)|0,a=a+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var we=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,H),a=Math.imul(C,q),a=a+Math.imul(P,H)|0,i=Math.imul(P,q),n=n+Math.imul(E,K)|0,a=a+Math.imul(E,$)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(M,V)|0,a=a+Math.imul(M,W)|0,a=a+Math.imul(k,V)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,a=a+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,n=n+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,a=a+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0,a=a+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(u,ie)|0,a=a+Math.imul(u,ce)|0,a=a+Math.imul(b,ie)|0,i=i+Math.imul(b,ce)|0;var _e=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,H),a=Math.imul(R,q),a=a+Math.imul(I,H)|0,i=Math.imul(I,q),n=n+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,a=a+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,n=n+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,a=a+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,a=a+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,a=a+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,a=a+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(l,ie)|0,a=a+Math.imul(l,ce)|0,a=a+Math.imul(p,ie)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(u,fe)|0,a=a+Math.imul(u,de)|0,a=a+Math.imul(b,fe)|0,i=i+Math.imul(b,de)|0;var Me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,H),a=Math.imul(L,q),a=a+Math.imul(N,H)|0,i=Math.imul(N,q),n=n+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,a=a+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(C,V)|0,a=a+Math.imul(C,W)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(E,J)|0,a=a+Math.imul(E,Y)|0,a=a+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,n=n+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,a=a+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,a=a+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(m,ie)|0,a=a+Math.imul(m,ce)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(l,fe)|0,a=a+Math.imul(l,de)|0,a=a+Math.imul(p,fe)|0,i=i+Math.imul(p,de)|0,n=n+Math.imul(u,ue)|0,a=a+Math.imul(u,be)|0,a=a+Math.imul(b,ue)|0,i=i+Math.imul(b,be)|0;var ke=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,H),a=Math.imul(j,q),a=a+Math.imul(D,H)|0,i=Math.imul(D,q),n=n+Math.imul(L,K)|0,a=a+Math.imul(L,$)|0,a=a+Math.imul(N,K)|0,i=i+Math.imul(N,$)|0,n=n+Math.imul(R,V)|0,a=a+Math.imul(R,W)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(C,J)|0,a=a+Math.imul(C,Y)|0,a=a+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,n=n+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,a=a+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,a=a+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(y,ie)|0,a=a+Math.imul(y,ce)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(v,de)|0,n=n+Math.imul(l,ue)|0,a=a+Math.imul(l,be)|0,a=a+Math.imul(p,ue)|0,i=i+Math.imul(p,be)|0,n=n+Math.imul(u,le)|0,a=a+Math.imul(u,pe)|0,a=a+Math.imul(b,le)|0,i=i+Math.imul(b,pe)|0;var Ae=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),a=Math.imul(j,$),a=a+Math.imul(D,K)|0,i=Math.imul(D,$),n=n+Math.imul(L,V)|0,a=a+Math.imul(L,W)|0,a=a+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,n=n+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,a=a+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,a=a+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,a=a+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(M,ie)|0,a=a+Math.imul(M,ce)|0,a=a+Math.imul(k,ie)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(m,ue)|0,a=a+Math.imul(m,be)|0,a=a+Math.imul(v,ue)|0,i=i+Math.imul(v,be)|0,n=n+Math.imul(l,le)|0,a=a+Math.imul(l,pe)|0,a=a+Math.imul(p,le)|0,i=i+Math.imul(p,pe)|0;var Ee=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),a=Math.imul(j,W),a=a+Math.imul(D,V)|0,i=Math.imul(D,W),n=n+Math.imul(L,J)|0,a=a+Math.imul(L,Y)|0,a=a+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,n=n+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,a=a+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,a=a+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(E,ie)|0,a=a+Math.imul(E,ce)|0,a=a+Math.imul(S,ie)|0,i=i+Math.imul(S,ce)|0,n=n+Math.imul(M,fe)|0,a=a+Math.imul(M,de)|0,a=a+Math.imul(k,fe)|0,i=i+Math.imul(k,de)|0,n=n+Math.imul(y,ue)|0,a=a+Math.imul(y,be)|0,a=a+Math.imul(w,ue)|0,i=i+Math.imul(w,be)|0,n=n+Math.imul(m,le)|0,a=a+Math.imul(m,pe)|0,a=a+Math.imul(v,le)|0,i=i+Math.imul(v,pe)|0;var Se=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,J),a=Math.imul(j,Y),a=a+Math.imul(D,J)|0,i=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,a=a+Math.imul(N,Q)|0,i=i+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,a=a+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(C,ie)|0,a=a+Math.imul(C,ce)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,a=a+Math.imul(E,de)|0,a=a+Math.imul(S,fe)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(M,ue)|0,a=a+Math.imul(M,be)|0,a=a+Math.imul(k,ue)|0,i=i+Math.imul(k,be)|0,n=n+Math.imul(y,le)|0,a=a+Math.imul(y,pe)|0,a=a+Math.imul(w,le)|0,i=i+Math.imul(w,pe)|0;var Te=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Q),a=Math.imul(j,ee),a=a+Math.imul(D,Q)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,a=a+Math.imul(L,ne)|0,a=a+Math.imul(N,re)|0,i=i+Math.imul(N,ne)|0,n=n+Math.imul(R,ie)|0,a=a+Math.imul(R,ce)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(I,ce)|0,n=n+Math.imul(C,fe)|0,a=a+Math.imul(C,de)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(P,de)|0,n=n+Math.imul(E,ue)|0,a=a+Math.imul(E,be)|0,a=a+Math.imul(S,ue)|0,i=i+Math.imul(S,be)|0,n=n+Math.imul(M,le)|0,a=a+Math.imul(M,pe)|0,a=a+Math.imul(k,le)|0,i=i+Math.imul(k,pe)|0;var Ce=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),a=Math.imul(j,ne),a=a+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,a=a+Math.imul(L,ce)|0,a=a+Math.imul(N,ie)|0,i=i+Math.imul(N,ce)|0,n=n+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(I,de)|0,n=n+Math.imul(C,ue)|0,a=a+Math.imul(C,be)|0,a=a+Math.imul(P,ue)|0,i=i+Math.imul(P,be)|0,n=n+Math.imul(E,le)|0,a=a+Math.imul(E,pe)|0,a=a+Math.imul(S,le)|0,i=i+Math.imul(S,pe)|0;var Pe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,ie),a=Math.imul(j,ce),a=a+Math.imul(D,ie)|0,i=Math.imul(D,ce),n=n+Math.imul(L,fe)|0,a=a+Math.imul(L,de)|0,a=a+Math.imul(N,fe)|0,i=i+Math.imul(N,de)|0,n=n+Math.imul(R,ue)|0,a=a+Math.imul(R,be)|0,a=a+Math.imul(I,ue)|0,i=i+Math.imul(I,be)|0,n=n+Math.imul(C,le)|0,a=a+Math.imul(C,pe)|0,a=a+Math.imul(P,le)|0,i=i+Math.imul(P,pe)|0;var Oe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,fe),a=Math.imul(j,de),a=a+Math.imul(D,fe)|0,i=Math.imul(D,de),n=n+Math.imul(L,ue)|0,a=a+Math.imul(L,be)|0,a=a+Math.imul(N,ue)|0,i=i+Math.imul(N,be)|0,n=n+Math.imul(R,le)|0,a=a+Math.imul(R,pe)|0,a=a+Math.imul(I,le)|0,i=i+Math.imul(I,pe)|0;var Re=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,ue),a=Math.imul(j,be),a=a+Math.imul(D,ue)|0,i=Math.imul(D,be),n=n+Math.imul(L,le)|0,a=a+Math.imul(L,pe)|0,a=a+Math.imul(N,le)|0,i=i+Math.imul(N,pe)|0;var Ie=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,le),a=Math.imul(j,pe),a=a+Math.imul(D,le)|0,i=Math.imul(D,pe);var Be=(d+n|0)+((8191&a)<<13)|0;return d=(i+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=xe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=we,f[6]=_e,f[7]=Me,f[8]=ke,f[9]=Ae,f[10]=Ee,f[11]=Se,f[12]=Te,f[13]=Ce,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ie,f[18]=Be,0!==d&&(f[19]=d,r.length++),r};function x(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0,a+=c>>>26,c&=67108863}r.words[i]=o,n=c,c=a}return 0!==n?r.words[i]=n:r.length--,r.strip()}function m(e,t,r){var n=new v;return n.mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=l),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?l(this,e,t):n<1024?x(this,e,t):m(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,a,i){for(var c=0;c>>=1)a++;return 1<>>=13,r[2*c+1]=8191&i,i>>>=13;for(c=2*t;c>=26,t+=a/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=h(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var c=0;for(t=0;t>>26-r}c&&(this.words[t]=c,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,c=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<c)for(this.length-=c,d=0;d=0&&(0!==s||d>=a);d--){var u=0|this.words[d];this.words[d]=s<<26-i|u>>>i,s=u&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===o)return this.strip();for(n(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),a=e,c=0|a.words[a.length-1],o=this._countBits(c);r=26-o,0!==r&&(a=a.ushln(r),n.iushln(r),c=0|a.words[a.length-1]);var f,d=n.length-a.length;if("mod"!==t){f=new i(null),f.length=d+1,f.words=new Array(f.length);for(var s=0;s=0;b--){var h=67108864*(0|n.words[a.length+b])+(0|n.words[a.length+b-1]);h=Math.min(h/c|0,67108863),n._ishlnsubmul(a,h,b);while(0!==n.negative)h--,n.negative=0,n._ishlnsubmul(a,1,b),n.isZero()||(n.negative^=1);f&&(f.words[b]=h)}return f&&f.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.iadd(e)),{div:a,mod:c}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.isub(e)),{div:o.div,mod:c}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,c,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,a=this.length-1;a>=0;a--)r=(t*r+(0|this.words[a]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*t;this.words[r]=a/e|0,t=a%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a=new i(1),c=new i(0),o=new i(0),f=new i(1),d=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++d;var s=r.clone(),u=t.clone();while(!t.isZero()){for(var b=0,h=1;0===(t.words[0]&h)&&b<26;++b,h<<=1);if(b>0){t.iushrn(b);while(b-- >0)(a.isOdd()||c.isOdd())&&(a.iadd(s),c.isub(u)),a.iushrn(1),c.iushrn(1)}for(var l=0,p=1;0===(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(u)),o.iushrn(1),f.iushrn(1)}t.cmp(r)>=0?(t.isub(r),a.isub(o),c.isub(f)):(r.isub(t),o.isub(a),f.isub(c))}return{a:o,b:f,gcd:r.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a,c=new i(1),o=new i(0),f=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var d=0,s=1;0===(t.words[0]&s)&&d<26;++d,s<<=1);if(d>0){t.iushrn(d);while(d-- >0)c.isOdd()&&c.iadd(f),c.iushrn(1)}for(var u=0,b=1;0===(r.words[0]&b)&&u<26;++u,b<<=1);if(u>0){r.iushrn(u);while(u-- >0)o.isOdd()&&o.iadd(f),o.iushrn(1)}t.cmp(r)>=0?(t.isub(r),c.isub(o)):(r.isub(t),o.isub(c))}return a=0===t.cmpn(1)?c:o,a.cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[c]=o}return 0!==i&&(this.words[c]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new A(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},a(w,y),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=c}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new _;else if("p192"===e)t=new M;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return g[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}var a=this.m.subn(1),c=0;while(!a.isZero()&&0===a.andln(1))c++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),f=o.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();s=new i(2*s*s).toRed(this);while(0!==this.pow(s,d).cmp(f))s.redIAdd(f);var u=this.pow(s,a),b=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),l=c;while(0!==h.cmp(o)){for(var p=h,x=0;0!==p.cmp(o);x++)p=p.redSqr();n(x=0;a--){for(var s=t.words[a],u=d-1;u>=0;u--){var b=s>>u&1;c!==n[0]&&(c=this.sqr(c)),0!==b||0!==o?(o<<=1,o|=b,f++,(f===r||0===a&&0===u)&&(c=this.mul(c,n[o]),f=0,o=0)):f=0}d=26}return c},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},a(E,A),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),c=a;return a.cmp(this.m)>=0?c=a.isub(this.m):a.cmpn(0)<0&&(c=a.iadd(this.m)),c._forceRed(this)},E.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}(e,this)},36482:function(e,t,r){"use strict";r.d(t,{lE:function(){return u},zo:function(){return b},xs:function(){return y},E1:function(){return v},p3:function(){return g},$m:function(){return w},Dv:function(){return m},_t:function(){return s},Zq:function(){return f},A7:function(){return p},N:function(){return _},G1:function(){return h}});r(48675),r(3462);var n=r(48737);const a="bytes/5.6.0",i=new n.Yd(a);function c(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function f(e){return p(e)&&!(e.length%2)||s(e)}function d(e){return"number"===typeof e&&e==e&&e%1===0}function s(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(!d(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function u(e,t){if(t||(t={}),"number"===typeof e){i.checkSafeUint53(e,"invalid arrayify value");const t=[];while(e)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),o(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),c(e)&&(e=e.toHexString()),p(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0x0"+r.substring(2):"right"===t.hexPad?r+="0":i.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;eu(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),o(n)}function h(e){let t=u(e);if(0===t.length)return t;let r=0;while(rt&&i.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),o(r)}function p(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}const x="0123456789abcdef";function m(e,t){if(t||(t={}),"number"===typeof e){i.checkSafeUint53(e,"invalid hexlify value");let t="";while(e)t=x[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"===typeof e)return e=e.toString(16),e.length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),c(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":i.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(s(e)){let t="0x";for(let r=0;r>4]+x[15&n]}return t}return i.throwArgumentError("invalid hexlify value","value",e)}function v(e){if("string"!==typeof e)e=m(e);else if(!p(e)||e.length%2)return null;return(e.length-2)/2}function g(e,t,r){return"string"!==typeof e?e=m(e):(!p(e)||e.length%2)&&i.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function y(e){let t="0x";return e.forEach((e=>{t+=m(e).substring(2)})),t}function w(e,t){"string"!==typeof e?e=m(e):p(e)||i.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&i.throwArgumentError("value out of range","value",arguments[1]);while(e.length<2*t+2)e="0x0"+e.substring(2);return e}function _(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(f(e)){let r=u(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64))):65===r.length?(t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64)),t.v=r[64]):i.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:i.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=m(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=l(u(t._vs),32);t._vs=m(r);const n=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=n:t.recoveryParam!==n&&i.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const a=m(r);null==t.s?t.s=a:t.s!==a&&i.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?i.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&i.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=w(t.r,32):i.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=w(t.s,32):i.throwArgumentError("signature missing or invalid s","signature",e);const r=u(t.s);r[0]>=128&&i.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const n=m(r);t._vs&&(p(t._vs)||i.throwArgumentError("signature invalid _vs","signature",e),t._vs=w(t._vs,32)),null==t._vs?t._vs=n:t._vs!==n&&i.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},5554:function(e,t,r){"use strict";r.d(t,{Bz:function(){return o},_Y:function(){return i},fh:function(){return c},tL:function(){return a}});var n=r(83966);const a=n.O$.from(-1),i=n.O$.from(0),c=n.O$.from(1),o=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},76502:function(e,t,r){"use strict";r.d(t,{w:function(){return c}});var n=r(69893),a=r.n(n),i=r(36482);function c(e){return"0x"+a().keccak_256((0,i.lE)(e))}},48737:function(e,t,r){"use strict";r.d(t,{Yd:function(){return l}});r(21703),r(48675),r(3462);const n="logger/5.6.0";let a=!1,i=!1;const c={debug:1,default:2,info:2,warning:3,error:4,off:5};let o=c["default"],f=null;function d(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}const s=d();var u,b;(function(e){e["DEBUG"]="DEBUG",e["INFO"]="INFO",e["WARNING"]="WARNING",e["ERROR"]="ERROR",e["OFF"]="OFF"})(u||(u={})),function(e){e["UNKNOWN_ERROR"]="UNKNOWN_ERROR",e["NOT_IMPLEMENTED"]="NOT_IMPLEMENTED",e["UNSUPPORTED_OPERATION"]="UNSUPPORTED_OPERATION",e["NETWORK_ERROR"]="NETWORK_ERROR",e["SERVER_ERROR"]="SERVER_ERROR",e["TIMEOUT"]="TIMEOUT",e["BUFFER_OVERRUN"]="BUFFER_OVERRUN",e["NUMERIC_FAULT"]="NUMERIC_FAULT",e["MISSING_NEW"]="MISSING_NEW",e["INVALID_ARGUMENT"]="INVALID_ARGUMENT",e["MISSING_ARGUMENT"]="MISSING_ARGUMENT",e["UNEXPECTED_ARGUMENT"]="UNEXPECTED_ARGUMENT",e["CALL_EXCEPTION"]="CALL_EXCEPTION",e["INSUFFICIENT_FUNDS"]="INSUFFICIENT_FUNDS",e["NONCE_EXPIRED"]="NONCE_EXPIRED",e["REPLACEMENT_UNDERPRICED"]="REPLACEMENT_UNDERPRICED",e["UNPREDICTABLE_GAS_LIMIT"]="UNPREDICTABLE_GAS_LIMIT",e["TRANSACTION_REPLACED"]="TRANSACTION_REPLACED"}(b||(b={}));const h="0123456789abcdef";class l{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==c[r]&&this.throwArgumentError("invalid log level name","logLevel",e),o>c[r]||console.log.apply(console,t)}debug(...e){this._log(l.levels.DEBUG,e)}info(...e){this._log(l.levels.INFO,e)}warn(...e){this._log(l.levels.WARNING,e)}makeError(e,t,r){if(i)return this.makeError("censored error",t,{});t||(t=l.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=h[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(o){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const a=e;let c="";switch(t){case b.NUMERIC_FAULT:{c="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":c+="-"+t;break;case"negative-power":case"negative-width":c+="-unsupported";break;case"unbound-bitwise-result":c+="-unbound-result";break}break}case b.CALL_EXCEPTION:case b.INSUFFICIENT_FUNDS:case b.MISSING_NEW:case b.NONCE_EXPIRED:case b.REPLACEMENT_UNDERPRICED:case b.TRANSACTION_REPLACED:case b.UNPREDICTABLE_GAS_LIMIT:c=t;break}c&&(e+=" [ See: https://links.ethers.org/v5-errors-"+c+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const o=new Error(e);return o.reason=a,o.code=t,Object.keys(r).forEach((function(e){o[e]=r[e]})),o}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,l.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),s&&this.throwError("platform missing String.prototype.normalize",l.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:s})}checkSafeUint53(e,t){"number"===typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,l.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,l.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,l.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",l.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",l.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",l.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return f||(f=new l(n)),f}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",l.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),a){if(!e)return;this.globalLogger().throwError("error censorship permanent",l.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,a=!!t}static setLogLevel(e){const t=c[e.toLowerCase()];null!=t?o=t:l.globalLogger().warn("invalid log level - "+e)}static from(e){return new l(e)}}l.errors=b,l.levels=u},72224:function(e,t,r){"use strict";r.d(t,{uj:function(){return o},zG:function(){return c}});var n=r(48737);const a="properties/5.6.0";const i=new n.Yd(a);function c(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function o(e,t){e&&"object"===typeof e||i.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((r=>{t[r]||i.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}},26407:function(e,t,r){e=r.nmd(e),r(21703),function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var c;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{c="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(62808).Buffer}catch(S){}function o(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function f(e,t,r){var n=o(e,r);return r-1>=t&&(n|=o(e,r-1)<<4),n}function d(e,t,r,n){for(var a=0,i=Math.min(e.length,r),c=t;c=49?o-49+10:o>=17?o-17+10:o}return a}i.isBN=function(e){return e instanceof i||null!==e&&"object"===typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&(a++,this.negative=1),a=0;a-=3)c=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=c<>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=f(e,t,n)<=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8;else{var o=e.length-t;for(n=o%2===0?t+1:t;n=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8}this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,c=i%n,o=Math.min(i,i-c)+r,f=0,s=r;s1&&0===this.words[this.length-1])this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var s=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e){for(var t=new Array(e.bitLength()),r=0;r>>a}return t}function l(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],c=a*i,o=67108863&c,f=c/67108864|0;r.words[0]=o;for(var d=1;d>>26,u=67108863&f,b=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=b;h++){var l=d-h|0;a=0|e.words[l],i=0|t.words[h],c=a*i+u,s+=c/67108864|0,u=67108863&c}r.words[d]=0|u,f=0|s}return 0!==f?r.words[d]=0|f:r.length--,r.strip()}i.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var a=0,i=0,c=0;c>>24-a&16777215,r=0!==i||c!==this.length-1?s[6-f.length]+f+r:f+r,a+=2,a>=26&&(a-=26,c--)}0!==i&&(r=i.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=u[e],h=b[e];r="";var l=this.clone();l.negative=0;while(!l.isZero()){var p=l.modn(h).toString(e);l=l.idivn(h),r=l.isZero()?p+r:s[d-p.length]+p+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n("undefined"!==typeof c),this.toArrayLike(c,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var c,o,f="le"===t,d=new e(i),s=this.clone();if(f){for(o=0;!s.isZero();o++)c=s.andln(255),s.iushrn(8),d[o]=c;for(;o=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,c=0;c>26,this.words[c]=67108863&t;for(;0!==i&&c>26,this.words[c]=67108863&t;if(0===i&&c>>13,h=0|c[1],l=8191&h,p=h>>>13,x=0|c[2],m=8191&x,v=x>>>13,g=0|c[3],y=8191&g,w=g>>>13,_=0|c[4],M=8191&_,k=_>>>13,A=0|c[5],E=8191&A,S=A>>>13,T=0|c[6],C=8191&T,P=T>>>13,O=0|c[7],R=8191&O,I=O>>>13,B=0|c[8],L=8191&B,N=B>>>13,U=0|c[9],j=8191&U,D=U>>>13,F=0|o[0],H=8191&F,q=F>>>13,z=0|o[1],K=8191&z,$=z>>>13,G=0|o[2],V=8191&G,W=G>>>13,Z=0|o[3],J=8191&Z,Y=Z>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ae=0|o[6],ie=8191&ae,ce=ae>>>13,oe=0|o[7],fe=8191&oe,de=oe>>>13,se=0|o[8],ue=8191&se,be=se>>>13,he=0|o[9],le=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(u,H),a=Math.imul(u,q),a=a+Math.imul(b,H)|0,i=Math.imul(b,q);var xe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(l,H),a=Math.imul(l,q),a=a+Math.imul(p,H)|0,i=Math.imul(p,q),n=n+Math.imul(u,K)|0,a=a+Math.imul(u,$)|0,a=a+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0;var me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,H),a=Math.imul(m,q),a=a+Math.imul(v,H)|0,i=Math.imul(v,q),n=n+Math.imul(l,K)|0,a=a+Math.imul(l,$)|0,a=a+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(u,V)|0,a=a+Math.imul(u,W)|0,a=a+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ve=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(y,H),a=Math.imul(y,q),a=a+Math.imul(w,H)|0,i=Math.imul(w,q),n=n+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(l,V)|0,a=a+Math.imul(l,W)|0,a=a+Math.imul(p,V)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(u,J)|0,a=a+Math.imul(u,Y)|0,a=a+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ge=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(M,H),a=Math.imul(M,q),a=a+Math.imul(k,H)|0,i=Math.imul(k,q),n=n+Math.imul(y,K)|0,a=a+Math.imul(y,$)|0,a=a+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,n=n+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0,a=a+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,n=n+Math.imul(u,Q)|0,a=a+Math.imul(u,ee)|0,a=a+Math.imul(b,Q)|0,i=i+Math.imul(b,ee)|0;var ye=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,H),a=Math.imul(E,q),a=a+Math.imul(S,H)|0,i=Math.imul(S,q),n=n+Math.imul(M,K)|0,a=a+Math.imul(M,$)|0,a=a+Math.imul(k,K)|0,i=i+Math.imul(k,$)|0,n=n+Math.imul(y,V)|0,a=a+Math.imul(y,W)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,a=a+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,n=n+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0,a=a+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(u,re)|0,a=a+Math.imul(u,ne)|0,a=a+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var we=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,H),a=Math.imul(C,q),a=a+Math.imul(P,H)|0,i=Math.imul(P,q),n=n+Math.imul(E,K)|0,a=a+Math.imul(E,$)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(M,V)|0,a=a+Math.imul(M,W)|0,a=a+Math.imul(k,V)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,a=a+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,n=n+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,a=a+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0,a=a+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(u,ie)|0,a=a+Math.imul(u,ce)|0,a=a+Math.imul(b,ie)|0,i=i+Math.imul(b,ce)|0;var _e=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,H),a=Math.imul(R,q),a=a+Math.imul(I,H)|0,i=Math.imul(I,q),n=n+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,a=a+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,n=n+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,a=a+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,a=a+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,a=a+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,a=a+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(l,ie)|0,a=a+Math.imul(l,ce)|0,a=a+Math.imul(p,ie)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(u,fe)|0,a=a+Math.imul(u,de)|0,a=a+Math.imul(b,fe)|0,i=i+Math.imul(b,de)|0;var Me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,H),a=Math.imul(L,q),a=a+Math.imul(N,H)|0,i=Math.imul(N,q),n=n+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,a=a+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(C,V)|0,a=a+Math.imul(C,W)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(E,J)|0,a=a+Math.imul(E,Y)|0,a=a+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,n=n+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,a=a+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,a=a+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(m,ie)|0,a=a+Math.imul(m,ce)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(l,fe)|0,a=a+Math.imul(l,de)|0,a=a+Math.imul(p,fe)|0,i=i+Math.imul(p,de)|0,n=n+Math.imul(u,ue)|0,a=a+Math.imul(u,be)|0,a=a+Math.imul(b,ue)|0,i=i+Math.imul(b,be)|0;var ke=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,H),a=Math.imul(j,q),a=a+Math.imul(D,H)|0,i=Math.imul(D,q),n=n+Math.imul(L,K)|0,a=a+Math.imul(L,$)|0,a=a+Math.imul(N,K)|0,i=i+Math.imul(N,$)|0,n=n+Math.imul(R,V)|0,a=a+Math.imul(R,W)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(C,J)|0,a=a+Math.imul(C,Y)|0,a=a+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,n=n+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,a=a+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,a=a+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(y,ie)|0,a=a+Math.imul(y,ce)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(v,de)|0,n=n+Math.imul(l,ue)|0,a=a+Math.imul(l,be)|0,a=a+Math.imul(p,ue)|0,i=i+Math.imul(p,be)|0,n=n+Math.imul(u,le)|0,a=a+Math.imul(u,pe)|0,a=a+Math.imul(b,le)|0,i=i+Math.imul(b,pe)|0;var Ae=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),a=Math.imul(j,$),a=a+Math.imul(D,K)|0,i=Math.imul(D,$),n=n+Math.imul(L,V)|0,a=a+Math.imul(L,W)|0,a=a+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,n=n+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,a=a+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,a=a+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,a=a+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(M,ie)|0,a=a+Math.imul(M,ce)|0,a=a+Math.imul(k,ie)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(m,ue)|0,a=a+Math.imul(m,be)|0,a=a+Math.imul(v,ue)|0,i=i+Math.imul(v,be)|0,n=n+Math.imul(l,le)|0,a=a+Math.imul(l,pe)|0,a=a+Math.imul(p,le)|0,i=i+Math.imul(p,pe)|0;var Ee=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),a=Math.imul(j,W),a=a+Math.imul(D,V)|0,i=Math.imul(D,W),n=n+Math.imul(L,J)|0,a=a+Math.imul(L,Y)|0,a=a+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,n=n+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,a=a+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,a=a+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(E,ie)|0,a=a+Math.imul(E,ce)|0,a=a+Math.imul(S,ie)|0,i=i+Math.imul(S,ce)|0,n=n+Math.imul(M,fe)|0,a=a+Math.imul(M,de)|0,a=a+Math.imul(k,fe)|0,i=i+Math.imul(k,de)|0,n=n+Math.imul(y,ue)|0,a=a+Math.imul(y,be)|0,a=a+Math.imul(w,ue)|0,i=i+Math.imul(w,be)|0,n=n+Math.imul(m,le)|0,a=a+Math.imul(m,pe)|0,a=a+Math.imul(v,le)|0,i=i+Math.imul(v,pe)|0;var Se=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,J),a=Math.imul(j,Y),a=a+Math.imul(D,J)|0,i=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,a=a+Math.imul(N,Q)|0,i=i+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,a=a+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(C,ie)|0,a=a+Math.imul(C,ce)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,a=a+Math.imul(E,de)|0,a=a+Math.imul(S,fe)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(M,ue)|0,a=a+Math.imul(M,be)|0,a=a+Math.imul(k,ue)|0,i=i+Math.imul(k,be)|0,n=n+Math.imul(y,le)|0,a=a+Math.imul(y,pe)|0,a=a+Math.imul(w,le)|0,i=i+Math.imul(w,pe)|0;var Te=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Q),a=Math.imul(j,ee),a=a+Math.imul(D,Q)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,a=a+Math.imul(L,ne)|0,a=a+Math.imul(N,re)|0,i=i+Math.imul(N,ne)|0,n=n+Math.imul(R,ie)|0,a=a+Math.imul(R,ce)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(I,ce)|0,n=n+Math.imul(C,fe)|0,a=a+Math.imul(C,de)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(P,de)|0,n=n+Math.imul(E,ue)|0,a=a+Math.imul(E,be)|0,a=a+Math.imul(S,ue)|0,i=i+Math.imul(S,be)|0,n=n+Math.imul(M,le)|0,a=a+Math.imul(M,pe)|0,a=a+Math.imul(k,le)|0,i=i+Math.imul(k,pe)|0;var Ce=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),a=Math.imul(j,ne),a=a+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,a=a+Math.imul(L,ce)|0,a=a+Math.imul(N,ie)|0,i=i+Math.imul(N,ce)|0,n=n+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(I,de)|0,n=n+Math.imul(C,ue)|0,a=a+Math.imul(C,be)|0,a=a+Math.imul(P,ue)|0,i=i+Math.imul(P,be)|0,n=n+Math.imul(E,le)|0,a=a+Math.imul(E,pe)|0,a=a+Math.imul(S,le)|0,i=i+Math.imul(S,pe)|0;var Pe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,ie),a=Math.imul(j,ce),a=a+Math.imul(D,ie)|0,i=Math.imul(D,ce),n=n+Math.imul(L,fe)|0,a=a+Math.imul(L,de)|0,a=a+Math.imul(N,fe)|0,i=i+Math.imul(N,de)|0,n=n+Math.imul(R,ue)|0,a=a+Math.imul(R,be)|0,a=a+Math.imul(I,ue)|0,i=i+Math.imul(I,be)|0,n=n+Math.imul(C,le)|0,a=a+Math.imul(C,pe)|0,a=a+Math.imul(P,le)|0,i=i+Math.imul(P,pe)|0;var Oe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,fe),a=Math.imul(j,de),a=a+Math.imul(D,fe)|0,i=Math.imul(D,de),n=n+Math.imul(L,ue)|0,a=a+Math.imul(L,be)|0,a=a+Math.imul(N,ue)|0,i=i+Math.imul(N,be)|0,n=n+Math.imul(R,le)|0,a=a+Math.imul(R,pe)|0,a=a+Math.imul(I,le)|0,i=i+Math.imul(I,pe)|0;var Re=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,ue),a=Math.imul(j,be),a=a+Math.imul(D,ue)|0,i=Math.imul(D,be),n=n+Math.imul(L,le)|0,a=a+Math.imul(L,pe)|0,a=a+Math.imul(N,le)|0,i=i+Math.imul(N,pe)|0;var Ie=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,le),a=Math.imul(j,pe),a=a+Math.imul(D,le)|0,i=Math.imul(D,pe);var Be=(d+n|0)+((8191&a)<<13)|0;return d=(i+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=xe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=we,f[6]=_e,f[7]=Me,f[8]=ke,f[9]=Ae,f[10]=Ee,f[11]=Se,f[12]=Te,f[13]=Ce,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ie,f[18]=Be,0!==d&&(f[19]=d,r.length++),r};function x(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0,a+=c>>>26,c&=67108863}r.words[i]=o,n=c,c=a}return 0!==n?r.words[i]=n:r.length--,r.strip()}function m(e,t,r){var n=new v;return n.mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=l),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?l(this,e,t):n<1024?x(this,e,t):m(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,a,i){for(var c=0;c>>=1)a++;return 1<>>=13,r[2*c+1]=8191&i,i>>>=13;for(c=2*t;c>=26,t+=a/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=h(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var c=0;for(t=0;t>>26-r}c&&(this.words[t]=c,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,c=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<c)for(this.length-=c,d=0;d=0&&(0!==s||d>=a);d--){var u=0|this.words[d];this.words[d]=s<<26-i|u>>>i,s=u&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===o)return this.strip();for(n(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),a=e,c=0|a.words[a.length-1],o=this._countBits(c);r=26-o,0!==r&&(a=a.ushln(r),n.iushln(r),c=0|a.words[a.length-1]);var f,d=n.length-a.length;if("mod"!==t){f=new i(null),f.length=d+1,f.words=new Array(f.length);for(var s=0;s=0;b--){var h=67108864*(0|n.words[a.length+b])+(0|n.words[a.length+b-1]);h=Math.min(h/c|0,67108863),n._ishlnsubmul(a,h,b);while(0!==n.negative)h--,n.negative=0,n._ishlnsubmul(a,1,b),n.isZero()||(n.negative^=1);f&&(f.words[b]=h)}return f&&f.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.iadd(e)),{div:a,mod:c}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.isub(e)),{div:o.div,mod:c}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,c,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,a=this.length-1;a>=0;a--)r=(t*r+(0|this.words[a]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*t;this.words[r]=a/e|0,t=a%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a=new i(1),c=new i(0),o=new i(0),f=new i(1),d=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++d;var s=r.clone(),u=t.clone();while(!t.isZero()){for(var b=0,h=1;0===(t.words[0]&h)&&b<26;++b,h<<=1);if(b>0){t.iushrn(b);while(b-- >0)(a.isOdd()||c.isOdd())&&(a.iadd(s),c.isub(u)),a.iushrn(1),c.iushrn(1)}for(var l=0,p=1;0===(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(u)),o.iushrn(1),f.iushrn(1)}t.cmp(r)>=0?(t.isub(r),a.isub(o),c.isub(f)):(r.isub(t),o.isub(a),f.isub(c))}return{a:o,b:f,gcd:r.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a,c=new i(1),o=new i(0),f=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var d=0,s=1;0===(t.words[0]&s)&&d<26;++d,s<<=1);if(d>0){t.iushrn(d);while(d-- >0)c.isOdd()&&c.iadd(f),c.iushrn(1)}for(var u=0,b=1;0===(r.words[0]&b)&&u<26;++u,b<<=1);if(u>0){r.iushrn(u);while(u-- >0)o.isOdd()&&o.iadd(f),o.iushrn(1)}t.cmp(r)>=0?(t.isub(r),c.isub(o)):(r.isub(t),o.isub(c))}return a=0===t.cmpn(1)?c:o,a.cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[c]=o}return 0!==i&&(this.words[c]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new A(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},a(w,y),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=c}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new _;else if("p192"===e)t=new M;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return g[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}var a=this.m.subn(1),c=0;while(!a.isZero()&&0===a.andln(1))c++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),f=o.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();s=new i(2*s*s).toRed(this);while(0!==this.pow(s,d).cmp(f))s.redIAdd(f);var u=this.pow(s,a),b=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),l=c;while(0!==h.cmp(o)){for(var p=h,x=0;0!==p.cmp(o);x++)p=p.redSqr();n(x=0;a--){for(var s=t.words[a],u=d-1;u>=0;u--){var b=s>>u&1;c!==n[0]&&(c=this.sqr(c)),0!==b||0!==o?(o<<=1,o|=b,f++,(f===r||0===a&&0===u)&&(c=this.mul(c,n[o]),f=0,o=0)):f=0}d=26}return c},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},a(E,A),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),c=a;return a.cmp(this.m)>=0?c=a.isub(this.m):a.cmpn(0)<0&&(c=a.iadd(this.m)),c._forceRed(this)},E.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}(e,this)},68775:function(e,t,r){"use strict";r.r(t),r.d(t,{TransactionTypes:function(){return xe},accessListify:function(){return Ae},computeAddress:function(){return we},parse:function(){return Le},recoverAddress:function(){return _e},serialize:function(){return Pe}});r(21703);var n=r(80594),a=r(83966),i=r(36482),c=r(5554),o=r(76502),f=r(72224),d=r(48737);const s="rlp/5.6.0",u=new d.Yd(s);function b(e){const t=[];while(e)t.unshift(255&e),e>>=8;return t}function h(e,t,r){let n=0;for(let a=0;at+1+n&&u.throwError("child data too short",d.Yd.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:a}}function m(e,t){if(0===e.length&&u.throwError("data too short",d.Yd.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&u.throwError("data short segment too short",d.Yd.errors.BUFFER_OVERRUN,{});const n=h(e,t+1,r);return t+1+r+n>e.length&&u.throwError("data long segment too short",d.Yd.errors.BUFFER_OVERRUN,{}),x(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&u.throwError("data array too short",d.Yd.errors.BUFFER_OVERRUN,{}),x(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&u.throwError("data array too short",d.Yd.errors.BUFFER_OVERRUN,{});const n=h(e,t+1,r);t+1+r+n>e.length&&u.throwError("data array too short",d.Yd.errors.BUFFER_OVERRUN,{});const a=(0,i.Dv)(e.slice(t+1+r,t+1+r+n));return{consumed:1+r+n,result:a}}if(e[t]>=128){const r=e[t]-128;t+1+r>e.length&&u.throwError("data too short",d.Yd.errors.BUFFER_OVERRUN,{});const n=(0,i.Dv)(e.slice(t+1,t+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:(0,i.Dv)(e[t])}}function v(e){const t=(0,i.lE)(e),r=m(t,0);return r.consumed!==t.length&&u.throwArgumentError("invalid rlp data","data",e),r.result}var g=r(26407),y=r.n(g),w=r(78730),_=r.n(w);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:"undefined"!==typeof self&&self;function M(e,t,r){return r={path:t,exports:{},require:function(e,t){return k(e,void 0===t||null===t?r.path:t)}},e(r,r.exports),r.exports}function k(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var A=E;function E(e,t){if(!e)throw new Error(t||"Assertion failed")}E.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var S=M((function(e,t){var r=t;function n(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!==typeof e){for(var n=0;n>8,c=255&a;i?r.push(i,c):r.push(c)}return r}function a(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r(a>>1)-1?(a>>1)-f:f,i.isubn(o)):o=0,n[c]=o,i.iushrn(1)}return n}function a(e,t){var r=[[],[]];e=e.clone(),t=t.clone();var n,a=0,i=0;while(e.cmpn(-a)>0||t.cmpn(-i)>0){var c,o,f=e.andln(3)+a&3,d=t.andln(3)+i&3;3===f&&(f=-1),3===d&&(d=-1),0===(1&f)?c=0:(n=e.andln(7)+a&7,c=3!==n&&5!==n||2!==d?f:-f),r[0].push(c),0===(1&d)?o=0:(n=t.andln(7)+i&7,o=3!==n&&5!==n||2!==f?d:-d),r[1].push(o),2*a===c+1&&(a=1-a),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r}function i(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function c(e){return"string"===typeof e?r.toArray(e,"hex"):e}function o(e){return new(y())(e,"hex","le")}r.assert=A,r.toArray=S.toArray,r.zero2=S.zero2,r.toHex=S.toHex,r.encode=S.encode,r.getNAF=n,r.getJSF=a,r.cachedProperty=i,r.parseBytes=c,r.intFromLE=o})),C=T.getNAF,P=T.getJSF,O=T.assert;function R(e,t){this.type=e,this.p=new(y())(t.p,16),this.red=t.prime?y().red(t.prime):y().mont(this.p),this.zero=new(y())(0).toRed(this.red),this.one=new(y())(1).toRed(this.red),this.two=new(y())(2).toRed(this.red),this.n=t.n&&new(y())(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var I=R;function B(e,t){this.curve=e,this.type=t,this.precomputed=null}R.prototype.point=function(){throw new Error("Not implemented")},R.prototype.validate=function(){throw new Error("Not implemented")},R.prototype._fixedNafMul=function(e,t){O(e.precomputed);var r=e._getDoubles(),n=C(t,1,this._bitLength),a=(1<=i;f--)c=(c<<1)+n[f];o.push(c)}for(var d=this.jpoint(null,null,null),s=this.jpoint(null,null,null),u=a;u>0;u--){for(i=0;i=0;o--){for(var f=0;o>=0&&0===i[o];o--)f++;if(o>=0&&f++,c=c.dblp(f),o<0)break;var d=i[o];O(0!==d),c="affine"===e.type?d>0?c.mixedAdd(a[d-1>>1]):c.mixedAdd(a[-d-1>>1].neg()):d>0?c.add(a[d-1>>1]):c.add(a[-d-1>>1].neg())}return"affine"===e.type?c.toP():c},R.prototype._wnafMulAdd=function(e,t,r,n,a){var i,c,o,f=this._wnafT1,d=this._wnafT2,s=this._wnafT3,u=0;for(i=0;i=1;i-=2){var h=i-1,l=i;if(1===f[h]&&1===f[l]){var p=[t[h],null,null,t[l]];0===t[h].y.cmp(t[l].y)?(p[1]=t[h].add(t[l]),p[2]=t[h].toJ().mixedAdd(t[l].neg())):0===t[h].y.cmp(t[l].y.redNeg())?(p[1]=t[h].toJ().mixedAdd(t[l]),p[2]=t[h].add(t[l].neg())):(p[1]=t[h].toJ().mixedAdd(t[l]),p[2]=t[h].toJ().mixedAdd(t[l].neg()));var x=[-3,-1,-5,-7,0,7,5,1,3],m=P(r[h],r[l]);for(u=Math.max(m[0].length,u),s[h]=new Array(u),s[l]=new Array(u),c=0;c=0;i--){var _=0;while(i>=0){var M=!0;for(c=0;c=0&&_++,y=y.dblp(_),i<0)break;for(c=0;c0?o=d[c][k-1>>1]:k<0&&(o=d[c][-k-1>>1].neg()),y="affine"===o.type?y.mixedAdd(o):y.add(o))}}for(i=0;i=Math.ceil((e.bitLength()+1)/t.step)},B.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,a=0;a=0&&(i=t,c=r),n.negative&&(n=n.neg(),a=a.neg()),i.negative&&(i=i.neg(),c=c.neg()),[{a:n,b:a},{a:i,b:c}]},U.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],a=n.b.mul(e).divRound(this.n),i=r.b.neg().mul(e).divRound(this.n),c=a.mul(r.a),o=i.mul(n.a),f=a.mul(r.b),d=i.mul(n.b),s=e.sub(c).sub(o),u=f.add(d).neg();return{k1:s,k2:u}},U.prototype.pointFromX=function(e,t){e=new(y())(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=n.fromRed().isOdd();return(t&&!a||!t&&a)&&(n=n.redNeg()),this.point(e,n)},U.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(a).cmpn(0)},U.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,a=this._endoWnafT2,i=0;i":""},D.prototype.isInfinity=function(){return this.inf},D.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},D.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),a=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),i=a.redSqr().redISub(this.x.redAdd(this.x)),c=a.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,c)},D.prototype.getX=function(){return this.x.fromRed()},D.prototype.getY=function(){return this.y.fromRed()},D.prototype.mul=function(e){return e=new(y())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},D.prototype.mulAdd=function(e,t,r){var n=[this,t],a=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,a):this.curve._wnafMulAdd(1,n,a,2)},D.prototype.jmulAdd=function(e,t,r){var n=[this,t],a=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,a,!0):this.curve._wnafMulAdd(1,n,a,2,!0)},D.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},D.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},D.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},L(F,I.BasePoint),U.prototype.jpoint=function(e,t,r){return new F(this,e,t,r)},F.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},F.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},F.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),a=e.x.redMul(r),i=this.y.redMul(t.redMul(e.z)),c=e.y.redMul(r.redMul(this.z)),o=n.redSub(a),f=i.redSub(c);if(0===o.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var d=o.redSqr(),s=d.redMul(o),u=n.redMul(d),b=f.redSqr().redIAdd(s).redISub(u).redISub(u),h=f.redMul(u.redISub(b)).redISub(i.redMul(s)),l=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(b,h,l)},F.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),a=this.y,i=e.y.redMul(t).redMul(this.z),c=r.redSub(n),o=a.redSub(i);if(0===c.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=c.redSqr(),d=f.redMul(c),s=r.redMul(f),u=o.redSqr().redIAdd(d).redISub(s).redISub(s),b=o.redMul(s.redISub(u)).redISub(a.redMul(d)),h=this.z.redMul(c);return this.curve.jpoint(u,b,h)},F.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(a),0===this.x.cmp(r))return!0}},F.prototype.inspect=function(){return this.isInfinity()?"":""},F.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var H=M((function(e,t){var r=t;r.base=I,r.short=j,r.mont=null,r.edwards=null})),q=M((function(e,t){var r,n=t,a=T.assert;function i(e){"short"===e.type?this.curve=new H.short(e):"edwards"===e.type?this.curve=new H.edwards(e):this.curve=new H.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new i(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=i,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:_().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:_().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:_().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:_().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:_().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:_().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:_().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(o){r=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:_().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function z(e){if(!(this instanceof z))return new z(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=S.toArray(e.entropy,e.entropyEnc||"hex"),r=S.toArray(e.nonce,e.nonceEnc||"hex"),n=S.toArray(e.pers,e.persEnc||"hex");A(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var K=z;z.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},z.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=S.toArray(r,n||"hex"),this._update(r));var a=[];while(a.length"};var W=T.assert;function Z(e,t){if(e instanceof Z)return e;this._importDER(e,t)||(W(e.r&&e.s,"Signature without r or s"),this.r=new(y())(e.r,16),this.s=new(y())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var J=Z;function Y(){this.place=0}function X(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var a=0,i=0,c=t.place;i>>=0;return!(a<=127)&&(t.place=c,a)}function Q(e){var t=0,r=e.length-1;while(!e[t]&&!(128&e[t+1])&&t>>3);e.push(128|r);while(--r)e.push(t>>>(r<<3)&255);e.push(t)}}Z.prototype._importDER=function(e,t){e=T.toArray(e,t);var r=new Y;if(48!==e[r.place++])return!1;var n=X(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=X(e,r);if(!1===a)return!1;var i=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var c=X(e,r);if(!1===c)return!1;if(e.length!==c+r.place)return!1;var o=e.slice(r.place,c+r.place);if(0===i[0]){if(!(128&i[1]))return!1;i=i.slice(1)}if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}return this.r=new(y())(i),this.s=new(y())(o),this.recoveryParam=null,!0},Z.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=Q(t),r=Q(r);while(!r[0]&&!(128&r[1]))r=r.slice(1);var n=[2];ee(n,t.length),n=n.concat(t),n.push(2),ee(n,r.length);var a=n.concat(r),i=[48];return ee(i,a.length),i=i.concat(a),T.encode(i,e)};var te=function(){throw new Error("unsupported")},re=T.assert;function ne(e){if(!(this instanceof ne))return new ne(e);"string"===typeof e&&(re(Object.prototype.hasOwnProperty.call(q,e),"Unknown curve "+e),e=q[e]),e instanceof q.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var ae=ne;ne.prototype.keyPair=function(e){return new V(this,e)},ne.prototype.keyFromPrivate=function(e,t){return V.fromPrivate(this,e,t)},ne.prototype.keyFromPublic=function(e,t){return V.fromPublic(this,e,t)},ne.prototype.genKeyPair=function(e){e||(e={});for(var t=new K({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||te(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(y())(2));;){var a=new(y())(t.generate(r));if(!(a.cmp(n)>0))return a.iaddn(1),this.keyFromPrivate(a)}},ne.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},ne.prototype.sign=function(e,t,r,n){"object"===typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new(y())(e,16));for(var a=this.n.byteLength(),i=t.getPrivate().toArray("be",a),c=e.toArray("be",a),o=new K({hash:this.hash,entropy:i,nonce:c,pers:n.pers,persEnc:n.persEnc||"utf8"}),f=this.n.sub(new(y())(1)),d=0;;d++){var s=n.k?n.k(d):new(y())(o.generate(this.n.byteLength()));if(s=this._truncateToN(s,!0),!(s.cmpn(1)<=0||s.cmp(f)>=0)){var u=this.g.mul(s);if(!u.isInfinity()){var b=u.getX(),h=b.umod(this.n);if(0!==h.cmpn(0)){var l=s.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(l=l.umod(this.n),0!==l.cmpn(0)){var p=(u.getY().isOdd()?1:0)|(0!==b.cmp(h)?2:0);return n.canonical&&l.cmp(this.nh)>0&&(l=this.n.sub(l),p^=1),new J({r:h,s:l,recoveryParam:p})}}}}}},ne.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(y())(e,16)),r=this.keyFromPublic(r,n),t=new J(t,"hex");var a=t.r,i=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var c,o=i.invm(this.n),f=o.mul(e).umod(this.n),d=o.mul(a).umod(this.n);return this.curve._maxwellTrick?(c=this.g.jmulAdd(f,r.getPublic(),d),!c.isInfinity()&&c.eqXToP(a)):(c=this.g.mulAdd(f,r.getPublic(),d),!c.isInfinity()&&0===c.getX().umod(this.n).cmp(a))},ne.prototype.recoverPubKey=function(e,t,r,n){re((3&r)===r,"The recovery param is more than two bits"),t=new J(t,n);var a=this.n,i=new(y())(e),c=t.r,o=t.s,f=1&r,d=r>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");c=d?this.curve.pointFromX(c.add(this.curve.n),f):this.curve.pointFromX(c,f);var s=t.r.invm(a),u=a.sub(i).mul(s).umod(a),b=o.mul(s).umod(a);return this.g.mulAdd(u,c,b)},ne.prototype.getKeyRecoveryParam=function(e,t,r,n){if(t=new J(t,n),null!==t.recoveryParam)return t.recoveryParam;for(var a=0;a<4;a++){var i;try{i=this.recoverPubKey(e,t,a)}catch(e){continue}if(i.eq(r))return a}throw new Error("Unable to find valid recovery factor")};var ie=M((function(e,t){var r=t;r.version={version:"6.5.4"}.version,r.utils=T,r.rand=function(){throw new Error("unsupported")},r.curve=H,r.curves=q,r.ec=ae,r.eddsa=null})),ce=ie.ec;const oe="signing-key/5.6.0",fe=new d.Yd(oe);let de=null;function se(){return de||(de=new ce("secp256k1")),de}class ue{constructor(e){(0,f.zG)(this,"curve","secp256k1"),(0,f.zG)(this,"privateKey",(0,i.Dv)(e));const t=se().keyFromPrivate((0,i.lE)(this.privateKey));(0,f.zG)(this,"publicKey","0x"+t.getPublic(!1,"hex")),(0,f.zG)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),(0,f.zG)(this,"_isSigningKey",!0)}_addPoint(e){const t=se().keyFromPublic((0,i.lE)(this.publicKey)),r=se().keyFromPublic((0,i.lE)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=se().keyFromPrivate((0,i.lE)(this.privateKey)),r=(0,i.lE)(e);32!==r.length&&fe.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return(0,i.N)({recoveryParam:n.recoveryParam,r:(0,i.$m)("0x"+n.r.toString(16),32),s:(0,i.$m)("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=se().keyFromPrivate((0,i.lE)(this.privateKey)),r=se().keyFromPublic((0,i.lE)(he(e)));return(0,i.$m)("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function be(e,t){const r=(0,i.N)(t),n={r:(0,i.lE)(r.r),s:(0,i.lE)(r.s)};return"0x"+se().recoverPubKey((0,i.lE)(e),n,r.recoveryParam).encode("hex",!1)}function he(e,t){const r=(0,i.lE)(e);if(32===r.length){const e=new ue(r);return t?"0x"+se().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?(0,i.Dv)(r):"0x"+se().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+se().keyFromPublic(r).getPublic(!0,"hex"):(0,i.Dv)(r):fe.throwArgumentError("invalid public or private key","key","[REDACTED]")}const le="transactions/5.6.0",pe=new d.Yd(le);var xe;function me(e){return"0x"===e?null:(0,n.Kn)(e)}function ve(e){return"0x"===e?c._Y:a.O$.from(e)}(function(e){e[e["legacy"]=0]="legacy",e[e["eip2930"]=1]="eip2930",e[e["eip1559"]=2]="eip1559"})(xe||(xe={}));const ge=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],ye={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function we(e){const t=he(e);return(0,n.Kn)((0,i.p3)((0,o.w)((0,i.p3)(t,1)),12))}function _e(e,t){return we(be((0,i.lE)(e),t))}function Me(e,t){const r=(0,i.G1)(a.O$.from(e).toHexString());return r.length>32&&pe.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function ke(e,t){return{address:(0,n.Kn)(e),storageKeys:(t||[]).map(((t,r)=>(32!==(0,i.E1)(t)&&pe.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function Ae(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&pe.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),ke(e[0],e[1])):ke(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return ke(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function Ee(e){return Ae(e).map((e=>[e.address,e.storageKeys]))}function Se(e,t){if(null!=e.gasPrice){const t=a.O$.from(e.gasPrice),r=a.O$.from(e.maxFeePerGas||0);t.eq(r)||pe.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[Me(e.chainId||0,"chainId"),Me(e.nonce||0,"nonce"),Me(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Me(e.maxFeePerGas||0,"maxFeePerGas"),Me(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.Kn)(e.to):"0x",Me(e.value||0,"value"),e.data||"0x",Ee(e.accessList||[])];if(t){const e=(0,i.N)(t);r.push(Me(e.recoveryParam,"recoveryParam")),r.push((0,i.G1)(e.r)),r.push((0,i.G1)(e.s))}return(0,i.xs)(["0x02",p(r)])}function Te(e,t){const r=[Me(e.chainId||0,"chainId"),Me(e.nonce||0,"nonce"),Me(e.gasPrice||0,"gasPrice"),Me(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.Kn)(e.to):"0x",Me(e.value||0,"value"),e.data||"0x",Ee(e.accessList||[])];if(t){const e=(0,i.N)(t);r.push(Me(e.recoveryParam,"recoveryParam")),r.push((0,i.G1)(e.r)),r.push((0,i.G1)(e.s))}return(0,i.xs)(["0x01",p(r)])}function Ce(e,t){(0,f.uj)(e,ye);const r=[];ge.forEach((function(t){let n=e[t.name]||[];const a={};t.numeric&&(a.hexPad="left"),n=(0,i.lE)((0,i.Dv)(n,a)),t.length&&n.length!==t.length&&n.length>0&&pe.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,i.G1)(n),n.length>t.maxLength&&pe.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push((0,i.Dv)(n))}));let n=0;if(null!=e.chainId?(n=e.chainId,"number"!==typeof n&&pe.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!(0,i.Zq)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,i.Dv)(n)),r.push("0x"),r.push("0x")),!t)return p(r);const a=(0,i.N)(t);let c=27+a.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),c+=2*n+8,a.v>28&&a.v!==c&&pe.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):a.v!==c&&pe.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,i.Dv)(c)),r.push((0,i.G1)((0,i.lE)(a.r))),r.push((0,i.G1)((0,i.lE)(a.s))),p(r)}function Pe(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&pe.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),Ce(e,t);switch(e.type){case 1:return Te(e,t);case 2:return Se(e,t);default:break}return pe.throwError(`unsupported transaction type: ${e.type}`,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function Oe(e,t,r){try{const r=ve(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(n){pe.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,i.$m)(t[1],32),e.s=(0,i.$m)(t[2],32);try{const t=(0,o.w)(r(e));e.from=_e(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(n){console.log(n)}}function Re(e){const t=v(e.slice(1));9!==t.length&&12!==t.length&&pe.throwArgumentError("invalid component count for transaction type: 2","payload",(0,i.Dv)(e));const r=ve(t[2]),n=ve(t[3]),a={type:2,chainId:ve(t[0]).toNumber(),nonce:ve(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:ve(t[4]),to:me(t[5]),value:ve(t[6]),data:t[7],accessList:Ae(t[8])};return 9===t.length||(a.hash=(0,o.w)(e),Oe(a,t.slice(9),Se)),a}function Ie(e){const t=v(e.slice(1));8!==t.length&&11!==t.length&&pe.throwArgumentError("invalid component count for transaction type: 1","payload",(0,i.Dv)(e));const r={type:1,chainId:ve(t[0]).toNumber(),nonce:ve(t[1]).toNumber(),gasPrice:ve(t[2]),gasLimit:ve(t[3]),to:me(t[4]),value:ve(t[5]),data:t[6],accessList:Ae(t[7])};return 8===t.length||(r.hash=(0,o.w)(e),Oe(r,t.slice(8),Te)),r}function Be(e){const t=v(e);9!==t.length&&6!==t.length&&pe.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:ve(t[0]).toNumber(),gasPrice:ve(t[1]),gasLimit:ve(t[2]),to:me(t[3]),value:ve(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=a.O$.from(t[6]).toNumber()}catch(n){return console.log(n),r}if(r.r=(0,i.$m)(t[7],32),r.s=(0,i.$m)(t[8],32),a.O$.from(r.r).isZero()&&a.O$.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let a=r.v-27;const c=t.slice(0,6);0!==r.chainId&&(c.push((0,i.Dv)(r.chainId)),c.push("0x"),c.push("0x"),a-=2*r.chainId+8);const f=(0,o.w)(p(c));try{r.from=_e(f,{r:(0,i.Dv)(r.r),s:(0,i.Dv)(r.s),recoveryParam:a})}catch(n){console.log(n)}r.hash=(0,o.w)(e)}return r.type=null,r}function Le(e){const t=(0,i.lE)(e);if(t[0]>127)return Be(t);switch(t[0]){case 1:return Ie(t);case 2:return Re(t);default:break}return pe.throwError(`unsupported transaction type: ${t[0]}`,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},73055:function(e,t,r){"use strict";r(21703),Object.defineProperty(t,"__esModule",{value:!0});const n=r(43793);function a(e,t,r){try{Reflect.apply(e,t,r)}catch(n){setTimeout((()=>{throw n}))}}function i(e){const t=e.length,r=new Array(t);for(let n=0;n0&&([e]=t),e instanceof Error)throw e;const r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}const c=n[e];if(void 0===c)return!1;if("function"===typeof c)a(c,this,t);else{const e=c.length,r=i(c);for(let n=0;nc(e)))}var f=e=>e===window,d=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),s=e=>{const t=(0,n.SU)(e);if(f(t)){const e=t.innerWidth,r=t.innerHeight;return d(e,r)}return(null==t?void 0:t.getBoundingClientRect)?t.getBoundingClientRect():d(0,0)};function u(e){const t=(0,a.f3)(e,null);if(t){const e=(0,a.FN)(),{link:r,unlink:n,internalChildren:i}=t;r(e),(0,a.Ah)((()=>n(e)));const c=(0,a.Fl)((()=>i.indexOf(e)));return{parent:t,index:c}}return{parent:null,index:(0,n.iH)(-1)}}function b(e){const t=[],r=e=>{Array.isArray(e)&&e.forEach((e=>{var n;(0,a.lA)(e)&&(t.push(e),(null==(n=e.component)?void 0:n.subTree)&&(t.push(e.component.subTree),r(e.component.subTree.children)),e.children&&r(e.children))}))};return r(e),t}function h(e,t,r){const n=b(e.subTree.children);r.sort(((e,t)=>n.indexOf(e.vnode)-n.indexOf(t.vnode)));const a=r.map((e=>e.proxy));t.sort(((e,t)=>{const r=a.indexOf(e),n=a.indexOf(t);return r-n}))}function l(e){const t=(0,n.qj)([]),r=(0,n.qj)([]),i=(0,a.FN)(),c=n=>{const c=e=>{e.proxy&&(r.push(e),t.push(e.proxy),h(i,t,r))},o=e=>{const n=r.indexOf(e);t.splice(n,1),r.splice(n,1)};(0,a.JJ)(e,Object.assign({link:c,unlink:o,children:t,internalChildren:r},n))};return{children:t,linkChildren:c}}var p,x;function m(e){let t;(0,a.bv)((()=>{e(),(0,a.Y3)((()=>{t=!0}))})),(0,a.dl)((()=>{t&&e()}))}function v(e,t,r={}){if(!i)return;const{target:c=window,passive:o=!1,capture:f=!1}=r;let d;const s=r=>{const a=(0,n.SU)(r);a&&!d&&(a.addEventListener(e,t,{capture:f,passive:o}),d=!0)},u=r=>{const a=(0,n.SU)(r);a&&d&&(a.removeEventListener(e,t,f),d=!1)};(0,a.Ah)((()=>u(c))),(0,a.se)((()=>u(c))),m((()=>s(c))),(0,n.dq)(c)&&(0,a.YP)(c,((e,t)=>{u(t),s(e)}))}function g(e,t,r={}){if(!i)return;const{eventName:a="click"}=r,c=r=>{const a=(0,n.SU)(e);a&&!a.contains(r.target)&&t(r)};v(a,c,{target:document})}function y(){if(!p&&(p=(0,n.iH)(0),x=(0,n.iH)(0),i)){const e=()=>{p.value=window.innerWidth,x.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:p,height:x}}var w,_=/scroll|auto/i,M=i?window:void 0;function k(e){const t=1;return"HTML"!==e.tagName&&"BODY"!==e.tagName&&e.nodeType===t}function A(e,t=M){let r=e;while(r&&r!==t&&k(r)){const{overflowY:e}=window.getComputedStyle(r);if(_.test(e))return r;r=r.parentNode}return t}function E(e,t=M){const r=(0,n.iH)();return(0,a.bv)((()=>{e.value&&(r.value=A(e.value,t))})),r}function S(){if(!w&&(w=(0,n.iH)("visible"),i)){const e=()=>{w.value=document.hidden?"hidden":"visible"};e(),window.addEventListener("visibilitychange",e)}return w}Symbol("van-field")},44870:function(e,t,r){"use strict";r.d(t,{Bj:function(){return i},Fl:function(){return qe},IU:function(){return Se},Jd:function(){return M},PG:function(){return Me},SU:function(){return je},Um:function(){return ye},WL:function(){return Fe},X$:function(){return S},X3:function(){return Ee},XI:function(){return Le},Xl:function(){return Te},dq:function(){return Ie},iH:function(){return Be},j:function(){return A},lk:function(){return k},qj:function(){return ge},qq:function(){return g},yT:function(){return Ae}});var n=r(87139);let a;class i{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&a&&(this.parent=a,this.index=(a.scopes||(a.scopes=[])).push(this)-1)}run(e){if(this.active)try{return a=this,e()}finally{a=this.parent}else 0}on(){a=this}off(){a=this.parent}stop(e){if(this.active){let t,r;for(t=0,r=this.effects.length;t{const t=new Set(e);return t.w=0,t.n=0,t},f=e=>(e.w&l)>0,d=e=>(e.n&l)>0,s=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let r=0;for(let n=0;n{("length"===t||t>=a)&&d.push(e)}));else switch(void 0!==r&&d.push(f.get(r)),t){case"add":(0,n.kJ)(e)?(0,n.S0)(r)&&d.push(f.get("length")):(d.push(f.get(m)),(0,n._N)(e)&&d.push(f.get(v)));break;case"delete":(0,n.kJ)(e)||(d.push(f.get(m)),(0,n._N)(e)&&d.push(f.get(v)));break;case"set":(0,n._N)(e)&&d.push(f.get(m));break}if(1===d.length)d[0]&&T(d[0]);else{const e=[];for(const t of d)t&&e.push(...t);T(o(e))}}function T(e,t){for(const r of(0,n.kJ)(e)?e:[...e])(r!==x||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}const C=(0,n.fY)("__proto__,__v_isRef,__isVue"),P=new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter(n.yk)),O=N(),R=N(!1,!0),I=N(!0),B=L();function L(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const r=Se(this);for(let t=0,a=this.length;t{e[t]=function(...e){M();const r=Se(this)[t].apply(this,e);return k(),r}})),e}function N(e=!1,t=!1){return function(r,a,i){if("__v_isReactive"===a)return!e;if("__v_isReadonly"===a)return e;if("__v_isShallow"===a)return t;if("__v_raw"===a&&i===(e?t?xe:pe:t?le:he).get(r))return r;const c=(0,n.kJ)(r);if(!e&&c&&(0,n.RI)(B,a))return Reflect.get(B,a,i);const o=Reflect.get(r,a,i);if((0,n.yk)(a)?P.has(a):C(a))return o;if(e||A(r,"get",a),t)return o;if(Ie(o)){const e=!c||!(0,n.S0)(a);return e?o.value:o}return(0,n.Kn)(o)?e?we(o):ge(o):o}}const U=D(),j=D(!0);function D(e=!1){return function(t,r,a,i){let c=t[r];if(ke(c)&&Ie(c)&&!Ie(a))return!1;if(!e&&!ke(a)&&(Ae(a)||(a=Se(a),c=Se(c)),!(0,n.kJ)(t)&&Ie(c)&&!Ie(a)))return c.value=a,!0;const o=(0,n.kJ)(t)&&(0,n.S0)(r)?Number(r)e,V=e=>Reflect.getPrototypeOf(e);function W(e,t,r=!1,n=!1){e=e["__v_raw"];const a=Se(e),i=Se(t);t!==i&&!r&&A(a,"get",t),!r&&A(a,"get",i);const{has:c}=V(a),o=n?G:r?Pe:Ce;return c.call(a,t)?o(e.get(t)):c.call(a,i)?o(e.get(i)):void(e!==a&&e.get(t))}function Z(e,t=!1){const r=this["__v_raw"],n=Se(r),a=Se(e);return e!==a&&!t&&A(n,"has",e),!t&&A(n,"has",a),e===a?r.has(e):r.has(e)||r.has(a)}function J(e,t=!1){return e=e["__v_raw"],!t&&A(Se(e),"iterate",m),Reflect.get(e,"size",e)}function Y(e){e=Se(e);const t=Se(this),r=V(t),n=r.has.call(t,e);return n||(t.add(e),S(t,"add",e,e)),this}function X(e,t){t=Se(t);const r=Se(this),{has:a,get:i}=V(r);let c=a.call(r,e);c||(e=Se(e),c=a.call(r,e));const o=i.call(r,e);return r.set(e,t),c?(0,n.aU)(t,o)&&S(r,"set",e,t,o):S(r,"add",e,t),this}function Q(e){const t=Se(this),{has:r,get:n}=V(t);let a=r.call(t,e);a||(e=Se(e),a=r.call(t,e));const i=n?n.call(t,e):void 0,c=t.delete(e);return a&&S(t,"delete",e,void 0,i),c}function ee(){const e=Se(this),t=0!==e.size,r=void 0,n=e.clear();return t&&S(e,"clear",void 0,void 0,r),n}function te(e,t){return function(r,n){const a=this,i=a["__v_raw"],c=Se(i),o=t?G:e?Pe:Ce;return!e&&A(c,"iterate",m),i.forEach(((e,t)=>r.call(n,o(e),o(t),a)))}}function re(e,t,r){return function(...a){const i=this["__v_raw"],c=Se(i),o=(0,n._N)(c),f="entries"===e||e===Symbol.iterator&&o,d="keys"===e&&o,s=i[e](...a),u=r?G:t?Pe:Ce;return!t&&A(c,"iterate",d?v:m),{next(){const{value:e,done:t}=s.next();return t?{value:e,done:t}:{value:f?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function ne(e){return function(...t){return"delete"!==e&&this}}function ae(){const e={get(e){return W(this,e)},get size(){return J(this)},has:Z,add:Y,set:X,delete:Q,clear:ee,forEach:te(!1,!1)},t={get(e){return W(this,e,!1,!0)},get size(){return J(this)},has:Z,add:Y,set:X,delete:Q,clear:ee,forEach:te(!1,!0)},r={get(e){return W(this,e,!0)},get size(){return J(this,!0)},has(e){return Z.call(this,e,!0)},add:ne("add"),set:ne("set"),delete:ne("delete"),clear:ne("clear"),forEach:te(!0,!1)},n={get(e){return W(this,e,!0,!0)},get size(){return J(this,!0)},has(e){return Z.call(this,e,!0)},add:ne("add"),set:ne("set"),delete:ne("delete"),clear:ne("clear"),forEach:te(!0,!0)},a=["keys","values","entries",Symbol.iterator];return a.forEach((a=>{e[a]=re(a,!1,!1),r[a]=re(a,!0,!1),t[a]=re(a,!1,!0),n[a]=re(a,!0,!0)})),[e,r,t,n]}const[ie,ce,oe,fe]=ae();function de(e,t){const r=t?e?fe:oe:e?ce:ie;return(t,a,i)=>"__v_isReactive"===a?!e:"__v_isReadonly"===a?e:"__v_raw"===a?t:Reflect.get((0,n.RI)(r,a)&&a in t?r:t,a,i)}const se={get:de(!1,!1)},ue={get:de(!1,!0)},be={get:de(!0,!1)};const he=new WeakMap,le=new WeakMap,pe=new WeakMap,xe=new WeakMap;function me(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ve(e){return e["__v_skip"]||!Object.isExtensible(e)?0:me((0,n.W7)(e))}function ge(e){return ke(e)?e:_e(e,!1,z,se,he)}function ye(e){return _e(e,!1,$,ue,le)}function we(e){return _e(e,!0,K,be,pe)}function _e(e,t,r,a,i){if(!(0,n.Kn)(e))return e;if(e["__v_raw"]&&(!t||!e["__v_isReactive"]))return e;const c=i.get(e);if(c)return c;const o=ve(e);if(0===o)return e;const f=new Proxy(e,2===o?a:r);return i.set(e,f),f}function Me(e){return ke(e)?Me(e["__v_raw"]):!(!e||!e["__v_isReactive"])}function ke(e){return!(!e||!e["__v_isReadonly"])}function Ae(e){return!(!e||!e["__v_isShallow"])}function Ee(e){return Me(e)||ke(e)}function Se(e){const t=e&&e["__v_raw"];return t?Se(t):e}function Te(e){return(0,n.Nj)(e,"__v_skip",!0),e}const Ce=e=>(0,n.Kn)(e)?ge(e):e,Pe=e=>(0,n.Kn)(e)?we(e):e;function Oe(e){w&&x&&(e=Se(e),E(e.dep||(e.dep=o())))}function Re(e,t){e=Se(e),e.dep&&T(e.dep)}function Ie(e){return!(!e||!0!==e.__v_isRef)}function Be(e){return Ne(e,!1)}function Le(e){return Ne(e,!0)}function Ne(e,t){return Ie(e)?e:new Ue(e,t)}class Ue{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Se(e),this._value=t?e:Ce(e)}get value(){return Oe(this),this._value}set value(e){e=this.__v_isShallow?e:Se(e),(0,n.aU)(e,this._rawValue)&&(this._rawValue=e,this._value=this.__v_isShallow?e:Ce(e),Re(this,e))}}function je(e){return Ie(e)?e.value:e}const De={get:(e,t,r)=>je(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const a=e[t];return Ie(a)&&!Ie(r)?(a.value=r,!0):Reflect.set(e,t,r,n)}};function Fe(e){return Me(e)?e:new Proxy(e,De)}class He{constructor(e,t,r,n){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new g(e,(()=>{this._dirty||(this._dirty=!0,Re(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!n,this["__v_isReadonly"]=r}get value(){const e=Se(this);return Oe(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function qe(e,t,r=!1){let a,i;const c=(0,n.mf)(e);c?(a=e,i=n.dG):(a=e.get,i=e.set);const o=new He(a,i,c||!i,r);return o}Promise.resolve()},73396:function(e,t,r){"use strict";r.d(t,{$d:function(){return c},Ah:function(){return Re},Cn:function(){return H},FN:function(){return Er},Fl:function(){return qr},HY:function(){return Dt},JJ:function(){return Y},Jd:function(){return Oe},Ko:function(){return xr},P$:function(){return fe},Q6:function(){return le},U2:function(){return se},Uk:function(){return fr},Us:function(){return wt},WI:function(){return mr},Wm:function(){return ar},Xn:function(){return Ce},Y3:function(){return _},Y8:function(){return ie},YP:function(){return ee},_:function(){return nr},aZ:function(){return pe},bv:function(){return Te},dD:function(){return F},dG:function(){return lr},dl:function(){return ge},f3:function(){return X},h:function(){return zr},iD:function(){return Jt},ic:function(){return Pe},j4:function(){return Yt},kq:function(){return sr},lA:function(){return Xt},lR:function(){return It},nK:function(){return he},se:function(){return ye},uE:function(){return dr},up:function(){return Lt},w5:function(){return q},wF:function(){return Se},wg:function(){return $t},wy:function(){return ht},xv:function(){return Ft}});r(21703);var n=r(44870),a=r(87139);function i(e,t,r,n){let a;try{a=n?e(...n):e()}catch(i){o(i,t,r)}return a}function c(e,t,r,n){if((0,a.mf)(e)){const c=i(e,t,r,n);return c&&(0,a.tI)(c)&&c.catch((e=>{o(e,t,r)})),c}const f=[];for(let a=0;a>>1,a=R(u[n]);ab&&u.splice(t,1)}function S(e,t,r,n){(0,a.kJ)(e)?r.push(...e):t&&t.includes(e,e.allowRecurse?n+1:n)||r.push(e),A()}function T(e){S(e,l,h,p)}function C(e){S(e,m,x,v)}function P(e,t=null){if(h.length){for(w=t,l=[...new Set(h)],h.length=0,p=0;pR(e)-R(t))),v=0;vnull==e.id?1/0:e.id;function I(e){s=!1,d=!0,P(e),u.sort(((e,t)=>R(e)-R(t)));a.dG;try{for(b=0;be.trim())):t&&(i=r.map(a.He))}let d;let s=n[d=(0,a.hR)(t)]||n[d=(0,a.hR)((0,a._A)(t))];!s&&o&&(s=n[d=(0,a.hR)((0,a.rs)(t))]),s&&c(s,e,6,i);const u=n[d+"Once"];if(u){if(e.emitted){if(e.emitted[d])return}else e.emitted={};e.emitted[d]=!0,c(u,e,6,i)}}function L(e,t,r=!1){const n=t.emitsCache,i=n.get(e);if(void 0!==i)return i;const c=e.emits;let o={},f=!1;if(!(0,a.mf)(e)){const n=e=>{const r=L(e,t,!0);r&&(f=!0,(0,a.l7)(o,r))};!r&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}return c||f?((0,a.kJ)(c)?c.forEach((e=>o[e]=null)):(0,a.l7)(o,c),n.set(e,o),o):(n.set(e,null),null)}function N(e,t){return!(!e||!(0,a.F7)(t))&&(t=t.slice(2).replace(/Once$/,""),(0,a.RI)(e,t[0].toLowerCase()+t.slice(1))||(0,a.RI)(e,(0,a.rs)(t))||(0,a.RI)(e,t))}let U=null,j=null;function D(e){const t=U;return U=e,j=e&&e.type.__scopeId||null,t}function F(e){j=e}function H(){j=null}function q(e,t=U,r){if(!t)return e;if(e._n)return e;const n=(...r)=>{n._d&&Wt(-1);const a=D(t),i=e(...r);return D(a),n._d&&Wt(1),i};return n._n=!0,n._c=!0,n._d=!0,n}function z(e){const{type:t,vnode:r,proxy:n,withProxy:i,props:c,propsOptions:[f],slots:d,attrs:s,emit:u,render:b,renderCache:h,data:l,setupState:p,ctx:x,inheritAttrs:m}=e;let v,g;const y=D(e);try{if(4&r.shapeFlag){const e=i||n;v=ur(b.call(e,e,h,c,p,l,x)),g=s}else{const e=t;0,v=ur(e.length>1?e(c,{attrs:s,slots:d,emit:u}):e(c,null)),g=t.props?s:K(s)}}catch(_){zt.length=0,o(_,e,1),v=ar(Ht)}let w=v;if(g&&!1!==m){const e=Object.keys(g),{shapeFlag:t}=w;e.length&&7&t&&(f&&e.some(a.tR)&&(g=$(g,f)),w=or(w,g))}return r.dirs&&(w.dirs=w.dirs?w.dirs.concat(r.dirs):r.dirs),r.transition&&(w.transition=r.transition),v=w,D(y),v}const K=e=>{let t;for(const r in e)("class"===r||"style"===r||(0,a.F7)(r))&&((t||(t={}))[r]=e[r]);return t},$=(e,t)=>{const r={};for(const n in e)(0,a.tR)(n)&&n.slice(9)in t||(r[n]=e[n]);return r};function G(e,t,r){const{props:n,children:a,component:i}=e,{props:c,children:o,patchFlag:f}=t,d=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!(r&&f>=0))return!(!a&&!o||o&&o.$stable)||n!==c&&(n?!c||V(n,c,d):!!c);if(1024&f)return!0;if(16&f)return n?V(n,c,d):!!c;if(8&f){const e=t.dynamicProps;for(let t=0;te.__isSuspense;function J(e,t){t&&t.pendingBranch?(0,a.kJ)(e)?t.effects.push(...e):t.effects.push(e):C(e)}function Y(e,t){if(Ar){let r=Ar.provides;const n=Ar.parent&&Ar.parent.provides;n===r&&(r=Ar.provides=Object.create(n)),r[e]=t}else 0}function X(e,t,r=!1){const n=Ar||U;if(n){const i=null==n.parent?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return r&&(0,a.mf)(t)?t.call(n.proxy):t}else 0}const Q={};function ee(e,t,r){return te(e,t,r)}function te(e,t,{immediate:r,deep:o,flush:f,onTrack:d,onTrigger:s}=a.kT){const u=Ar;let b,h,l=!1,p=!1;if((0,n.dq)(e)?(b=()=>e.value,l=(0,n.yT)(e)):(0,n.PG)(e)?(b=()=>e,o=!0):(0,a.kJ)(e)?(p=!0,l=e.some(n.PG),b=()=>e.map((e=>(0,n.dq)(e)?e.value:(0,n.PG)(e)?ae(e):(0,a.mf)(e)?i(e,u,2):void 0))):b=(0,a.mf)(e)?t?()=>i(e,u,2):()=>{if(!u||!u.isUnmounted)return h&&h(),c(e,u,3,[x])}:a.dG,t&&o){const e=b;b=()=>ae(e())}let x=e=>{h=y.onStop=()=>{i(e,u,4)}};if(Rr)return x=a.dG,t?r&&c(t,u,3,[b(),p?[]:void 0,x]):b(),a.dG;let m=p?[]:Q;const v=()=>{if(y.active)if(t){const e=y.run();(o||l||(p?e.some(((e,t)=>(0,a.aU)(e,m[t]))):(0,a.aU)(e,m)))&&(h&&h(),c(t,u,3,[e,m===Q?void 0:m,x]),m=e)}else y.run()};let g;v.allowRecurse=!!t,g="sync"===f?v:"post"===f?()=>yt(v,u&&u.suspense):()=>{!u||u.isMounted?T(v):v()};const y=new n.qq(b,g);return t?r?v():m=y.run():"post"===f?yt(y.run.bind(y),u&&u.suspense):y.run(),()=>{y.stop(),u&&u.scope&&(0,a.Od)(u.scope.effects,y)}}function re(e,t,r){const n=this.proxy,i=(0,a.HD)(e)?e.includes(".")?ne(n,e):()=>n[e]:e.bind(n,n);let c;(0,a.mf)(t)?c=t:(c=t.handler,r=t);const o=Ar;Sr(this);const f=te(i,c.bind(n),r);return o?Sr(o):Tr(),f}function ne(e,t){const r=t.split(".");return()=>{let t=e;for(let e=0;e{ae(e,t)}));else if((0,a.PO)(e))for(const r in e)ae(e[r],t);return e}function ie(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Te((()=>{e.isMounted=!0})),Oe((()=>{e.isUnmounting=!0})),e}const ce=[Function,Array],oe={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ce,onEnter:ce,onAfterEnter:ce,onEnterCancelled:ce,onBeforeLeave:ce,onLeave:ce,onAfterLeave:ce,onLeaveCancelled:ce,onBeforeAppear:ce,onAppear:ce,onAfterAppear:ce,onAppearCancelled:ce},setup(e,{slots:t}){const r=Er(),a=ie();let i;return()=>{const c=t.default&&le(t.default(),!0);if(!c||!c.length)return;const o=(0,n.IU)(e),{mode:f}=o;const d=c[0];if(a.isLeaving)return ue(d);const s=be(d);if(!s)return ue(d);const u=se(s,o,a,r);he(s,u);const b=r.subTree,h=b&&be(b);let l=!1;const{getTransitionKey:p}=s.type;if(p){const e=p();void 0===i?i=e:e!==i&&(i=e,l=!0)}if(h&&h.type!==Ht&&(!Qt(s,h)||l)){const e=se(h,o,a,r);if(he(h,e),"out-in"===f)return a.isLeaving=!0,e.afterLeave=()=>{a.isLeaving=!1,r.update()},ue(d);"in-out"===f&&s.type!==Ht&&(e.delayLeave=(e,t,r)=>{const n=de(a,h);n[String(h.key)]=h,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=r})}return d}}},fe=oe;function de(e,t){const{leavingVNodes:r}=e;let n=r.get(t.type);return n||(n=Object.create(null),r.set(t.type,n)),n}function se(e,t,r,n){const{appear:a,mode:i,persisted:o=!1,onBeforeEnter:f,onEnter:d,onAfterEnter:s,onEnterCancelled:u,onBeforeLeave:b,onLeave:h,onAfterLeave:l,onLeaveCancelled:p,onBeforeAppear:x,onAppear:m,onAfterAppear:v,onAppearCancelled:g}=t,y=String(e.key),w=de(r,e),_=(e,t)=>{e&&c(e,n,9,t)},M={mode:i,persisted:o,beforeEnter(t){let n=f;if(!r.isMounted){if(!a)return;n=x||f}t._leaveCb&&t._leaveCb(!0);const i=w[y];i&&Qt(e,i)&&i.el._leaveCb&&i.el._leaveCb(),_(n,[t])},enter(e){let t=d,n=s,i=u;if(!r.isMounted){if(!a)return;t=m||d,n=v||s,i=g||u}let c=!1;const o=e._enterCb=t=>{c||(c=!0,_(t?i:n,[e]),M.delayedLeave&&M.delayedLeave(),e._enterCb=void 0)};t?(t(e,o),t.length<=1&&o()):o()},leave(t,n){const a=String(e.key);if(t._enterCb&&t._enterCb(!0),r.isUnmounting)return n();_(b,[t]);let i=!1;const c=t._leaveCb=r=>{i||(i=!0,n(),_(r?p:l,[t]),t._leaveCb=void 0,w[a]===e&&delete w[a])};w[a]=e,h?(h(t,c),h.length<=1&&c()):c()},clone(e){return se(e,t,r,n)}};return M}function ue(e){if(me(e))return e=or(e),e.children=null,e}function be(e){return me(e)?e.children?e.children[0]:void 0:e}function he(e,t){6&e.shapeFlag&&e.component?he(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function le(e,t=!1){let r=[],n=0;for(let a=0;a1)for(let a=0;a!!e.type.__asyncLoader;const me=e=>e.type.__isKeepAlive;RegExp,RegExp;function ve(e,t){return(0,a.kJ)(e)?e.some((e=>ve(e,t))):(0,a.HD)(e)?e.split(",").includes(t):!!e.test&&e.test(t)}function ge(e,t){we(e,"a",t)}function ye(e,t){we(e,"da",t)}function we(e,t,r=Ar){const n=e.__wdc||(e.__wdc=()=>{let t=r;while(t){if(t.isDeactivated)return;t=t.parent}return e()});if(Ae(t,n,r),r){let e=r.parent;while(e&&e.parent)me(e.parent.vnode)&&_e(n,t,r,e),e=e.parent}}function _e(e,t,r,n){const i=Ae(t,e,n,!0);Re((()=>{(0,a.Od)(n[t],i)}),r)}function Me(e){let t=e.shapeFlag;256&t&&(t-=256),512&t&&(t-=512),e.shapeFlag=t}function ke(e){return 128&e.shapeFlag?e.ssContent:e}function Ae(e,t,r=Ar,a=!1){if(r){const i=r[e]||(r[e]=[]),o=t.__weh||(t.__weh=(...a)=>{if(r.isUnmounted)return;(0,n.Jd)(),Sr(r);const i=c(t,r,e,a);return Tr(),(0,n.lk)(),i});return a?i.unshift(o):i.push(o),o}}const Ee=e=>(t,r=Ar)=>(!Rr||"sp"===e)&&Ae(e,t,r),Se=Ee("bm"),Te=Ee("m"),Ce=Ee("bu"),Pe=Ee("u"),Oe=Ee("bum"),Re=Ee("um"),Ie=Ee("sp"),Be=Ee("rtg"),Le=Ee("rtc");function Ne(e,t=Ar){Ae("ec",e,t)}let Ue=!0;function je(e){const t=qe(e),r=e.proxy,i=e.ctx;Ue=!1,t.beforeCreate&&Fe(t.beforeCreate,e,"bc");const{data:c,computed:o,methods:f,watch:d,provide:s,inject:u,created:b,beforeMount:h,mounted:l,beforeUpdate:p,updated:x,activated:m,deactivated:v,beforeDestroy:g,beforeUnmount:y,destroyed:w,unmounted:_,render:M,renderTracked:k,renderTriggered:A,errorCaptured:E,serverPrefetch:S,expose:T,inheritAttrs:C,components:P,directives:O,filters:R}=t,I=null;if(u&&De(u,i,I,e.appContext.config.unwrapInjectedRef),f)for(const n in f){const e=f[n];(0,a.mf)(e)&&(i[n]=e.bind(r))}if(c){0;const t=c.call(r,r);0,(0,a.Kn)(t)&&(e.data=(0,n.qj)(t))}if(Ue=!0,o)for(const n in o){const e=o[n],t=(0,a.mf)(e)?e.bind(r,r):(0,a.mf)(e.get)?e.get.bind(r,r):a.dG;0;const c=!(0,a.mf)(e)&&(0,a.mf)(e.set)?e.set.bind(r):a.dG,f=qr({get:t,set:c});Object.defineProperty(i,n,{enumerable:!0,configurable:!0,get:()=>f.value,set:e=>f.value=e})}if(d)for(const n in d)He(d[n],i,r,n);if(s){const e=(0,a.mf)(s)?s.call(r):s;Reflect.ownKeys(e).forEach((t=>{Y(t,e[t])}))}function B(e,t){(0,a.kJ)(t)?t.forEach((t=>e(t.bind(r)))):t&&e(t.bind(r))}if(b&&Fe(b,e,"c"),B(Se,h),B(Te,l),B(Ce,p),B(Pe,x),B(ge,m),B(ye,v),B(Ne,E),B(Le,k),B(Be,A),B(Oe,y),B(Re,_),B(Ie,S),(0,a.kJ)(T))if(T.length){const t=e.exposed||(e.exposed={});T.forEach((e=>{Object.defineProperty(t,e,{get:()=>r[e],set:t=>r[e]=t})}))}else e.exposed||(e.exposed={});M&&e.render===a.dG&&(e.render=M),null!=C&&(e.inheritAttrs=C),P&&(e.components=P),O&&(e.directives=O)}function De(e,t,r=a.dG,i=!1){(0,a.kJ)(e)&&(e=Ve(e));for(const c in e){const r=e[c];let o;o=(0,a.Kn)(r)?"default"in r?X(r.from||c,r.default,!0):X(r.from||c):X(r),(0,n.dq)(o)&&i?Object.defineProperty(t,c,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[c]=o}}function Fe(e,t,r){c((0,a.kJ)(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,r)}function He(e,t,r,n){const i=n.includes(".")?ne(r,n):()=>r[n];if((0,a.HD)(e)){const r=t[e];(0,a.mf)(r)&&ee(i,r)}else if((0,a.mf)(e))ee(i,e.bind(r));else if((0,a.Kn)(e))if((0,a.kJ)(e))e.forEach((e=>He(e,t,r,n)));else{const n=(0,a.mf)(e.handler)?e.handler.bind(r):t[e.handler];(0,a.mf)(n)&&ee(i,n,e)}else 0}function qe(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:a,optionsCache:i,config:{optionMergeStrategies:c}}=e.appContext,o=i.get(t);let f;return o?f=o:a.length||r||n?(f={},a.length&&a.forEach((e=>ze(f,e,c,!0))),ze(f,t,c)):f=t,i.set(t,f),f}function ze(e,t,r,n=!1){const{mixins:a,extends:i}=t;i&&ze(e,i,r,!0),a&&a.forEach((t=>ze(e,t,r,!0)));for(const c in t)if(n&&"expose"===c);else{const n=Ke[c]||r&&r[c];e[c]=n?n(e[c],t[c]):t[c]}return e}const Ke={data:$e,props:Ze,emits:Ze,methods:Ze,computed:Ze,beforeCreate:We,created:We,beforeMount:We,mounted:We,beforeUpdate:We,updated:We,beforeDestroy:We,beforeUnmount:We,destroyed:We,unmounted:We,activated:We,deactivated:We,errorCaptured:We,serverPrefetch:We,components:Ze,directives:Ze,watch:Je,provide:$e,inject:Ge};function $e(e,t){return t?e?function(){return(0,a.l7)((0,a.mf)(e)?e.call(this,this):e,(0,a.mf)(t)?t.call(this,this):t)}:t:e}function Ge(e,t){return Ze(Ve(e),Ve(t))}function Ve(e){if((0,a.kJ)(e)){const t={};for(let r=0;r0)||16&f){let n;Qe(e,t,c,o)&&(u=!0);for(const i in d)t&&((0,a.RI)(t,i)||(n=(0,a.rs)(i))!==i&&(0,a.RI)(t,n))||(s?!r||void 0===r[i]&&void 0===r[n]||(c[i]=et(s,d,i,void 0,e,!0)):delete c[i]);if(o!==d)for(const e in o)t&&(0,a.RI)(t,e)||(delete o[e],u=!0)}else if(8&f){const r=e.vnode.dynamicProps;for(let n=0;n{d=!0;const[r,n]=tt(e,t,!0);(0,a.l7)(o,r),n&&f.push(...n)};!r&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!c&&!d)return n.set(e,a.Z6),a.Z6;if((0,a.kJ)(c))for(let u=0;u-1,n[1]=r<0||e-1||(0,a.RI)(n,"default"))&&f.push(t)}}}}const s=[o,f];return n.set(e,s),s}function rt(e){return"$"!==e[0]}function nt(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function at(e,t){return nt(e)===nt(t)}function it(e,t){return(0,a.kJ)(t)?t.findIndex((t=>at(t,e))):(0,a.mf)(t)&&at(t,e)?0:-1}const ct=e=>"_"===e[0]||"$stable"===e,ot=e=>(0,a.kJ)(e)?e.map(ur):[ur(e)],ft=(e,t,r)=>{const n=q(((...e)=>ot(t(...e))),r);return n._c=!1,n},dt=(e,t,r)=>{const n=e._ctx;for(const i in e){if(ct(i))continue;const r=e[i];if((0,a.mf)(r))t[i]=ft(i,r,n);else if(null!=r){0;const e=ot(r);t[i]=()=>e}}},st=(e,t)=>{const r=ot(t);e.slots.default=()=>r},ut=(e,t)=>{if(32&e.vnode.shapeFlag){const r=t._;r?(e.slots=(0,n.IU)(t),(0,a.Nj)(t,"_",r)):dt(t,e.slots={})}else e.slots={},t&&st(e,t);(0,a.Nj)(e.slots,er,1)},bt=(e,t,r)=>{const{vnode:n,slots:i}=e;let c=!0,o=a.kT;if(32&n.shapeFlag){const e=t._;e?r&&1===e?c=!1:((0,a.l7)(i,t),r||1!==e||delete i._):(c=!t.$stable,dt(t,i)),o=t}else t&&(st(e,t),o={default:1});if(c)for(const a in i)ct(a)||a in o||delete i[a]};function ht(e,t){const r=U;if(null===r)return e;const n=r.proxy,i=e.dirs||(e.dirs=[]);for(let c=0;cvt(e,t&&((0,a.kJ)(t)?t[n]:t),r,c,o)));if(xe(c)&&!o)return;const f=4&c.shapeFlag?Dr(c.component)||c.component.proxy:c.el,d=o?null:f,{i:s,r:u}=e;const b=t&&t.r,h=s.refs===a.kT?s.refs={}:s.refs,l=s.setupState;if(null!=b&&b!==u&&((0,a.HD)(b)?(h[b]=null,(0,a.RI)(l,b)&&(l[b]=null)):(0,n.dq)(b)&&(b.value=null)),(0,a.mf)(u))i(u,s,12,[d,h]);else{const t=(0,a.HD)(u),i=(0,n.dq)(u);if(t||i){const i=()=>{if(e.f){const r=t?h[u]:u.value;o?(0,a.kJ)(r)&&(0,a.Od)(r,f):(0,a.kJ)(r)?r.includes(f)||r.push(f):t?h[u]=[f]:(u.value=[f],e.k&&(h[e.k]=u.value))}else t?(h[u]=d,(0,a.RI)(l,u)&&(l[u]=d)):(0,n.dq)(u)&&(u.value=d,e.k&&(h[e.k]=d))};d?(i.id=-1,yt(i,r)):i()}else 0}}function gt(){}const yt=J;function wt(e){return _t(e)}function _t(e,t){gt();const r=(0,a.E9)();r.__VUE__=!0;const{insert:i,remove:c,patchProp:o,createElement:f,createText:d,createComment:s,setText:u,setElementText:b,parentNode:h,nextSibling:l,setScopeId:p=a.dG,cloneNode:x,insertStaticContent:m}=e,v=(e,t,r,n=null,a=null,i=null,c=!1,o=null,f=!!t.dynamicChildren)=>{if(e===t)return;e&&!Qt(e,t)&&(n=Q(e),V(e,a,i,!0),e=null),-2===t.patchFlag&&(f=!1,t.dynamicChildren=null);const{type:d,ref:s,shapeFlag:u}=t;switch(d){case Ft:g(e,t,r,n);break;case Ht:y(e,t,r,n);break;case qt:null==e&&w(t,r,n,c);break;case Dt:L(e,t,r,n,a,i,c,o,f);break;default:1&u?A(e,t,r,n,a,i,c,o,f):6&u?N(e,t,r,n,a,i,c,o,f):(64&u||128&u)&&d.process(e,t,r,n,a,i,c,o,f,te)}null!=s&&a&&vt(s,e&&e.ref,i,t||e,!t)},g=(e,t,r,n)=>{if(null==e)i(t.el=d(t.children),r,n);else{const r=t.el=e.el;t.children!==e.children&&u(r,t.children)}},y=(e,t,r,n)=>{null==e?i(t.el=s(t.children||""),r,n):t.el=e.el},w=(e,t,r,n)=>{[e.el,e.anchor]=m(e.children,t,r,n,e.el,e.anchor)},_=({el:e,anchor:t},r,n)=>{let a;while(e&&e!==t)a=l(e),i(e,r,n),e=a;i(t,r,n)},M=({el:e,anchor:t})=>{let r;while(e&&e!==t)r=l(e),c(e),e=r;c(t)},A=(e,t,r,n,a,i,c,o,f)=>{c=c||"svg"===t.type,null==e?S(t,r,n,a,i,c,o,f):R(e,t,a,i,c,o,f)},S=(e,t,r,n,c,d,s,u)=>{let h,l;const{type:p,props:m,shapeFlag:v,transition:g,patchFlag:y,dirs:w}=e;if(e.el&&void 0!==x&&-1===y)h=e.el=x(e.el);else{if(h=e.el=f(e.type,d,m&&m.is,m),8&v?b(h,e.children):16&v&&C(e.children,h,null,n,c,d&&"foreignObject"!==p,s,u),w&<(e,null,n,"created"),m){for(const t in m)"value"===t||(0,a.Gg)(t)||o(h,t,null,m[t],d,e.children,n,c,X);"value"in m&&o(h,"value",null,m.value),(l=m.onVnodeBeforeMount)&&pr(l,n,e)}T(h,e,e.scopeId,s,n)}w&<(e,null,n,"beforeMount");const _=(!c||c&&!c.pendingBranch)&&g&&!g.persisted;_&&g.beforeEnter(h),i(h,t,r),((l=m&&m.onVnodeMounted)||_||w)&&yt((()=>{l&&pr(l,n,e),_&&g.enter(h),w&<(e,null,n,"mounted")}),c)},T=(e,t,r,n,a)=>{if(r&&p(e,r),n)for(let i=0;i{for(let d=f;d{const d=t.el=e.el;let{patchFlag:s,dynamicChildren:u,dirs:h}=t;s|=16&e.patchFlag;const l=e.props||a.kT,p=t.props||a.kT;let x;r&&Mt(r,!1),(x=p.onVnodeBeforeUpdate)&&pr(x,r,t,e),h&<(t,e,r,"beforeUpdate"),r&&Mt(r,!0);const m=i&&"foreignObject"!==t.type;if(u?I(e.dynamicChildren,u,d,r,n,m,c):f||H(e,t,d,null,r,n,m,c,!1),s>0){if(16&s)B(d,t,l,p,r,n,i);else if(2&s&&l.class!==p.class&&o(d,"class",null,p.class,i),4&s&&o(d,"style",l.style,p.style,i),8&s){const a=t.dynamicProps;for(let t=0;t{x&&pr(x,r,t,e),h&<(t,e,r,"updated")}),n)},I=(e,t,r,n,a,i,c)=>{for(let o=0;o{if(r!==n){for(const d in n){if((0,a.Gg)(d))continue;const s=n[d],u=r[d];s!==u&&"value"!==d&&o(e,d,u,s,f,t.children,i,c,X)}if(r!==a.kT)for(const d in r)(0,a.Gg)(d)||d in n||o(e,d,r[d],null,f,t.children,i,c,X);"value"in n&&o(e,"value",r.value,n.value)}},L=(e,t,r,n,a,c,o,f,s)=>{const u=t.el=e?e.el:d(""),b=t.anchor=e?e.anchor:d("");let{patchFlag:h,dynamicChildren:l,slotScopeIds:p}=t;p&&(f=f?f.concat(p):p),null==e?(i(u,r,n),i(b,r,n),C(t.children,r,b,a,c,o,f,s)):h>0&&64&h&&l&&e.dynamicChildren?(I(e.dynamicChildren,l,r,a,c,o,f),(null!=t.key||a&&t===a.subTree)&&kt(e,t,!0)):H(e,t,r,b,a,c,o,f,s)},N=(e,t,r,n,a,i,c,o,f)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?a.ctx.activate(t,r,n,c,f):U(t,r,n,a,i,c,f):j(e,t,f)},U=(e,t,r,n,a,i,c)=>{const o=e.component=kr(e,n,a);if(me(e)&&(o.ctx.renderer=te),Ir(o),o.asyncDep){if(a&&a.registerDep(o,D),!e.el){const e=o.subTree=ar(Ht);y(null,e,t,r)}}else D(o,e,t,r,a,i,c)},j=(e,t,r)=>{const n=t.component=e.component;if(G(e,t,r)){if(n.asyncDep&&!n.asyncResolved)return void F(n,t,r);n.next=t,E(n.update),n.update()}else t.component=e.component,t.el=e.el,n.vnode=t},D=(e,t,r,i,c,o,f)=>{const d=()=>{if(e.isMounted){let t,{next:r,bu:n,u:i,parent:d,vnode:s}=e,u=r;0,Mt(e,!1),r?(r.el=s.el,F(e,r,f)):r=s,n&&(0,a.ir)(n),(t=r.props&&r.props.onVnodeBeforeUpdate)&&pr(t,d,r,s),Mt(e,!0);const b=z(e);0;const l=e.subTree;e.subTree=b,v(l,b,h(l.el),Q(l),e,c,o),r.el=b.el,null===u&&W(e,b.el),i&&yt(i,c),(t=r.props&&r.props.onVnodeUpdated)&&yt((()=>pr(t,d,r,s)),c)}else{let n;const{el:f,props:d}=t,{bm:s,m:u,parent:b}=e,h=xe(t);if(Mt(e,!1),s&&(0,a.ir)(s),!h&&(n=d&&d.onVnodeBeforeMount)&&pr(n,b,t),Mt(e,!0),f&&ne){const r=()=>{e.subTree=z(e),ne(f,e.subTree,e,c,null)};h?t.type.__asyncLoader().then((()=>!e.isUnmounted&&r())):r()}else{0;const n=e.subTree=z(e);0,v(null,n,r,i,e,c,o),t.el=n.el}if(u&&yt(u,c),!h&&(n=d&&d.onVnodeMounted)){const e=t;yt((()=>pr(n,b,e)),c)}256&t.shapeFlag&&e.a&&yt(e.a,c),e.isMounted=!0,t=r=i=null}},s=e.effect=new n.qq(d,(()=>k(e.update)),e.scope),u=e.update=s.run.bind(s);u.id=e.uid,Mt(e,!0),u()},F=(e,t,r)=>{t.component=e;const a=e.vnode.props;e.vnode=t,e.next=null,Xe(e,t.props,a,r),bt(e,t.children,r),(0,n.Jd)(),P(void 0,e.update),(0,n.lk)()},H=(e,t,r,n,a,i,c,o,f=!1)=>{const d=e&&e.children,s=e?e.shapeFlag:0,u=t.children,{patchFlag:h,shapeFlag:l}=t;if(h>0){if(128&h)return void K(d,u,r,n,a,i,c,o,f);if(256&h)return void q(d,u,r,n,a,i,c,o,f)}8&l?(16&s&&X(d,a,i),u!==d&&b(r,u)):16&s?16&l?K(d,u,r,n,a,i,c,o,f):X(d,a,i,!0):(8&s&&b(r,""),16&l&&C(u,r,n,a,i,c,o,f))},q=(e,t,r,n,i,c,o,f,d)=>{e=e||a.Z6,t=t||a.Z6;const s=e.length,u=t.length,b=Math.min(s,u);let h;for(h=0;hu?X(e,i,c,!0,!1,b):C(t,r,n,i,c,o,f,d,b)},K=(e,t,r,n,i,c,o,f,d)=>{let s=0;const u=t.length;let b=e.length-1,h=u-1;while(s<=b&&s<=h){const n=e[s],a=t[s]=d?br(t[s]):ur(t[s]);if(!Qt(n,a))break;v(n,a,r,null,i,c,o,f,d),s++}while(s<=b&&s<=h){const n=e[b],a=t[h]=d?br(t[h]):ur(t[h]);if(!Qt(n,a))break;v(n,a,r,null,i,c,o,f,d),b--,h--}if(s>b){if(s<=h){const e=h+1,a=eh)while(s<=b)V(e[s],i,c,!0),s++;else{const l=s,p=s,x=new Map;for(s=p;s<=h;s++){const e=t[s]=d?br(t[s]):ur(t[s]);null!=e.key&&x.set(e.key,s)}let m,g=0;const y=h-p+1;let w=!1,_=0;const M=new Array(y);for(s=0;s=y){V(n,i,c,!0);continue}let a;if(null!=n.key)a=x.get(n.key);else for(m=p;m<=h;m++)if(0===M[m-p]&&Qt(n,t[m])){a=m;break}void 0===a?V(n,i,c,!0):(M[a-p]=s+1,a>=_?_=a:w=!0,v(n,t[a],r,null,i,c,o,f,d),g++)}const k=w?At(M):a.Z6;for(m=k.length-1,s=y-1;s>=0;s--){const e=p+s,a=t[e],b=e+1{const{el:c,type:o,transition:f,children:d,shapeFlag:s}=e;if(6&s)return void $(e.component.subTree,t,r,n);if(128&s)return void e.suspense.move(t,r,n);if(64&s)return void o.move(e,t,r,te);if(o===Dt){i(c,t,r);for(let e=0;ef.enter(c)),a);else{const{leave:e,delayLeave:n,afterLeave:a}=f,o=()=>i(c,t,r),d=()=>{e(c,(()=>{o(),a&&a()}))};n?n(c,o,d):d()}else i(c,t,r)},V=(e,t,r,n=!1,a=!1)=>{const{type:i,props:c,ref:o,children:f,dynamicChildren:d,shapeFlag:s,patchFlag:u,dirs:b}=e;if(null!=o&&vt(o,null,r,e,!0),256&s)return void t.ctx.deactivate(e);const h=1&s&&b,l=!xe(e);let p;if(l&&(p=c&&c.onVnodeBeforeUnmount)&&pr(p,t,e),6&s)Y(e.component,r,n);else{if(128&s)return void e.suspense.unmount(r,n);h&<(e,null,t,"beforeUnmount"),64&s?e.type.remove(e,t,r,a,te,n):d&&(i!==Dt||u>0&&64&u)?X(d,t,r,!1,!0):(i===Dt&&384&u||!a&&16&s)&&X(f,t,r),n&&Z(e)}(l&&(p=c&&c.onVnodeUnmounted)||h)&&yt((()=>{p&&pr(p,t,e),h&<(e,null,t,"unmounted")}),r)},Z=e=>{const{type:t,el:r,anchor:n,transition:a}=e;if(t===Dt)return void J(r,n);if(t===qt)return void M(e);const i=()=>{c(r),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(1&e.shapeFlag&&a&&!a.persisted){const{leave:t,delayLeave:n}=a,c=()=>t(r,i);n?n(e.el,i,c):c()}else i()},J=(e,t)=>{let r;while(e!==t)r=l(e),c(e),e=r;c(t)},Y=(e,t,r)=>{const{bum:n,scope:i,update:c,subTree:o,um:f}=e;n&&(0,a.ir)(n),i.stop(),c&&(c.active=!1,V(o,e,t,r)),f&&yt(f,t),yt((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},X=(e,t,r,n=!1,a=!1,i=0)=>{for(let c=i;c6&e.shapeFlag?Q(e.component.subTree):128&e.shapeFlag?e.suspense.next():l(e.anchor||e.el),ee=(e,t,r)=>{null==e?t._vnode&&V(t._vnode,null,null,!0):v(t._vnode||null,e,t,null,null,null,r),O(),t._vnode=e},te={p:v,um:V,m:$,r:Z,mt:U,mc:C,pc:H,pbc:I,n:Q,o:e};let re,ne;return t&&([re,ne]=t(te)),{render:ee,hydrate:re,createApp:mt(ee,re)}}function Mt({effect:e,update:t},r){e.allowRecurse=t.allowRecurse=r}function kt(e,t,r=!1){const n=e.children,i=t.children;if((0,a.kJ)(n)&&(0,a.kJ)(i))for(let a=0;a>1,e[r[o]]0&&(t[n]=r[i-1]),r[i]=n)}}i=r.length,c=r[i-1];while(i-- >0)r[i]=c,c=t[c];return r}const Et=e=>e.__isTeleport,St=e=>e&&(e.disabled||""===e.disabled),Tt=e=>"undefined"!==typeof SVGElement&&e instanceof SVGElement,Ct=(e,t)=>{const r=e&&e.to;if((0,a.HD)(r)){if(t){const e=t(r);return e}return null}return r},Pt={__isTeleport:!0,process(e,t,r,n,a,i,c,o,f,d){const{mc:s,pc:u,pbc:b,o:{insert:h,querySelector:l,createText:p,createComment:x}}=d,m=St(t.props);let{shapeFlag:v,children:g,dynamicChildren:y}=t;if(null==e){const e=t.el=p(""),d=t.anchor=p("");h(e,r,n),h(d,r,n);const u=t.target=Ct(t.props,l),b=t.targetAnchor=p("");u&&(h(b,u),c=c||Tt(u));const x=(e,t)=>{16&v&&s(g,e,t,a,i,c,o,f)};m?x(r,d):u&&x(u,b)}else{t.el=e.el;const n=t.anchor=e.anchor,s=t.target=e.target,h=t.targetAnchor=e.targetAnchor,p=St(e.props),x=p?r:s,v=p?n:h;if(c=c||Tt(s),y?(b(e.dynamicChildren,y,x,a,i,c,o),kt(e,t,!0)):f||u(e,t,x,v,a,i,c,o,!1),m)p||Ot(t,r,n,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Ct(t.props,l);e&&Ot(t,e,null,d,0)}else p&&Ot(t,s,h,d,1)}},remove(e,t,r,n,{um:a,o:{remove:i}},c){const{shapeFlag:o,children:f,anchor:d,targetAnchor:s,target:u,props:b}=e;if(u&&i(s),(c||!St(b))&&(i(d),16&o))for(let h=0;h0?Kt||a.Z6:null,Gt(),Vt>0&&Kt&&Kt.push(e),e}function Jt(e,t,r,n,a,i){return Zt(nr(e,t,r,n,a,i,!0))}function Yt(e,t,r,n,a){return Zt(ar(e,t,r,n,a,!0))}function Xt(e){return!!e&&!0===e.__v_isVNode}function Qt(e,t){return e.type===t.type&&e.key===t.key}const er="__vInternal",tr=({key:e})=>null!=e?e:null,rr=({ref:e,ref_key:t,ref_for:r})=>null!=e?(0,a.HD)(e)||(0,n.dq)(e)||(0,a.mf)(e)?{i:U,r:e,k:t,f:!!r}:e:null;function nr(e,t=null,r=null,n=0,i=null,c=(e===Dt?0:1),o=!1,f=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&tr(t),ref:t&&rr(t),scopeId:j,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:c,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null};return f?(hr(d,r),128&c&&e.normalize(d)):r&&(d.shapeFlag|=(0,a.HD)(r)?8:16),Vt>0&&!o&&Kt&&(d.patchFlag>0||6&c)&&32!==d.patchFlag&&Kt.push(d),d}const ar=ir;function ir(e,t=null,r=null,i=0,c=null,o=!1){if(e&&e!==Nt||(e=Ht),Xt(e)){const n=or(e,t,!0);return r&&hr(n,r),n}if(Hr(e)&&(e=e.__vccOpts),t){t=cr(t);let{class:e,style:r}=t;e&&!(0,a.HD)(e)&&(t.class=(0,a.C_)(e)),(0,a.Kn)(r)&&((0,n.X3)(r)&&!(0,a.kJ)(r)&&(r=(0,a.l7)({},r)),t.style=(0,a.j5)(r))}const f=(0,a.HD)(e)?1:Z(e)?128:Et(e)?64:(0,a.Kn)(e)?4:(0,a.mf)(e)?2:0;return nr(e,t,r,i,c,f,o,!0)}function cr(e){return e?(0,n.X3)(e)||er in e?(0,a.l7)({},e):e:null}function or(e,t,r=!1){const{props:n,ref:i,patchFlag:c,children:o}=e,f=t?lr(n||{},t):n,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&tr(f),ref:t&&t.ref?r&&i?(0,a.kJ)(i)?i.concat(rr(t)):[i,rr(t)]:rr(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Dt?-1===c?16:16|c:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&or(e.ssContent),ssFallback:e.ssFallback&&or(e.ssFallback),el:e.el,anchor:e.anchor};return d}function fr(e=" ",t=0){return ar(Ft,null,e,t)}function dr(e,t){const r=ar(qt,null,e);return r.staticCount=t,r}function sr(e="",t=!1){return t?($t(),Yt(Ht,null,e)):ar(Ht,null,e)}function ur(e){return null==e||"boolean"===typeof e?ar(Ht):(0,a.kJ)(e)?ar(Dt,null,e.slice()):"object"===typeof e?br(e):ar(Ft,null,String(e))}function br(e){return null===e.el||e.memo?e:or(e)}function hr(e,t){let r=0;const{shapeFlag:n}=e;if(null==t)t=null;else if((0,a.kJ)(t))r=16;else if("object"===typeof t){if(65&n){const r=t.default;return void(r&&(r._c&&(r._d=!1),hr(e,r()),r._c&&(r._d=!0)))}{r=32;const n=t._;n||er in t?3===n&&U&&(1===U.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=U}}else(0,a.mf)(t)?(t={default:t,_ctx:U},r=32):(t=String(t),64&n?(r=16,t=[fr(t)]):r=8);e.children=t,e.shapeFlag|=r}function lr(...e){const t={};for(let r=0;rt(e,r,void 0,c&&c[r])));else{const r=Object.keys(e);i=new Array(r.length);for(let n=0,a=r.length;n!Xt(e)||e.type!==Ht&&!(e.type===Dt&&!vr(e.children))))?e:null}const gr=e=>e?Cr(e)?Dr(e)||e.proxy:gr(e.parent):null,yr=(0,a.l7)(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>gr(e.parent),$root:e=>gr(e.root),$emit:e=>e.emit,$options:e=>qe(e),$forceUpdate:e=>()=>k(e.update),$nextTick:e=>_.bind(e.proxy),$watch:e=>re.bind(e)}),wr={get({_:e},t){const{ctx:r,setupState:i,data:c,props:o,accessCache:f,type:d,appContext:s}=e;let u;if("$"!==t[0]){const n=f[t];if(void 0!==n)switch(n){case 1:return i[t];case 2:return c[t];case 4:return r[t];case 3:return o[t]}else{if(i!==a.kT&&(0,a.RI)(i,t))return f[t]=1,i[t];if(c!==a.kT&&(0,a.RI)(c,t))return f[t]=2,c[t];if((u=e.propsOptions[0])&&(0,a.RI)(u,t))return f[t]=3,o[t];if(r!==a.kT&&(0,a.RI)(r,t))return f[t]=4,r[t];Ue&&(f[t]=0)}}const b=yr[t];let h,l;return b?("$attrs"===t&&(0,n.j)(e,"get",t),b(e)):(h=d.__cssModules)&&(h=h[t])?h:r!==a.kT&&(0,a.RI)(r,t)?(f[t]=4,r[t]):(l=s.config.globalProperties,(0,a.RI)(l,t)?l[t]:void 0)},set({_:e},t,r){const{data:n,setupState:i,ctx:c}=e;return i!==a.kT&&(0,a.RI)(i,t)?(i[t]=r,!0):n!==a.kT&&(0,a.RI)(n,t)?(n[t]=r,!0):!(0,a.RI)(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(c[t]=r,!0))},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:i,propsOptions:c}},o){let f;return!!r[o]||e!==a.kT&&(0,a.RI)(e,o)||t!==a.kT&&(0,a.RI)(t,o)||(f=c[0])&&(0,a.RI)(f,o)||(0,a.RI)(n,o)||(0,a.RI)(yr,o)||(0,a.RI)(i.config.globalProperties,o)},defineProperty(e,t,r){return null!=r.get?this.set(e,t,r.get(),null):null!=r.value&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};const _r=pt();let Mr=0;function kr(e,t,r){const i=e.type,c=(t?t.appContext:e.appContext)||_r,o={uid:Mr++,vnode:e,type:i,parent:t,appContext:c,root:null,next:null,subTree:null,effect:null,update:null,scope:new n.Bj(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(c.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:tt(i,c),emitsOptions:L(i,c),emit:null,emitted:null,propsDefaults:a.kT,inheritAttrs:i.inheritAttrs,ctx:a.kT,data:a.kT,props:a.kT,attrs:a.kT,slots:a.kT,refs:a.kT,setupState:a.kT,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=B.bind(null,o),e.ce&&e.ce(o),o}let Ar=null;const Er=()=>Ar||U,Sr=e=>{Ar=e,e.scope.on()},Tr=()=>{Ar&&Ar.scope.off(),Ar=null};function Cr(e){return 4&e.vnode.shapeFlag}let Pr,Or,Rr=!1;function Ir(e,t=!1){Rr=t;const{props:r,children:n}=e.vnode,a=Cr(e);Ye(e,r,a,t),ut(e,n);const i=a?Br(e,t):void 0;return Rr=!1,i}function Br(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=(0,n.Xl)(new Proxy(e.ctx,wr));const{setup:c}=r;if(c){const r=e.setupContext=c.length>1?jr(e):null;Sr(e),(0,n.Jd)();const f=i(c,e,0,[e.props,r]);if((0,n.lk)(),Tr(),(0,a.tI)(f)){if(f.then(Tr,Tr),t)return f.then((r=>{Lr(e,r,t)})).catch((t=>{o(t,e,0)}));e.asyncDep=f}else Lr(e,f,t)}else Nr(e,t)}function Lr(e,t,r){(0,a.mf)(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:(0,a.Kn)(t)&&(e.setupState=(0,n.WL)(t)),Nr(e,r)}function Nr(e,t,r){const i=e.type;if(!e.render){if(!t&&Pr&&!i.render){const t=i.template;if(t){0;const{isCustomElement:r,compilerOptions:n}=e.appContext.config,{delimiters:c,compilerOptions:o}=i,f=(0,a.l7)((0,a.l7)({isCustomElement:r,delimiters:c},n),o);i.render=Pr(t,f)}}e.render=i.render||a.dG,Or&&Or(e)}Sr(e),(0,n.Jd)(),je(e),(0,n.lk)(),Tr()}function Ur(e){return new Proxy(e.attrs,{get(t,r){return(0,n.j)(e,"get","$attrs"),t[r]}})}function jr(e){const t=t=>{e.exposed=t||{}};let r;return{get attrs(){return r||(r=Ur(e))},slots:e.slots,emit:e.emit,expose:t}}function Dr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy((0,n.WL)((0,n.Xl)(e.exposed)),{get(t,r){return r in t?t[r]:r in yr?yr[r](e):void 0}}))}function Fr(e){return(0,a.mf)(e)&&e.displayName||e.name}function Hr(e){return(0,a.mf)(e)&&"__vccOpts"in e}const qr=(e,t)=>(0,n.Fl)(e,t,Rr);function zr(e,t,r){const n=arguments.length;return 2===n?(0,a.Kn)(t)&&!(0,a.kJ)(t)?Xt(t)?ar(e,null,[t]):ar(e,t):ar(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):3===n&&Xt(r)&&(r=[r]),ar(e,t,r))}Symbol("");const Kr="3.2.31"},49242:function(e,t,r){"use strict";r.d(t,{F8:function(){return re},iM:function(){return te},ri:function(){return oe},uT:function(){return U}});var n=r(87139),a=r(73396);r(44870);const i="http://www.w3.org/2000/svg",c="undefined"!==typeof document?document:null,o=c&&c.createElement("template"),f={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const a=t?c.createElementNS(i,e):c.createElement(e,r?{is:r}:void 0);return"select"===e&&n&&null!=n.multiple&&a.setAttribute("multiple",n.multiple),a},createText:e=>c.createTextNode(e),createComment:e=>c.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>c.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,r,n,a,i){const c=r?r.previousSibling:t.lastChild;if(a&&(a===i||a.nextSibling)){while(1)if(t.insertBefore(a.cloneNode(!0),r),a===i||!(a=a.nextSibling))break}else{o.innerHTML=n?`${e}`:e;const a=o.content;if(n){const e=a.firstChild;while(e.firstChild)a.appendChild(e.firstChild);a.removeChild(e)}t.insertBefore(a,r)}return[c?c.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}};function d(e,t,r){const n=e._vtc;n&&(t=(t?[t,...n]:[...n]).join(" ")),null==t?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}function s(e,t,r){const a=e.style,i=(0,n.HD)(r);if(r&&!i){for(const e in r)b(a,e,r[e]);if(t&&!(0,n.HD)(t))for(const e in t)null==r[e]&&b(a,e,"")}else{const n=a.display;i?t!==r&&(a.cssText=r):t&&e.removeAttribute("style"),"_vod"in e&&(a.display=n)}}const u=/\s*!important$/;function b(e,t,r){if((0,n.kJ)(r))r.forEach((r=>b(e,t,r)));else if(t.startsWith("--"))e.setProperty(t,r);else{const a=p(e,t);u.test(r)?e.setProperty((0,n.rs)(a),r.replace(u,""),"important"):e[a]=r}}const h=["Webkit","Moz","ms"],l={};function p(e,t){const r=l[t];if(r)return r;let a=(0,n._A)(t);if("filter"!==a&&a in e)return l[t]=a;a=(0,n.kC)(a);for(let n=0;ndocument.createEvent("Event").timeStamp&&(g=()=>performance.now());const e=navigator.userAgent.match(/firefox\/(\d+)/i);y=!!(e&&Number(e[1])<=53)}let w=0;const _=Promise.resolve(),M=()=>{w=0},k=()=>w||(_.then(M),w=g());function A(e,t,r,n){e.addEventListener(t,r,n)}function E(e,t,r,n){e.removeEventListener(t,r,n)}function S(e,t,r,n,a=null){const i=e._vei||(e._vei={}),c=i[t];if(n&&c)c.value=n;else{const[r,o]=C(t);if(n){const c=i[t]=P(n,a);A(e,r,c,o)}else c&&(E(e,r,c,o),i[t]=void 0)}}const T=/(?:Once|Passive|Capture)$/;function C(e){let t;if(T.test(e)){let r;t={};while(r=e.match(T))e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[(0,n.rs)(e.slice(2)),t]}function P(e,t){const r=e=>{const n=e.timeStamp||g();(y||n>=r.attached-1)&&(0,a.$d)(O(e,r.value),t,5,[e])};return r.value=e,r.attached=k(),r}function O(e,t){if((0,n.kJ)(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}const R=/^on[a-z]/,I=(e,t,r,a,i=!1,c,o,f,u)=>{"class"===t?d(e,a,i):"style"===t?s(e,r,a):(0,n.F7)(t)?(0,n.tR)(t)||S(e,t,r,a,o):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):B(e,t,a,i))?v(e,t,a,c,o,f,u):("true-value"===t?e._trueValue=a:"false-value"===t&&(e._falseValue=a),m(e,t,a,i))};function B(e,t,r,a){return a?"innerHTML"===t||"textContent"===t||!!(t in e&&R.test(t)&&(0,n.mf)(r)):"spellcheck"!==t&&"draggable"!==t&&("form"!==t&&(("list"!==t||"INPUT"!==e.tagName)&&(("type"!==t||"TEXTAREA"!==e.tagName)&&((!R.test(t)||!(0,n.HD)(r))&&t in e))))}"undefined"!==typeof HTMLElement&&HTMLElement;const L="transition",N="animation",U=(e,{slots:t})=>(0,a.h)(a.P$,H(e),t);U.displayName="Transition";const j={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},D=(U.props=(0,n.l7)({},a.P$.props,j),(e,t=[])=>{(0,n.kJ)(e)?e.forEach((e=>e(...t))):e&&e(...t)}),F=e=>!!e&&((0,n.kJ)(e)?e.some((e=>e.length>1)):e.length>1);function H(e){const t={};for(const n in e)n in j||(t[n]=e[n]);if(!1===e.css)return t;const{name:r="v",type:a,duration:i,enterFromClass:c=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:f=`${r}-enter-to`,appearFromClass:d=c,appearActiveClass:s=o,appearToClass:u=f,leaveFromClass:b=`${r}-leave-from`,leaveActiveClass:h=`${r}-leave-active`,leaveToClass:l=`${r}-leave-to`}=e,p=q(i),x=p&&p[0],m=p&&p[1],{onBeforeEnter:v,onEnter:g,onEnterCancelled:y,onLeave:w,onLeaveCancelled:_,onBeforeAppear:M=v,onAppear:k=g,onAppearCancelled:A=y}=t,E=(e,t,r)=>{$(e,t?u:f),$(e,t?s:o),r&&r()},S=(e,t)=>{$(e,l),$(e,h),t&&t()},T=e=>(t,r)=>{const n=e?k:g,i=()=>E(t,e,r);D(n,[t,i]),G((()=>{$(t,e?d:c),K(t,e?u:f),F(n)||W(t,a,x,i)}))};return(0,n.l7)(t,{onBeforeEnter(e){D(v,[e]),K(e,c),K(e,o)},onBeforeAppear(e){D(M,[e]),K(e,d),K(e,s)},onEnter:T(!1),onAppear:T(!0),onLeave(e,t){const r=()=>S(e,t);K(e,b),X(),K(e,h),G((()=>{$(e,b),K(e,l),F(w)||W(e,a,m,r)})),D(w,[e,r])},onEnterCancelled(e){E(e,!1),D(y,[e])},onAppearCancelled(e){E(e,!0),D(A,[e])},onLeaveCancelled(e){S(e),D(_,[e])}})}function q(e){if(null==e)return null;if((0,n.Kn)(e))return[z(e.enter),z(e.leave)];{const t=z(e);return[t,t]}}function z(e){const t=(0,n.He)(e);return t}function K(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function $(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:r}=e;r&&(r.delete(t),r.size||(e._vtc=void 0))}function G(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let V=0;function W(e,t,r,n){const a=e._endId=++V,i=()=>{a===e._endId&&n()};if(r)return setTimeout(i,r);const{type:c,timeout:o,propCount:f}=Z(e,t);if(!c)return n();const d=c+"end";let s=0;const u=()=>{e.removeEventListener(d,b),i()},b=t=>{t.target===e&&++s>=f&&u()};setTimeout((()=>{s(r[e]||"").split(", "),a=n(L+"Delay"),i=n(L+"Duration"),c=J(a,i),o=n(N+"Delay"),f=n(N+"Duration"),d=J(o,f);let s=null,u=0,b=0;t===L?c>0&&(s=L,u=c,b=i.length):t===N?d>0&&(s=N,u=d,b=f.length):(u=Math.max(c,d),s=u>0?c>d?L:N:null,b=s?s===L?i.length:f.length:0);const h=s===L&&/\b(transform|all)(,|$)/.test(r[L+"Property"]);return{type:s,timeout:u,propCount:b,hasTransform:h}}function J(e,t){while(e.lengthY(t)+Y(e[r]))))}function Y(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function X(){return document.body.offsetHeight}new WeakMap,new WeakMap;const Q=["ctrl","shift","alt","meta"],ee={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Q.some((r=>e[`${r}Key`]&&!t.includes(r)))},te=(e,t)=>(r,...n)=>{for(let e=0;e{ne(e,!1)})):ne(e,t))},beforeUnmount(e,{value:t}){ne(e,t)}};function ne(e,t){e.style.display=t?e._vod:"none"}const ae=(0,n.l7)({patchProp:I},f);let ie;function ce(){return ie||(ie=(0,a.Us)(ae))}const oe=(...e)=>{const t=ce().createApp(...e);const{mount:r}=t;return t.mount=e=>{const a=fe(e);if(!a)return;const i=t._component;(0,n.mf)(i)||i.render||i.template||(i.template=a.innerHTML),a.innerHTML="";const c=r(a,!1,a instanceof SVGElement);return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),c},t};function fe(e){if((0,n.HD)(e)){const t=document.querySelector(e);return t}return e}},87139:function(e,t,r){"use strict";function n(e,t){const r=Object.create(null),n=e.split(",");for(let a=0;a!!r[e.toLowerCase()]:e=>!!r[e]}r.d(t,{C_:function(){return h},DM:function(){return R},E9:function(){return ne},F7:function(){return k},Gg:function(){return K},HD:function(){return L},He:function(){return te},Kn:function(){return U},NO:function(){return _},Nj:function(){return ee},Od:function(){return S},PO:function(){return q},Pq:function(){return o},RI:function(){return C},S0:function(){return z},W7:function(){return H},WV:function(){return p},Z6:function(){return y},_A:function(){return V},_N:function(){return O},aU:function(){return X},dG:function(){return w},e1:function(){return i},fY:function(){return n},hR:function(){return Y},hq:function(){return x},ir:function(){return Q},j5:function(){return d},kC:function(){return J},kJ:function(){return P},kT:function(){return g},l7:function(){return E},mf:function(){return B},rs:function(){return Z},tI:function(){return j},tR:function(){return A},yA:function(){return f},yk:function(){return N},zw:function(){return m}});const a="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",i=n(a);const c="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",o=n(c);function f(e){return!!e||""===e}function d(e){if(P(e)){const t={};for(let r=0;r{if(e){const r=e.split(u);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}function h(e){let t="";if(L(e))t=e;else if(P(e))for(let r=0;rp(e,t)))}const m=e=>L(e)?e:null==e?"":P(e)||U(e)&&(e.toString===D||!B(e.toString))?JSON.stringify(e,v,2):String(e),v=(e,t)=>t&&t.__v_isRef?v(e,t.value):O(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,r])=>(e[`${t} =>`]=r,e)),{})}:R(t)?{[`Set(${t.size})`]:[...t.values()]}:!U(t)||P(t)||q(t)?t:String(t),g={},y=[],w=()=>{},_=()=>!1,M=/^on[^a-z]/,k=e=>M.test(e),A=e=>e.startsWith("onUpdate:"),E=Object.assign,S=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},T=Object.prototype.hasOwnProperty,C=(e,t)=>T.call(e,t),P=Array.isArray,O=e=>"[object Map]"===F(e),R=e=>"[object Set]"===F(e),I=e=>e instanceof Date,B=e=>"function"===typeof e,L=e=>"string"===typeof e,N=e=>"symbol"===typeof e,U=e=>null!==e&&"object"===typeof e,j=e=>U(e)&&B(e.then)&&B(e.catch),D=Object.prototype.toString,F=e=>D.call(e),H=e=>F(e).slice(8,-1),q=e=>"[object Object]"===F(e),z=e=>L(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,K=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$=e=>{const t=Object.create(null);return r=>{const n=t[r];return n||(t[r]=e(r))}},G=/-(\w)/g,V=$((e=>e.replace(G,((e,t)=>t?t.toUpperCase():"")))),W=/\B([A-Z])/g,Z=$((e=>e.replace(W,"-$1").toLowerCase())),J=$((e=>e.charAt(0).toUpperCase()+e.slice(1))),Y=$((e=>e?`on${J(e)}`:"")),X=(e,t)=>!Object.is(e,t),Q=(e,t)=>{for(let r=0;r{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:r})},te=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let re;const ne=()=>re||(re="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:{})},61639:function(e,t,r){"use strict";r.r(t),r.d(t,{detectEnv:function(){return M},detectOS:function(){return k},formatIOSMobile:function(){return Y},formatMobileRegistry:function(){return ie},formatMobileRegistryEntry:function(){return ae},getClientMeta:function(){return q},getCrypto:function(){return D},getCryptoOrThrow:function(){return j},getDappRegistryUrl:function(){return ne},getDocument:function(){return I},getDocumentOrThrow:function(){return R},getFromWindow:function(){return P},getFromWindowOrThrow:function(){return O},getLocal:function(){return W},getLocalStorage:function(){return H},getLocalStorageOrThrow:function(){return F},getLocation:function(){return U},getLocationOrThrow:function(){return N},getMobileLinkRegistry:function(){return ee},getMobileRegistryEntry:function(){return Q},getNavigator:function(){return L},getNavigatorOrThrow:function(){return B},getWalletRegistryUrl:function(){return re},isAndroid:function(){return A},isBrowser:function(){return C},isIOS:function(){return E},isMobile:function(){return S},isNode:function(){return T},mobileLinkChoiceKey:function(){return J},removeLocal:function(){return Z},safeJsonParse:function(){return $},safeJsonStringify:function(){return G},saveMobileLinkInfo:function(){return X},setLocal:function(){return V}});var n=r(91342),a=r(23380),i=r(96027),c=function(){for(var e=0,t=0,r=arguments.length;t1)}function S(){const e=k();return!!e&&(A()||E())}function T(){const e=M(),t=!(!e||!e.name)&&"node"===e.name.toLowerCase();return t}function C(){const e=!T()&&!!L();return e}const P=a.getFromWindow,O=a.getFromWindowOrThrow,R=a.getDocumentOrThrow,I=a.getDocument,B=a.getNavigatorOrThrow,L=a.getNavigator,N=a.getLocationOrThrow,U=a.getLocation,j=a.getCryptoOrThrow,D=a.getCrypto,F=a.getLocalStorageOrThrow,H=a.getLocalStorage;function q(){return n.D()}r(21703);function z(e){if("string"!==typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch(t){return e}}function K(e){return"string"===typeof e?e:JSON.stringify(e)}const $=z,G=K;function V(e,t){const r=G(t),n=H();n&&n.setItem(e,r)}function W(e){let t=null,r=null;const n=H();return n&&(r=n.getItem(e)),t=r?$(r):r,t}function Z(e){const t=H();t&&t.removeItem(e)}const J="WALLETCONNECT_DEEPLINK_CHOICE";function Y(e,t){const r=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${r}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${r}`:""}function X(e){const t=e.href.split("?")[0];V(J,Object.assign(Object.assign({},e),{href:t}))}function Q(e,t){return e.filter((e=>e.name.toLowerCase().includes(t.toLowerCase())))[0]}function ee(e,t){let r=e;return t&&(r=t.map((t=>Q(e,t))).filter(Boolean)),r}const te="https://registry.walletconnect.com";function re(){return te+"/api/v2/wallets"}function ne(){return te+"/api/v2/dapps"}function ae(e,t="mobile"){var r;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:null!==(r=e.image_url.sm)&&void 0!==r?r:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function ie(e,t="mobile"){return Object.values(e).filter((e=>!!e[t].universal||!!e[t].native)).map((e=>ae(e,t)))}},3896:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(48675),r(3462),r(21703);var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.removeHexLeadingZeros=t.sanitizeHex=t.addHexPrefix=t.removeHexPrefix=t.padRight=t.padLeft=t.sanitizeBytes=t.swapHex=t.swapBytes=t.splitBytes=t.calcByteLength=t.trimRight=t.trimLeft=t.concatArrays=t.concatBuffers=t.getEncoding=t.getType=t.isArrayBuffer=t.isTypedArray=t.isBuffer=t.isHexString=t.isBinaryString=t.binaryToNumber=t.binaryToUtf8=t.binaryToHex=t.binaryToArray=t.binaryToBuffer=t.numberToBinary=t.numberToUtf8=t.numberToHex=t.numberToArray=t.numberToBuffer=t.utf8ToBinary=t.utf8ToNumber=t.utf8ToHex=t.utf8ToArray=t.utf8ToBuffer=t.hexToBinary=t.hexToNumber=t.hexToUtf8=t.hexToArray=t.hexToBuffer=t.arrayToBinary=t.arrayToNumber=t.arrayToUtf8=t.arrayToHex=t.arrayToBuffer=t.bufferToBinary=t.bufferToNumber=t.bufferToUtf8=t.bufferToHex=t.bufferToArray=void 0;const i=a(r(6513)),c=a(r(75519)),o="hex",f="utf8",d="binary",s="buffer",u="array",b="typed-array",h="array-buffer",l="0";function p(e){return new Uint8Array(e)}function x(e,t=!1){const r=e.toString(o);return t?se(r):r}function m(e){return e.toString(f)}function v(e){return e.readUIntBE(0,e.length)}function g(e){return k(p(e))}function y(e){return c.default(e)}function w(e,t=!1){return x(y(e),t)}function _(e){return m(y(e))}function M(e){return v(y(e))}function k(e){return Array.from(e).map(D).join("")}function A(e){return n.from(de(e),o)}function E(e){return p(A(e))}function S(e){return m(A(e))}function T(e){return M(E(e))}function C(e){return k(E(e))}function P(e){return n.from(e,f)}function O(e){return p(P(e))}function R(e,t=!1){return x(P(e),t)}function I(e){const t=parseInt(e,10);return pe(le(t),"Number can only safely store up to 53 bits"),t}function B(e){return k(O(e))}function L(e){return F(D(e))}function N(e){return H(D(e))}function U(e,t){return q(D(e),t)}function j(e){return`${e}`}function D(e){const t=(e>>>0).toString(2);return ce(t)}function F(e){return y(H(e))}function H(e){return new Uint8Array(ne(e).map((e=>parseInt(e,2))))}function q(e,t){return w(H(e),t)}function z(e){return _(H(e))}function K(e){return M(H(e))}function $(e){return!("string"!==typeof e||!new RegExp(/^[01]+$/).test(e))&&e.length%8===0}function G(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function V(e){return n.isBuffer(e)}function W(e){return i.default.strict(e)&&!V(e)}function Z(e){return!W(e)&&!V(e)&&"undefined"!==typeof e.byteLength}function J(e){return V(e)?s:W(e)?b:Z(e)?h:Array.isArray(e)?u:typeof e}function Y(e){return $(e)?d:G(e)?o:f}function X(...e){const t=n.concat(e);return t}function Q(...e){let t=[];return e.forEach((e=>t=t.concat(Array.from(e)))),new Uint8Array([...t])}function ee(e,t){const r=e.length-t;return r>0&&(e=e.slice(r)),e}function te(e,t){return e.slice(0,t)}function re(e,t=8){const r=e%t;return r?(e-r)/t*t+t:e}function ne(e,t=8){const r=ce(e).match(new RegExp(`.{${t}}`,"gi"));return Array.from(r||[])}function ae(e){return ne(e).map(xe).join("")}function ie(e){return q(ae(C(e)))}function ce(e,t=8,r=l){return oe(e,re(e.length,t),r)}function oe(e,t,r=l){return me(e,t,!0,r)}function fe(e,t,r=l){return me(e,t,!1,r)}function de(e){return e.replace(/^0x/,"")}function se(e){return e.startsWith("0x")?e:`0x${e}`}function ue(e){return e=de(e),e=ce(e,2),e&&(e=se(e)),e}function be(e){const t=e.startsWith("0x");return e=de(e),e=e.startsWith(l)?e.substring(1):e,t?se(e):e}function he(e){return"undefined"===typeof e}function le(e){return!he(e)}function pe(e,t){if(!e)throw new Error(t)}function xe(e){return e.split("").reverse().join("")}function me(e,t,r,n=l){const a=t-e.length;let i=e;if(a>0){const t=n.repeat(a);i=r?t+e:e+t}return i}t.bufferToArray=p,t.bufferToHex=x,t.bufferToUtf8=m,t.bufferToNumber=v,t.bufferToBinary=g,t.arrayToBuffer=y,t.arrayToHex=w,t.arrayToUtf8=_,t.arrayToNumber=M,t.arrayToBinary=k,t.hexToBuffer=A,t.hexToArray=E,t.hexToUtf8=S,t.hexToNumber=T,t.hexToBinary=C,t.utf8ToBuffer=P,t.utf8ToArray=O,t.utf8ToHex=R,t.utf8ToNumber=I,t.utf8ToBinary=B,t.numberToBuffer=L,t.numberToArray=N,t.numberToHex=U,t.numberToUtf8=j,t.numberToBinary=D,t.binaryToBuffer=F,t.binaryToArray=H,t.binaryToHex=q,t.binaryToUtf8=z,t.binaryToNumber=K,t.isBinaryString=$,t.isHexString=G,t.isBuffer=V,t.isTypedArray=W,t.isArrayBuffer=Z,t.getType=J,t.getEncoding=Y,t.concatBuffers=X,t.concatArrays=Q,t.trimLeft=ee,t.trimRight=te,t.calcByteLength=re,t.splitBytes=ne,t.swapBytes=ae,t.swapHex=ie,t.sanitizeBytes=ce,t.padLeft=oe,t.padRight=fe,t.removeHexPrefix=de,t.addHexPrefix=se,t.sanitizeHex=ue,t.removeHexLeadingZeros=be},46129:function(e,t,r){"use strict";function n(){return(null===r.g||void 0===r.g?void 0:r.g.crypto)||(null===r.g||void 0===r.g?void 0:r.g.msCrypto)||{}}function a(){const e=n();return e.subtle||e.webkitSubtle}function i(){return!!n()&&!!a()}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=a,t.isBrowserCryptoAvailable=i},46862:function(e,t,r){"use strict";var n=r(96027);function a(){return"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product}function i(){return"undefined"!==typeof n&&"undefined"!==typeof n.versions&&"undefined"!==typeof n.versions.node}function c(){return!a()&&!i()}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=a,t.isNode=i,t.isBrowser=c},29441:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(46129),t),a(r(46862),t)},83581:function(e,t,r){var n=r(96027);function a(e){return e&&"object"===typeof e&&"default"in e?e["default"]:e}var i=r(61639),c=a(r(38385)),o=a(r(51945)),f=r(45626);function d(e){c.toString(e,{type:"terminal"}).then(console.log)}var s=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n';"undefined"!==typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!==typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function u(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}var b="data:image/svg+xml,%3Csvg height='185' viewBox='0 0 300 185' width='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m61.4385429 36.2562612c48.9112241-47.8881663 128.2119871-47.8881663 177.1232091 0l5.886545 5.7634174c2.445561 2.3944081 2.445561 6.2765112 0 8.6709204l-20.136695 19.715503c-1.222781 1.1972051-3.2053 1.1972051-4.428081 0l-8.100584-7.9311479c-34.121692-33.4079817-89.443886-33.4079817-123.5655788 0l-8.6750562 8.4936051c-1.2227816 1.1972041-3.205301 1.1972041-4.4280806 0l-20.1366949-19.7155031c-2.4455612-2.3944092-2.4455612-6.2765122 0-8.6709204zm218.7677961 40.7737449 17.921697 17.546897c2.445549 2.3943969 2.445563 6.2764769.000031 8.6708899l-80.810171 79.121134c-2.445544 2.394426-6.410582 2.394453-8.85616.000062-.00001-.00001-.000022-.000022-.000032-.000032l-57.354143-56.154572c-.61139-.598602-1.60265-.598602-2.21404 0-.000004.000004-.000007.000008-.000011.000011l-57.3529212 56.154531c-2.4455368 2.394432-6.4105755 2.394472-8.8561612.000087-.0000143-.000014-.0000296-.000028-.0000449-.000044l-80.81241943-79.122185c-2.44556021-2.394408-2.44556021-6.2765115 0-8.6709197l17.92172963-17.5468673c2.4455602-2.3944082 6.4105989-2.3944082 8.8561602 0l57.3549775 56.155357c.6113908.598602 1.602649.598602 2.2140398 0 .0000092-.000009.0000174-.000017.0000265-.000024l57.3521031-56.155333c2.445505-2.3944633 6.410544-2.3945531 8.856161-.0002.000034.0000336.000068.0000673.000101.000101l57.354902 56.155432c.61139.598601 1.60265.598601 2.21404 0l57.353975-56.1543249c2.445561-2.3944092 6.410599-2.3944092 8.85616 0z' fill='%233b99fc'/%3E%3C/svg%3E",h="WalletConnect",l=300,p="rgb(64, 153, 255)",x="walletconnect-wrapper",m="walletconnect-style-sheet",v="walletconnect-qrcode-modal",g="walletconnect-qrcode-close",y="walletconnect-qrcode-text",w="walletconnect-connect-button";function _(e){return f.createElement("div",{className:"walletconnect-modal__header"},f.createElement("img",{src:b,className:"walletconnect-modal__headerLogo"}),f.createElement("p",null,h),f.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:e.onClose},f.createElement("div",{id:g,className:"walletconnect-modal__close__icon"},f.createElement("div",{className:"walletconnect-modal__close__line1"}),f.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function M(e){return f.createElement("a",{className:"walletconnect-connect__button",href:e.href,id:w+"-"+e.name,onClick:e.onClick,rel:"noopener noreferrer",style:{backgroundColor:e.color},target:"_blank"},e.name)}var k="data:image/svg+xml,%3Csvg fill='none' height='18' viewBox='0 0 8 18' width='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath clip-rule='evenodd' d='m.586301.213898c-.435947.33907-.5144813.967342-.175411 1.403292l4.87831 6.27212c.28087.36111.28087.86677 0 1.22788l-4.878311 6.27211c-.33907.436-.260536 1.0642.175412 1.4033.435949.3391 1.064219.2605 1.403289-.1754l4.87832-6.2721c.84259-1.08336.84259-2.60034 0-3.68367l-4.87832-6.27212c-.33907-.4359474-.96734-.514482-1.403289-.175412z' fill='%233c4252' fill-rule='evenodd'/%3E%3C/svg%3E";function A(e){var t=e.color,r=e.href,n=e.name,a=e.logo,i=e.onClick;return f.createElement("a",{className:"walletconnect-modal__base__row",href:r,onClick:i,rel:"noopener noreferrer",target:"_blank"},f.createElement("h3",{className:"walletconnect-modal__base__row__h3"},n),f.createElement("div",{className:"walletconnect-modal__base__row__right"},f.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+a+"') "+t,backgroundSize:"100%"}}),f.createElement("img",{src:k,className:"walletconnect-modal__base__row__right__caret"})))}function E(e){var t=e.color,r=e.href,n=e.name,a=e.logo,i=e.onClick,c=window.innerWidth<768?(n.length>8?2.5:2.7)+"vw":"inherit";return f.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:r,onClick:i,rel:"noopener noreferrer",target:"_blank"},f.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+a+"') "+t,backgroundSize:"100%"}}),f.createElement("div",{style:{fontSize:c},className:"walletconnect-connect__button__text"},n))}var S=5,T=12;function C(e){var t=i.isAndroid(),r=f.useState(""),n=r[0],a=r[1],c=f.useState(""),o=c[0],d=c[1],s=f.useState(1),u=s[0],b=s[1],h=o?e.links.filter((function(e){return e.name.toLowerCase().includes(o.toLowerCase())})):e.links,l=e.errorMessage,x=o||h.length>S,m=Math.ceil(h.length/T),v=[(u-1)*T+1,u*T],g=h.length?h.filter((function(e,t){return t+1>=v[0]&&t+1<=v[1]})):[],w=!(t||!(m>1)),_=void 0;function k(e){a(e.target.value),clearTimeout(_),e.target.value?_=setTimeout((function(){d(e.target.value),b(1)}),1e3):(a(""),d(""),b(1))}return f.createElement("div",null,f.createElement("p",{id:y,className:"walletconnect-qrcode__text"},t?e.text.connect_mobile_wallet:e.text.choose_preferred_wallet),!t&&f.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:n,onChange:k}),f.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(t?"__android":x&&h.length?"__wrap":"")},t?f.createElement(M,{name:e.text.connect,color:p,href:e.uri,onClick:f.useCallback((function(){i.saveMobileLinkInfo({name:"Unknown",href:e.uri})}),[])}):g.length?g.map((function(t){var r=t.color,n=t.name,a=t.shortName,c=t.logo,o=i.formatIOSMobile(e.uri,t),d=f.useCallback((function(){i.saveMobileLinkInfo({name:n,href:o})}),[g]);return x?f.createElement(E,{color:r,href:o,name:a||n,logo:c,onClick:d}):f.createElement(A,{color:r,href:o,name:n,logo:c,onClick:d})})):f.createElement(f.Fragment,null,f.createElement("p",null,l.length?e.errorMessage:e.links.length&&!h.length?e.text.no_wallets_found:e.text.loading))),w&&f.createElement("div",{className:"walletconnect-modal__footer"},Array(m).fill(0).map((function(e,t){var r=t+1,n=u===r;return f.createElement("a",{style:{margin:"auto 10px",fontWeight:n?"bold":"normal"},onClick:function(){return b(r)}},r)}))))}function P(e){var t=!!e.message.trim();return f.createElement("div",{className:"walletconnect-qrcode__notification"+(t?" notification__show":"")},e.message)}var O=function(e){try{var t="";return Promise.resolve(c.toString(e,{margin:0,type:"svg"})).then((function(e){return"string"===typeof e&&(t=e.replace("0||f.useEffect((function(){var a=function(){try{if(t)return Promise.resolve();o(!0);var a=u((function(){var t=e.qrcodeModalOptions&&e.qrcodeModalOptions.registryUrl?e.qrcodeModalOptions.registryUrl:i.getWalletRegistryUrl();return Promise.resolve(fetch(t)).then((function(t){return Promise.resolve(t.json()).then((function(t){var a=t.listings,c=r?"mobile":"desktop",f=i.getMobileLinkRegistry(i.formatMobileRegistry(a,c),n);o(!1),b(!0),O(f.length?"":e.text.no_supported_wallets),S(f);var d=1===f.length;d&&(y(i.formatIOSMobile(e.uri,f[0])),p(!0)),k(d)}))}))}),(function(t){o(!1),b(!0),O(e.text.something_went_wrong),console.error(t)}));return Promise.resolve(a&&a.then?a.then((function(){})):void 0)}catch(c){return Promise.reject(c)}};a()}))};I();var B=r?l:!l;return f.createElement("div",{id:v,className:"walletconnect-qrcode__base animated fadeIn"},f.createElement("div",{className:"walletconnect-modal__base"},f.createElement(_,{onClose:e.onClose}),M&&l?f.createElement("div",{className:"walletconnect-modal__single_wallet"},f.createElement("a",{onClick:function(){return i.saveMobileLinkInfo({name:E[0].name,href:g})},href:g,rel:"noopener noreferrer",target:"_blank"},e.text.connect_with+" "+(M?E[0].name:"")+" ›")):t||c||!c&&E.length?f.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(B?" right__selected":"")},f.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),r?f.createElement(f.Fragment,null,f.createElement("a",{onClick:function(){return p(!1),I()}},e.text.mobile),f.createElement("a",{onClick:function(){return p(!0)}},e.text.qrcode)):f.createElement(f.Fragment,null,f.createElement("a",{onClick:function(){return p(!0)}},e.text.qrcode),f.createElement("a",{onClick:function(){return p(!1),I()}},e.text.desktop))):null,f.createElement("div",null,l||!t&&!c&&!E.length?f.createElement(R,Object.assign({},x)):f.createElement(C,Object.assign({},x,{links:E,errorMessage:P})))))}var B={choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},L={choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},N={choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},U={choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},j={choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},D={choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},F={choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},H={choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"},q={de:B,en:L,es:N,fr:U,ko:j,pt:D,zh:F,fa:H};function z(){var e=i.getDocumentOrThrow(),t=e.getElementById(m);t&&e.head.removeChild(t);var r=e.createElement("style");r.setAttribute("id",m),r.innerText=s,e.head.appendChild(r)}function K(){var e=i.getDocumentOrThrow(),t=e.createElement("div");return t.setAttribute("id",x),e.body.appendChild(t),t}function $(){var e=i.getDocumentOrThrow(),t=e.getElementById(v);t&&(t.className=t.className.replace("fadeIn","fadeOut"),setTimeout((function(){var t=e.getElementById(x);t&&e.body.removeChild(t)}),l))}function G(e){return function(){$(),e&&e()}}function V(){var e=i.getNavigatorOrThrow().language.split("-")[0]||"en";return q[e]||q["en"]}function W(e,t,r){z();var n=K();f.render(f.createElement(I,{text:V(),uri:e,onClose:G(t),qrcodeModalOptions:r}),n)}function Z(){$()}var J=function(){return"undefined"!==typeof n&&"undefined"!==typeof n.versions&&"undefined"!==typeof n.versions.node};function Y(e,t,r){console.log(e),J()?d(e):W(e,t,r)}function X(){J()||Z()}var Q={open:Y,close:X};e.exports=Q},90994:function(e,t,r){"use strict";r(21703),e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},30322:function(e,t,r){"use strict";r.d(t,{Z:function(){return xt}});var n={};r.r(n),r.d(n,{decrypt:function(){return Ye},encrypt:function(){return Je},generateKey:function(){return We},verifyHmac:function(){return Ze}});r(21703);var a=r(61639);const i=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],c=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],o={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"};r(48675),r(3462);var f=r(2396),d=r.n(f),s=r(3896);function u(e){return s.arrayToBuffer(new Uint8Array(e))}function b(e,t){return s.arrayToHex(new Uint8Array(e),!t)}function h(e){return s.bufferToArray(e).buffer}function l(e){return s.utf8ToBuffer(e)}function p(e,t){return s.utf8ToHex(e,!t)}function x(e){return s.hexToArray(e).buffer}function m(e,t){const r=s.removeHexPrefix(s.sanitizeHex(new(d())(e).toString(16)));return t?r:s.addHexPrefix(r)}var v=r(69893);var g=r(29441);function y(){const e=Date.now()*Math.pow(10,3),t=Math.floor(Math.random()*Math.pow(10,3));return e+t}function w(e){return s.sanitizeHex(e)}function _(e){return s.removeHexLeadingZeros(s.addHexPrefix(e))}const M=y;function k(){const e=((e,t)=>{for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t})();return e}function A(e,t){let r;const n=o[e];return n&&(r=`https://${n}.infura.io/v3/${t}`),r}function E(e,t){let r;const n=A(e,t.infuraId);return t.custom&&t.custom[e]?r=t.custom[e]:n&&(r=n),r}function S(e){return""===e||"string"===typeof e&&""===e.trim()}function T(e){return!(e&&e.length)}function C(e,t){return s.isHexString(e,t)}function P(e){return"undefined"!==typeof e.method}function O(e){return"undefined"!==typeof e.result}function R(e){return"undefined"!==typeof e.error}function I(e){return"undefined"!==typeof e.event}function B(e){return i.includes(e)||e.startsWith("wc_")}function L(e){return!!e.method.startsWith("wc_")||!c.includes(e.method)}function N(e){e=(0,s.removeHexPrefix)(e.toLowerCase());const t=(0,s.removeHexPrefix)((0,v.keccak_256)(l(e)));let r="";for(let n=0;n7?r+=e[n].toUpperCase():r+=e[n];return(0,s.addHexPrefix)(r)}const U=e=>!!e&&("0x"===e.toLowerCase().substring(0,2)&&(!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e))||e===N(e))));function j(e){return T(e)||C(e[0])||(e[0]=p(e[0])),e}function D(e){if("undefined"!==typeof e.type&&"0"!==e.type)return e;if("undefined"===typeof e.from||!U(e.from))throw new Error("Transaction object must include a valid 'from' value.");function t(e){let t=e;return("number"===typeof e||"string"===typeof e&&!S(e))&&(C(e)?"string"===typeof e&&(t=w(e)):t=m(e)),"string"===typeof t&&(t=_(t)),t}const r={from:w(e.from),to:"undefined"===typeof e.to?"":w(e.to),gasPrice:"undefined"===typeof e.gasPrice?"":t(e.gasPrice),gas:"undefined"===typeof e.gas?"undefined"===typeof e.gasLimit?"":t(e.gasLimit):t(e.gas),value:"undefined"===typeof e.value?"":t(e.value),nonce:"undefined"===typeof e.nonce?"":t(e.nonce),data:"undefined"===typeof e.data?"":w(e.data)||"0x"},n=["gasPrice","gas","value","nonce"];return Object.keys(r).forEach((e=>{!r[e].trim().length&&n.includes(e)&&delete r[e]})),r}function F(e){const t=e.message||"Failed or Rejected Request";let r=-32e3;if(e&&!e.code)switch(t){case"Parse error":r=-32700;break;case"Invalid request":r=-32600;break;case"Method not found":r=-32601;break;case"Invalid params":r=-32602;break;case"Internal error":r=-32603;break;default:r=-32e3;break}const n={code:r,message:t};return n}var H=r(14782);function q(e){const t=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r="undefined"!==typeof t?e.substr(t):"";return r}function z(e,t){let r=K(e);return r=Object.assign(Object.assign({},r),t),e=$(r),e}function K(e){return H.parse(e)}function $(e){return H.stringify(e)}function G(e){return"undefined"!==typeof e.bridge}function V(e){const t=e.indexOf(":"),r=-1!==e.indexOf("?")?e.indexOf("?"):void 0,n=e.substring(0,t),a=e.substring(t+1,r);function i(e){const t="@",r=e.split(t),n={handshakeTopic:r[0],version:parseInt(r[1],10)};return n}const c=i(a),o="undefined"!==typeof r?e.substr(r):"";function f(e){const t=K(e),r={key:t.key||"",bridge:t.bridge||""};return r}const d=f(o),s=Object.assign(Object.assign({protocol:n},c),d);return s}class W{constructor(){this._eventEmitters=[],"undefined"!==typeof window&&"undefined"!==typeof window.addEventListener&&(window.addEventListener("online",(()=>this.trigger("online"))),window.addEventListener("offline",(()=>this.trigger("offline"))))}on(e,t){this._eventEmitters.push({event:e,callback:t})}trigger(e){let t=[];e&&(t=this._eventEmitters.filter((t=>t.event===e))),t.forEach((e=>{e.callback()}))}}var Z=W;const J="undefined"!==typeof r.g.WebSocket?r.g.WebSocket:r(90994);class Y{constructor(e){if(this.opts=e,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=e.protocol,this._version=e.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=e.subscriptions||[],this._netMonitor=e.netMonitor||new Z,!e.url||"string"!==typeof e.url)throw new Error("Missing or invalid WebSocket url");this._url=e.url,this._netMonitor.on("online",(()=>this._socketCreate()))}set readyState(e){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(e){}get connecting(){return 0===this.readyState}set connected(e){}get connected(){return 1===this.readyState}set closing(e){}get closing(){return 2===this.readyState}set closed(e){}get closed(){return 3===this.readyState}open(){this._socketCreate()}close(){this._socketClose()}send(e,t,r){if(!t||"string"!==typeof t)throw new Error("Missing or invalid topic field");this._socketSend({topic:t,type:"pub",payload:e,silent:!!r})}subscribe(e){this._socketSend({topic:e,type:"sub",payload:"",silent:!0})}on(e,t){this._events.push({event:e,callback:t})}_socketCreate(){if(this._nextSocket)return;const e=X(this._url,this._protocol,this._version);if(this._nextSocket=new J(e),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=e=>this._socketReceive(e),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=e=>this._socketError(e),this._nextSocket.onclose=()=>{setTimeout((()=>{this._nextSocket=null,this._socketCreate()}),1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(e){const t=JSON.stringify(e);this._socket&&1===this._socket.readyState?this._socket.send(t):(this._setToQueue(e),this._socketCreate())}async _socketReceive(e){let t;try{t=JSON.parse(e.data)}catch(r){return}if(this._socketSend({topic:t.topic,type:"ack",payload:"",silent:!0}),this._socket&&1===this._socket.readyState){const e=this._events.filter((e=>"message"===e.event));e&&e.length&&e.forEach((e=>e.callback(t)))}}_socketError(e){const t=this._events.filter((e=>"error"===e.event));t&&t.length&&t.forEach((t=>t.callback(e)))}_queueSubscriptions(){const e=this._subscriptions;e.forEach((e=>this._queue.push({topic:e,type:"sub",payload:"",silent:!0}))),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(e){this._queue.push(e)}_pushQueue(){const e=this._queue;e.forEach((e=>this._socketSend(e))),this._queue=[]}}function X(e,t,r){var n,i;const c=e.startsWith("https")?e.replace("https","wss"):e.startsWith("http")?e.replace("http","ws"):e,o=c.split("?"),f=(0,a.isBrowser)()?{protocol:t,version:r,env:"browser",host:(null===(n=(0,a.getLocation)())||void 0===n?void 0:n.host)||""}:{protocol:t,version:r,env:(null===(i=(0,a.detectEnv)())||void 0===i?void 0:i.name)||""},d=z(q(o[1]||""),f);return o[0]+"?"+d}var Q=Y;const ee="Session currently connected",te="Session currently disconnected",re="Session Rejected",ne="Missing JSON RPC response",ae='JSON-RPC success response must include "result" field',ie='JSON-RPC error response must include "error" field',ce='JSON RPC request must have valid "method" value',oe='JSON RPC request must have valid "id" value',fe="Missing one of the required parameters: bridge / uri / session",de="JSON RPC response format is invalid",se="URI format is invalid",ue="QRCode Modal not provided",be="User close QRCode Modal";class he{constructor(){this._eventEmitters=[]}subscribe(e){this._eventEmitters.push(e)}unsubscribe(e){this._eventEmitters=this._eventEmitters.filter((t=>t.event!==e))}trigger(e){let t,r=[];t=P(e)?e.method:O(e)||R(e)?`response:${e.id}`:I(e)?e.event:"",t&&(r=this._eventEmitters.filter((e=>e.event===t))),r&&r.length||B(t)||I(t)||(r=this._eventEmitters.filter((e=>"call_request"===e.event))),r.forEach((t=>{if(R(e)){const r=new Error(e.error.message);t.callback(r,null)}else t.callback(null,e)}))}}var le=he;class pe{constructor(e="walletconnect"){this.storageId=e}getSession(){let e=null;const t=(0,a.getLocal)(this.storageId);return t&&G(t)&&(e=t),e}setSession(e){return(0,a.setLocal)(this.storageId,e),e}removeSession(){(0,a.removeLocal)(this.storageId)}}var xe=pe;const me="walletconnect.org",ve="abcdefghijklmnopqrstuvwxyz0123456789",ge=ve.split("").map((e=>`https://${e}.bridge.walletconnect.org`));function ye(e){let t=e.indexOf("//")>-1?e.split("/")[2]:e.split("/")[0];return t=t.split(":")[0],t=t.split("?")[0],t}function we(e){return ye(e).split(".").slice(-2).join(".")}function _e(){return Math.floor(Math.random()*ge.length)}function Me(){return ge[_e()]}function ke(e){return we(e)===me}function Ae(e){return ke(e)?Me():e}class Ee{constructor(e){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new le,this._clientMeta=(0,a.getClientMeta)()||e.connectorOpts.clientMeta||null,this._cryptoLib=e.cryptoLib,this._sessionStorage=e.sessionStorage||new xe(e.connectorOpts.storageId),this._qrcodeModal=e.connectorOpts.qrcodeModal,this._qrcodeModalOptions=e.connectorOpts.qrcodeModalOptions,this._signingMethods=[...c,...e.connectorOpts.signingMethods||[]],!e.connectorOpts.bridge&&!e.connectorOpts.uri&&!e.connectorOpts.session)throw new Error(fe);e.connectorOpts.bridge&&(this.bridge=Ae(e.connectorOpts.bridge)),e.connectorOpts.uri&&(this.uri=e.connectorOpts.uri);const t=e.connectorOpts.session||this._getStorageSession();t&&(this.session=t),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=e.transport||new Q({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),e.connectorOpts.uri&&this._subscribeToSessionRequest(),e.pushServerOpts&&this._registerPushServer(e.pushServerOpts)}set bridge(e){e&&(this._bridge=e)}get bridge(){return this._bridge}set key(e){if(!e)return;const t=x(e);this._key=t}get key(){if(this._key){const e=b(this._key,!0);return e}return""}set clientId(e){e&&(this._clientId=e)}get clientId(){let e=this._clientId;return e||(e=this._clientId=k()),this._clientId}set peerId(e){e&&(this._peerId=e)}get peerId(){return this._peerId}set clientMeta(e){}get clientMeta(){let e=this._clientMeta;return e||(e=this._clientMeta=(0,a.getClientMeta)()),e}set peerMeta(e){this._peerMeta=e}get peerMeta(){const e=this._peerMeta;return e}set handshakeTopic(e){e&&(this._handshakeTopic=e)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(e){e&&(this._handshakeId=e)}get handshakeId(){return this._handshakeId}get uri(){const e=this._formatUri();return e}set uri(e){if(!e)return;const{handshakeTopic:t,bridge:r,key:n}=this._parseUri(e);this.handshakeTopic=t,this.bridge=r,this.key=n}set chainId(e){this._chainId=e}get chainId(){const e=this._chainId;return e}set networkId(e){this._networkId=e}get networkId(){const e=this._networkId;return e}set accounts(e){this._accounts=e}get accounts(){const e=this._accounts;return e}set rpcUrl(e){this._rpcUrl=e}get rpcUrl(){const e=this._rpcUrl;return e}set connected(e){}get connected(){return this._connected}set pending(e){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.bridge=e.bridge,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic)}on(e,t){const r={event:e,callback:t};this._eventManager.subscribe(r)}off(e){this._eventManager.unsubscribe(e)}async createInstantRequest(e){this._key=await this._generateKey();const t=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(e)}]});this.handshakeId=t.id,this.handshakeTopic=k(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",(()=>{throw new Error(be)}));const r=()=>{this.killSession()};try{const e=await this._sendCallRequest(t);return e&&r(),e}catch(n){throw r(),n}}async connect(e){if(!this._qrcodeModal)throw new Error(ue);return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(e),new Promise((async(e,t)=>{this.on("modal_closed",(()=>t(new Error(be)))),this.on("connect",((r,n)=>{if(r)return t(r);e(n.params[0])}))})))}async createSession(e){if(this._connected)throw new Error(ee);if(this.pending)return;this._key=await this._generateKey();const t=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e&&e.chainId?e.chainId:null}]});this.handshakeId=t.id,this.handshakeTopic=k(),this._sendSessionRequest(t,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(e){if(this._connected)throw new Error(ee);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const t={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},r={id:this.handshakeId,jsonrpc:"2.0",result:t};this._sendResponse(r),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(e){if(this._connected)throw new Error(ee);const t=e&&e.message?e.message:re,r=this._formatResponse({id:this.handshakeId,error:{message:t}});this._sendResponse(r),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:t}]}),this._removeStorageSession()}updateSession(e){if(!this._connected)throw new Error(te);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const t={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},r=this._formatRequest({method:"wc_sessionUpdate",params:[t]});this._sendSessionRequest(r,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(e){const t=e?e.message:"Session Disconnected",r={approved:!1,chainId:null,networkId:null,accounts:null},n=this._formatRequest({method:"wc_sessionUpdate",params:[r]});await this._sendRequest(n),this._handleSessionDisconnect(t)}async sendTransaction(e){if(!this._connected)throw new Error(te);const t=D(e),r=this._formatRequest({method:"eth_sendTransaction",params:[t]}),n=await this._sendCallRequest(r);return n}async signTransaction(e){if(!this._connected)throw new Error(te);const t=D(e),r=this._formatRequest({method:"eth_signTransaction",params:[t]}),n=await this._sendCallRequest(r);return n}async signMessage(e){if(!this._connected)throw new Error(te);const t=this._formatRequest({method:"eth_sign",params:e}),r=await this._sendCallRequest(t);return r}async signPersonalMessage(e){if(!this._connected)throw new Error(te);e=j(e);const t=this._formatRequest({method:"personal_sign",params:e}),r=await this._sendCallRequest(t);return r}async signTypedData(e){if(!this._connected)throw new Error(te);const t=this._formatRequest({method:"eth_signTypedData",params:e}),r=await this._sendCallRequest(t);return r}async updateChain(e){if(!this._connected)throw new Error("Session currently disconnected");const t=this._formatRequest({method:"wallet_updateChain",params:[e]}),r=await this._sendCallRequest(t);return r}unsafeSend(e,t){return this._sendRequest(e,t),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:t}]}),new Promise(((t,r)=>{this._subscribeToResponse(e.id,((e,n)=>{if(e)r(e);else{if(!n)throw new Error(ne);t(n)}}))}))}async sendCustomRequest(e,t){if(!this._connected)throw new Error(te);switch(e.method){case"eth_accounts":return this.accounts;case"eth_chainId":return m(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":e.params&&(e.params[0]=D(e.params[0]));break;case"personal_sign":e.params&&(e.params=j(e.params));break;default:break}const r=this._formatRequest(e),n=await this._sendCallRequest(r,t);return n}approveRequest(e){if(!O(e))throw new Error(ae);{const t=this._formatResponse(e);this._sendResponse(t)}}rejectRequest(e){if(!R(e))throw new Error(ie);{const t=this._formatResponse(e);this._sendResponse(t)}}transportClose(){this._transport.close()}async _sendRequest(e,t){const r=this._formatRequest(e),n=await this._encrypt(r),a="undefined"!==typeof(null===t||void 0===t?void 0:t.topic)?t.topic:this.peerId,i=JSON.stringify(n),c="undefined"!==typeof(null===t||void 0===t?void 0:t.forcePushNotification)?!t.forcePushNotification:L(r);this._transport.send(i,a,c)}async _sendResponse(e){const t=await this._encrypt(e),r=this.peerId,n=JSON.stringify(t),a=!0;this._transport.send(n,r,a)}async _sendSessionRequest(e,t,r){this._sendRequest(e,r),this._subscribeToSessionResponse(e.id,t)}_sendCallRequest(e,t){return this._sendRequest(e,t),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:t}]}),this._subscribeToCallResponse(e.id)}_formatRequest(e){if("undefined"===typeof e.method)throw new Error(ce);const t={id:"undefined"===typeof e.id?M():e.id,jsonrpc:"2.0",method:e.method,params:"undefined"===typeof e.params?[]:e.params};return t}_formatResponse(e){if("undefined"===typeof e.id)throw new Error(oe);const t={id:e.id,jsonrpc:"2.0"};if(R(e)){const r=F(e.error),n=Object.assign(Object.assign(Object.assign({},t),e),{error:r});return n}if(O(e)){const r=Object.assign(Object.assign({},t),e);return r}throw new Error(de)}_handleSessionDisconnect(e){const t=e||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),(0,a.removeLocal)(a.mobileLinkChoiceKey)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:t}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(e,t){t&&t.approved?(this._connected?(t.chainId&&(this.chainId=t.chainId),t.accounts&&(this.accounts=t.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,t.chainId&&(this.chainId=t.chainId),t.accounts&&(this.accounts=t.accounts),t.peerId&&!this.peerId&&(this.peerId=t.peerId),t.peerMeta&&!this.peerMeta&&(this.peerMeta=t.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(e)}async _handleIncomingMessages(e){const t=[this.clientId,this.handshakeTopic];if(!t.includes(e.topic))return;let r;try{r=JSON.parse(e.payload)}catch(a){return}const n=await this._decrypt(r);n&&this._eventManager.trigger(n)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(e,t){this.on(`response:${e}`,t)}_subscribeToSessionResponse(e,t){this._subscribeToResponse(e,((e,r)=>{e?this._handleSessionResponse(e.message):r.result?this._handleSessionResponse(t,r.result):r.error&&r.error.message?this._handleSessionResponse(r.error.message):this._handleSessionResponse(t)}))}_subscribeToCallResponse(e){return new Promise(((t,r)=>{this._subscribeToResponse(e,((e,n)=>{e?r(e):n.result?t(n.result):n.error&&n.error.message?r(new Error(n.error.message)):r(new Error(de))}))}))}_subscribeToInternalEvents(){this.on("display_uri",(()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,(()=>{this._eventManager.trigger({event:"modal_closed",params:[]})}),this._qrcodeModalOptions)})),this.on("connect",(()=>{this._qrcodeModal&&this._qrcodeModal.close()})),this.on("call_request_sent",((e,t)=>{const{request:r}=t.params[0];if((0,a.isMobile)()&&this._signingMethods.includes(r.method)){const e=(0,a.getLocal)(a.mobileLinkChoiceKey);e&&(window.location.href=e.href)}})),this.on("wc_sessionRequest",((e,t)=>{e&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:e.toString()}]}),this.handshakeId=t.id,this.peerId=t.params[0].peerId,this.peerMeta=t.params[0].peerMeta;const r=Object.assign(Object.assign({},t),{method:"session_request"});this._eventManager.trigger(r)})),this.on("wc_sessionUpdate",((e,t)=>{e&&this._handleSessionResponse(e.message),this._handleSessionResponse("Session disconnected",t.params[0])}))}_initTransport(){this._transport.on("message",(e=>this._handleIncomingMessages(e))),this._transport.on("open",(()=>this._eventManager.trigger({event:"transport_open",params:[]}))),this._transport.on("close",(()=>this._eventManager.trigger({event:"transport_close",params:[]}))),this._transport.on("error",(()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]}))),this._transport.open()}_formatUri(){const e=this.protocol,t=this.handshakeTopic,r=this.version,n=encodeURIComponent(this.bridge),a=this.key,i=`${e}:${t}@${r}?bridge=${n}&key=${a}`;return i}_parseUri(e){const t=V(e);if(t.protocol===this.protocol){if(!t.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const e=t.handshakeTopic;if(!t.bridge)throw Error("Invalid or missing bridge url parameter value");const r=decodeURIComponent(t.bridge);if(!t.key)throw Error("Invalid or missing key parameter value");const n=t.key;return{handshakeTopic:e,bridge:r,key:n}}throw new Error(se)}async _generateKey(){if(this._cryptoLib){const e=await this._cryptoLib.generateKey();return e}return null}async _encrypt(e){const t=this._key;if(this._cryptoLib&&t){const r=await this._cryptoLib.encrypt(e,t);return r}return null}async _decrypt(e){const t=this._key;if(this._cryptoLib&&t){const r=await this._cryptoLib.decrypt(e,t);return r}return null}_getStorageSession(){let e=null;return this._sessionStorage&&(e=this._sessionStorage.getSession()),e}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(e){if(!e.url||"string"!==typeof e.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!e.type||"string"!==typeof e.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!e.token||"string"!==typeof e.token)throw Error("Invalid or missing pushServerOpts.token parameter value");const t={bridge:this.bridge,topic:this.clientId,type:e.type,token:e.token,peerName:"",language:e.language||""};this.on("connect",(async(r,n)=>{if(r)throw r;if(e.peerMeta){const e=n.params[0].peerMeta.name;t.peerName=e}try{const r=await fetch(`${e.url}/new`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}),n=await r.json();if(!n.success)throw Error("Failed to register in Push Server")}catch(r){throw Error("Failed to register in Push Server")}}))}}var Se=Ee;function Te(e){const t=g.getBrowerCrypto();return t.getRandomValues(new Uint8Array(e))}const Ce=256,Pe=Ce,Oe=Ce,Re="AES-CBC",Ie=`SHA-${Pe}`,Be="HMAC",Le="encrypt",Ne="decrypt",Ue="sign",je="verify";function De(e){return e===Re?{length:Pe,name:Re}:{hash:{name:Ie},name:Be}}function Fe(e){return e===Re?[Le,Ne]:[Ue,je]}async function He(e,t=Re){return g.getSubtleCrypto().importKey("raw",e,De(t),!0,Fe(t))}async function qe(e,t,r){const n=g.getSubtleCrypto(),a=await He(t,Re),i=await n.encrypt({iv:e,name:Re},a,r);return new Uint8Array(i)}async function ze(e,t,r){const n=g.getSubtleCrypto(),a=await He(t,Re),i=await n.decrypt({iv:e,name:Re},a,r);return new Uint8Array(i)}async function Ke(e,t){const r=g.getSubtleCrypto(),n=await He(e,Be),a=await r.sign({length:Oe,name:Be},n,t);return new Uint8Array(a)}function $e(e,t,r){return qe(e,t,r)}function Ge(e,t,r){return ze(e,t,r)}async function Ve(e,t){const r=await Ke(e,t);return r}async function We(e){const t=(e||256)/8,r=Te(t),n=h(s.arrayToBuffer(r));return n}async function Ze(e,t){const r=s.hexToArray(e.data),n=s.hexToArray(e.iv),a=s.hexToArray(e.hmac),i=s.arrayToHex(a,!1),c=s.concatArrays(r,n),o=await Ve(t,c),f=s.arrayToHex(o,!1);return s.removeHexPrefix(i)===s.removeHexPrefix(f)}async function Je(e,t,r){const n=s.bufferToArray(u(t)),a=r||await We(128),i=s.bufferToArray(u(a)),c=s.arrayToHex(i,!1),o=JSON.stringify(e),f=s.utf8ToArray(o),d=await $e(i,n,f),b=s.arrayToHex(d,!1),h=s.concatArrays(d,i),l=await Ve(n,h),p=s.arrayToHex(l,!1);return{data:b,hmac:p,iv:c}}async function Ye(e,t){const r=s.bufferToArray(u(t));if(!r)throw new Error("Missing key: required for decryption");const n=await Ze(e,r);if(!n)return null;const a=s.hexToArray(e.data),i=s.hexToArray(e.iv),c=await Ge(i,r,a),o=s.arrayToUtf8(c);let f;try{f=JSON.parse(o)}catch(d){return null}return f}class Xe extends Se{constructor(e,t){super({cryptoLib:n,connectorOpts:e,pushServerOpts:t})}}var Qe=Xe,et=r(83581),tt=r.n(et),rt=r(6856),nt=r.n(rt),at=r(51283);const it=(0,a.getFromWindow)("XMLHttpRequest")||at.XMLHttpRequest;class ct extends(nt()){constructor(e){super(),this.url=e}formatError(e,t,r=-1){return{error:{message:t,code:r},id:e.id,jsonrpc:e.jsonrpc}}send(e,t){return new Promise((r=>{if("eth_subscribe"===e.method){const t=this.formatError(e,"Subscriptions are not supported by this HTTP endpoint");return this.emit("error",t),r(t)}const n=new it;let a=!1;const i=(i,c)=>{if(!a)if(n.abort(),a=!0,t)t(i,c);else{const{id:t,jsonrpc:n}=e,a=i?{id:t,jsonrpc:n,error:{message:i.message,code:i.code}}:{id:t,jsonrpc:n,result:c};this.emit("payload",a),r(a)}};n.open("POST",this.url,!0),n.setRequestHeader("Content-Type","application/json"),n.timeout=6e4,n.onerror=i,n.ontimeout=i,n.onreadystatechange=()=>{if(4===n.readyState)try{const e=JSON.parse(n.responseText);i(e.error,e.result)}catch(e){i(e)}},n.send(JSON.stringify(e))}))}}var ot=ct;const ft=r(79948),dt=r(91501),st=r(51080),ut=r(23220),bt=r(49537),ht=r(50822),lt=r(95905);class pt extends ft{constructor(e){if(super({pollingInterval:e.pollingInterval||8e3}),this.bridge="https://bridge.walletconnect.org",this.qrcode=!0,this.qrcodeModal=tt(),this.qrcodeModalOptions=void 0,this.rpc=null,this.infuraId="",this.http=null,this.isConnecting=!1,this.connected=!1,this.connectCallbacks=[],this.accounts=[],this.chainId=1,this.rpcUrl="",this.enable=async()=>{const e=await this.getWalletConnector();if(e)return this.start(),this.subscribeWalletConnector(),e.accounts;throw new Error("Failed to connect to WalleConnect")},this.request=async e=>this.send(e),this.send=async(e,t)=>{if("string"===typeof e){const r=e;let n=t;return"personal_sign"===r&&(n=j(n)),this.sendAsyncPromise(r,n)}if(e=Object.assign({id:M(),jsonrpc:"2.0"},e),"personal_sign"===e.method&&(e.params=j(e.params)),!t)return this.sendAsyncPromise(e.method,e.params);this.sendAsync(e,t)},this.onConnect=e=>{this.connectCallbacks.push(e)},this.triggerConnect=e=>{this.connectCallbacks&&this.connectCallbacks.length&&this.connectCallbacks.forEach((t=>t(e)))},this.bridge=e.connector?e.connector.bridge:e.bridge||"https://bridge.walletconnect.org",this.qrcode="undefined"===typeof e.qrcode||!1!==e.qrcode,this.qrcodeModal=e.qrcodeModal||this.qrcodeModal,this.qrcodeModalOptions=e.qrcodeModalOptions,this.wc=e.connector||new Qe({bridge:this.bridge,qrcodeModal:this.qrcode?this.qrcodeModal:void 0,qrcodeModalOptions:this.qrcodeModalOptions,storageId:null===e||void 0===e?void 0:e.storageId,signingMethods:null===e||void 0===e?void 0:e.signingMethods,clientMeta:null===e||void 0===e?void 0:e.clientMeta}),this.rpc=e.rpc||null,!this.rpc&&(!e.infuraId||"string"!==typeof e.infuraId||!e.infuraId.trim()))throw new Error("Missing one of the required parameters: rpc or infuraId");this.infuraId=e.infuraId||"",this.chainId=(null===e||void 0===e?void 0:e.chainId)||this.chainId,this.initialize()}get isWalletConnect(){return!0}get connector(){return this.wc}get walletMeta(){return this.wc.peerMeta}async disconnect(){this.close()}async close(){const e=await this.getWalletConnector({disableSessionCreation:!0});await e.killSession(),await this.onDisconnect()}async handleRequest(e){try{let t,r=null;const n=await this.getWalletConnector();switch(e.method){case"wc_killSession":await this.close(),r=null;break;case"eth_accounts":r=n.accounts;break;case"eth_coinbase":r=n.accounts[0];break;case"eth_chainId":r=n.chainId;break;case"net_version":r=n.chainId;break;case"eth_uninstallFilter":this.sendAsync(e,(e=>e)),r=!0;break;default:t=await this.handleOtherRequests(e)}return t||this.formatResponse(e,r)}catch(t){throw this.emit("error",t),t}}async handleOtherRequests(e){if(!c.includes(e.method)&&e.method.startsWith("eth_"))return this.handleReadRequests(e);const t=await this.getWalletConnector(),r=await t.sendCustomRequest(e);return this.formatResponse(e,r)}async handleReadRequests(e){if(!this.http){const e=new Error("HTTP Connection not available");throw this.emit("error",e),e}return this.http.send(e)}formatResponse(e,t){return{id:e.id,jsonrpc:e.jsonrpc,result:t}}getWalletConnector(e={}){const{disableSessionCreation:t=!1}=e;return new Promise(((e,r)=>{const n=this.wc;this.isConnecting?this.onConnect((t=>e(t))):n.connected||t?(this.connected||(this.connected=!0,this.updateState(n.session)),e(n)):(this.isConnecting=!0,n.on("modal_closed",(()=>{r(new Error("User closed modal"))})),n.createSession({chainId:this.chainId}).then((()=>{n.on("connect",((t,a)=>{if(t)return this.isConnecting=!1,r(t);this.isConnecting=!1,this.connected=!0,a&&this.updateState(a.params[0]),this.emit("connect"),this.triggerConnect(n),e(n)}))})).catch((e=>{this.isConnecting=!1,r(e)})))}))}async subscribeWalletConnector(){const e=await this.getWalletConnector();e.on("disconnect",(e=>{e?this.emit("error",e):this.onDisconnect()})),e.on("session_update",((e,t)=>{e?this.emit("error",e):this.updateState(t.params[0])}))}async onDisconnect(){await this.stop(),this.emit("close",1e3,"Connection closed"),this.emit("disconnect",1e3,"Connection disconnected"),this.connected=!1}async updateState(e){const{accounts:t,chainId:r,networkId:n,rpcUrl:a}=e;(!this.accounts||t&&this.accounts!==t)&&(this.accounts=t,this.emit("accountsChanged",t)),(!this.chainId||r&&this.chainId!==r)&&(this.chainId=r,this.emit("chainChanged",r)),(!this.networkId||n&&this.networkId!==n)&&(this.networkId=n,this.emit("networkChanged",n)),this.updateRpcUrl(this.chainId,a||"")}updateRpcUrl(e,t=""){const r={infuraId:this.infuraId,custom:this.rpc||void 0};t=t||E(e,r),t?(this.rpcUrl=t,this.updateHttpConnection()):this.emit("error",new Error(`No RPC Url available for chainId: ${e}`))}updateHttpConnection(){this.rpcUrl&&(this.http=new ot(this.rpcUrl),this.http.on("payload",(e=>this.emit("payload",e))),this.http.on("error",(e=>this.emit("error",e))))}sendAsyncPromise(e,t){return new Promise(((r,n)=>{this.sendAsync({id:M(),jsonrpc:"2.0",method:e,params:t||[]},((e,t)=>{e?n(e):r(t.result)}))}))}initialize(){this.updateRpcUrl(this.chainId),this.addProvider(new st({eth_hashrate:"0x00",eth_mining:!1,eth_syncing:!0,net_listening:!0,web3_clientVersion:"WalletConnect/v1.x.x/javascript"})),this.addProvider(new dt),this.addProvider(new lt),this.addProvider(new ut),this.addProvider(new ht),this.addProvider(new bt(this.configWallet())),this.addProvider({handleRequest:async(e,t,r)=>{try{const{error:t,result:n}=await this.handleRequest(e);r(t,n)}catch(n){r(n)}},setEngine:e=>e})}configWallet(){return{getAccounts:async e=>{try{const t=await this.getWalletConnector(),r=t.accounts;r&&r.length?e(null,r):e(new Error("Failed to get accounts"))}catch(t){e(t)}},processMessage:async(e,t)=>{try{const r=await this.getWalletConnector(),n=await r.signMessage([e.from,e.data]);t(null,n)}catch(r){t(r)}},processPersonalMessage:async(e,t)=>{try{const r=await this.getWalletConnector(),n=await r.signPersonalMessage([e.data,e.from]);t(null,n)}catch(r){t(r)}},processSignTransaction:async(e,t)=>{try{const r=await this.getWalletConnector(),n=await r.signTransaction(e);t(null,n)}catch(r){t(r)}},processTransaction:async(e,t)=>{try{const r=await this.getWalletConnector(),n=await r.sendTransaction(e);t(null,n)}catch(r){t(r)}},processTypedMessage:async(e,t)=>{try{const r=await this.getWalletConnector(),n=await r.signTypedData([e.from,e.data]);t(null,n)}catch(r){t(r)}}}}}var xt=pt},23380:function(e,t,r){"use strict";function n(e){let t;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(t=window[e]),t}function a(e){const t=n(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}function i(){return a("document")}function c(){return n("document")}function o(){return a("navigator")}function f(){return n("navigator")}function d(){return a("location")}function s(){return n("location")}function u(){return a("crypto")}function b(){return n("crypto")}function h(){return a("localStorage")}function l(){return n("localStorage")}r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=n,t.getFromWindowOrThrow=a,t.getDocumentOrThrow=i,t.getDocument=c,t.getNavigatorOrThrow=o,t.getNavigator=f,t.getLocationOrThrow=d,t.getLocation=s,t.getCryptoOrThrow=u,t.getCrypto=b,t.getLocalStorageOrThrow=h,t.getLocalStorage=l},91342:function(e,t,r){"use strict";t.D=void 0;const n=r(23380);function a(){let e,t;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(b){return null}function r(){const r=e.getElementsByTagName("link"),n=[];for(let e=0;e-1){const e=a.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let r=t.protocol+"//"+t.host;if(0===e.indexOf("/"))r+=e;else{const n=t.pathname.split("/");n.pop();const a=n.join("/");r+=a+"/"+e}n.push(r)}else if(0===e.indexOf("//")){const r=t.protocol+e;n.push(r)}else n.push(e)}}return n}function a(...t){const r=e.getElementsByTagName("meta");for(let e=0;en.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(a.length&&a){const e=n.getAttribute("content");if(e)return e}}return""}function i(){let t=a("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}function c(){const e=a("description","og:description","twitter:description","keywords");return e}const o=i(),f=c(),d=t.origin,s=r(),u={description:f,url:d,icons:s,name:o};return u}t.D=a},18625:function(e,t,r){"use strict";const n=t;n.bignum=r(2396),n.define=r(49542).define,n.base=r(51406),n.constants=r(84194),n.decoders=r(86410),n.encoders=r(19375)},49542:function(e,t,r){"use strict";const n=r(19375),a=r(86410),i=r(81923),c=t;function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}c.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){const t=this.name;function r(e){this._initNamed(e,t)}return i(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(a[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},42956:function(e,t,r){"use strict";const n=r(81923),a=r(5487).b,i=r(85330).Buffer;function c(e,t){a.call(this,t),i.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return o.isEncoderBuffer(e)||(e=new o(e,t)),this.length+=e.length,e}),this);else if("number"===typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"===typeof e)this.value=e,this.length=i.byteLength(e);else{if(!i.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(c,a),t.C=c,c.isDecoderBuffer=function(e){if(e instanceof c)return!0;const t="object"===typeof e&&i.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"===typeof e.offset&&"number"===typeof e.length&&"function"===typeof e.save&&"function"===typeof e.restore&&"function"===typeof e.isEmpty&&"function"===typeof e.readUInt8&&"function"===typeof e.skip&&"function"===typeof e.raw;return t},c.prototype.save=function(){return{offset:this.offset,reporter:a.prototype.save.call(this)}},c.prototype.restore=function(e){const t=new c(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,a.prototype.restore.call(this,e.reporter),t},c.prototype.isEmpty=function(){return this.offset===this.length},c.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},c.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new c(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},c.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=o,o.isEncoderBuffer=function(e){if(e instanceof o)return!0;const t="object"===typeof e&&"EncoderBuffer"===e.constructor.name&&"number"===typeof e.length&&"function"===typeof e.join;return t},o.prototype.join=function(e,t){return e||(e=i.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"===typeof this.value?e[t]=this.value:"string"===typeof this.value?e.write(this.value,t):i.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},51406:function(e,t,r){"use strict";const n=t;n.Reporter=r(5487).b,n.DecoderBuffer=r(42956).C,n.EncoderBuffer=r(42956).R,n.Node=r(92851)},92851:function(e,t,r){"use strict";r(21703);const n=r(5487).b,a=r(42956).R,i=r(42956).C,c=r(14961),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],f=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o),d=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function s(e,t,r){const n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n["default"]=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=s;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];s.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(r){t[r]=e[r]}));const r=new this.constructor(t.parent);return r._baseState=t,r},s.prototype._wrap=function(){const e=this._baseState;f.forEach((function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},s.prototype._init=function(e){const t=this._baseState;c(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),c.equal(t.children.length,1,"Root node can have only one child")},s.prototype._useArgs=function(e){const t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(c(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(c(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);const n=e[r];t[n]=r})),t})))},d.forEach((function(e){s.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),o.forEach((function(e){s.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return c(null===t.tag),t.tag=e,this._useArgs(r),this}})),s.prototype.use=function(e){c(e);const t=this._baseState;return c(null===t.use),t.use=e,this},s.prototype.optional=function(){const e=this._baseState;return e.optional=!0,this},s.prototype.def=function(e){const t=this._baseState;return c(null===t["default"]),t["default"]=e,t.optional=!0,this},s.prototype.explicit=function(e){const t=this._baseState;return c(null===t.explicit&&null===t.implicit),t.explicit=e,this},s.prototype.implicit=function(e){const t=this._baseState;return c(null===t.explicit&&null===t.implicit),t.implicit=e,this},s.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},s.prototype.key=function(e){const t=this._baseState;return c(null===t.key),t.key=e,this},s.prototype.any=function(){const e=this._baseState;return e.any=!0,this},s.prototype.choice=function(e){const t=this._baseState;return c(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},s.prototype.contains=function(e){const t=this._baseState;return c(null===t.use),t.contains=e,this},s.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let n,a=r["default"],c=!0,o=null;if(null!==r.key&&(o=e.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(c=this._peekTag(e,n,r.any),e.isError(c))return c}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),c=!0}catch(f){c=!1}e.restore(n)}}if(r.obj&&c&&(n=e.enterObject()),c){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?a=e.raw(t):e=n}if(t&&t.track&&null!==r.tag&&t.track(e.path(),n,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(a=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(a))return a;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new i(a);a=this._getUse(r.contains,e._reporterState.obj)._decode(n,t)}}return r.obj&&c&&(a=e.leaveObject(n)),null===r.key||null===a&&!0!==c?null!==o&&e.exitKey(o):e.leaveKey(o,r.key,a),a},s.prototype._decodeGeneric=function(e,t,r){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},s.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),c(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},s.prototype._decodeChoice=function(e,t){const r=this._baseState;let n=null,a=!1;return Object.keys(r.choice).some((function(i){const c=e.save(),o=r.choice[i];try{const r=o._decode(e,t);if(e.isError(r))return!1;n={type:i,value:r},a=!0}catch(f){return e.restore(c),!1}return!0}),this),a?n:e.error("Choice not matched")},s.prototype._createEncoderBuffer=function(e){return new a(e,this.reporter)},s.prototype._encode=function(e,t,r){const n=this._baseState;if(null!==n["default"]&&n["default"]===e)return;const a=this._encodeValue(e,t,r);return void 0===a||this._skipDefault(a,t,r)?void 0:a},s.prototype._encodeValue=function(e,t,r){const a=this._baseState;if(null===a.parent)return a.children[0]._encode(e,t||new n);let i=null;if(this.reporter=t,a.optional&&void 0===e){if(null===a["default"])return;e=a["default"]}let c=null,o=!1;if(a.any)i=this._createEncoderBuffer(e);else if(a.choice)i=this._encodeChoice(e,t);else if(a.contains)c=this._getUse(a.contains,r)._encode(e,t),o=!0;else if(a.children)c=a.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");const n=t.enterKey(r._baseState.key);if("object"!==typeof e)return t.error("Child expected, but input is not object");const a=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),a}),this).filter((function(e){return e})),c=this._createEncoderBuffer(c);else if("seqof"===a.tag||"setof"===a.tag){if(!a.args||1!==a.args.length)return t.error("Too many args for : "+a.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,c=this._createEncoderBuffer(e.map((function(r){const n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),r))}else null!==a.use?i=this._getUse(a.use,r)._encode(e,t):(c=this._encodePrimitive(a.tag,e),o=!0);if(!a.any&&null===a.choice){const e=null!==a.implicit?a.implicit:a.tag,r=null===a.implicit?"universal":"context";null===e?null===a.use&&t.error("Tag could be omitted only for .use()"):null===a.use&&(i=this._encodeComposite(e,o,r,c))}return null!==a.explicit&&(i=this._encodeComposite(a.explicit,!1,"context",i)),i},s.prototype._encodeChoice=function(e,t){const r=this._baseState,n=r.choice[e.type];return n||c(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},s.prototype._encodePrimitive=function(e,t){const r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},s.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},s.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},5487:function(e,t,r){"use strict";r(21703);const n=r(81923);function a(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function i(e,t){this.path=e,this.rethrow(t)}t.b=a,a.prototype.isError=function(e){return e instanceof i},a.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},a.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},a.prototype.enterKey=function(e){return this._reporterState.path.push(e)},a.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},a.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},a.prototype.path=function(){return this._reporterState.path.join("/")},a.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},a.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},a.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof i;if(t=n?e:new i(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},a.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(i,Error),i.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},70607:function(e,t){"use strict";function r(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},84194:function(e,t,r){"use strict";const n=t;n._reverse=function(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t},n.der=r(70607)},96496:function(e,t,r){"use strict";const n=r(81923),a=r(2396),i=r(42956).C,c=r(92851),o=r(70607);function f(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new d,this.tree._init(e.body)}function d(e){c.call(this,"der",e)}function s(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=o.tagClass[r>>6],a=0===(32&r);if(31===(31&r)){let n=r;r=0;while(128===(128&n)){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;const i=o.tag[r];return{cls:n,primitive:a,tag:r,tagStr:i}}function u(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0===(128&n))return n;const a=127&n;if(a>4)return e.error("length octect is too long");n=0;for(let i=0;i=31?n.error("Multi-octet tag encoding unsupported"):(t||(a|=32),a|=c.tagClassByName[r||"universal"]<<6,a)}e.exports=o,o.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(f,i),f.prototype._encodeComposite=function(e,t,r,n){const i=s(e,t,r,this.reporter);if(n.length<128){const e=a.alloc(2);return e[0]=i,e[1]=n.length,this._createEncoderBuffer([e,n])}let c=1;for(let a=n.length;a>=256;a>>=8)c++;const o=a.alloc(2+c);o[0]=i,o[1]=128|c;for(let a=1+c,f=n.length;f>0;a--,f>>=8)o[a]=255&f;return this._createEncoderBuffer([o,n])},f.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=a.alloc(2*e.length);for(let r=0;r=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let a=0;a=128;t>>=7)n++}const i=a.alloc(n);let c=i.length-1;for(let a=e.length-1;a>=0;a--){let t=e[a];i[c--]=127&t;while((t>>=7)>0)i[c--]=128|127&t}return this._createEncoderBuffer(i)},f.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[d(n.getUTCFullYear()),d(n.getUTCMonth()+1),d(n.getUTCDate()),d(n.getUTCHours()),d(n.getUTCMinutes()),d(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[d(n.getUTCFullYear()%100),d(n.getUTCMonth()+1),d(n.getUTCDate()),d(n.getUTCHours()),d(n.getUTCMinutes()),d(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(e,t){if("string"===typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!==typeof e&&!a.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=a.from(t)}if(a.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=a.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let a=e;a>=256;a>>=8)r++;const n=new Array(r);for(let a=n.length-1;a>=0;a--)n[a]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(a.from(n))},f.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},f.prototype._use=function(e,t){return"function"===typeof e&&(e=e(t)),e._getEncoder("der").tree},f.prototype._skipDefault=function(e,t,r){const n=this._baseState;let a;if(null===n["default"])return!1;const i=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n["default"],t,r).join()),i.length!==n.defaultBuffer.length)return!1;for(a=0;a1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},e.prototype._dispatch=function(){var e=this,t=this._queue.shift();if(t){var r=!1;this._currentReleaser=function(){r||(r=!0,e._value++,e._dispatch())},t([this._value--,this._currentReleaser])}},e}();t["default"]=a},41704:function(e,t,r){"use strict";t.WU=void 0;var n=r(14059);Object.defineProperty(t,"WU",{enumerable:!0,get:function(){return n.default}});var a=r(66846);var i=r(419)},419:function(e,t,r){"use strict";r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.withTimeout=void 0;var n=r(62900);function a(e,t,r){var a=this;return void 0===r&&(r=new Error("timeout")),{acquire:function(){return new Promise((function(i,c){return n.__awaiter(a,void 0,void 0,(function(){var a,o,f;return n.__generator(this,(function(n){switch(n.label){case 0:return a=!1,setTimeout((function(){a=!0,c(r)}),t),[4,e.acquire()];case 1:return o=n.sent(),a?(f=Array.isArray(o)?o[1]:o,f()):i(o),[2]}}))}))}))},runExclusive:function(e){return n.__awaiter(this,void 0,void 0,(function(){var t,r;return n.__generator(this,(function(n){switch(n.label){case 0:t=function(){},n.label=1;case 1:return n.trys.push([1,,7,8]),[4,this.acquire()];case 2:return r=n.sent(),Array.isArray(r)?(t=r[1],[4,e(r[0])]):[3,4];case 3:return[2,n.sent()];case 4:return t=r,[4,e()];case 5:return[2,n.sent()];case 6:return[3,8];case 7:return t(),[7];case 8:return[2]}}))}))},release:function(){e.release()},isLocked:function(){return e.isLocked()}}}t.withTimeout=a},24890:function(e,t,r){"use strict";r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=s;var n=r(70150),a=d(n),i=r(17467),c=d(i),o=r(28498),f=d(o);function d(e){return e&&e.__esModule?e:{default:e}}function s(e){return(0,c.default)((function(t,r){var n;try{n=e.apply(this,t)}catch(i){return r(i)}(0,a.default)(n)&&"function"===typeof n.then?n.then((function(e){u(r,null,e)}),(function(e){u(r,e.message?e:new Error(e))})):r(null,n)}))}function u(e,t,r){try{e(t,r)}catch(n){(0,f.default)(b,n)}}function b(e){throw e}e.exports=t["default"]},91718:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=s;var n=r(95906),a=d(n),i=r(22988),c=d(i),o=r(67279),f=d(o);function d(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n){(0,a.default)(t)(e,(0,c.default)((0,f.default)(r)),n)}e.exports=t["default"]},63068:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t,r){var n=(0,a.default)(e)?y:w;n(e,(0,v.default)(t),r)};var n=r(45372),a=g(n),i=r(32294),c=g(i),o=r(60336),f=g(o),d=r(18855),s=g(d),u=r(98869),b=g(u),h=r(4934),l=g(h),p=r(55621),x=g(p),m=r(67279),v=g(m);function g(e){return e&&e.__esModule?e:{default:e}}function y(e,t,r){r=(0,l.default)(r||b.default);var n=0,a=0,i=e.length;function o(e,t){e?r(e):++a!==i&&t!==c.default||r(null)}for(0===i&&r(null);n2&&(a=(0,f.default)(arguments,1)),n[t]=a,r(e)}))}),(function(e){r(e,n)}))}e.exports=t["default"]},28498:function(e,t,r){"use strict";var n=r(96027);r(84633),Object.defineProperty(t,"__esModule",{value:!0}),t.hasNextTick=t.hasSetImmediate=void 0,t.fallback=s,t.wrap=u;var a=r(14195),i=c(a);function c(e){return e&&e.__esModule?e:{default:e}}var o,f=t.hasSetImmediate="function"===typeof setImmediate&&setImmediate,d=t.hasNextTick="object"===typeof n&&"function"===typeof n.nextTick;function s(e){setTimeout(e,0)}function u(e){return function(t){var r=(0,i.default)(arguments,1);e((function(){t.apply(null,r)}))}}o=f?setImmediate:d?n.nextTick:s,t["default"]=u(o)},14195:function(e,t){"use strict";function r(e,t){t|=0;for(var r=Math.max(e.length-t,0),n=Array(r),a=0;a=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],(function(e){b.headers[e]={}})),a.forEach(["post","put","patch"],(function(e){b.headers[e]=a.merge(f)})),e.exports=b},58507:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},4679:function(e){e.exports={version:"0.26.1"}},15955:function(e){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n=0)return;c[t]="set-cookie"===t?(c[t]?c[t]:[]).concat([r]):c[t]?c[t]+", "+r:r}})),c):c}},45431:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},46298:function(e,t,r){"use strict";r(21703);var n=r(4679).version,a={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){a[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={};function c(e,t,r){if("object"!==typeof e)throw new TypeError("options must be an object");var n=Object.keys(e),a=n.length;while(a-- >0){var i=n[a],c=t[i];if(c){var o=e[i],f=void 0===o||c(o,i,e);if(!0!==f)throw new TypeError("option "+i+" must be "+f)}else if(!0!==r)throw Error("Unknown option "+i)}}a.transitional=function(e,t,r){function a(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,c){if(!1===e)throw new Error(a(n," has been removed"+(t?" in "+t:"")));return t&&!i[n]&&(i[n]=!0,console.warn(a(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,c)}},e.exports={assertOptions:c,validators:a}},26642:function(e,t,r){"use strict";var n=r(15955),a=Object.prototype.toString;function i(e){return Array.isArray(e)}function c(e){return"undefined"===typeof e}function o(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function f(e){return"[object ArrayBuffer]"===a.call(e)}function d(e){return"[object FormData]"===a.call(e)}function s(e){var t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t}function u(e){return"string"===typeof e}function b(e){return"number"===typeof e}function h(e){return null!==e&&"object"===typeof e}function l(e){if("[object Object]"!==a.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function p(e){return"[object Date]"===a.call(e)}function x(e){return"[object File]"===a.call(e)}function m(e){return"[object Blob]"===a.call(e)}function v(e){return"[object Function]"===a.call(e)}function g(e){return h(e)&&v(e.pipe)}function y(e){return"[object URLSearchParams]"===a.call(e)}function w(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function _(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function M(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,u=new Uint8Array(d);while(i!==c){for(var b=t[i],h=0,l=d-1;(0!==b||h>>0,u[l]=b%o>>>0,b=b/o>>>0;if(0!==b)throw new Error("Non-zero carry");a=h,i++}var p=d-a;while(p!==d&&0===u[p])p++;for(var x=f.repeat(r);p>>0,s=new Uint8Array(c);while(e[r]){var u=t[e.charCodeAt(r)];if(255===u)return;for(var b=0,h=c-1;(0!==u||b>>0,s[h]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=b,r++}var l=c-i;while(l!==c&&0===s[l])l++;var p=n.allocUnsafe(a+(c-l));p.fill(0,0,a);var x=a;while(l!==c)p[x++]=s[l++];return p}function h(e){var t=b(e);if(t)return t;throw new Error("Non-base"+o+" character")}return{encode:u,decodeUnsafe:b,decode:h}}e.exports=a},61271:function(e,t,r){"use strict";r(48675),r(3462),r(21703),t.byteLength=s,t.toByteArray=b,t.fromByteArray=p;for(var n=[],a=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,f=c.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function s(e){var t=d(e),r=t[0],n=t[1];return 3*(r+n)/4-n}function u(e,t,r){return 3*(t+r)/4-r}function b(e){var t,r,n=d(e),c=n[0],o=n[1],f=new i(u(e,c,o)),s=0,b=o>0?c-4:c;for(r=0;r>16&255,f[s++]=t>>8&255,f[s++]=255&t;return 2===o&&(t=a[e.charCodeAt(r)]<<2|a[e.charCodeAt(r+1)]>>4,f[s++]=255&t),1===o&&(t=a[e.charCodeAt(r)]<<10|a[e.charCodeAt(r+1)]<<4|a[e.charCodeAt(r+2)]>>2,f[s++]=t>>8&255,f[s++]=255&t),f}function h(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,r){for(var n,a=[],i=t;if?f:o+c));return 1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},2396:function(e,t,r){e=r.nmd(e),r(21703),function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var c;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{c=r(46601).Buffer}catch(E){}function o(e,t,r){for(var n=0,a=Math.min(e.length,r),i=t;i=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:15&c}return n}function f(e,t,r,n){for(var a=0,i=Math.min(e.length,r),c=t;c=49?o-49+10:o>=17?o-17+10:o}return a}i.isBN=function(e){return e instanceof i||null!==e&&"object"===typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&a++,16===t?this._parseHex(e,a):this._parseBase(e,t,a),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a=0;a-=3)c=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=c<>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)a=o(e,r,r+6),this.words[n]|=a<>>26-i&4194303,i+=24,i>=26&&(i-=26,n++);r+6!==t&&(a=o(e,t,r+6),this.words[n]|=a<>>26-i&4194303),this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,c=i%n,o=Math.min(i,i-c)+r,d=0,s=r;s1&&0===this.words[this.length-1])this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],s=[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],u=[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 b(e){for(var t=new Array(e.bitLength()),r=0;r>>a}return t}function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],c=a*i,o=67108863&c,f=c/67108864|0;r.words[0]=o;for(var d=1;d>>26,u=67108863&f,b=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=b;h++){var l=d-h|0;a=0|e.words[l],i=0|t.words[h],c=a*i+u,s+=c/67108864|0,u=67108863&c}r.words[d]=0|u,f=0|s}return 0!==f?r.words[d]=0|f:r.length--,r.strip()}i.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var a=0,i=0,c=0;c>>24-a&16777215,r=0!==i||c!==this.length-1?d[6-f.length]+f+r:f+r,a+=2,a>=26&&(a-=26,c--)}0!==i&&(r=i.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],h=u[e];r="";var l=this.clone();l.negative=0;while(!l.isZero()){var p=l.modn(h).toString(e);l=l.idivn(h),r=l.isZero()?p+r:d[b-p.length]+p+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n("undefined"!==typeof c),this.toArrayLike(c,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var c,o,f="le"===t,d=new e(i),s=this.clone();if(f){for(o=0;!s.isZero();o++)c=s.andln(255),s.iushrn(8),d[o]=c;for(;o=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,c=0;c>26,this.words[c]=67108863&t;for(;0!==i&&c>26,this.words[c]=67108863&t;if(0===i&&c>>13,h=0|c[1],l=8191&h,p=h>>>13,x=0|c[2],m=8191&x,v=x>>>13,g=0|c[3],y=8191&g,w=g>>>13,_=0|c[4],M=8191&_,k=_>>>13,A=0|c[5],E=8191&A,S=A>>>13,T=0|c[6],C=8191&T,P=T>>>13,O=0|c[7],R=8191&O,I=O>>>13,B=0|c[8],L=8191&B,N=B>>>13,U=0|c[9],j=8191&U,D=U>>>13,F=0|o[0],H=8191&F,q=F>>>13,z=0|o[1],K=8191&z,$=z>>>13,G=0|o[2],V=8191&G,W=G>>>13,Z=0|o[3],J=8191&Z,Y=Z>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ae=0|o[6],ie=8191&ae,ce=ae>>>13,oe=0|o[7],fe=8191&oe,de=oe>>>13,se=0|o[8],ue=8191&se,be=se>>>13,he=0|o[9],le=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(u,H),a=Math.imul(u,q),a=a+Math.imul(b,H)|0,i=Math.imul(b,q);var xe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(l,H),a=Math.imul(l,q),a=a+Math.imul(p,H)|0,i=Math.imul(p,q),n=n+Math.imul(u,K)|0,a=a+Math.imul(u,$)|0,a=a+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0;var me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,H),a=Math.imul(m,q),a=a+Math.imul(v,H)|0,i=Math.imul(v,q),n=n+Math.imul(l,K)|0,a=a+Math.imul(l,$)|0,a=a+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(u,V)|0,a=a+Math.imul(u,W)|0,a=a+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ve=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(y,H),a=Math.imul(y,q),a=a+Math.imul(w,H)|0,i=Math.imul(w,q),n=n+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(l,V)|0,a=a+Math.imul(l,W)|0,a=a+Math.imul(p,V)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(u,J)|0,a=a+Math.imul(u,Y)|0,a=a+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ge=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(M,H),a=Math.imul(M,q),a=a+Math.imul(k,H)|0,i=Math.imul(k,q),n=n+Math.imul(y,K)|0,a=a+Math.imul(y,$)|0,a=a+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,n=n+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0,a=a+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,n=n+Math.imul(u,Q)|0,a=a+Math.imul(u,ee)|0,a=a+Math.imul(b,Q)|0,i=i+Math.imul(b,ee)|0;var ye=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,H),a=Math.imul(E,q),a=a+Math.imul(S,H)|0,i=Math.imul(S,q),n=n+Math.imul(M,K)|0,a=a+Math.imul(M,$)|0,a=a+Math.imul(k,K)|0,i=i+Math.imul(k,$)|0,n=n+Math.imul(y,V)|0,a=a+Math.imul(y,W)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,a=a+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,n=n+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0,a=a+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(u,re)|0,a=a+Math.imul(u,ne)|0,a=a+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var we=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,H),a=Math.imul(C,q),a=a+Math.imul(P,H)|0,i=Math.imul(P,q),n=n+Math.imul(E,K)|0,a=a+Math.imul(E,$)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(M,V)|0,a=a+Math.imul(M,W)|0,a=a+Math.imul(k,V)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,a=a+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,n=n+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,a=a+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0,a=a+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(u,ie)|0,a=a+Math.imul(u,ce)|0,a=a+Math.imul(b,ie)|0,i=i+Math.imul(b,ce)|0;var _e=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,H),a=Math.imul(R,q),a=a+Math.imul(I,H)|0,i=Math.imul(I,q),n=n+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,a=a+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,n=n+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,a=a+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,a=a+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,a=a+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,a=a+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(l,ie)|0,a=a+Math.imul(l,ce)|0,a=a+Math.imul(p,ie)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(u,fe)|0,a=a+Math.imul(u,de)|0,a=a+Math.imul(b,fe)|0,i=i+Math.imul(b,de)|0;var Me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,H),a=Math.imul(L,q),a=a+Math.imul(N,H)|0,i=Math.imul(N,q),n=n+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,a=a+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(C,V)|0,a=a+Math.imul(C,W)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(E,J)|0,a=a+Math.imul(E,Y)|0,a=a+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,n=n+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,a=a+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,a=a+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(m,ie)|0,a=a+Math.imul(m,ce)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(l,fe)|0,a=a+Math.imul(l,de)|0,a=a+Math.imul(p,fe)|0,i=i+Math.imul(p,de)|0,n=n+Math.imul(u,ue)|0,a=a+Math.imul(u,be)|0,a=a+Math.imul(b,ue)|0,i=i+Math.imul(b,be)|0;var ke=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,H),a=Math.imul(j,q),a=a+Math.imul(D,H)|0,i=Math.imul(D,q),n=n+Math.imul(L,K)|0,a=a+Math.imul(L,$)|0,a=a+Math.imul(N,K)|0,i=i+Math.imul(N,$)|0,n=n+Math.imul(R,V)|0,a=a+Math.imul(R,W)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(C,J)|0,a=a+Math.imul(C,Y)|0,a=a+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,n=n+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,a=a+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,a=a+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(y,ie)|0,a=a+Math.imul(y,ce)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(v,de)|0,n=n+Math.imul(l,ue)|0,a=a+Math.imul(l,be)|0,a=a+Math.imul(p,ue)|0,i=i+Math.imul(p,be)|0,n=n+Math.imul(u,le)|0,a=a+Math.imul(u,pe)|0,a=a+Math.imul(b,le)|0,i=i+Math.imul(b,pe)|0;var Ae=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),a=Math.imul(j,$),a=a+Math.imul(D,K)|0,i=Math.imul(D,$),n=n+Math.imul(L,V)|0,a=a+Math.imul(L,W)|0,a=a+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,n=n+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,a=a+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,a=a+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,a=a+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(M,ie)|0,a=a+Math.imul(M,ce)|0,a=a+Math.imul(k,ie)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(m,ue)|0,a=a+Math.imul(m,be)|0,a=a+Math.imul(v,ue)|0,i=i+Math.imul(v,be)|0,n=n+Math.imul(l,le)|0,a=a+Math.imul(l,pe)|0,a=a+Math.imul(p,le)|0,i=i+Math.imul(p,pe)|0;var Ee=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),a=Math.imul(j,W),a=a+Math.imul(D,V)|0,i=Math.imul(D,W),n=n+Math.imul(L,J)|0,a=a+Math.imul(L,Y)|0,a=a+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,n=n+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,a=a+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,a=a+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(E,ie)|0,a=a+Math.imul(E,ce)|0,a=a+Math.imul(S,ie)|0,i=i+Math.imul(S,ce)|0,n=n+Math.imul(M,fe)|0,a=a+Math.imul(M,de)|0,a=a+Math.imul(k,fe)|0,i=i+Math.imul(k,de)|0,n=n+Math.imul(y,ue)|0,a=a+Math.imul(y,be)|0,a=a+Math.imul(w,ue)|0,i=i+Math.imul(w,be)|0,n=n+Math.imul(m,le)|0,a=a+Math.imul(m,pe)|0,a=a+Math.imul(v,le)|0,i=i+Math.imul(v,pe)|0;var Se=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,J),a=Math.imul(j,Y),a=a+Math.imul(D,J)|0,i=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,a=a+Math.imul(N,Q)|0,i=i+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,a=a+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(C,ie)|0,a=a+Math.imul(C,ce)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,a=a+Math.imul(E,de)|0,a=a+Math.imul(S,fe)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(M,ue)|0,a=a+Math.imul(M,be)|0,a=a+Math.imul(k,ue)|0,i=i+Math.imul(k,be)|0,n=n+Math.imul(y,le)|0,a=a+Math.imul(y,pe)|0,a=a+Math.imul(w,le)|0,i=i+Math.imul(w,pe)|0;var Te=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Q),a=Math.imul(j,ee),a=a+Math.imul(D,Q)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,a=a+Math.imul(L,ne)|0,a=a+Math.imul(N,re)|0,i=i+Math.imul(N,ne)|0,n=n+Math.imul(R,ie)|0,a=a+Math.imul(R,ce)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(I,ce)|0,n=n+Math.imul(C,fe)|0,a=a+Math.imul(C,de)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(P,de)|0,n=n+Math.imul(E,ue)|0,a=a+Math.imul(E,be)|0,a=a+Math.imul(S,ue)|0,i=i+Math.imul(S,be)|0,n=n+Math.imul(M,le)|0,a=a+Math.imul(M,pe)|0,a=a+Math.imul(k,le)|0,i=i+Math.imul(k,pe)|0;var Ce=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),a=Math.imul(j,ne),a=a+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,a=a+Math.imul(L,ce)|0,a=a+Math.imul(N,ie)|0,i=i+Math.imul(N,ce)|0,n=n+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(I,de)|0,n=n+Math.imul(C,ue)|0,a=a+Math.imul(C,be)|0,a=a+Math.imul(P,ue)|0,i=i+Math.imul(P,be)|0,n=n+Math.imul(E,le)|0,a=a+Math.imul(E,pe)|0,a=a+Math.imul(S,le)|0,i=i+Math.imul(S,pe)|0;var Pe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,ie),a=Math.imul(j,ce),a=a+Math.imul(D,ie)|0,i=Math.imul(D,ce),n=n+Math.imul(L,fe)|0,a=a+Math.imul(L,de)|0,a=a+Math.imul(N,fe)|0,i=i+Math.imul(N,de)|0,n=n+Math.imul(R,ue)|0,a=a+Math.imul(R,be)|0,a=a+Math.imul(I,ue)|0,i=i+Math.imul(I,be)|0,n=n+Math.imul(C,le)|0,a=a+Math.imul(C,pe)|0,a=a+Math.imul(P,le)|0,i=i+Math.imul(P,pe)|0;var Oe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,fe),a=Math.imul(j,de),a=a+Math.imul(D,fe)|0,i=Math.imul(D,de),n=n+Math.imul(L,ue)|0,a=a+Math.imul(L,be)|0,a=a+Math.imul(N,ue)|0,i=i+Math.imul(N,be)|0,n=n+Math.imul(R,le)|0,a=a+Math.imul(R,pe)|0,a=a+Math.imul(I,le)|0,i=i+Math.imul(I,pe)|0;var Re=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,ue),a=Math.imul(j,be),a=a+Math.imul(D,ue)|0,i=Math.imul(D,be),n=n+Math.imul(L,le)|0,a=a+Math.imul(L,pe)|0,a=a+Math.imul(N,le)|0,i=i+Math.imul(N,pe)|0;var Ie=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,le),a=Math.imul(j,pe),a=a+Math.imul(D,le)|0,i=Math.imul(D,pe);var Be=(d+n|0)+((8191&a)<<13)|0;return d=(i+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=xe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=we,f[6]=_e,f[7]=Me,f[8]=ke,f[9]=Ae,f[10]=Ee,f[11]=Se,f[12]=Te,f[13]=Ce,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ie,f[18]=Be,0!==d&&(f[19]=d,r.length++),r};function p(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0,a+=c>>>26,c&=67108863}r.words[i]=o,n=c,c=a}return 0!==n?r.words[i]=n:r.length--,r.strip()}function x(e,t,r){var n=new m;return n.mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(l=h),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?l(this,e,t):n<63?h(this,e,t):n<1024?p(this,e,t):x(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,r,n,a,i){for(var c=0;c>>=1)a++;return 1<>>=13,r[2*c+1]=8191&i,i>>>=13;for(c=2*t;c>=26,t+=a/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=b(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var c=0;for(t=0;t>>26-r}c&&(this.words[t]=c,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,c=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<c)for(this.length-=c,d=0;d=0&&(0!==s||d>=a);d--){var u=0|this.words[d];this.words[d]=s<<26-i|u>>>i,s=u&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===o)return this.strip();for(n(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),a=e,c=0|a.words[a.length-1],o=this._countBits(c);r=26-o,0!==r&&(a=a.ushln(r),n.iushln(r),c=0|a.words[a.length-1]);var f,d=n.length-a.length;if("mod"!==t){f=new i(null),f.length=d+1,f.words=new Array(f.length);for(var s=0;s=0;b--){var h=67108864*(0|n.words[a.length+b])+(0|n.words[a.length+b-1]);h=Math.min(h/c|0,67108863),n._ishlnsubmul(a,h,b);while(0!==n.negative)h--,n.negative=0,n._ishlnsubmul(a,1,b),n.isZero()||(n.negative^=1);f&&(f.words[b]=h)}return f&&f.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.iadd(e)),{div:a,mod:c}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.isub(e)),{div:o.div,mod:c}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,c,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,a=this.length-1;a>=0;a--)r=(t*r+(0|this.words[a]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*t;this.words[r]=a/e|0,t=a%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a=new i(1),c=new i(0),o=new i(0),f=new i(1),d=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++d;var s=r.clone(),u=t.clone();while(!t.isZero()){for(var b=0,h=1;0===(t.words[0]&h)&&b<26;++b,h<<=1);if(b>0){t.iushrn(b);while(b-- >0)(a.isOdd()||c.isOdd())&&(a.iadd(s),c.isub(u)),a.iushrn(1),c.iushrn(1)}for(var l=0,p=1;0===(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(u)),o.iushrn(1),f.iushrn(1)}t.cmp(r)>=0?(t.isub(r),a.isub(o),c.isub(f)):(r.isub(t),o.isub(a),f.isub(c))}return{a:o,b:f,gcd:r.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a,c=new i(1),o=new i(0),f=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var d=0,s=1;0===(t.words[0]&s)&&d<26;++d,s<<=1);if(d>0){t.iushrn(d);while(d-- >0)c.isOdd()&&c.iadd(f),c.iushrn(1)}for(var u=0,b=1;0===(r.words[0]&b)&&u<26;++u,b<<=1);if(u>0){r.iushrn(u);while(u-- >0)o.isOdd()&&o.iadd(f),o.iushrn(1)}t.cmp(r)>=0?(t.isub(r),c.isub(o)):(r.isub(t),o.isub(c))}return a=0===t.cmpn(1)?c:o,a.cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[c]=o}return 0!==i&&(this.words[c]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},a(y,g),y.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=c}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}var a=this.m.subn(1),c=0;while(!a.isZero()&&0===a.andln(1))c++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),f=o.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();s=new i(2*s*s).toRed(this);while(0!==this.pow(s,d).cmp(f))s.redIAdd(f);var u=this.pow(s,a),b=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),l=c;while(0!==h.cmp(o)){for(var p=h,x=0;0!==p.cmp(o);x++)p=p.redSqr();n(x=0;a--){for(var s=t.words[a],u=d-1;u>=0;u--){var b=s>>u&1;c!==n[0]&&(c=this.sqr(c)),0!==b||0!==o?(o<<=1,o|=b,f++,(f===r||0===a&&0===u)&&(c=this.mul(c,n[o]),f=0,o=0)):f=0}d=26}return c},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new A(e)},a(A,k),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),c=a;return a.cmp(this.m)>=0?c=a.isub(this.m):a.cmpn(0)<0&&(c=a.iadd(this.m)),c._forceRed(this)},A.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}(e,this)},31482:function(e,t,r){var n;function a(e){this.rand=e}if(r(48675),r(3462),r(21703),e.exports=function(e){return n||(n=new a(null)),n.generate(e)},e.exports.Rand=a,a.prototype.generate=function(e){return this._rand(e)},a.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^s[l>>>16&255]^u[p>>>8&255]^b[255&x]^t[m++],c=d[l>>>24]^s[p>>>16&255]^u[x>>>8&255]^b[255&h]^t[m++],o=d[p>>>24]^s[x>>>16&255]^u[h>>>8&255]^b[255&l]^t[m++],f=d[x>>>24]^s[h>>>16&255]^u[l>>>8&255]^b[255&p]^t[m++],h=i,l=c,p=o,x=f;return i=(n[h>>>24]<<24|n[l>>>16&255]<<16|n[p>>>8&255]<<8|n[255&x])^t[m++],c=(n[l>>>24]<<24|n[p>>>16&255]<<16|n[x>>>8&255]<<8|n[255&h])^t[m++],o=(n[p>>>24]<<24|n[x>>>16&255]<<16|n[h>>>8&255]<<8|n[255&l])^t[m++],f=(n[x>>>24]<<24|n[h>>>16&255]<<16|n[l>>>8&255]<<8|n[255&p])^t[m++],i>>>=0,c>>>=0,o>>>=0,f>>>=0,[i,c,o,f]}var o=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],a=[[],[],[],[]],i=[[],[],[],[]],c=0,o=0,f=0;f<256;++f){var d=o^o<<1^o<<2^o<<3^o<<4;d=d>>>8^255&d^99,r[c]=d,n[d]=c;var s=e[c],u=e[s],b=e[u],h=257*e[d]^16843008*d;a[0][c]=h<<24|h>>>8,a[1][c]=h<<16|h>>>16,a[2][c]=h<<8|h>>>24,a[3][c]=h,h=16843009*b^65537*u^257*s^16843008*c,i[0][d]=h<<24|h>>>8,i[1][d]=h<<16|h>>>16,i[2][d]=h<<8|h>>>24,i[3][d]=h,0===c?c=o=1:(c=s^e[e[e[b^s]]],o^=e[e[o]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:a,INV_SUB_MIX:i}}();function d(e){this._key=a(e),this._reset()}d.blockSize=16,d.keySize=32,d.prototype.blockSize=d.blockSize,d.prototype.keySize=d.keySize,d.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),a=[],i=0;i>>24,c=f.SBOX[c>>>24]<<24|f.SBOX[c>>>16&255]<<16|f.SBOX[c>>>8&255]<<8|f.SBOX[255&c],c^=o[i/t|0]<<24):t>6&&i%t===4&&(c=f.SBOX[c>>>24]<<24|f.SBOX[c>>>16&255]<<16|f.SBOX[c>>>8&255]<<8|f.SBOX[255&c]),a[i]=a[i-t]^c}for(var d=[],s=0;s>>24]]^f.INV_SUB_MIX[1][f.SBOX[b>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[b>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&b]]}this._nRounds=r,this._keySchedule=a,this._invKeySchedule=d},d.prototype.encryptBlockRaw=function(e){return e=a(e),c(e,this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},d.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},d.prototype.decryptBlock=function(e){e=a(e);var t=e[1];e[1]=e[3],e[3]=t;var r=c(e,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),i=n.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i},d.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},e.exports.AES=d},89043:function(e,t,r){r(21703);var n=r(88970),a=r(6779).Buffer,i=r(11414),c=r(81923),o=r(92789),f=r(96662),d=r(40306);function s(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),a=0;a16)throw new Error("unable to decrypt data");var r=-1;while(++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},b.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=p,t.createDecipheriv=l},74213:function(e,t,r){r(21703);var n=r(65612),a=r(89043),i=r(6779).Buffer,c=r(25248),o=r(11414),f=r(88970),d=r(13692),s=r(81923);function u(e,t,r){o.call(this),this._cache=new h,this._cipher=new f.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}s(u,o),u.prototype._update=function(e){var t,r;this._cache.add(e);var n=[];while(t=this._cache.get())r=this._mode.encrypt(this,t),n.push(r);return i.concat(n)};var b=i.alloc(16,16);function h(){this.cache=i.allocUnsafe(0)}function l(e,t,r){var o=n[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"===typeof t&&(t=i.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);if("string"===typeof r&&(r=i.from(r)),"GCM"!==o.mode&&r.length!==o.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===o.type?new c(o.module,t,r):"auth"===o.type?new a(o.module,t,r):new u(o.module,t,r)}function p(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var a=d(t,!1,r.key,r.iv);return l(e,a.key,a.iv)}u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(b))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=i.concat([this.cache,e])},h.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},h.prototype.flush=function(){var e=16-this.cache.length,t=i.allocUnsafe(e),r=-1;while(++r>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}o.prototype.ghash=function(e){var t=-1;while(++t0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=c(a)},o.prototype.update=function(e){var t;this.cache=n.concat([this.cache,e]);while(this.cache.length>=16)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,a],16)),this.ghash(c([0,e,0,t])),this.state},e.exports=o},40306:function(e){function t(e){var t,r=e.length;while(r--){if(t=e.readUInt8(r),255!==t){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}e.exports=t},66151:function(e,t,r){var n=r(96662);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var a=e._cipher.decryptBlock(t);return n(a,r)}},36557:function(e,t,r){var n=r(6779).Buffer,a=r(96662);function i(e,t,r){var i=t.length,c=a(t,e._cache);return e._cache=e._cache.slice(i),e._prev=n.concat([e._prev,r?t:c]),c}t.encrypt=function(e,t,r){var a,c=n.allocUnsafe(0);while(t.length){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){c=n.concat([c,i(e,t,r)]);break}a=e._cache.length,c=n.concat([c,i(e,t.slice(0,a),r)]),t=t.slice(a)}return c}},12610:function(e,t,r){var n=r(6779).Buffer;function a(e,t,r){var n,a,c,o=-1,f=8,d=0;while(++o>o%8,e._prev=i(e._prev,r?a:c);return d}function i(e,t){var r=e.length,a=-1,i=n.allocUnsafe(e.length);e=n.concat([e,n.from([t])]);while(++a>7;return i}t.encrypt=function(e,t,r){var i=t.length,c=n.allocUnsafe(i),o=-1;while(++o=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function f(e,t){var r=c(t),i=t.modulus.byteLength(),o=new a(e).mul(r.blinder).umod(t.modulus),f=o.toRed(a.mont(t.prime1)),d=o.toRed(a.mont(t.prime2)),s=t.coefficient,u=t.prime1,b=t.prime2,h=f.redPow(t.exponent1).fromRed(),l=d.redPow(t.exponent2).fromRed(),p=h.isub(l).imul(s).umod(u).imul(b);return l.iadd(p).imul(r.unblinder).umod(t.modulus).toArrayLike(n,"be",i)}f.getr=o,e.exports=f},58509:function(e,t,r){e=r.nmd(e),r(21703),function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var c;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{c="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(71922).Buffer}catch(P){}function o(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function f(e,t,r){var n=o(e,r);return r-1>=t&&(n|=o(e,r-1)<<4),n}function d(e,t,r,a){for(var i=0,c=0,o=Math.min(e.length,r),f=t;f=49?d-49+10:d>=17?d-17+10:d,n(d>=0&&c0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&(a++,this.negative=1),a=0;a-=3)c=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=c<>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=f(e,t,n)<=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8;else{var o=e.length-t;for(n=o%2===0?t+1:t;n=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8}this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,c=i%n,o=Math.min(i,i-c)+r,f=0,s=r;s1&&0===this.words[this.length-1])this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(P){i.prototype.inspect=u}else i.prototype.inspect=u;function u(){return(this.red?""}var b=["","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];i.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var a=0,i=0,c=0;c>>24-a&16777215,r=0!==i||c!==this.length-1?b[6-f.length]+f+r:f+r,a+=2,a>=26&&(a-=26,c--)}0!==i&&(r=i.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=h[e],s=l[e];r="";var u=this.clone();u.negative=0;while(!u.isZero()){var p=u.modrn(s).toString(e);u=u.idivn(s),r=u.isZero()?p+r:b[d-p.length]+p+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},c&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(c,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var p=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};function x(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],c=a*i,o=67108863&c,f=c/67108864|0;r.words[0]=o;for(var d=1;d>>26,u=67108863&f,b=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=b;h++){var l=d-h|0;a=0|e.words[l],i=0|t.words[h],c=a*i+u,s+=c/67108864|0,u=67108863&c}r.words[d]=0|u,f=0|s}return 0!==f?r.words[d]=0|f:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var c=p(e,i),o="le"===t?"LE":"BE";return this["_toArrayLike"+o](c,a),c},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=c>>>24,i+=2)}if(r=0&&(e[r--]=c>>8&255),r>=0&&(e[r--]=c>>16&255),6===i?(r>=0&&(e[r--]=c>>24&255),n=0,i=0):(n=c>>>24,i+=2)}if(r>=0){e[r--]=n;while(r>=0)e[r--]=0}},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,c=0;c>26,this.words[c]=67108863&t;for(;0!==i&&c>26,this.words[c]=67108863&t;if(0===i&&c>>13,h=0|c[1],l=8191&h,p=h>>>13,x=0|c[2],m=8191&x,v=x>>>13,g=0|c[3],y=8191&g,w=g>>>13,_=0|c[4],M=8191&_,k=_>>>13,A=0|c[5],E=8191&A,S=A>>>13,T=0|c[6],C=8191&T,P=T>>>13,O=0|c[7],R=8191&O,I=O>>>13,B=0|c[8],L=8191&B,N=B>>>13,U=0|c[9],j=8191&U,D=U>>>13,F=0|o[0],H=8191&F,q=F>>>13,z=0|o[1],K=8191&z,$=z>>>13,G=0|o[2],V=8191&G,W=G>>>13,Z=0|o[3],J=8191&Z,Y=Z>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ae=0|o[6],ie=8191&ae,ce=ae>>>13,oe=0|o[7],fe=8191&oe,de=oe>>>13,se=0|o[8],ue=8191&se,be=se>>>13,he=0|o[9],le=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(u,H),a=Math.imul(u,q),a=a+Math.imul(b,H)|0,i=Math.imul(b,q);var xe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(l,H),a=Math.imul(l,q),a=a+Math.imul(p,H)|0,i=Math.imul(p,q),n=n+Math.imul(u,K)|0,a=a+Math.imul(u,$)|0,a=a+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0;var me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,H),a=Math.imul(m,q),a=a+Math.imul(v,H)|0,i=Math.imul(v,q),n=n+Math.imul(l,K)|0,a=a+Math.imul(l,$)|0,a=a+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(u,V)|0,a=a+Math.imul(u,W)|0,a=a+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ve=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(y,H),a=Math.imul(y,q),a=a+Math.imul(w,H)|0,i=Math.imul(w,q),n=n+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(l,V)|0,a=a+Math.imul(l,W)|0,a=a+Math.imul(p,V)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(u,J)|0,a=a+Math.imul(u,Y)|0,a=a+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ge=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(M,H),a=Math.imul(M,q),a=a+Math.imul(k,H)|0,i=Math.imul(k,q),n=n+Math.imul(y,K)|0,a=a+Math.imul(y,$)|0,a=a+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,n=n+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0,a=a+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,n=n+Math.imul(u,Q)|0,a=a+Math.imul(u,ee)|0,a=a+Math.imul(b,Q)|0,i=i+Math.imul(b,ee)|0;var ye=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,H),a=Math.imul(E,q),a=a+Math.imul(S,H)|0,i=Math.imul(S,q),n=n+Math.imul(M,K)|0,a=a+Math.imul(M,$)|0,a=a+Math.imul(k,K)|0,i=i+Math.imul(k,$)|0,n=n+Math.imul(y,V)|0,a=a+Math.imul(y,W)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,a=a+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,n=n+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0,a=a+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(u,re)|0,a=a+Math.imul(u,ne)|0,a=a+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var we=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,H),a=Math.imul(C,q),a=a+Math.imul(P,H)|0,i=Math.imul(P,q),n=n+Math.imul(E,K)|0,a=a+Math.imul(E,$)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(M,V)|0,a=a+Math.imul(M,W)|0,a=a+Math.imul(k,V)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,a=a+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,n=n+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,a=a+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0,a=a+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(u,ie)|0,a=a+Math.imul(u,ce)|0,a=a+Math.imul(b,ie)|0,i=i+Math.imul(b,ce)|0;var _e=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,H),a=Math.imul(R,q),a=a+Math.imul(I,H)|0,i=Math.imul(I,q),n=n+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,a=a+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,n=n+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,a=a+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,a=a+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,a=a+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,a=a+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(l,ie)|0,a=a+Math.imul(l,ce)|0,a=a+Math.imul(p,ie)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(u,fe)|0,a=a+Math.imul(u,de)|0,a=a+Math.imul(b,fe)|0,i=i+Math.imul(b,de)|0;var Me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,H),a=Math.imul(L,q),a=a+Math.imul(N,H)|0,i=Math.imul(N,q),n=n+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,a=a+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(C,V)|0,a=a+Math.imul(C,W)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(E,J)|0,a=a+Math.imul(E,Y)|0,a=a+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,n=n+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,a=a+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,a=a+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(m,ie)|0,a=a+Math.imul(m,ce)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(l,fe)|0,a=a+Math.imul(l,de)|0,a=a+Math.imul(p,fe)|0,i=i+Math.imul(p,de)|0,n=n+Math.imul(u,ue)|0,a=a+Math.imul(u,be)|0,a=a+Math.imul(b,ue)|0,i=i+Math.imul(b,be)|0;var ke=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,H),a=Math.imul(j,q),a=a+Math.imul(D,H)|0,i=Math.imul(D,q),n=n+Math.imul(L,K)|0,a=a+Math.imul(L,$)|0,a=a+Math.imul(N,K)|0,i=i+Math.imul(N,$)|0,n=n+Math.imul(R,V)|0,a=a+Math.imul(R,W)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(C,J)|0,a=a+Math.imul(C,Y)|0,a=a+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,n=n+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,a=a+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,a=a+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(y,ie)|0,a=a+Math.imul(y,ce)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(v,de)|0,n=n+Math.imul(l,ue)|0,a=a+Math.imul(l,be)|0,a=a+Math.imul(p,ue)|0,i=i+Math.imul(p,be)|0,n=n+Math.imul(u,le)|0,a=a+Math.imul(u,pe)|0,a=a+Math.imul(b,le)|0,i=i+Math.imul(b,pe)|0;var Ae=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),a=Math.imul(j,$),a=a+Math.imul(D,K)|0,i=Math.imul(D,$),n=n+Math.imul(L,V)|0,a=a+Math.imul(L,W)|0,a=a+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,n=n+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,a=a+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,a=a+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,a=a+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(M,ie)|0,a=a+Math.imul(M,ce)|0,a=a+Math.imul(k,ie)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(m,ue)|0,a=a+Math.imul(m,be)|0,a=a+Math.imul(v,ue)|0,i=i+Math.imul(v,be)|0,n=n+Math.imul(l,le)|0,a=a+Math.imul(l,pe)|0,a=a+Math.imul(p,le)|0,i=i+Math.imul(p,pe)|0;var Ee=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),a=Math.imul(j,W),a=a+Math.imul(D,V)|0,i=Math.imul(D,W),n=n+Math.imul(L,J)|0,a=a+Math.imul(L,Y)|0,a=a+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,n=n+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,a=a+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,a=a+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(E,ie)|0,a=a+Math.imul(E,ce)|0,a=a+Math.imul(S,ie)|0,i=i+Math.imul(S,ce)|0,n=n+Math.imul(M,fe)|0,a=a+Math.imul(M,de)|0,a=a+Math.imul(k,fe)|0,i=i+Math.imul(k,de)|0,n=n+Math.imul(y,ue)|0,a=a+Math.imul(y,be)|0,a=a+Math.imul(w,ue)|0,i=i+Math.imul(w,be)|0,n=n+Math.imul(m,le)|0,a=a+Math.imul(m,pe)|0,a=a+Math.imul(v,le)|0,i=i+Math.imul(v,pe)|0;var Se=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,J),a=Math.imul(j,Y),a=a+Math.imul(D,J)|0,i=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,a=a+Math.imul(N,Q)|0,i=i+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,a=a+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(C,ie)|0,a=a+Math.imul(C,ce)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,a=a+Math.imul(E,de)|0,a=a+Math.imul(S,fe)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(M,ue)|0,a=a+Math.imul(M,be)|0,a=a+Math.imul(k,ue)|0,i=i+Math.imul(k,be)|0,n=n+Math.imul(y,le)|0,a=a+Math.imul(y,pe)|0,a=a+Math.imul(w,le)|0,i=i+Math.imul(w,pe)|0;var Te=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Q),a=Math.imul(j,ee),a=a+Math.imul(D,Q)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,a=a+Math.imul(L,ne)|0,a=a+Math.imul(N,re)|0,i=i+Math.imul(N,ne)|0,n=n+Math.imul(R,ie)|0,a=a+Math.imul(R,ce)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(I,ce)|0,n=n+Math.imul(C,fe)|0,a=a+Math.imul(C,de)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(P,de)|0,n=n+Math.imul(E,ue)|0,a=a+Math.imul(E,be)|0,a=a+Math.imul(S,ue)|0,i=i+Math.imul(S,be)|0,n=n+Math.imul(M,le)|0,a=a+Math.imul(M,pe)|0,a=a+Math.imul(k,le)|0,i=i+Math.imul(k,pe)|0;var Ce=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),a=Math.imul(j,ne),a=a+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,a=a+Math.imul(L,ce)|0,a=a+Math.imul(N,ie)|0,i=i+Math.imul(N,ce)|0,n=n+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(I,de)|0,n=n+Math.imul(C,ue)|0,a=a+Math.imul(C,be)|0,a=a+Math.imul(P,ue)|0,i=i+Math.imul(P,be)|0,n=n+Math.imul(E,le)|0,a=a+Math.imul(E,pe)|0,a=a+Math.imul(S,le)|0,i=i+Math.imul(S,pe)|0;var Pe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,ie),a=Math.imul(j,ce),a=a+Math.imul(D,ie)|0,i=Math.imul(D,ce),n=n+Math.imul(L,fe)|0,a=a+Math.imul(L,de)|0,a=a+Math.imul(N,fe)|0,i=i+Math.imul(N,de)|0,n=n+Math.imul(R,ue)|0,a=a+Math.imul(R,be)|0,a=a+Math.imul(I,ue)|0,i=i+Math.imul(I,be)|0,n=n+Math.imul(C,le)|0,a=a+Math.imul(C,pe)|0,a=a+Math.imul(P,le)|0,i=i+Math.imul(P,pe)|0;var Oe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,fe),a=Math.imul(j,de),a=a+Math.imul(D,fe)|0,i=Math.imul(D,de),n=n+Math.imul(L,ue)|0,a=a+Math.imul(L,be)|0,a=a+Math.imul(N,ue)|0,i=i+Math.imul(N,be)|0,n=n+Math.imul(R,le)|0,a=a+Math.imul(R,pe)|0,a=a+Math.imul(I,le)|0,i=i+Math.imul(I,pe)|0;var Re=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,ue),a=Math.imul(j,be),a=a+Math.imul(D,ue)|0,i=Math.imul(D,be),n=n+Math.imul(L,le)|0,a=a+Math.imul(L,pe)|0,a=a+Math.imul(N,le)|0,i=i+Math.imul(N,pe)|0;var Ie=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,le),a=Math.imul(j,pe),a=a+Math.imul(D,le)|0,i=Math.imul(D,pe);var Be=(d+n|0)+((8191&a)<<13)|0;return d=(i+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=xe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=we,f[6]=_e,f[7]=Me,f[8]=ke,f[9]=Ae,f[10]=Ee,f[11]=Se,f[12]=Te,f[13]=Ce,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ie,f[18]=Be,0!==d&&(f[19]=d,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0,a+=c>>>26,c&=67108863}r.words[i]=o,n=c,c=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function y(e,t,r){return g(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(v=m),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?v(this,e,t):n<63?m(this,e,t):n<1024?g(this,e,t):y(this,e,t),r},w.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},w.prototype.permute=function(e,t,r,n,a,i){for(var c=0;c>>=1)a++;return 1<>>=13,r[2*c+1]=8191&i,i>>>=13;for(c=2*t;c>=26,r+=i/67108864|0,r+=c>>>26,this.words[a]=67108863&c}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=x(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var c=0;for(t=0;t>>26-r}c&&(this.words[t]=c,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,c=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<c)for(this.length-=c,d=0;d=0&&(0!==s||d>=a);d--){var u=0|this.words[d];this.words[d]=s<<26-i|u>>>i,s=u&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===o)return this._strip();for(n(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),a=e,c=0|a.words[a.length-1],o=this._countBits(c);r=26-o,0!==r&&(a=a.ushln(r),n.iushln(r),c=0|a.words[a.length-1]);var f,d=n.length-a.length;if("mod"!==t){f=new i(null),f.length=d+1,f.words=new Array(f.length);for(var s=0;s=0;b--){var h=67108864*(0|n.words[a.length+b])+(0|n.words[a.length+b-1]);h=Math.min(h/c|0,67108863),n._ishlnsubmul(a,h,b);while(0!==n.negative)h--,n.negative=0,n._ishlnsubmul(a,1,b),n.isZero()||(n.negative^=1);f&&(f.words[b]=h)}return f&&f._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.iadd(e)),{div:a,mod:c}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.isub(e)),{div:o.div,mod:c}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,c,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a=new i(1),c=new i(0),o=new i(0),f=new i(1),d=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++d;var s=r.clone(),u=t.clone();while(!t.isZero()){for(var b=0,h=1;0===(t.words[0]&h)&&b<26;++b,h<<=1);if(b>0){t.iushrn(b);while(b-- >0)(a.isOdd()||c.isOdd())&&(a.iadd(s),c.isub(u)),a.iushrn(1),c.iushrn(1)}for(var l=0,p=1;0===(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(u)),o.iushrn(1),f.iushrn(1)}t.cmp(r)>=0?(t.isub(r),a.isub(o),c.isub(f)):(r.isub(t),o.isub(a),f.isub(c))}return{a:o,b:f,gcd:r.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a,c=new i(1),o=new i(0),f=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var d=0,s=1;0===(t.words[0]&s)&&d<26;++d,s<<=1);if(d>0){t.iushrn(d);while(d-- >0)c.isOdd()&&c.iadd(f),c.iushrn(1)}for(var u=0,b=1;0===(r.words[0]&b)&&u<26;++u,b<<=1);if(u>0){r.iushrn(u);while(u-- >0)o.isOdd()&&o.iadd(f),o.iushrn(1)}t.cmp(r)>=0?(t.isub(r),c.isub(o)):(r.isub(t),o.isub(c))}return a=0===t.cmpn(1)?c:o,a.cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[c]=o}return 0!==i&&(this.words[c]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new T(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function M(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){M.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){M.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){M.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){M.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},M.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},M.prototype.split=function(e,t){e.iushrn(this.n,0,t)},M.prototype.imulK=function(e){return e.imul(this.k)},a(k,M),k.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=c}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new A;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return _[e]=t,t},T.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(s(e,e.umod(this.m)._forceRed(this)),e)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}var a=this.m.subn(1),c=0;while(!a.isZero()&&0===a.andln(1))c++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),f=o.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();s=new i(2*s*s).toRed(this);while(0!==this.pow(s,d).cmp(f))s.redIAdd(f);var u=this.pow(s,a),b=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),l=c;while(0!==h.cmp(o)){for(var p=h,x=0;0!==p.cmp(o);x++)p=p.redSqr();n(x=0;a--){for(var s=t.words[a],u=d-1;u>=0;u--){var b=s>>u&1;c!==n[0]&&(c=this.sqr(c)),0!==b||0!==o?(o<<=1,o|=b,f++,(f===r||0===a&&0===u)&&(c=this.mul(c,n[o]),f=0,o=0)):f=0}d=26}return c},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new C(e)},a(C,T),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),c=a;return a.cmp(this.m)>=0?c=a.isub(this.m):a.cmpn(0)<0&&(c=a.iadd(this.m)),c._forceRed(this)},C.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}(e,this)},12481:function(e,t,r){e.exports=r(75207)},68130:function(e,t,r){r(21703);var n=r(29882).Buffer,a=r(65443),i=r(98141),c=r(81923),o=r(36528),f=r(72170),d=r(75207);function s(e){i.Writable.call(this);var t=d[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=a(t.hash),this._tag=t.id,this._signType=t.sign}function u(e){i.Writable.call(this);var t=d[e];if(!t)throw new Error("Unknown message digest");this._hash=a(t.hash),this._tag=t.id,this._signType=t.sign}function b(e){return new s(e)}function h(e){return new u(e)}Object.keys(d).forEach((function(e){d[e].id=n.from(d[e].id,"hex"),d[e.toLowerCase()]=d[e]})),c(s,i.Writable),s.prototype._write=function(e,t,r){this._hash.update(e),r()},s.prototype.update=function(e,t){return"string"===typeof e&&(e=n.from(e,t)),this._hash.update(e),this},s.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=o(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},c(u,i.Writable),u.prototype._write=function(e,t,r){this._hash.update(e),r()},u.prototype.update=function(e,t){return"string"===typeof e&&(e=n.from(e,t)),this._hash.update(e),this},u.prototype.verify=function(e,t,r){"string"===typeof t&&(t=n.from(t,r)),this.end();var a=this._hash.digest();return f(t,a,e,this._signType,this._tag)},e.exports={Sign:b,Verify:h,createSign:b,createVerify:h}},36528:function(e,t,r){r(21703);var n=r(29882).Buffer,a=r(54868),i=r(28593),c=r(32127).ec,o=r(79194),f=r(2616),d=r(1308);function s(e,t,r,a,c){var o=f(t);if(o.curve){if("ecdsa"!==a&&"ecdsa/rsa"!==a)throw new Error("wrong private key type");return u(e,o)}if("dsa"===o.type){if("dsa"!==a)throw new Error("wrong private key type");return b(e,o,r)}if("rsa"!==a&&"ecdsa/rsa"!==a)throw new Error("wrong private key type");e=n.concat([c,e]);var d=o.modulus.byteLength(),s=[0,1];while(e.length+s.length+10&&r.ishrn(n),r}function x(e,t){e=p(e,t),e=e.mod(t);var r=n.from(e.toArray());if(r.length=t)throw new Error("invalid sig")}e.exports=f},79194:function(e,t,r){e=r.nmd(e),r(21703),function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var c;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{c="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(2363).Buffer}catch(P){}function o(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function f(e,t,r){var n=o(e,r);return r-1>=t&&(n|=o(e,r-1)<<4),n}function d(e,t,r,a){for(var i=0,c=0,o=Math.min(e.length,r),f=t;f=49?d-49+10:d>=17?d-17+10:d,n(d>=0&&c0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&(a++,this.negative=1),a=0;a-=3)c=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=c<>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=f(e,t,n)<=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8;else{var o=e.length-t;for(n=o%2===0?t+1:t;n=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8}this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,c=i%n,o=Math.min(i,i-c)+r,f=0,s=r;s1&&0===this.words[this.length-1])this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(P){i.prototype.inspect=u}else i.prototype.inspect=u;function u(){return(this.red?""}var b=["","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];i.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var a=0,i=0,c=0;c>>24-a&16777215,r=0!==i||c!==this.length-1?b[6-f.length]+f+r:f+r,a+=2,a>=26&&(a-=26,c--)}0!==i&&(r=i.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=h[e],s=l[e];r="";var u=this.clone();u.negative=0;while(!u.isZero()){var p=u.modrn(s).toString(e);u=u.idivn(s),r=u.isZero()?p+r:b[d-p.length]+p+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},c&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(c,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var p=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};function x(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],c=a*i,o=67108863&c,f=c/67108864|0;r.words[0]=o;for(var d=1;d>>26,u=67108863&f,b=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=b;h++){var l=d-h|0;a=0|e.words[l],i=0|t.words[h],c=a*i+u,s+=c/67108864|0,u=67108863&c}r.words[d]=0|u,f=0|s}return 0!==f?r.words[d]=0|f:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var c=p(e,i),o="le"===t?"LE":"BE";return this["_toArrayLike"+o](c,a),c},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=c>>>24,i+=2)}if(r=0&&(e[r--]=c>>8&255),r>=0&&(e[r--]=c>>16&255),6===i?(r>=0&&(e[r--]=c>>24&255),n=0,i=0):(n=c>>>24,i+=2)}if(r>=0){e[r--]=n;while(r>=0)e[r--]=0}},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,c=0;c>26,this.words[c]=67108863&t;for(;0!==i&&c>26,this.words[c]=67108863&t;if(0===i&&c>>13,h=0|c[1],l=8191&h,p=h>>>13,x=0|c[2],m=8191&x,v=x>>>13,g=0|c[3],y=8191&g,w=g>>>13,_=0|c[4],M=8191&_,k=_>>>13,A=0|c[5],E=8191&A,S=A>>>13,T=0|c[6],C=8191&T,P=T>>>13,O=0|c[7],R=8191&O,I=O>>>13,B=0|c[8],L=8191&B,N=B>>>13,U=0|c[9],j=8191&U,D=U>>>13,F=0|o[0],H=8191&F,q=F>>>13,z=0|o[1],K=8191&z,$=z>>>13,G=0|o[2],V=8191&G,W=G>>>13,Z=0|o[3],J=8191&Z,Y=Z>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ae=0|o[6],ie=8191&ae,ce=ae>>>13,oe=0|o[7],fe=8191&oe,de=oe>>>13,se=0|o[8],ue=8191&se,be=se>>>13,he=0|o[9],le=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(u,H),a=Math.imul(u,q),a=a+Math.imul(b,H)|0,i=Math.imul(b,q);var xe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(l,H),a=Math.imul(l,q),a=a+Math.imul(p,H)|0,i=Math.imul(p,q),n=n+Math.imul(u,K)|0,a=a+Math.imul(u,$)|0,a=a+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0;var me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,H),a=Math.imul(m,q),a=a+Math.imul(v,H)|0,i=Math.imul(v,q),n=n+Math.imul(l,K)|0,a=a+Math.imul(l,$)|0,a=a+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(u,V)|0,a=a+Math.imul(u,W)|0,a=a+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ve=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(y,H),a=Math.imul(y,q),a=a+Math.imul(w,H)|0,i=Math.imul(w,q),n=n+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(l,V)|0,a=a+Math.imul(l,W)|0,a=a+Math.imul(p,V)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(u,J)|0,a=a+Math.imul(u,Y)|0,a=a+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ge=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(M,H),a=Math.imul(M,q),a=a+Math.imul(k,H)|0,i=Math.imul(k,q),n=n+Math.imul(y,K)|0,a=a+Math.imul(y,$)|0,a=a+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,n=n+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0,a=a+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,n=n+Math.imul(u,Q)|0,a=a+Math.imul(u,ee)|0,a=a+Math.imul(b,Q)|0,i=i+Math.imul(b,ee)|0;var ye=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,H),a=Math.imul(E,q),a=a+Math.imul(S,H)|0,i=Math.imul(S,q),n=n+Math.imul(M,K)|0,a=a+Math.imul(M,$)|0,a=a+Math.imul(k,K)|0,i=i+Math.imul(k,$)|0,n=n+Math.imul(y,V)|0,a=a+Math.imul(y,W)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,a=a+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,n=n+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0,a=a+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(u,re)|0,a=a+Math.imul(u,ne)|0,a=a+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var we=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,H),a=Math.imul(C,q),a=a+Math.imul(P,H)|0,i=Math.imul(P,q),n=n+Math.imul(E,K)|0,a=a+Math.imul(E,$)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(M,V)|0,a=a+Math.imul(M,W)|0,a=a+Math.imul(k,V)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,a=a+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,n=n+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,a=a+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0,a=a+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(u,ie)|0,a=a+Math.imul(u,ce)|0,a=a+Math.imul(b,ie)|0,i=i+Math.imul(b,ce)|0;var _e=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,H),a=Math.imul(R,q),a=a+Math.imul(I,H)|0,i=Math.imul(I,q),n=n+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,a=a+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,n=n+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,a=a+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,a=a+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,a=a+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,a=a+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(l,ie)|0,a=a+Math.imul(l,ce)|0,a=a+Math.imul(p,ie)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(u,fe)|0,a=a+Math.imul(u,de)|0,a=a+Math.imul(b,fe)|0,i=i+Math.imul(b,de)|0;var Me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,H),a=Math.imul(L,q),a=a+Math.imul(N,H)|0,i=Math.imul(N,q),n=n+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,a=a+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(C,V)|0,a=a+Math.imul(C,W)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(E,J)|0,a=a+Math.imul(E,Y)|0,a=a+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,n=n+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,a=a+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,a=a+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(m,ie)|0,a=a+Math.imul(m,ce)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(l,fe)|0,a=a+Math.imul(l,de)|0,a=a+Math.imul(p,fe)|0,i=i+Math.imul(p,de)|0,n=n+Math.imul(u,ue)|0,a=a+Math.imul(u,be)|0,a=a+Math.imul(b,ue)|0,i=i+Math.imul(b,be)|0;var ke=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,H),a=Math.imul(j,q),a=a+Math.imul(D,H)|0,i=Math.imul(D,q),n=n+Math.imul(L,K)|0,a=a+Math.imul(L,$)|0,a=a+Math.imul(N,K)|0,i=i+Math.imul(N,$)|0,n=n+Math.imul(R,V)|0,a=a+Math.imul(R,W)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(C,J)|0,a=a+Math.imul(C,Y)|0,a=a+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,n=n+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,a=a+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,a=a+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(y,ie)|0,a=a+Math.imul(y,ce)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(v,de)|0,n=n+Math.imul(l,ue)|0,a=a+Math.imul(l,be)|0,a=a+Math.imul(p,ue)|0,i=i+Math.imul(p,be)|0,n=n+Math.imul(u,le)|0,a=a+Math.imul(u,pe)|0,a=a+Math.imul(b,le)|0,i=i+Math.imul(b,pe)|0;var Ae=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),a=Math.imul(j,$),a=a+Math.imul(D,K)|0,i=Math.imul(D,$),n=n+Math.imul(L,V)|0,a=a+Math.imul(L,W)|0,a=a+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,n=n+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,a=a+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,a=a+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,a=a+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(M,ie)|0,a=a+Math.imul(M,ce)|0,a=a+Math.imul(k,ie)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(m,ue)|0,a=a+Math.imul(m,be)|0,a=a+Math.imul(v,ue)|0,i=i+Math.imul(v,be)|0,n=n+Math.imul(l,le)|0,a=a+Math.imul(l,pe)|0,a=a+Math.imul(p,le)|0,i=i+Math.imul(p,pe)|0;var Ee=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),a=Math.imul(j,W),a=a+Math.imul(D,V)|0,i=Math.imul(D,W),n=n+Math.imul(L,J)|0,a=a+Math.imul(L,Y)|0,a=a+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,n=n+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,a=a+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,a=a+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(E,ie)|0,a=a+Math.imul(E,ce)|0,a=a+Math.imul(S,ie)|0,i=i+Math.imul(S,ce)|0,n=n+Math.imul(M,fe)|0,a=a+Math.imul(M,de)|0,a=a+Math.imul(k,fe)|0,i=i+Math.imul(k,de)|0,n=n+Math.imul(y,ue)|0,a=a+Math.imul(y,be)|0,a=a+Math.imul(w,ue)|0,i=i+Math.imul(w,be)|0,n=n+Math.imul(m,le)|0,a=a+Math.imul(m,pe)|0,a=a+Math.imul(v,le)|0,i=i+Math.imul(v,pe)|0;var Se=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,J),a=Math.imul(j,Y),a=a+Math.imul(D,J)|0,i=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,a=a+Math.imul(N,Q)|0,i=i+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,a=a+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(C,ie)|0,a=a+Math.imul(C,ce)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,a=a+Math.imul(E,de)|0,a=a+Math.imul(S,fe)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(M,ue)|0,a=a+Math.imul(M,be)|0,a=a+Math.imul(k,ue)|0,i=i+Math.imul(k,be)|0,n=n+Math.imul(y,le)|0,a=a+Math.imul(y,pe)|0,a=a+Math.imul(w,le)|0,i=i+Math.imul(w,pe)|0;var Te=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Q),a=Math.imul(j,ee),a=a+Math.imul(D,Q)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,a=a+Math.imul(L,ne)|0,a=a+Math.imul(N,re)|0,i=i+Math.imul(N,ne)|0,n=n+Math.imul(R,ie)|0,a=a+Math.imul(R,ce)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(I,ce)|0,n=n+Math.imul(C,fe)|0,a=a+Math.imul(C,de)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(P,de)|0,n=n+Math.imul(E,ue)|0,a=a+Math.imul(E,be)|0,a=a+Math.imul(S,ue)|0,i=i+Math.imul(S,be)|0,n=n+Math.imul(M,le)|0,a=a+Math.imul(M,pe)|0,a=a+Math.imul(k,le)|0,i=i+Math.imul(k,pe)|0;var Ce=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),a=Math.imul(j,ne),a=a+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,a=a+Math.imul(L,ce)|0,a=a+Math.imul(N,ie)|0,i=i+Math.imul(N,ce)|0,n=n+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(I,de)|0,n=n+Math.imul(C,ue)|0,a=a+Math.imul(C,be)|0,a=a+Math.imul(P,ue)|0,i=i+Math.imul(P,be)|0,n=n+Math.imul(E,le)|0,a=a+Math.imul(E,pe)|0,a=a+Math.imul(S,le)|0,i=i+Math.imul(S,pe)|0;var Pe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,ie),a=Math.imul(j,ce),a=a+Math.imul(D,ie)|0,i=Math.imul(D,ce),n=n+Math.imul(L,fe)|0,a=a+Math.imul(L,de)|0,a=a+Math.imul(N,fe)|0,i=i+Math.imul(N,de)|0,n=n+Math.imul(R,ue)|0,a=a+Math.imul(R,be)|0,a=a+Math.imul(I,ue)|0,i=i+Math.imul(I,be)|0,n=n+Math.imul(C,le)|0,a=a+Math.imul(C,pe)|0,a=a+Math.imul(P,le)|0,i=i+Math.imul(P,pe)|0;var Oe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,fe),a=Math.imul(j,de),a=a+Math.imul(D,fe)|0,i=Math.imul(D,de),n=n+Math.imul(L,ue)|0,a=a+Math.imul(L,be)|0,a=a+Math.imul(N,ue)|0,i=i+Math.imul(N,be)|0,n=n+Math.imul(R,le)|0,a=a+Math.imul(R,pe)|0,a=a+Math.imul(I,le)|0,i=i+Math.imul(I,pe)|0;var Re=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,ue),a=Math.imul(j,be),a=a+Math.imul(D,ue)|0,i=Math.imul(D,be),n=n+Math.imul(L,le)|0,a=a+Math.imul(L,pe)|0,a=a+Math.imul(N,le)|0,i=i+Math.imul(N,pe)|0;var Ie=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,le),a=Math.imul(j,pe),a=a+Math.imul(D,le)|0,i=Math.imul(D,pe);var Be=(d+n|0)+((8191&a)<<13)|0;return d=(i+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=xe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=we,f[6]=_e,f[7]=Me,f[8]=ke,f[9]=Ae,f[10]=Ee,f[11]=Se,f[12]=Te,f[13]=Ce,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ie,f[18]=Be,0!==d&&(f[19]=d,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0,a+=c>>>26,c&=67108863}r.words[i]=o,n=c,c=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function y(e,t,r){return g(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(v=m),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?v(this,e,t):n<63?m(this,e,t):n<1024?g(this,e,t):y(this,e,t),r},w.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},w.prototype.permute=function(e,t,r,n,a,i){for(var c=0;c>>=1)a++;return 1<>>=13,r[2*c+1]=8191&i,i>>>=13;for(c=2*t;c>=26,r+=i/67108864|0,r+=c>>>26,this.words[a]=67108863&c}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=x(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var c=0;for(t=0;t>>26-r}c&&(this.words[t]=c,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,c=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<c)for(this.length-=c,d=0;d=0&&(0!==s||d>=a);d--){var u=0|this.words[d];this.words[d]=s<<26-i|u>>>i,s=u&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===o)return this._strip();for(n(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),a=e,c=0|a.words[a.length-1],o=this._countBits(c);r=26-o,0!==r&&(a=a.ushln(r),n.iushln(r),c=0|a.words[a.length-1]);var f,d=n.length-a.length;if("mod"!==t){f=new i(null),f.length=d+1,f.words=new Array(f.length);for(var s=0;s=0;b--){var h=67108864*(0|n.words[a.length+b])+(0|n.words[a.length+b-1]);h=Math.min(h/c|0,67108863),n._ishlnsubmul(a,h,b);while(0!==n.negative)h--,n.negative=0,n._ishlnsubmul(a,1,b),n.isZero()||(n.negative^=1);f&&(f.words[b]=h)}return f&&f._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.iadd(e)),{div:a,mod:c}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.isub(e)),{div:o.div,mod:c}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,c,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a=new i(1),c=new i(0),o=new i(0),f=new i(1),d=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++d;var s=r.clone(),u=t.clone();while(!t.isZero()){for(var b=0,h=1;0===(t.words[0]&h)&&b<26;++b,h<<=1);if(b>0){t.iushrn(b);while(b-- >0)(a.isOdd()||c.isOdd())&&(a.iadd(s),c.isub(u)),a.iushrn(1),c.iushrn(1)}for(var l=0,p=1;0===(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(u)),o.iushrn(1),f.iushrn(1)}t.cmp(r)>=0?(t.isub(r),a.isub(o),c.isub(f)):(r.isub(t),o.isub(a),f.isub(c))}return{a:o,b:f,gcd:r.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a,c=new i(1),o=new i(0),f=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var d=0,s=1;0===(t.words[0]&s)&&d<26;++d,s<<=1);if(d>0){t.iushrn(d);while(d-- >0)c.isOdd()&&c.iadd(f),c.iushrn(1)}for(var u=0,b=1;0===(r.words[0]&b)&&u<26;++u,b<<=1);if(u>0){r.iushrn(u);while(u-- >0)o.isOdd()&&o.iadd(f),o.iushrn(1)}t.cmp(r)>=0?(t.isub(r),c.isub(o)):(r.isub(t),o.isub(c))}return a=0===t.cmpn(1)?c:o,a.cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[c]=o}return 0!==i&&(this.words[c]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new T(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function M(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){M.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){M.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){M.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){M.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},M.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},M.prototype.split=function(e,t){e.iushrn(this.n,0,t)},M.prototype.imulK=function(e){return e.imul(this.k)},a(k,M),k.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=c}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new A;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return _[e]=t,t},T.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(s(e,e.umod(this.m)._forceRed(this)),e)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}var a=this.m.subn(1),c=0;while(!a.isZero()&&0===a.andln(1))c++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),f=o.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();s=new i(2*s*s).toRed(this);while(0!==this.pow(s,d).cmp(f))s.redIAdd(f);var u=this.pow(s,a),b=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),l=c;while(0!==h.cmp(o)){for(var p=h,x=0;0!==p.cmp(o);x++)p=p.redSqr();n(x=0;a--){for(var s=t.words[a],u=d-1;u>=0;u--){var b=s>>u&1;c!==n[0]&&(c=this.sqr(c)),0!==b||0!==o?(o<<=1,o|=b,f++,(f===r||0===a&&0===u)&&(c=this.mul(c,n[o]),f=0,o=0)):f=0}d=26}return c},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new C(e)},a(C,T),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),c=a;return a.cmp(this.m)>=0?c=a.isub(this.m):a.cmpn(0)<0&&(c=a.iadd(this.m)),c._forceRed(this)},C.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}(e,this)},29882:function(e,t,r){r(21703); /*! safe-buffer. MIT License. Feross Aboukhadijeh */ var n=r(15361),a=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function c(e,t,r){return a(e,t,r)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=c),c.prototype=Object.create(a.prototype),i(a,c),c.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return a(e,t,r)},c.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=a(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},c.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return a(e)},c.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},96662:function(e,t,r){var n=r(15361)["Buffer"];e.exports=function(e,t){for(var r=Math.min(e.length,t.length),a=new n(r),i=0;i * @license MIT */r(48675),r(3462),r(21703);var n=r(61271),a=r(27055),i="function"===typeof Symbol&&"function"===typeof Symbol["for"]?Symbol["for"]("nodejs.util.inspect.custom"):null;t.Buffer=d,t.SlowBuffer=y,t.INSPECT_MAX_BYTES=50;var c=2147483647;function o(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(r){return!1}}function f(e){if(e>c)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,d.prototype),t}function d(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return s(e,t,r)}function s(e,t,r){if("string"===typeof e)return l(e,t);if(ArrayBuffer.isView(e))return x(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return m(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return m(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return d.from(n,t,r);var a=v(e);if(a)return a;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return d.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function b(e,t,r){return u(e),e<=0?f(e):void 0!==t?"string"===typeof r?f(e).fill(t,r):f(e).fill(t):f(e)}function h(e){return u(e),f(e<0?0:0|g(e))}function l(e,t){if("string"===typeof t&&""!==t||(t="utf8"),!d.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|w(e,t),n=f(r),a=n.write(e,t);return a!==r&&(n=n.slice(0,a)),n}function p(e){for(var t=e.length<0?0:0|g(e.length),r=f(t),n=0;n=c)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c.toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),d.alloc(+e)}function w(e,t){if(d.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Z(e).length;default:if(a)return n?-1:G(e).length;t=(""+t).toLowerCase(),a=!0}}function _(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return U(this,t,r);case"utf8":case"utf-8":return R(this,t,r);case"ascii":return L(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function M(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function k(e,t,r,n,a){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,X(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"===typeof t&&(t=d.from(t,n)),d.isBuffer(t))return 0===t.length?-1:A(e,t,r,n,a);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):A(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function A(e,t,r,n,a){var i,c=1,o=e.length,f=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;c=2,o/=2,f/=2,r/=2}function d(e,t){return 1===c?e[t]:e.readUInt16BE(t*c)}if(a){var s=-1;for(i=r;io&&(r=o-f),i=r;i>=0;i--){for(var u=!0,b=0;ba&&(n=a)):n=a;var i=t.length;n>i/2&&(n=i/2);for(var c=0;c239?4:d>223?3:d>191?2:1;if(a+u<=r)switch(u){case 1:d<128&&(s=d);break;case 2:i=e[a+1],128===(192&i)&&(f=(31&d)<<6|63&i,f>127&&(s=f));break;case 3:i=e[a+1],c=e[a+2],128===(192&i)&&128===(192&c)&&(f=(15&d)<<12|(63&i)<<6|63&c,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:i=e[a+1],c=e[a+2],o=e[a+3],128===(192&i)&&128===(192&c)&&128===(192&o)&&(f=(15&d)<<18|(63&i)<<12|(63&c)<<6|63&o,f>65535&&f<1114112&&(s=f))}null===s?(s=65533,u=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),a+=u}return B(n)}t.kMaxLength=c,d.TYPED_ARRAY_SUPPORT=o(),d.TYPED_ARRAY_SUPPORT||"undefined"===typeof console||"function"!==typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}}),d.poolSize=8192,d.from=function(e,t,r){return s(e,t,r)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array),d.alloc=function(e,t,r){return b(e,t,r)},d.allocUnsafe=function(e){return h(e)},d.allocUnsafeSlow=function(e){return h(e)},d.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==d.prototype},d.compare=function(e,t){if(Y(e,Uint8Array)&&(e=d.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=d.from(t,t.offset,t.byteLength)),!d.isBuffer(e)||!d.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);an.length?d.from(i).copy(n,a):Uint8Array.prototype.set.call(n,i,a);else{if(!d.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,a)}a+=i.length}return n},d.byteLength=w,d.prototype._isBuffer=!0,d.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},i&&(d.prototype[i]=d.prototype.inspect),d.prototype.compare=function(e,t,r,n,a){if(Y(e,Uint8Array)&&(e=d.from(e,e.offset,e.byteLength)),!d.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,a>>>=0,this===e)return 0;for(var i=a-n,c=r-t,o=Math.min(i,c),f=this.slice(n,a),s=e.slice(t,r),u=0;u>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return E(this,e,t,r);case"utf8":case"utf-8":return S(this,e,t,r);case"ascii":case"latin1":case"binary":return T(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function B(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var r="",n=0;while(nn)&&(r=n);for(var a="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,r,n,a,i){if(!d.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function H(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function q(e,t,r,n,i){return t=+t,r>>>=0,i||H(e,t,r,4,34028234663852886e22,-34028234663852886e22),a.write(e,t,r,n,23,4),r+4}function z(e,t,r,n,i){return t=+t,r>>>=0,i||H(e,t,r,8,17976931348623157e292,-17976931348623157e292),a.write(e,t,r,n,52,8),r+8}d.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t>>=0,t>>>=0,r||D(e,t,this.length);var n=this[e],a=1,i=0;while(++i>>=0,t>>>=0,r||D(e,t,this.length);var n=this[e+--t],a=1;while(t>0&&(a*=256))n+=this[e+--t]*a;return n},d.prototype.readUint8=d.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);var n=this[e],a=1,i=0;while(++i=a&&(n-=Math.pow(2,8*t)),n},d.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);var n=t,a=1,i=this[e+--n];while(n>0&&(a*=256))i+=this[e+--n]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},d.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},d.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},d.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},d.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),a.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),a.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),a.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),a.read(this,e,!1,52,8)},d.prototype.writeUintLE=d.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var a=Math.pow(2,8*r)-1;F(this,e,t,r,a,0)}var i=1,c=0;this[t]=255&e;while(++c>>=0,r>>>=0,!n){var a=Math.pow(2,8*r)-1;F(this,e,t,r,a,0)}var i=r-1,c=1;this[t+i]=255&e;while(--i>=0&&(c*=256))this[t+i]=e/c&255;return t+r},d.prototype.writeUint8=d.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,1,255,0),this[t]=255&e,t+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);F(this,e,t,r,a-1,-a)}var i=0,c=1,o=0;this[t]=255&e;while(++i>0)-o&255;return t+r},d.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);F(this,e,t,r,a-1,-a)}var i=r-1,c=1,o=0;this[t+i]=255&e;while(--i>=0&&(c*=256))e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/c>>0)-o&255;return t+r},d.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},d.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},d.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeFloatLE=function(e,t,r){return q(this,e,t,!0,r)},d.prototype.writeFloatBE=function(e,t,r){return q(this,e,t,!1,r)},d.prototype.writeDoubleLE=function(e,t,r){return z(this,e,t,!0,r)},d.prototype.writeDoubleBE=function(e,t,r){return z(this,e,t,!1,r)},d.prototype.copy=function(e,t,r,n){if(!d.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=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),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(i=t;i55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(c+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function V(e){for(var t=[],r=0;r>8,a=r%256,i.push(a),i.push(n)}return i}function Z(e){return n.toByteArray($(e))}function J(e,t,r,n){for(var a=0;a=t.length||a>=e.length)break;t[a+r]=e[a]}return a}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!==e}var Q=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,a=0;a<16;++a)t[n+a]=e[r]+e[a];return t}()},15477:function(e,t,r){"use strict";var n=r(8692),a=r(81542),i=a(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"===typeof r&&i(e,".prototype.")>-1?a(r):r}},81542:function(e,t,r){"use strict";var n=r(49148),a=r(8692),i=a("%Function.prototype.apply%"),c=a("%Function.prototype.call%"),o=a("%Reflect.apply%",!0)||n.call(c,i),f=a("%Object.getOwnPropertyDescriptor%",!0),d=a("%Object.defineProperty%",!0),s=a("%Math.max%");if(d)try{d({},"a",{value:1})}catch(b){d=null}e.exports=function(e){var t=o(n,c,arguments);if(f&&d){var r=f(t,"length");r.configurable&&d(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var u=function(){return o(n,i,arguments)};d?d(e.exports,"apply",{value:u}):e.exports.apply=u},68754:function(e,t,r){"use strict";const n=r(83630),a={};for(const[i,c]of Object.entries(n))a[i.toUpperCase().replace(/-/g,"_")]=c;e.exports=Object.freeze(a)},68018:function(e,t,r){"use strict";r(21703);const{Buffer:n}=r(15361),a=r(42611),i=r(48681),c=r(63459),o=r(94718);t=e.exports,t.addPrefix=(e,t)=>{let r;if(n.isBuffer(e))r=o.varintBufferEncode(e);else{if(!c[e])throw new Error("multicodec not recognized");r=c[e]}return n.concat([r,t])},t.rmPrefix=e=>(a.decode(e),e.slice(a.decode.bytes)),t.getCodec=e=>{const t=a.decode(e),r=i.get(t);if(void 0===r)throw new Error(`Code ${t} not found`);return r},t.getName=e=>i.get(e),t.getNumber=e=>{const t=c[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return o.varintBufferDecode(t)[0]},t.getCode=e=>a.decode(e),t.getCodeVarint=e=>{const t=c[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=e=>a.encode(e);const f=r(68754);Object.assign(t,f),t.print=r(86347)},48681:function(e,t,r){"use strict";const n=r(83630),a=new Map;for(const i in n){const e=n[i];a.set(e,i)}e.exports=Object.freeze(a)},86347:function(e,t,r){"use strict";const n=r(83630),a={};for(const[i,c]of Object.entries(n))void 0===a[c]&&(a[c]=i);e.exports=Object.freeze(a)},94718:function(e,t,r){"use strict";const n=r(42611),{Buffer:a}=r(15361);function i(e){return parseInt(e.toString("hex"),16)}function c(e){let t=e.toString(16);return t.length%2===1&&(t="0"+t),a.from(t,"hex")}function o(e){return a.from(n.encode(i(e)))}function f(e){return c(n.decode(e))}function d(e){return a.from(n.encode(e))}e.exports={numberToBuffer:c,bufferToNumber:i,varintBufferEncode:o,varintBufferDecode:f,varintEncode:d}},63459:function(e,t,r){"use strict";const n=r(83630),a=r(94718).varintEncode,i={};for(const c in n){const e=n[c];i[c]=a(e)}e.exports=Object.freeze(i)},8702:function(e,t,r){"use strict";const n=r(21272),{Buffer:a}=r(15361);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!==typeof e.codec)return"codec must be string";if(0===e.version){if("dag-pb"!==e.codec)return"codec must be 'dag-pb' for CIDv0";if("base58btc"!==e.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!a.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(t){let e=t.message;return e||(e="Multihash validation failed"),e}}};e.exports=i},4821:function(e,t,r){"use strict";r(21703);const{Buffer:n}=r(15361),a=r(21272),i=r(64869),c=r(68018),o=r(83630),f=r(8702),d=r(67151);class s{constructor(e,t,r,o){if(u.isCID(e)){const t=e;return this.version=t.version,this.codec=t.codec,this.multihash=n.from(t.multihash),void(this.multibaseName=t.multibaseName||(0===t.version?"base58btc":"base32"))}if("string"===typeof e){const t=i.isEncoded(e);if(t){const r=i.decode(e);this.version=parseInt(r.slice(0,1).toString("hex"),16),this.codec=c.getCodec(r.slice(1)),this.multihash=c.rmPrefix(r.slice(1)),this.multibaseName=t}else this.version=0,this.codec="dag-pb",this.multihash=a.fromB58String(e),this.multibaseName="base58btc";return s.validateCID(this),void Object.defineProperty(this,"string",{value:e})}if(n.isBuffer(e)){const t=e.slice(0,1),r=parseInt(t.toString("hex"),16);if(1===r){const t=e;this.version=r,this.codec=c.getCodec(t.slice(1)),this.multihash=c.rmPrefix(t.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=e,this.multibaseName="base58btc";s.validateCID(this)}else this.version=e,this.codec=t,this.multihash=r,this.multibaseName=o||(0===e?"base58btc":"base32"),s.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=n.concat([n.from("01","hex"),c.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return n.concat([n.from(`0${this.version}`,"hex"),c.getCodeVarint(this.codec),a.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=a.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new u(0,this.codec,this.multihash)}toV1(){return new u(1,this.codec,this.multihash)}toBaseEncodedString(e=this.multibaseName){if(this.string&&e===this.multibaseName)return this.string;let t=null;if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");t=a.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");t=i.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){const t=f.checkCIDComponents(e);if(t)throw new Error(t)}}const u=d(s,{className:"CID",symbolName:"@ipld/js-cid/CID"});u.codecs=o,e.exports=u},11414:function(e,t,r){r(21703);var n=r(6779).Buffer,a=r(22263).Transform,i=r(25605).s,c=r(81923);function o(e){a.call(this),this.hashMode="string"===typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}c(o,a),o.prototype.update=function(e,t,r){"string"===typeof e&&(e=n.from(e,t));var a=this._update(e);return this.hashMode?this:(r&&(a=this._toString(a,r)),a)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(a){n=a}finally{r(n)}},o.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)},o.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},o.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new i(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=o},67151:function(e){"use strict";function t(e,{className:t,symbolName:r}){const n=Symbol.for(r),a={[t]:class extends e{constructor(...e){super(...e),Object.defineProperty(this,n,{value:!0})}get[Symbol.toStringTag](){return t}}}[t];return a[`is${t}`]=e=>!(!e||!e[n]),a}function r(e,{className:t,symbolName:r,withoutNew:n}){const a=Symbol.for(r),i={[t]:function(...t){if(n&&!(this instanceof i))return new i(...t);const r=e.call(this,...t)||this;return r&&!r[a]&&Object.defineProperty(r,a,{value:!0}),r}}[t];return i.prototype=Object.create(e.prototype),i.prototype.constructor=i,Object.defineProperty(i.prototype,Symbol.toStringTag,{get(){return t}}),i[`is${t}`]=e=>!(!e||!e[a]),i}e.exports=t,e.exports.proto=r},79120:function(e){var t=function(){window.cancelAnimationFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return window.clearTimeout(e)}}(),window.requestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)}}()};e.exports=t},3506:function(e){var t=function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var r=0;r{let t=new n(e);return 0===t.version&&(t=t.toV1()),t.toString("base32")};t.cidV0ToV1Base32=a},72624:function(e,t,r){const n=r(58429),{hexStringToBuffer:a,profiles:i}=r(11970),{cidV0ToV1Base32:c}=r(45201);e.exports={helpers:{cidV0ToV1Base32:c},decode:function(e){const t=a(e),r=n.getCodec(t),c=n.rmPrefix(t);let o=i[r];return o||(o=i["default"]),o.decode(c)},fromIpfs:function(e){return this.encode("ipfs-ns",e)},fromSwarm:function(e){return this.encode("swarm-ns",e)},encode:function(e,t){let r=i[e];r||(r=i["default"]);const a=r.encode(t);return n.addPrefix(e,a).toString("hex")},getCodec:function(e){let t=a(e);return n.getCodec(t)}}},11970:function(e,t,r){var n=r(15361)["Buffer"];const a=r(4821),i=r(21272),c=e=>{let t=e.slice(0,2),r=e.slice(2),n="";return n="0x"===t?r:e,i.fromHexString(n)},o={swarm:e=>{const t=i.encode(c(e),"keccak-256");return new a(1,"swarm-manifest",t).buffer},ipfs:e=>{const t=i.fromB58String(e);return new a(1,"dag-pb",t).buffer},utf8:e=>n.from(e,"utf8")},f={hexMultiHash:e=>{const t=new a(e);return i.decode(t.multihash).digest.toString("hex")},b58MultiHash:e=>{const t=new a(e);return i.toB58String(t.multihash)},utf8:e=>e.toString("utf8")},d={"swarm-ns":{encode:o.swarm,decode:f.hexMultiHash},"ipfs-ns":{encode:o.ipfs,decode:f.b58MultiHash},"ipns-ns":{encode:o.ipfs,decode:f.b58MultiHash},default:{encode:o.utf8,decode:f.utf8}};t.hexStringToBuffer=c,t.profiles=d},15292:function(e,t){(function(){"use strict";function e(t,r,n,a){return this instanceof e?(this.domain=t||void 0,this.path=r||"/",this.secure=!!n,this.script=!!a,this):new e(t,r,n,a)}function r(e,t,n){return e instanceof r?e:this instanceof r?(this.name=null,this.value=null,this.expiration_date=1/0,this.path=String(n||"/"),this.explicit_path=!1,this.domain=t||null,this.explicit_domain=!1,this.secure=!1,this.noscript=!1,e&&this.parse(e,t,n),this):new r(e,t,n)}e.All=Object.freeze(Object.create(null)),t.CookieAccessInfo=e,t.Cookie=r,r.prototype.toString=function(){var e=[this.name+"="+this.value];return this.expiration_date!==1/0&&e.push("expires="+new Date(this.expiration_date).toGMTString()),this.domain&&e.push("domain="+this.domain),this.path&&e.push("path="+this.path),this.secure&&e.push("secure"),this.noscript&&e.push("httponly"),e.join("; ")},r.prototype.toValueString=function(){return this.name+"="+this.value};var n=/[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g;function a(){var e,t,n;return this instanceof a?(e=Object.create(null),this.setCookie=function(a,i,c){var o,f;if(a=new r(a,i,c),o=a.expiration_date<=Date.now(),void 0!==e[a.name]){for(t=e[a.name],f=0;f>>1:e>>>1,e=1&e?-306674912^e>>>1:e>>>1,e=1&e?-306674912^e>>>1:e>>>1,e=1&e?-306674912^e>>>1:e>>>1,e=1&e?-306674912^e>>>1:e>>>1,e=1&e?-306674912^e>>>1:e>>>1,e=1&e?-306674912^e>>>1:e>>>1,e=1&e?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!==typeof Int32Array?new Int32Array(t):t}e.version="1.2.1";var r=t();function n(e){var t=0,r=0,n=0,a="undefined"!==typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)a[n]=e[n];for(n=0;256!=n;++n)for(r=e[n],t=256+n;t<4096;t+=256)r=a[t]=r>>>8^e[255&r];var i=[];for(n=1;16!=n;++n)i[n-1]="undefined"!==typeof Int32Array?a.subarray(256*n,256*n+256):a.slice(256*n,256*n+256);return i}var a=n(r),i=a[0],c=a[1],o=a[2],f=a[3],d=a[4],s=a[5],u=a[6],b=a[7],h=a[8],l=a[9],p=a[10],x=a[11],m=a[12],v=a[13],g=a[14];function y(e,t){for(var n=-1^t,a=0,i=e.length;a>>8^r[255&(n^e.charCodeAt(a++))];return~n}function w(e,t){for(var n=-1^t,a=e.length-15,y=0;y>8&255]^m[e[y++]^n>>16&255]^x[e[y++]^n>>>24]^p[e[y++]]^l[e[y++]]^h[e[y++]]^b[e[y++]]^u[e[y++]]^s[e[y++]]^d[e[y++]]^f[e[y++]]^o[e[y++]]^c[e[y++]]^i[e[y++]]^r[e[y++]];a+=15;while(y>>8^r[255&(n^e[y++])];return~n}function _(e,t){for(var n=-1^t,a=0,i=e.length,c=0,o=0;a>>8^r[255&(n^c)]:c<2048?(n=n>>>8^r[255&(n^(192|c>>6&31))],n=n>>>8^r[255&(n^(128|63&c))]):c>=55296&&c<57344?(c=64+(1023&c),o=1023&e.charCodeAt(a++),n=n>>>8^r[255&(n^(240|c>>8&7))],n=n>>>8^r[255&(n^(128|c>>2&63))],n=n>>>8^r[255&(n^(128|o>>6&15|(3&c)<<4))],n=n>>>8^r[255&(n^(128|63&o))]):(n=n>>>8^r[255&(n^(224|c>>12&15))],n=n>>>8^r[255&(n^(128|c>>6&63))],n=n>>>8^r[255&(n^(128|63&c))]);return~n}e.table=r,e.bstr=y,e.buf=w,e.str=_}))},49907:function(e,t,r){var n=r(15361)["Buffer"],a=r(32127),i=r(2396);e.exports=function(e){return new o(e)};var c={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function o(e){this.curveType=c[e],this.curveType||(this.curveType={name:e}),this.curve=new a.ec(this.curveType.name),this.keys=void 0}function f(e,t,r){Array.isArray(e)||(e=e.toArray());var a=new n(e);if(r&&a.lengthr){var n="rmd160"===e?new f:d(e);t=n.update(t).digest()}else t.lengtho?t=e(t):t.length0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(a,r);return t+=this._buffer(e,t),a},a.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},a.prototype._pad=function(e,t){if(0===t)return!1;while(t>>1];r=i.r28shl(r,o),a=i.r28shl(a,o),i.pc2(r,a,e.keys,c)}},f.prototype._update=function(e,t,r,n){var a=this._desState,c=i.readUInt32BE(e,t),o=i.readUInt32BE(e,t+4);i.ip(c,o,a.tmp,0),c=a.tmp[0],o=a.tmp[1],"encrypt"===this.type?this._encrypt(a,c,o,a.tmp,0):this._decrypt(a,c,o,a.tmp,0),c=a.tmp[0],o=a.tmp[1],i.writeUInt32BE(r,c,n),i.writeUInt32BE(r,o,n+4)},f.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,c=h}i.rip(o,c,n,a)},f.prototype._decrypt=function(e,t,r,n,a){for(var c=r,o=t,f=e.keys.length-2;f>=0;f-=2){var d=e.keys[f],s=e.keys[f+1];i.expand(c,e.tmp,0),d^=e.tmp[0],s^=e.tmp[1];var u=i.substitute(d,s),b=i.permute(u),h=c;c=(o^b)>>>0,o=h}i.rip(c,o,n,a)}},33040:function(e,t,r){"use strict";var n=r(14961),a=r(81923),i=r(76224),c=r(27853);function o(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),a=t.slice(8,16),i=t.slice(16,24);this.ciphers="encrypt"===e?[c.create({type:"encrypt",key:r}),c.create({type:"decrypt",key:a}),c.create({type:"encrypt",key:i})]:[c.create({type:"decrypt",key:i}),c.create({type:"encrypt",key:a}),c.create({type:"decrypt",key:r})]}function f(e){i.call(this,e);var t=new o(this.type,this.options.key);this._edeState=t}a(f,i),e.exports=f,f.create=function(e){return new f(e)},f.prototype._update=function(e,t,r,n){var a=this._edeState;a.ciphers[0]._update(e,t,r,n),a.ciphers[1]._update(r,n,r,n),a.ciphers[2]._update(r,n,r,n)},f.prototype._pad=c.prototype._pad,f.prototype._unpad=c.prototype._unpad},99379:function(e,t){"use strict";t.readUInt32BE=function(e,t){var r=e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t];return r>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var a=0,i=0,c=6;c>=0;c-=2){for(var o=0;o<=24;o+=8)a<<=1,a|=t>>>o+c&1;for(o=0;o<=24;o+=8)a<<=1,a|=e>>>o+c&1}for(c=6;c>=0;c-=2){for(o=1;o<=25;o+=8)i<<=1,i|=t>>>o+c&1;for(o=1;o<=25;o+=8)i<<=1,i|=e>>>o+c&1}r[n+0]=a>>>0,r[n+1]=i>>>0},t.rip=function(e,t,r,n){for(var a=0,i=0,c=0;c<4;c++)for(var o=24;o>=0;o-=8)a<<=1,a|=t>>>o+c&1,a<<=1,a|=e>>>o+c&1;for(c=4;c<8;c++)for(o=24;o>=0;o-=8)i<<=1,i|=t>>>o+c&1,i<<=1,i|=e>>>o+c&1;r[n+0]=a>>>0,r[n+1]=i>>>0},t.pc1=function(e,t,r,n){for(var a=0,i=0,c=7;c>=5;c--){for(var o=0;o<=24;o+=8)a<<=1,a|=t>>o+c&1;for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+c&1}for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+c&1;for(c=1;c<=3;c++){for(o=0;o<=24;o+=8)i<<=1,i|=t>>o+c&1;for(o=0;o<=24;o+=8)i<<=1,i|=e>>o+c&1}for(o=0;o<=24;o+=8)i<<=1,i|=e>>o+c&1;r[n+0]=a>>>0,r[n+1]=i>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,a){for(var i=0,c=0,o=r.length>>>1,f=0;f>>r[f]&1;for(f=o;f>>r[f]&1;n[a+0]=i>>>0,n[a+1]=c>>>0},t.expand=function(e,t,r){var n=0,a=0;n=(1&e)<<5|e>>>27;for(var i=23;i>=15;i-=4)n<<=6,n|=e>>>i&63;for(i=11;i>=3;i-=4)a|=e>>>i&63,a<<=6;a|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=a>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,a=0;a<4;a++){var i=e>>>18-6*a&63,c=n[64*a+i];r<<=4,r|=c}for(a=0;a<4;a++){i=t>>>18-6*a&63,c=n[256+64*a+i];r<<=4,r|=c}return r>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>a[r]&1;return t>>>0},t.padSplit=function(e,t,r){var n=e.toString(2);while(n.lengthe)r.ishrn(1);if(r.isEven()&&r.iadd(f),r.testn(1)||r.iadd(d),t.cmp(d)){if(!t.cmp(s))while(r.mod(u).cmp(b))r.iadd(l)}else while(r.mod(i).cmp(h))r.iadd(l);if(c=r.shrn(1),m(c)&&m(r)&&v(c)&&v(r)&&o.test(c)&&o.test(r))return r}}},98716:function(e,t,r){"use strict";r(21703);var n={single_source_shortest_paths:function(e,t,r){var a={},i={};i[t]=0;var c,o,f,d,s,u,b,h,l,p=n.PriorityQueue.make();p.push(t,0);while(!p.empty())for(f in c=p.pop(),o=c.value,d=c.cost,s=e[o]||{},s)s.hasOwnProperty(f)&&(u=s[f],b=d+u,h=i[f],l="undefined"===typeof i[f],(l||h>b)&&(i[f]=b,p.push(f,b),a[f]=o));if("undefined"!==typeof r&&"undefined"===typeof i[r]){var x=["Could not find a path from ",t," to ",r,"."].join("");throw new Error(x)}return a},extract_shortest_path_from_predecessor_list:function(e,t){var r=[],n=t;while(n)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,t,r){var a=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(a,r)},PriorityQueue:{make:function(e){var t,r=n.PriorityQueue,a={};for(t in e=e||{},r)r.hasOwnProperty(t)&&(a[t]=r[t]);return a.queue=[],a.sorter=e.sorter||r.default_sorter,a},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=n},32127:function(e,t,r){"use strict";var n=t;n.version=r(18597).i8,n.utils=r(87913),n.rand=r(31482),n.curve=r(11626),n.curves=r(69474),n.ec=r(98082),n.eddsa=r(39322)},57661:function(e,t,r){"use strict";r(21703);var n=r(21646),a=r(87913),i=a.getNAF,c=a.getJSF,o=a.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function d(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){o(e.precomputed);var r=e._getDoubles(),n=i(t,1,this._bitLength),a=(1<=c;s--)f=(f<<1)+n[s];d.push(f)}for(var u=this.jpoint(null,null,null),b=this.jpoint(null,null,null),h=a;h>0;h--){for(c=0;c=0;d--){for(var s=0;d>=0&&0===c[d];d--)s++;if(d>=0&&s++,f=f.dblp(s),d<0)break;var u=c[d];o(0!==u),f="affine"===e.type?u>0?f.mixedAdd(a[u-1>>1]):f.mixedAdd(a[-u-1>>1].neg()):u>0?f.add(a[u-1>>1]):f.add(a[-u-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,a){var o,f,d,s=this._wnafT1,u=this._wnafT2,b=this._wnafT3,h=0;for(o=0;o=1;o-=2){var p=o-1,x=o;if(1===s[p]&&1===s[x]){var m=[t[p],null,null,t[x]];0===t[p].y.cmp(t[x].y)?(m[1]=t[p].add(t[x]),m[2]=t[p].toJ().mixedAdd(t[x].neg())):0===t[p].y.cmp(t[x].y.redNeg())?(m[1]=t[p].toJ().mixedAdd(t[x]),m[2]=t[p].add(t[x].neg())):(m[1]=t[p].toJ().mixedAdd(t[x]),m[2]=t[p].toJ().mixedAdd(t[x].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],g=c(r[p],r[x]);for(h=Math.max(g[0].length,h),b[p]=new Array(h),b[x]=new Array(h),f=0;f=0;o--){var k=0;while(o>=0){var A=!0;for(f=0;f=0&&k++,_=_.dblp(k),o<0)break;for(f=0;f0?d=u[f][E-1>>1]:E<0&&(d=u[f][-E-1>>1].neg()),_="affine"===d.type?_.mixedAdd(d):_.add(d))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},d.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,a=0;a":""},d.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},d.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),a=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),i=n.redAdd(t),c=i.redSub(r),o=n.redSub(t),f=a.redMul(c),d=i.redMul(o),s=a.redMul(o),u=c.redMul(i);return this.curve.point(f,d,u,s)},d.prototype._projDbl=function(){var e,t,r,n,a,i,c=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),f=this.y.redSqr();if(this.curve.twisted){n=this.curve._mulA(o);var d=n.redAdd(f);this.zOne?(e=c.redSub(o).redSub(f).redMul(d.redSub(this.curve.two)),t=d.redMul(n.redSub(f)),r=d.redSqr().redSub(d).redSub(d)):(a=this.z.redSqr(),i=d.redSub(a).redISub(a),e=c.redSub(o).redISub(f).redMul(i),t=d.redMul(n.redSub(f)),r=d.redMul(i))}else n=o.redAdd(f),a=this.curve._mulC(this.z).redSqr(),i=n.redSub(a).redSub(a),e=this.curve._mulC(c.redISub(n)).redMul(i),t=this.curve._mulC(n).redMul(o.redISub(f)),r=n.redMul(i);return this.curve.point(e,t,r)},d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},d.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),a=this.z.redMul(e.z.redAdd(e.z)),i=r.redSub(t),c=a.redSub(n),o=a.redAdd(n),f=r.redAdd(t),d=i.redMul(c),s=o.redMul(f),u=i.redMul(f),b=c.redMul(o);return this.curve.point(d,s,b,u)},d.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),a=n.redSqr(),i=this.x.redMul(e.x),c=this.y.redMul(e.y),o=this.curve.d.redMul(i).redMul(c),f=a.redSub(o),d=a.redAdd(o),s=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(c),u=n.redMul(f).redMul(s);return this.curve.twisted?(t=n.redMul(d).redMul(c.redSub(this.curve._mulA(i))),r=f.redMul(d)):(t=n.redMul(d).redMul(c.redSub(i)),r=this.curve._mulC(f).redMul(d)),this.curve.point(u,t,r)},d.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},d.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},d.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},d.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},d.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},d.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},d.prototype.getX=function(){return this.normalize(),this.x.fromRed()},d.prototype.getY=function(){return this.normalize(),this.y.fromRed()},d.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},d.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},d.prototype.toP=d.prototype.normalize,d.prototype.mixedAdd=d.prototype.add},11626:function(e,t,r){"use strict";var n=t;n.base=r(57661),n.short=r(78441),n.mont=r(96433),n.edwards=r(51727)},96433:function(e,t,r){"use strict";r(21703);var n=r(21646),a=r(81923),i=r(57661),c=r(87913);function o(e){i.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(e,t,r){i.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}a(o,i),e.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t),a=n.redSqrt();return 0===a.redSqr().cmp(n)},a(f,i.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(c.toArray(e,t),1)},o.prototype.point=function(e,t){return new f(this,e,t)},o.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),n=r.redSqr(),a=t.redSub(n),i=t.redMul(n),c=a.redMul(n.redAdd(this.curve.a24.redMul(a)));return this.curve.point(i,c)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),a=e.x.redAdd(e.z),i=e.x.redSub(e.z),c=i.redMul(r),o=a.redMul(n),f=t.z.redMul(c.redAdd(o).redSqr()),d=t.x.redMul(c.redISub(o).redSqr());return this.curve.point(f,d)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),a=this,i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var c=i.length-1;c>=0;c--)0===i[c]?(r=r.diffAdd(n,a),n=n.dbl()):(n=r.diffAdd(n,a),r=r.dbl());return n},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},78441:function(e,t,r){"use strict";r(21703);var n=r(87913),a=r(21646),i=r(81923),c=r(57661),o=n.assert;function f(e){c.call(this,"short",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function d(e,t,r,n){c.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(t,16),this.y=new a(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 s(e,t,r,n){c.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(t,16),this.y=new a(r,16),this.z=new a(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}i(f,c),e.exports=f,f.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r,n;if(e.beta)t=new a(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=i[0].cmp(i[1])<0?i[0]:i[1],t=t.toRed(this.red)}if(e.lambda)r=new a(e.lambda,16);else{var c=this._getEndoRoots(this.n);0===this.g.mul(c[0]).x.cmp(this.g.x.redMul(t))?r=c[0]:(r=c[1],o(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return n=e.basis?e.basis.map((function(e){return{a:new a(e.a,16),b:new a(e.b,16)}})):this._getEndoBasis(r),{beta:t,lambda:r,basis:n}}},f.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:a.mont(e),r=new a(2).toRed(t).redInvm(),n=r.redNeg(),i=new a(3).toRed(t).redNeg().redSqrt().redMul(r),c=n.redAdd(i).fromRed(),o=n.redSub(i).fromRed();return[c,o]},f.prototype._getEndoBasis=function(e){var t,r,n,i,c,o,f,d,s,u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),b=e,h=this.n.clone(),l=new a(1),p=new a(0),x=new a(0),m=new a(1),v=0;while(0!==b.cmpn(0)){var g=h.div(b);d=h.sub(g.mul(b)),s=x.sub(g.mul(l));var y=m.sub(g.mul(p));if(!n&&d.cmp(u)<0)t=f.neg(),r=l,n=d.neg(),i=s;else if(n&&2===++v)break;f=d,h=b,b=d,x=l,l=s,m=p,p=y}c=d.neg(),o=s;var w=n.sqr().add(i.sqr()),_=c.sqr().add(o.sqr());return _.cmp(w)>=0&&(c=t,o=r),n.negative&&(n=n.neg(),i=i.neg()),c.negative&&(c=c.neg(),o=o.neg()),[{a:n,b:i},{a:c,b:o}]},f.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],a=n.b.mul(e).divRound(this.n),i=r.b.neg().mul(e).divRound(this.n),c=a.mul(r.a),o=i.mul(n.a),f=a.mul(r.b),d=i.mul(n.b),s=e.sub(c).sub(o),u=f.add(d).neg();return{k1:s,k2:u}},f.prototype.pointFromX=function(e,t){e=new a(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},f.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(a).cmpn(0)},f.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,a=this._endoWnafT2,i=0;i":""},d.prototype.isInfinity=function(){return this.inf},d.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},d.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),a=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),i=a.redSqr().redISub(this.x.redAdd(this.x)),c=a.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,c)},d.prototype.getX=function(){return this.x.fromRed()},d.prototype.getY=function(){return this.y.fromRed()},d.prototype.mul=function(e){return e=new a(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},d.prototype.mulAdd=function(e,t,r){var n=[this,t],a=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,a):this.curve._wnafMulAdd(1,n,a,2)},d.prototype.jmulAdd=function(e,t,r){var n=[this,t],a=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,a,!0):this.curve._wnafMulAdd(1,n,a,2,!0)},d.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},d.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},d.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},i(s,c.BasePoint),f.prototype.jpoint=function(e,t,r){return new s(this,e,t,r)},s.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},s.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},s.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),a=e.x.redMul(r),i=this.y.redMul(t.redMul(e.z)),c=e.y.redMul(r.redMul(this.z)),o=n.redSub(a),f=i.redSub(c);if(0===o.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var d=o.redSqr(),s=d.redMul(o),u=n.redMul(d),b=f.redSqr().redIAdd(s).redISub(u).redISub(u),h=f.redMul(u.redISub(b)).redISub(i.redMul(s)),l=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(b,h,l)},s.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),a=this.y,i=e.y.redMul(t).redMul(this.z),c=r.redSub(n),o=a.redSub(i);if(0===c.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=c.redSqr(),d=f.redMul(c),s=r.redMul(f),u=o.redSqr().redIAdd(d).redISub(s).redISub(s),b=o.redMul(s.redISub(u)).redISub(a.redMul(d)),h=this.z.redMul(c);return this.curve.jpoint(u,b,h)},s.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(a),0===this.x.cmp(r))return!0}},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},69474:function(e,t,r){"use strict";var n,a=t,i=r(78730),c=r(11626),o=r(87913),f=o.assert;function d(e){"short"===e.type?this.curve=new c.short(e):"edwards"===e.type?this.curve=new c.edwards(e):this.curve=new c.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,f(this.g.validate(),"Invalid curve"),f(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(a,e,{configurable:!0,enumerable:!0,get:function(){var r=new d(t);return Object.defineProperty(a,e,{configurable:!0,enumerable:!0,value:r}),r}})}a.PresetCurve=d,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:i.sha384,gRed:!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"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:i.sha512,gRed:!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"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(36027)}catch(u){n=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},98082:function(e,t,r){"use strict";r(21703);var n=r(21646),a=r(72570),i=r(87913),c=r(69474),o=r(31482),f=i.assert,d=r(96964),s=r(4958);function u(e){if(!(this instanceof u))return new u(e);"string"===typeof e&&(f(Object.prototype.hasOwnProperty.call(c,e),"Unknown curve "+e),e=c[e]),e instanceof c.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=u,u.prototype.keyPair=function(e){return new d(this,e)},u.prototype.keyFromPrivate=function(e,t){return d.fromPrivate(this,e,t)},u.prototype.keyFromPublic=function(e,t){return d.fromPublic(this,e,t)},u.prototype.genKeyPair=function(e){e||(e={});for(var t=new a({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new n(2));;){var c=new n(t.generate(r));if(!(c.cmp(i)>0))return c.iaddn(1),this.keyFromPrivate(c)}},u.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},u.prototype.sign=function(e,t,r,i){"object"===typeof r&&(i=r,r=null),i||(i={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var c=this.n.byteLength(),o=t.getPrivate().toArray("be",c),f=e.toArray("be",c),d=new a({hash:this.hash,entropy:o,nonce:f,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new n(1)),b=0;;b++){var h=i.k?i.k(b):new n(d.generate(this.n.byteLength()));if(h=this._truncateToN(h,!0),!(h.cmpn(1)<=0||h.cmp(u)>=0)){var l=this.g.mul(h);if(!l.isInfinity()){var p=l.getX(),x=p.umod(this.n);if(0!==x.cmpn(0)){var m=h.invm(this.n).mul(x.mul(t.getPrivate()).iadd(e));if(m=m.umod(this.n),0!==m.cmpn(0)){var v=(l.getY().isOdd()?1:0)|(0!==p.cmp(x)?2:0);return i.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),v^=1),new s({r:x,s:m,recoveryParam:v})}}}}}},u.prototype.verify=function(e,t,r,a){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,a),t=new s(t,"hex");var i=t.r,c=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(c.cmpn(1)<0||c.cmp(this.n)>=0)return!1;var o,f=c.invm(this.n),d=f.mul(e).umod(this.n),u=f.mul(i).umod(this.n);return this.curve._maxwellTrick?(o=this.g.jmulAdd(d,r.getPublic(),u),!o.isInfinity()&&o.eqXToP(i)):(o=this.g.mulAdd(d,r.getPublic(),u),!o.isInfinity()&&0===o.getX().umod(this.n).cmp(i))},u.prototype.recoverPubKey=function(e,t,r,a){f((3&r)===r,"The recovery param is more than two bits"),t=new s(t,a);var i=this.n,c=new n(e),o=t.r,d=t.s,u=1&r,b=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&b)throw new Error("Unable to find sencond key candinate");o=b?this.curve.pointFromX(o.add(this.curve.n),u):this.curve.pointFromX(o,u);var h=t.r.invm(i),l=i.sub(c).mul(h).umod(i),p=d.mul(h).umod(i);return this.g.mulAdd(l,o,p)},u.prototype.getKeyRecoveryParam=function(e,t,r,n){if(t=new s(t,n),null!==t.recoveryParam)return t.recoveryParam;for(var a=0;a<4;a++){var i;try{i=this.recoverPubKey(e,t,a)}catch(e){continue}if(i.eq(r))return a}throw new Error("Unable to find valid recovery factor")}},96964:function(e,t,r){"use strict";var n=r(21646),a=r(87913),i=a.assert;function c(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=c,c.fromPublic=function(e,t,r){return t instanceof c?t:new c(e,{pub:t,pubEnc:r})},c.fromPrivate=function(e,t,r){return t instanceof c?t:new c(e,{priv:t,privEnc:r})},c.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},c.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},c.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},c.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},c.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},c.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},c.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},c.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},c.prototype.inspect=function(){return""}},4958:function(e,t,r){"use strict";var n=r(21646),a=r(87913),i=a.assert;function c(e,t){if(e instanceof c)return e;this._importDER(e,t)||(i(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function o(){this.place=0}function f(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var a=0,i=0,c=t.place;i>>=0;return!(a<=127)&&(t.place=c,a)}function d(e){var t=0,r=e.length-1;while(!e[t]&&!(128&e[t+1])&&t>>3);e.push(128|r);while(--r)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=c,c.prototype._importDER=function(e,t){e=a.toArray(e,t);var r=new o;if(48!==e[r.place++])return!1;var i=f(e,r);if(!1===i)return!1;if(i+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var c=f(e,r);if(!1===c)return!1;var d=e.slice(r.place,c+r.place);if(r.place+=c,2!==e[r.place++])return!1;var s=f(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var u=e.slice(r.place,s+r.place);if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new n(d),this.s=new n(u),this.recoveryParam=null,!0},c.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=d(t),r=d(r);while(!r[0]&&!(128&r[1]))r=r.slice(1);var n=[2];s(n,t.length),n=n.concat(t),n.push(2),s(n,r.length);var i=n.concat(r),c=[48];return s(c,i.length),c=c.concat(i),a.encode(c,e)}},39322:function(e,t,r){"use strict";var n=r(78730),a=r(69474),i=r(87913),c=i.assert,o=i.parseBytes,f=r(64586),d=r(96717);function s(e){if(c("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof s))return new s(e);e=a[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=s,s.prototype.sign=function(e,t){e=o(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),a=this.g.mul(n),i=this.encodePoint(a),c=this.hashInt(i,r.pubBytes(),e).mul(r.priv()),f=n.add(c).umod(this.curve.n);return this.makeSignature({R:a,S:f,Rencoded:i})},s.prototype.verify=function(e,t,r){e=o(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),a=this.hashInt(t.Rencoded(),n.pubBytes(),e),i=this.g.mul(t.S()),c=t.R().add(n.pub().mul(a));return c.eq(i)},s.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(a>>1)-1?(a>>1)-f:f,i.isubn(o)):o=0,n[c]=o,i.iushrn(1)}return n}function f(e,t){var r=[[],[]];e=e.clone(),t=t.clone();var n,a=0,i=0;while(e.cmpn(-a)>0||t.cmpn(-i)>0){var c,o,f=e.andln(3)+a&3,d=t.andln(3)+i&3;3===f&&(f=-1),3===d&&(d=-1),0===(1&f)?c=0:(n=e.andln(7)+a&7,c=3!==n&&5!==n||2!==d?f:-f),r[0].push(c),0===(1&d)?o=0:(n=t.andln(7)+i&7,o=3!==n&&5!==n||2!==f?d:-d),r[1].push(o),2*a===c+1&&(a=1-a),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r}function d(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function s(e){return"string"===typeof e?n.toArray(e,"hex"):e}function u(e){return new a(e,"hex","le")}n.assert=i,n.toArray=c.toArray,n.zero2=c.zero2,n.toHex=c.toHex,n.encode=c.encode,n.getNAF=o,n.getJSF=f,n.cachedProperty=d,n.parseBytes=s,n.intFromLE=u},21646:function(e,t,r){e=r.nmd(e),r(21703),function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var c;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{c="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(85568).Buffer}catch(S){}function o(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function f(e,t,r){var n=o(e,r);return r-1>=t&&(n|=o(e,r-1)<<4),n}function d(e,t,r,n){for(var a=0,i=Math.min(e.length,r),c=t;c=49?o-49+10:o>=17?o-17+10:o}return a}i.isBN=function(e){return e instanceof i||null!==e&&"object"===typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&(a++,this.negative=1),a=0;a-=3)c=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=c<>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=f(e,t,n)<=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8;else{var o=e.length-t;for(n=o%2===0?t+1:t;n=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8}this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,c=i%n,o=Math.min(i,i-c)+r,f=0,s=r;s1&&0===this.words[this.length-1])this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var s=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e){for(var t=new Array(e.bitLength()),r=0;r>>a}return t}function l(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],c=a*i,o=67108863&c,f=c/67108864|0;r.words[0]=o;for(var d=1;d>>26,u=67108863&f,b=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=b;h++){var l=d-h|0;a=0|e.words[l],i=0|t.words[h],c=a*i+u,s+=c/67108864|0,u=67108863&c}r.words[d]=0|u,f=0|s}return 0!==f?r.words[d]=0|f:r.length--,r.strip()}i.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var a=0,i=0,c=0;c>>24-a&16777215,r=0!==i||c!==this.length-1?s[6-f.length]+f+r:f+r,a+=2,a>=26&&(a-=26,c--)}0!==i&&(r=i.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=u[e],h=b[e];r="";var l=this.clone();l.negative=0;while(!l.isZero()){var p=l.modn(h).toString(e);l=l.idivn(h),r=l.isZero()?p+r:s[d-p.length]+p+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n("undefined"!==typeof c),this.toArrayLike(c,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var c,o,f="le"===t,d=new e(i),s=this.clone();if(f){for(o=0;!s.isZero();o++)c=s.andln(255),s.iushrn(8),d[o]=c;for(;o=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,c=0;c>26,this.words[c]=67108863&t;for(;0!==i&&c>26,this.words[c]=67108863&t;if(0===i&&c>>13,h=0|c[1],l=8191&h,p=h>>>13,x=0|c[2],m=8191&x,v=x>>>13,g=0|c[3],y=8191&g,w=g>>>13,_=0|c[4],M=8191&_,k=_>>>13,A=0|c[5],E=8191&A,S=A>>>13,T=0|c[6],C=8191&T,P=T>>>13,O=0|c[7],R=8191&O,I=O>>>13,B=0|c[8],L=8191&B,N=B>>>13,U=0|c[9],j=8191&U,D=U>>>13,F=0|o[0],H=8191&F,q=F>>>13,z=0|o[1],K=8191&z,$=z>>>13,G=0|o[2],V=8191&G,W=G>>>13,Z=0|o[3],J=8191&Z,Y=Z>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ae=0|o[6],ie=8191&ae,ce=ae>>>13,oe=0|o[7],fe=8191&oe,de=oe>>>13,se=0|o[8],ue=8191&se,be=se>>>13,he=0|o[9],le=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(u,H),a=Math.imul(u,q),a=a+Math.imul(b,H)|0,i=Math.imul(b,q);var xe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(l,H),a=Math.imul(l,q),a=a+Math.imul(p,H)|0,i=Math.imul(p,q),n=n+Math.imul(u,K)|0,a=a+Math.imul(u,$)|0,a=a+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0;var me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,H),a=Math.imul(m,q),a=a+Math.imul(v,H)|0,i=Math.imul(v,q),n=n+Math.imul(l,K)|0,a=a+Math.imul(l,$)|0,a=a+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(u,V)|0,a=a+Math.imul(u,W)|0,a=a+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ve=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(y,H),a=Math.imul(y,q),a=a+Math.imul(w,H)|0,i=Math.imul(w,q),n=n+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(l,V)|0,a=a+Math.imul(l,W)|0,a=a+Math.imul(p,V)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(u,J)|0,a=a+Math.imul(u,Y)|0,a=a+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ge=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(M,H),a=Math.imul(M,q),a=a+Math.imul(k,H)|0,i=Math.imul(k,q),n=n+Math.imul(y,K)|0,a=a+Math.imul(y,$)|0,a=a+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,n=n+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0,a=a+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,n=n+Math.imul(u,Q)|0,a=a+Math.imul(u,ee)|0,a=a+Math.imul(b,Q)|0,i=i+Math.imul(b,ee)|0;var ye=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,H),a=Math.imul(E,q),a=a+Math.imul(S,H)|0,i=Math.imul(S,q),n=n+Math.imul(M,K)|0,a=a+Math.imul(M,$)|0,a=a+Math.imul(k,K)|0,i=i+Math.imul(k,$)|0,n=n+Math.imul(y,V)|0,a=a+Math.imul(y,W)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,a=a+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,n=n+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0,a=a+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(u,re)|0,a=a+Math.imul(u,ne)|0,a=a+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var we=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,H),a=Math.imul(C,q),a=a+Math.imul(P,H)|0,i=Math.imul(P,q),n=n+Math.imul(E,K)|0,a=a+Math.imul(E,$)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(M,V)|0,a=a+Math.imul(M,W)|0,a=a+Math.imul(k,V)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,a=a+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,n=n+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,a=a+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0,a=a+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(u,ie)|0,a=a+Math.imul(u,ce)|0,a=a+Math.imul(b,ie)|0,i=i+Math.imul(b,ce)|0;var _e=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,H),a=Math.imul(R,q),a=a+Math.imul(I,H)|0,i=Math.imul(I,q),n=n+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,a=a+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,n=n+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,a=a+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,a=a+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,a=a+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,a=a+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(l,ie)|0,a=a+Math.imul(l,ce)|0,a=a+Math.imul(p,ie)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(u,fe)|0,a=a+Math.imul(u,de)|0,a=a+Math.imul(b,fe)|0,i=i+Math.imul(b,de)|0;var Me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,H),a=Math.imul(L,q),a=a+Math.imul(N,H)|0,i=Math.imul(N,q),n=n+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,a=a+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(C,V)|0,a=a+Math.imul(C,W)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(E,J)|0,a=a+Math.imul(E,Y)|0,a=a+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,n=n+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,a=a+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,a=a+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(m,ie)|0,a=a+Math.imul(m,ce)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(l,fe)|0,a=a+Math.imul(l,de)|0,a=a+Math.imul(p,fe)|0,i=i+Math.imul(p,de)|0,n=n+Math.imul(u,ue)|0,a=a+Math.imul(u,be)|0,a=a+Math.imul(b,ue)|0,i=i+Math.imul(b,be)|0;var ke=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,H),a=Math.imul(j,q),a=a+Math.imul(D,H)|0,i=Math.imul(D,q),n=n+Math.imul(L,K)|0,a=a+Math.imul(L,$)|0,a=a+Math.imul(N,K)|0,i=i+Math.imul(N,$)|0,n=n+Math.imul(R,V)|0,a=a+Math.imul(R,W)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(C,J)|0,a=a+Math.imul(C,Y)|0,a=a+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,n=n+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,a=a+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,a=a+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(y,ie)|0,a=a+Math.imul(y,ce)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(v,de)|0,n=n+Math.imul(l,ue)|0,a=a+Math.imul(l,be)|0,a=a+Math.imul(p,ue)|0,i=i+Math.imul(p,be)|0,n=n+Math.imul(u,le)|0,a=a+Math.imul(u,pe)|0,a=a+Math.imul(b,le)|0,i=i+Math.imul(b,pe)|0;var Ae=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),a=Math.imul(j,$),a=a+Math.imul(D,K)|0,i=Math.imul(D,$),n=n+Math.imul(L,V)|0,a=a+Math.imul(L,W)|0,a=a+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,n=n+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,a=a+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,a=a+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,a=a+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(M,ie)|0,a=a+Math.imul(M,ce)|0,a=a+Math.imul(k,ie)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(m,ue)|0,a=a+Math.imul(m,be)|0,a=a+Math.imul(v,ue)|0,i=i+Math.imul(v,be)|0,n=n+Math.imul(l,le)|0,a=a+Math.imul(l,pe)|0,a=a+Math.imul(p,le)|0,i=i+Math.imul(p,pe)|0;var Ee=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),a=Math.imul(j,W),a=a+Math.imul(D,V)|0,i=Math.imul(D,W),n=n+Math.imul(L,J)|0,a=a+Math.imul(L,Y)|0,a=a+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,n=n+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,a=a+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,a=a+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(E,ie)|0,a=a+Math.imul(E,ce)|0,a=a+Math.imul(S,ie)|0,i=i+Math.imul(S,ce)|0,n=n+Math.imul(M,fe)|0,a=a+Math.imul(M,de)|0,a=a+Math.imul(k,fe)|0,i=i+Math.imul(k,de)|0,n=n+Math.imul(y,ue)|0,a=a+Math.imul(y,be)|0,a=a+Math.imul(w,ue)|0,i=i+Math.imul(w,be)|0,n=n+Math.imul(m,le)|0,a=a+Math.imul(m,pe)|0,a=a+Math.imul(v,le)|0,i=i+Math.imul(v,pe)|0;var Se=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,J),a=Math.imul(j,Y),a=a+Math.imul(D,J)|0,i=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,a=a+Math.imul(N,Q)|0,i=i+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,a=a+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(C,ie)|0,a=a+Math.imul(C,ce)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,a=a+Math.imul(E,de)|0,a=a+Math.imul(S,fe)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(M,ue)|0,a=a+Math.imul(M,be)|0,a=a+Math.imul(k,ue)|0,i=i+Math.imul(k,be)|0,n=n+Math.imul(y,le)|0,a=a+Math.imul(y,pe)|0,a=a+Math.imul(w,le)|0,i=i+Math.imul(w,pe)|0;var Te=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Q),a=Math.imul(j,ee),a=a+Math.imul(D,Q)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,a=a+Math.imul(L,ne)|0,a=a+Math.imul(N,re)|0,i=i+Math.imul(N,ne)|0,n=n+Math.imul(R,ie)|0,a=a+Math.imul(R,ce)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(I,ce)|0,n=n+Math.imul(C,fe)|0,a=a+Math.imul(C,de)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(P,de)|0,n=n+Math.imul(E,ue)|0,a=a+Math.imul(E,be)|0,a=a+Math.imul(S,ue)|0,i=i+Math.imul(S,be)|0,n=n+Math.imul(M,le)|0,a=a+Math.imul(M,pe)|0,a=a+Math.imul(k,le)|0,i=i+Math.imul(k,pe)|0;var Ce=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),a=Math.imul(j,ne),a=a+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,a=a+Math.imul(L,ce)|0,a=a+Math.imul(N,ie)|0,i=i+Math.imul(N,ce)|0,n=n+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(I,de)|0,n=n+Math.imul(C,ue)|0,a=a+Math.imul(C,be)|0,a=a+Math.imul(P,ue)|0,i=i+Math.imul(P,be)|0,n=n+Math.imul(E,le)|0,a=a+Math.imul(E,pe)|0,a=a+Math.imul(S,le)|0,i=i+Math.imul(S,pe)|0;var Pe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,ie),a=Math.imul(j,ce),a=a+Math.imul(D,ie)|0,i=Math.imul(D,ce),n=n+Math.imul(L,fe)|0,a=a+Math.imul(L,de)|0,a=a+Math.imul(N,fe)|0,i=i+Math.imul(N,de)|0,n=n+Math.imul(R,ue)|0,a=a+Math.imul(R,be)|0,a=a+Math.imul(I,ue)|0,i=i+Math.imul(I,be)|0,n=n+Math.imul(C,le)|0,a=a+Math.imul(C,pe)|0,a=a+Math.imul(P,le)|0,i=i+Math.imul(P,pe)|0;var Oe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,fe),a=Math.imul(j,de),a=a+Math.imul(D,fe)|0,i=Math.imul(D,de),n=n+Math.imul(L,ue)|0,a=a+Math.imul(L,be)|0,a=a+Math.imul(N,ue)|0,i=i+Math.imul(N,be)|0,n=n+Math.imul(R,le)|0,a=a+Math.imul(R,pe)|0,a=a+Math.imul(I,le)|0,i=i+Math.imul(I,pe)|0;var Re=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,ue),a=Math.imul(j,be),a=a+Math.imul(D,ue)|0,i=Math.imul(D,be),n=n+Math.imul(L,le)|0,a=a+Math.imul(L,pe)|0,a=a+Math.imul(N,le)|0,i=i+Math.imul(N,pe)|0;var Ie=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,le),a=Math.imul(j,pe),a=a+Math.imul(D,le)|0,i=Math.imul(D,pe);var Be=(d+n|0)+((8191&a)<<13)|0;return d=(i+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=xe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=we,f[6]=_e,f[7]=Me,f[8]=ke,f[9]=Ae,f[10]=Ee,f[11]=Se,f[12]=Te,f[13]=Ce,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ie,f[18]=Be,0!==d&&(f[19]=d,r.length++),r};function x(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0,a+=c>>>26,c&=67108863}r.words[i]=o,n=c,c=a}return 0!==n?r.words[i]=n:r.length--,r.strip()}function m(e,t,r){var n=new v;return n.mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=l),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?l(this,e,t):n<1024?x(this,e,t):m(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,a,i){for(var c=0;c>>=1)a++;return 1<>>=13,r[2*c+1]=8191&i,i>>>=13;for(c=2*t;c>=26,t+=a/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=h(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var c=0;for(t=0;t>>26-r}c&&(this.words[t]=c,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,c=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<c)for(this.length-=c,d=0;d=0&&(0!==s||d>=a);d--){var u=0|this.words[d];this.words[d]=s<<26-i|u>>>i,s=u&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===o)return this.strip();for(n(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),a=e,c=0|a.words[a.length-1],o=this._countBits(c);r=26-o,0!==r&&(a=a.ushln(r),n.iushln(r),c=0|a.words[a.length-1]);var f,d=n.length-a.length;if("mod"!==t){f=new i(null),f.length=d+1,f.words=new Array(f.length);for(var s=0;s=0;b--){var h=67108864*(0|n.words[a.length+b])+(0|n.words[a.length+b-1]);h=Math.min(h/c|0,67108863),n._ishlnsubmul(a,h,b);while(0!==n.negative)h--,n.negative=0,n._ishlnsubmul(a,1,b),n.isZero()||(n.negative^=1);f&&(f.words[b]=h)}return f&&f.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.iadd(e)),{div:a,mod:c}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.isub(e)),{div:o.div,mod:c}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,c,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,a=this.length-1;a>=0;a--)r=(t*r+(0|this.words[a]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*t;this.words[r]=a/e|0,t=a%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a=new i(1),c=new i(0),o=new i(0),f=new i(1),d=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++d;var s=r.clone(),u=t.clone();while(!t.isZero()){for(var b=0,h=1;0===(t.words[0]&h)&&b<26;++b,h<<=1);if(b>0){t.iushrn(b);while(b-- >0)(a.isOdd()||c.isOdd())&&(a.iadd(s),c.isub(u)),a.iushrn(1),c.iushrn(1)}for(var l=0,p=1;0===(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(u)),o.iushrn(1),f.iushrn(1)}t.cmp(r)>=0?(t.isub(r),a.isub(o),c.isub(f)):(r.isub(t),o.isub(a),f.isub(c))}return{a:o,b:f,gcd:r.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a,c=new i(1),o=new i(0),f=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var d=0,s=1;0===(t.words[0]&s)&&d<26;++d,s<<=1);if(d>0){t.iushrn(d);while(d-- >0)c.isOdd()&&c.iadd(f),c.iushrn(1)}for(var u=0,b=1;0===(r.words[0]&b)&&u<26;++u,b<<=1);if(u>0){r.iushrn(u);while(u-- >0)o.isOdd()&&o.iadd(f),o.iushrn(1)}t.cmp(r)>=0?(t.isub(r),c.isub(o)):(r.isub(t),o.isub(c))}return a=0===t.cmpn(1)?c:o,a.cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[c]=o}return 0!==i&&(this.words[c]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new A(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},a(w,y),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=c}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new _;else if("p192"===e)t=new M;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return g[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}var a=this.m.subn(1),c=0;while(!a.isZero()&&0===a.andln(1))c++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),f=o.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();s=new i(2*s*s).toRed(this);while(0!==this.pow(s,d).cmp(f))s.redIAdd(f);var u=this.pow(s,a),b=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),l=c;while(0!==h.cmp(o)){for(var p=h,x=0;0!==p.cmp(o);x++)p=p.redSqr();n(x=0;a--){for(var s=t.words[a],u=d-1;u>=0;u--){var b=s>>u&1;c!==n[0]&&(c=this.sqr(c)),0!==b||0!==o?(o<<=1,o|=b,f++,(f===r||0===a&&0===u)&&(c=this.mul(c,n[o]),f=0,o=0)):f=0}d=26}return c},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},a(E,A),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),c=a;return a.cmp(this.m)>=0?c=a.isub(this.m):a.cmpn(0)<0&&(c=a.iadd(this.m)),c._forceRed(this)},E.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}(e,this)},7179:function(e,t,r){r(21703);var n=function(){if("object"===typeof self&&self)return self;if("object"===typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"===typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},94890:function(e,t,r){r(50402),r(33018);const n=r(43353),a=1e3,i=(e,t)=>e+t,c=["sync","latest"];class o extends n{constructor(e={}){super(),this._blockResetDuration=e.blockResetDuration||20*a,this._blockResetTimeout,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){if(this._currentBlock)return this._currentBlock;const e=await new Promise((e=>this.once("latest",e)));return e}removeAllListeners(e){e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e,t){c.includes(e)&&this._maybeStart()}_onRemoveListener(e,t){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return c.map((e=>this.listenerCount(e))).reduce(i)}_newPotentialLatest(e){const t=this._currentBlock;t&&f(e)<=f(t)||this._setCurrentBlock(e)}_setCurrentBlock(e){const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}function f(e){return Number.parseInt(e,16)}e.exports=o},97965:function(e,t,r){r(21703);const n=r(33018),a=r(94890),i=1e3;class c extends a{constructor(e={}){if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");const t=e.pollingInterval||20*i,r=e.retryTimeout||t/10,n=void 0===e.keepEventLoopActive||e.keepEventLoopActive,a=e.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:t},e)),this._provider=e.provider,this._pollingInterval=t,this._retryTimeout=r,this._keepEventLoopActive=n,this._setSkipCacheFlag=a}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch((e=>this.emit("error",e)))}async _performSync(){while(this._isRunning)try{await this._updateLatestBlock(),await o(this._pollingInterval,!this._keepEventLoopActive)}catch(e){const r=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${e.stack}`);try{this.emit("error",r)}catch(t){console.error(r)}await o(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0);const t=await n((t=>this._provider.sendAsync(e,t)))();if(t.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n${t.error}`);return t.result}}function o(e,t){return new Promise((r=>{const n=setTimeout(r,e);n.unref&&t&&n.unref()}))}e.exports=c},20591:function(e,t,r){var n=r(15361)["Buffer"],a=r(4046).keccak_256,i=r(88612);function c(e){for(var t="",r=0;r<32;r++)t+="00";if(name=o(e),name){var i=name.split(".");for(r=i.length-1;r>=0;r--){var c=a(i[r]);t=a(new n(t+c,"hex"))}}return"0x"+t}function o(e){return e?i.toUnicode(e,{useStd3ASCII:!0,transitional:!1}):e}t.hash=c,t.normalize=o},4046:function(e,t,r){var n=r(96027);r(48675),r(3462), /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * * @version 0.5.7 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2016 * @license MIT */ function(){"use strict";var t="object"===typeof window?window:{},a=!t.JS_SHA3_NO_NODE_JS&&"object"===typeof n&&n.versions&&n.versions.node;a&&(t=r.g);for(var i=!t.JS_SHA3_NO_COMMON_JS&&e.exports,c="0123456789abcdef".split(""),o=[31,7936,2031616,520093696],f=[1,256,65536,16777216],d=[6,1536,393216,100663296],s=[0,8,16,24],u=[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],b=[224,256,384,512],h=[128,256],l=["hex","buffer","arrayBuffer","array"],p=function(e,t,r){return function(n){return new S(e,t,e).update(n)[r]()}},x=function(e,t,r){return function(n,a){return new S(e,t,a).update(n)[r]()}},m=function(e,t){var r=p(e,t,"hex");r.create=function(){return new S(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}S.prototype.update=function(e){var t="string"!==typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));var r,n,a=e.length,i=this.blocks,c=this.byteCount,o=this.blockCount,f=0,d=this.s;while(f>2]|=e[f]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(i[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=c){for(this.start=r-c,this.block=i[o],r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+c[15&e]+c[e>>12&15]+c[e>>8&15]+c[e>>20&15]+c[e>>16&15]+c[e>>28&15]+c[e>>24&15];o%t===0&&(T(r),i=0)}return a&&(e=r[i],a>0&&(f+=c[e>>4&15]+c[15&e]),a>1&&(f+=c[e>>12&15]+c[e>>8&15]),a>2&&(f+=c[e>>20&15]+c[e>>16&15])),f},S.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,a=this.extraBytes,i=0,c=0,o=this.outputBits>>3;e=a?new ArrayBuffer(n+1<<2):new ArrayBuffer(o);var f=new Uint32Array(e);while(c>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;o%r===0&&T(n)}return i&&(e=o<<2,t=n[c],i>0&&(f[e]=255&t),i>1&&(f[e+1]=t>>8&255),i>2&&(f[e+2]=t>>16&255)),f};var T=function(e){var t,r,n,a,i,c,o,f,d,s,b,h,l,p,x,m,v,g,y,w,_,M,k,A,E,S,T,C,P,O,R,I,B,L,N,U,j,D,F,H,q,z,K,$,G,V,W,Z,J,Y,X,Q,ee,te,re,ne,ae,ie,ce,oe,fe,de,se;for(n=0;n<48;n+=2)a=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],c=e[2]^e[12]^e[22]^e[32]^e[42],o=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],d=e[5]^e[15]^e[25]^e[35]^e[45],s=e[6]^e[16]^e[26]^e[36]^e[46],b=e[7]^e[17]^e[27]^e[37]^e[47],h=e[8]^e[18]^e[28]^e[38]^e[48],l=e[9]^e[19]^e[29]^e[39]^e[49],t=h^(c<<1|o>>>31),r=l^(o<<1|c>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=a^(f<<1|d>>>31),r=i^(d<<1|f>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=c^(s<<1|b>>>31),r=o^(b<<1|s>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=f^(h<<1|l>>>31),r=d^(l<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=s^(a<<1|i>>>31),r=b^(i<<1|a>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],x=e[1],V=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,C=e[20]<<3|e[21]>>>29,P=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,O=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,de=e[42]<<2|e[43]>>>30,se=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,U=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,y=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,I=e[45]<<29|e[44]>>>3,B=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,E=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,$=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,S=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,ce=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,M=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~m&g,e[1]=x^~v&y,e[10]=A^~S&C,e[11]=E^~T&P,e[20]=L^~U&D,e[21]=N^~j&F,e[30]=$^~V&Z,e[31]=G^~W&J,e[40]=te^~ne&ie,e[41]=re^~ae&ce,e[2]=m^~g&w,e[3]=v^~y&_,e[12]=S^~C&O,e[13]=T^~P&R,e[22]=U^~D&H,e[23]=j^~F&q,e[32]=V^~Z&Y,e[33]=W^~J&X,e[42]=ne^~ie&oe,e[43]=ae^~ce&fe,e[4]=g^~w&M,e[5]=y^~_&k,e[14]=C^~O&I,e[15]=P^~R&B,e[24]=D^~H&z,e[25]=F^~q&K,e[34]=Z^~Y&Q,e[35]=J^~X&ee,e[44]=ie^~oe&de,e[45]=ce^~fe&se,e[6]=w^~M&p,e[7]=_^~k&x,e[16]=O^~I&A,e[17]=R^~B&E,e[26]=H^~z&L,e[27]=q^~K&N,e[36]=Y^~Q&$,e[37]=X^~ee&G,e[46]=oe^~de&te,e[47]=fe^~se&re,e[8]=M^~p&m,e[9]=k^~x&v,e[18]=I^~A&S,e[19]=B^~E&T,e[28]=z^~L&U,e[29]=K^~N&j,e[38]=Q^~$&V,e[39]=ee^~G&W,e[48]=de^~te&ne,e[49]=se^~re&ae,e[0]^=u[n],e[1]^=u[n+1]};if(i)e.exports=y;else for(_=0;_this.emit("update",e)))}addInitialResults(e){}getChangesAndClear(){const e=this.updates;return this.updates=[],e}}e.exports=a},26587:function(e,t,r){const n=r(71287),a=r(58829),{incrementHexInt:i}=r(85181);class c extends n{constructor({provider:e,params:t}){super(),this.type="block",this.provider=e}async update({oldBlock:e,newBlock:t}){const r=t,n=i(e),c=await a({provider:this.provider,fromBlock:n,toBlock:r}),o=c.map((e=>e.hash));this.addResults(o)}}e.exports=c},58829:function(e){async function t({provider:e,fromBlock:t,toBlock:i}){t||(t=i);const c=r(t),o=r(i),f=o-c+1,d=Array(f).fill().map(((e,t)=>c+t)).map(n),s=await Promise.all(d.map((t=>a(e,"eth_getBlockByNumber",[t,!1]))));return s}function r(e){return void 0===e||null===e?e:Number.parseInt(e,16)}function n(e){if(void 0===e||null===e)return e;const t=e.toString(16);return"0x"+t}function a(e,t,r){return new Promise(((n,a)=>{e.sendAsync({id:1,jsonrpc:"2.0",method:t,params:r},((e,t)=>{if(e)return a(e);n(t.result)}))}))}e.exports=t},85181:function(e){function t(...e){const t=n(e);return t[0]}function r(...e){const t=n(e);return t[t.length-1]}function n(e){return e.sort(((e,t)=>"latest"===e||"earliest"===t?1:"latest"===t||"earliest"===e?-1:c(e)-c(t)))}function a(e){return"0x"+e.toString(16)}function i(e){return e&&!["earliest","latest","pending"].includes(e)}function c(e){return void 0===e||null===e?e:Number.parseInt(e,16)}function o(e){if(void 0===e||null===e)return e;const t=c(e);return f(t+1)}function f(e){if(void 0===e||null===e)return e;let t=e.toString(16);const r=t.length%2;return r&&(t="0"+t),"0x"+t}function d(e){let t="0x";for(let r=0;r{if(0===a.length)return;const r=await u.acquire();try{await Promise.all(p(a).map((async r=>{try{await r.update({oldBlock:e,newBlock:t})}catch(n){console.error(n)}})))}catch(n){console.error(n)}r()};return m.newLogFilter=g,m.newBlockFilter=y,m.newPendingTransactionFilter=w,m.uninstallFilter=k,m.getFilterChanges=_,m.getFilterLogs=M,m.destroy=()=>{S()},m;async function g(e){const r=new c({provider:t,params:e});await A(r);return r}async function y(){const e=new o({provider:t});await A(e);return e}async function w(){const e=new f({provider:t});await A(e);return e}async function _(e){const t=s(e),r=a[t];if(!r)throw new Error(`No filter for index "${t}"`);const n=r.getChangesAndClear();return n}async function M(e){const t=s(e),r=a[t];if(!r)throw new Error(`No filter for index "${t}"`);return"log"===r.type?results=r.getAllResults():results=[],results}async function k(e){const t=s(e),r=a[t],n=Boolean(r);return n&&await E(t),n}async function A(t){const n=p(a).length,i=await e.getLatestBlock();await t.initialize({currentBlock:i}),r++,a[r]=t,t.id=r,t.idHex=d(r);const c=p(a).length;return T({prevFilterCount:n,newFilterCount:c}),r}async function E(e){const t=p(a).length;delete a[e];const r=p(a).length;T({prevFilterCount:t,newFilterCount:r})}async function S(){const e=p(a).length;a={},T({prevFilterCount:e,newFilterCount:0})}function T({prevFilterCount:t,newFilterCount:r}){0===t&&r>0?e.on("sync",v):t>0&&0===r&&e.removeListener("sync",v)}}function b(e){return h((async(...t)=>{const r=await e(...t),n=d(r.id);return n}))}function h(e){return a((async(t,r)=>{const n=await e.apply(null,t.params);r.result=n}))}function l({mutex:e}){return t=>async(r,n,a,i)=>{const c=await e.acquire();c(),t(r,n,a,i)}}function p(e,t){const r=[];for(let n in e)r.push(e[n]);return r}e.exports=u},19121:function(e,t,r){const n=r(50402),a=r(98490),i=r(8706),{bnToHex:c,hexToInt:o,incrementHexInt:f,minBlockRef:d,blockRefIsNumber:s}=r(85181);class u extends i{constructor({provider:e,params:t}){super(),this.type="log",this.ethQuery=new n(e),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},t),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((e=>e.toLowerCase())))}async initialize({currentBlock:e}){let t=this.params.fromBlock;["latest","pending"].includes(t)&&(t=e),"earliest"===t&&(t="0x0"),this.params.fromBlock=t;const r=d(this.params.toBlock,e),n=Object.assign({},this.params,{toBlock:r}),a=await this._fetchLogs(n);this.addInitialResults(a)}async update({oldBlock:e,newBlock:t}){const r=t;let n;n=e?f(e):t;const a=Object.assign({},this.params,{fromBlock:n,toBlock:r}),i=await this._fetchLogs(a),c=i.filter((e=>this.matchLog(e)));this.addResults(c)}async _fetchLogs(e){const t=await a((t=>this.ethQuery.getLogs(e,t)))();return t}matchLog(e){if(o(this.params.fromBlock)>=o(e.blockNumber))return!1;if(s(this.params.toBlock)&&o(this.params.toBlock)<=o(e.blockNumber))return!1;const t=e.address&&e.address.toLowerCase();if(this.params.address&&t&&!this.params.address.includes(t))return!1;const r=this.params.topics.every(((t,r)=>{let n=e.topics[r];if(!n)return!1;n=n.toLowerCase();let a=Array.isArray(t)?t:[t];const i=a.includes(null);if(i)return!0;a=a.map((e=>e.toLowerCase()));const c=a.includes(n);return c}));return r}}e.exports=u},98490:function(e,t,r){"use strict";r(21703);const n=(e,t,r,n)=>function(...a){const i=t.promiseModule;return new i(((i,c)=>{t.multiArgs?a.push(((...e)=>{t.errorFirst?e[0]?c(e):(e.shift(),i(e)):i(e)})):t.errorFirst?a.push(((e,t)=>{e?c(e):i(t)})):a.push(i);const o=this===r?n:this;Reflect.apply(e,o,a)}))},a=new WeakMap;e.exports=(e,t)=>{t={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...t};const r=typeof e;if(null===e||"object"!==r&&"function"!==r)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===e?"null":r}\``);const i=(e,r)=>{let n=a.get(e);if(n||(n={},a.set(e,n)),r in n)return n[r];const i=e=>"string"===typeof e||"symbol"===typeof r?r===e:e.test(r),c=Reflect.getOwnPropertyDescriptor(e,r),o=void 0===c||c.writable||c.configurable,f=t.include?t.include.some(i):!t.exclude.some(i),d=f&&o;return n[r]=d,d},c=new WeakMap,o=new Proxy(e,{apply(e,r,a){const i=c.get(e);if(i)return Reflect.apply(i,r,a);const f=t.excludeMain?e:n(e,t,o,e);return c.set(e,f),Reflect.apply(f,r,a)},get(e,r){const a=e[r];if(!i(e,r)||a===Function.prototype[r])return a;const f=c.get(a);if(f)return f;if("function"===typeof a){const r=n(a,t,o,e);return c.set(a,r),r}return a}});return o}},67234:function(e,t,r){r(21703);const n=r(73055)["default"],a=r(62506),{createAsyncMiddleware:i}=r(2482),c=r(56615),{unsafeRandomBytes:o,incrementHexInt:f}=r(85181),d=r(58829);function s({blockTracker:e,provider:t}){const r={},s=c({blockTracker:e,provider:t});let b=!1;const h=new n,l=a({eth_subscribe:i(p),eth_unsubscribe:i(x)});return l.destroy=v,{events:h,middleware:l};async function p(n,a){if(b)throw new Error("SubscriptionManager - attempting to use after destroying");const i=n.params[0],c=o(16);let h;switch(i){case"newHeads":h=l({subId:c});break;case"logs":const e=n.params[1],t=await s.newLogFilter(e);h=p({subId:c,filter:t});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${i}"`)}return r[c]=h,void(a.result=c);function l({subId:r}){const n={type:i,destroy:async()=>{e.removeListener("sync",n.update)},update:async({oldBlock:e,newBlock:n})=>{const a=n,i=f(e),c=await d({provider:t,fromBlock:i,toBlock:a}),o=c.map(u);o.forEach((e=>{m(r,e)}))}};return e.on("sync",n.update),n}function p({subId:e,filter:t}){t.on("update",(t=>m(e,t)));const r={type:i,destroy:async()=>await s.uninstallFilter(t.idHex)};return r}}async function x(e,t){if(b)throw new Error("SubscriptionManager - attempting to use after destroying");const n=e.params[0],a=r[n];a?(delete r[n],await a.destroy(),t.result=!0):t.result=!1}function m(e,t){h.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:e,result:t}})}function v(){h.removeAllListeners();for(const e in r)r[e].destroy(),delete r[e];b=!0}}function u(e){return{hash:e.hash,parentHash:e.parentHash,sha3Uncles:e.sha3Uncles,miner:e.miner,stateRoot:e.stateRoot,transactionsRoot:e.transactionsRoot,receiptsRoot:e.receiptsRoot,logsBloom:e.logsBloom,difficulty:e.difficulty,number:e.number,gasLimit:e.gasLimit,gasUsed:e.gasUsed,nonce:e.nonce,mixHash:e.mixHash,timestamp:e.timestamp,extraData:e.extraData}}e.exports=s},93893:function(e,t,r){const n=r(71287),a=r(58829),{incrementHexInt:i}=r(85181);class c extends n{constructor({provider:e}){super(),this.type="tx",this.provider=e}async update({oldBlock:e}){const t=e,r=i(e),n=await a({provider:this.provider,fromBlock:r,toBlock:t}),c=[];for(const a of n)c.push(...a.transactions);this.addResults(c)}}e.exports=c},47322:function(e,t,r){r(21703);const n=r(61014),a=r(40534),i=[void 0,null,""];function c(e={}){const{blockTracker:t}=e;if(!t)throw new Error("createBlockCacheMiddleware - No BlockTracker specified");const r=new o,i={perma:r,block:r,fork:r};return a((async(e,a,c)=>{if(e.skipCache)return c();const o=n.cacheTypeForPayload(e),f=i[o];if(!f)return c();if(!f.canCacheRequest(e))return c();let d,s=n.blockTagForPayload(e);if(s||(s="latest"),"earliest"===s)d="0x00";else if("latest"===s){const e=await t.getLatestBlock();r.clearBefore(e),d=e}else d=s;const u=await f.get(e,d);void 0===u?(await c(),await f.set(e,d,a.result)):a.result=u}))}e.exports=c;class o{constructor(){this.cache={}}getBlockCacheForPayload(e,t){const r=Number.parseInt(t,16);let n=this.cache[r];if(!n){const e={};this.cache[r]=e,n=e}return n}async get(e,t){const r=this.getBlockCacheForPayload(e,t);if(!r)return;const a=n.cacheIdentifierForPayload(e,!0),i=r[a];return i}async set(e,t,r){const a=this.canCacheResult(e,r);if(!a)return;const i=this.getBlockCacheForPayload(e,t),c=n.cacheIdentifierForPayload(e,!0);i[c]=r}canCacheRequest(e){if(!n.canCache(e))return!1;const t=n.blockTagForPayload(e);return"pending"!==t}canCacheResult(e,t){if(!i.includes(t))return!!(!["eth_getTransactionByHash","eth_getTransactionReceipt"].includes(e.method)||t&&t.blockHash&&"0x0000000000000000000000000000000000000000000000000000000000000000"!==t.blockHash)}clearBefore(e){const t=this,r=Number.parseInt(e,16);Object.keys(t.cache).map(Number).filter((e=>edelete t.cache[e]))}}},61014:function(e,t,r){const n=r(40391);function a(e,t){const r=t?o(e):e.params;return i(e)?e.method+":"+n(r):null}function i(e){return"never"!==d(e)}function c(e){let t=f(e);return t>=e.params.length?null:e.params[t]}function o(e){const t=f(e);return t>=e.params.length?e.params:"eth_getBlockByNumber"===e.method?e.params.slice(1):e.params.slice(0,t)}function f(e){switch(e.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":return 1;case"eth_getBlockByNumber":return 0;default:return}}function d(e){switch(e.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":case"test_permaCache":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":case"test_forkCache":return"fork";case"eth_gasPrice":case"eth_blockNumber":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"test_blockCache":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":case"test_neverCache":return"never"}}e.exports={cacheIdentifierForPayload:a,canCache:i,blockTagForPayload:c,paramsWithoutBlockTag:o,blockTagParamIndex:f,cacheTypeForPayload:d}},40534:function(e){e.exports=function(e){return(t,r,n,a)=>{let i;const c=new Promise((e=>{i=e}));let o,f;const d=async()=>{f=!0,n((e=>{o=e,i()})),await c};e(t,r,d).then((async()=>{f?(await c,o(null)):a(null)})).catch((e=>{o?o(e):a(e)}))}}},38249:function(e){e.exports=function(e){return(t,r,n,a)=>{const i=e[t.method];return void 0===i?n():"function"===typeof i?i(t,r,n,a):(r.result=i,a())}}},62506:function(e,t,r){e.exports=r(38249)},53895:function(e){var t=function(e,t){for(var r=[],n=0;n>6|192);else{if(a>55295&&a<56320){if(++n==e.length)return null;var i=e.charCodeAt(n);if(i<56320||i>57343)return null;a=65536+((1023&a)<<10)+(1023&i),r+=t(a>>18|240),r+=t(a>>12&63|128)}else r+=t(a>>12|224);r+=t(a>>6&63|128)}r+=t(63&a|128)}}return r},M=function(e){var t="",r=0,a=i(e);while(r127){if(c>191&&c<224){if(r>=a)return null;c=(31&c)<<6|63&n(e,r)}else if(c>223&&c<240){if(r+1>=a)return null;c=(15&c)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(c>239&&c<248))return null;if(r+2>=a)return null;c=(7&c)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(c<=65535)t+=String.fromCharCode(c);else{if(!(c<=1114111))return null;c-=65536,t+=String.fromCharCode(c>>10|55296),t+=String.fromCharCode(1023&c|56320)}}return t};e.exports={random:a,length:i,concat:m,flatten:c,slice:o,reverse:f,pad:d,padRight:s,fromAscii:y,toAscii:w,fromString:_,toString:M,fromNumber:p,toNumber:x,fromNat:v,toNat:g,fromArray:b,toArray:u,fromUint8Array:l,toUint8Array:h}},50849:function(e){var t="0123456789abcdef".split(""),r=[1,256,65536,16777216],n=[0,8,16,24],a=[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],i=function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:function(e){return[].concat(e,e,e,e,e)}([0,0,0,0,0,0,0,0,0,0])}},c=function(e,a){var i,c=a.length,f=e.blocks,d=e.blockCount<<2,s=e.blockCount,u=e.outputBlocks,b=e.s,h=0;while(h>2]|=a[h]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(f[x>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=d){for(e.start=x-d,e.block=f[s],x=0;x>2]|=r[3&x],e.lastByteIndex===d)for(f[0]=f[s],x=1;x>4&15]+t[15&l]+t[l>>12&15]+t[l>>8&15]+t[l>>20&15]+t[l>>16&15]+t[l>>28&15]+t[l>>24&15];m%s===0&&(o(b),x=0)}return"0x"+p},o=function(e){var t,r,n,i,c,o,f,d,s,u,b,h,l,p,x,m,v,g,y,w,_,M,k,A,E,S,T,C,P,O,R,I,B,L,N,U,j,D,F,H,q,z,K,$,G,V,W,Z,J,Y,X,Q,ee,te,re,ne,ae,ie,ce,oe,fe,de,se;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],c=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],f=e[3]^e[13]^e[23]^e[33]^e[43],d=e[4]^e[14]^e[24]^e[34]^e[44],s=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],b=e[7]^e[17]^e[27]^e[37]^e[47],h=e[8]^e[18]^e[28]^e[38]^e[48],l=e[9]^e[19]^e[29]^e[39]^e[49],t=h^(o<<1|f>>>31),r=l^(f<<1|o>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(d<<1|s>>>31),r=c^(s<<1|d>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=o^(u<<1|b>>>31),r=f^(b<<1|u>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=d^(h<<1|l>>>31),r=s^(l<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=u^(i<<1|c>>>31),r=b^(c<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],x=e[1],V=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,C=e[20]<<3|e[21]>>>29,P=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,O=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,de=e[42]<<2|e[43]>>>30,se=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,U=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,y=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,I=e[45]<<29|e[44]>>>3,B=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,E=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,$=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,S=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,ce=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,M=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~m&g,e[1]=x^~v&y,e[10]=A^~S&C,e[11]=E^~T&P,e[20]=L^~U&D,e[21]=N^~j&F,e[30]=$^~V&Z,e[31]=G^~W&J,e[40]=te^~ne&ie,e[41]=re^~ae&ce,e[2]=m^~g&w,e[3]=v^~y&_,e[12]=S^~C&O,e[13]=T^~P&R,e[22]=U^~D&H,e[23]=j^~F&q,e[32]=V^~Z&Y,e[33]=W^~J&X,e[42]=ne^~ie&oe,e[43]=ae^~ce&fe,e[4]=g^~w&M,e[5]=y^~_&k,e[14]=C^~O&I,e[15]=P^~R&B,e[24]=D^~H&z,e[25]=F^~q&K,e[34]=Z^~Y&Q,e[35]=J^~X&ee,e[44]=ie^~oe&de,e[45]=ce^~fe&se,e[6]=w^~M&p,e[7]=_^~k&x,e[16]=O^~I&A,e[17]=R^~B&E,e[26]=H^~z&L,e[27]=q^~K&N,e[36]=Y^~Q&$,e[37]=X^~ee&G,e[46]=oe^~de&te,e[47]=fe^~se&re,e[8]=M^~p&m,e[9]=k^~x&v,e[18]=I^~A&S,e[19]=B^~E&T,e[28]=z^~L&U,e[29]=K^~N&j,e[38]=Q^~$&V,e[39]=ee^~G&W,e[48]=de^~te&ne,e[49]=se^~re&ae,e[0]^=a[n],e[1]^=a[n+1]},f=function(e){return function(t){var r;if("0x"===t.slice(0,2)){r=[];for(var n=2,a=t.length;n=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error("invalid bloom")}function o(e,t){if(!a(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error(`Invalid ethereum address given: "${t}"`);const r=n.padLeft(t,64);return i(e,r)}function f(e,t){if(!a(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error(`Invalid contract address given: "${t}"`);return i(e,t)}function d(e,t){if(!a(e))throw new Error("Invalid bloom given");if(!s(t))throw new Error("Invalid topic");return i(e,t)}function s(e){return"string"===typeof e&&(!!/^(0x)?[0-9a-f]{64}$/i.test(e)&&!(!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e)))}function u(e){return"string"===typeof e&&(!!e.match(/^(0x)?[0-9a-fA-F]{40}$/)||!!e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}t.isBloom=a,t.isInBloom=i,t.isUserEthereumAddressInBloom=o,t.isContractAddressInBloom=f,t.isTopicInBloom=d,t.isTopic=s,t.isAddress=u},16773:function(e,t,r){"use strict";r(21703),r(48675),r(3462),Object.defineProperty(t,"__esModule",{value:!0});const n=r(69893);function a(e){return"0x"+n.keccak_256(c(e))}function i(e){const t=[];for(let r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return`0x${t.join("").replace(/^0+/,"")}`}function c(e){if(null==e)throw new Error("cannot convert null value to array");if("string"===typeof e){const t=e.match(/^(0x)?[0-9a-fA-F]*$/);if(!t)throw new Error("invalid hexidecimal string");if("0x"!==t[1])throw new Error("hex string must have 0x prefix");e=e.substring(2),e.length%2&&(e="0"+e);const r=[];for(let n=0;n=256||parseInt(String(r))!=r)return!1}return!0}function f(e){return void 0!==e.slice||(e.slice=()=>{const t=Array.prototype.slice.call(arguments);return f(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}t.keccak256=a,t.padLeft=(e,t)=>{const r=/^0x/i.test(e)||"number"===typeof e;e=e.toString().replace(/^0x/i,"");const n=t-e.length+1>=0?t-e.length+1:0;return(r?"0x":"")+new Array(n).join("0")+e},t.bytesToHex=i,t.toByteArray=c},30952:function(e,t,r){"use strict";var n=r(15361)["Buffer"];function a(e){return function(t){var r=e();return r.update(t),n.from(r.digest())}}Object.defineProperty(t,"__esModule",{value:!0}),t.createHashFunction=a},92802:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(30952),a=r(70574);t.keccak224=n.createHashFunction((function(){return a("keccak224")})),t.keccak256=n.createHashFunction((function(){return a("keccak256")})),t.keccak384=n.createHashFunction((function(){return a("keccak384")})),t.keccak512=n.createHashFunction((function(){return a("keccak512")}))},71418:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(67602);function a(e){return new Promise((function(t,r){n(e,(function(e,n){e?r(e):t(n)}))}))}function i(e){return n(e)}t.getRandomBytes=a,t.getRandomBytesSync=i},52010:function(e,t,r){"use strict";r(21703);var n=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function c(e){try{f(n.next(e))}catch(t){i(t)}}function o(e){try{f(n["throw"](e))}catch(t){i(t)}}function f(e){e.done?r(e.value):a(e.value).then(c,o)}f((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,i,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(e){return function(t){return f([e,t])}}function f(i){if(r)throw new TypeError("Generator is already executing.");while(c)try{if(r=1,n&&(a=2&i[0]?n["return"]:i[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,n=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(a=c.trys,!(a=a.length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]r)throw new Error("Elements exceed array size: "+r);for(b in o=[],e=e.slice(0,e.lastIndexOf("[")),"string"===typeof t&&(t=JSON.parse(t)),t)o.push(h(e,t[b]));if("dynamic"===r){var l=h("uint256",t.length);o.unshift(l)}return n.concat(o)}if("bytes"===e)return t=n.from(t),o=n.concat([h("uint256",t.length),t]),t.length%32!==0&&(o=n.concat([o,a.zeros(32-t.length%32)])),o;if(e.startsWith("bytes")){if(r=f(e),r<1||r>32)throw new Error("Invalid bytes width: "+r);return a.setLengthRight(t,32)}if(e.startsWith("uint")){if(r=f(e),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if(c=u(t),c.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+c.bitLength());if(c<0)throw new Error("Supplied uint is negative");return c.toArrayLike(n,"be",32)}if(e.startsWith("int")){if(r=f(e),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);if(c=u(t),c.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+c.bitLength());return c.toTwos(256).toArrayLike(n,"be",32)}if(e.startsWith("ufixed")){if(r=d(e),c=u(t),c<0)throw new Error("Supplied ufixed is negative");return h("uint256",c.mul(new i(2).pow(new i(r[1]))))}if(e.startsWith("fixed"))return r=d(e),h("int256",u(t).mul(new i(2).pow(new i(r[1]))));throw new Error("Unsupported or invalid type: "+e)}function l(e,t,r){var a,c,o,f;if("string"===typeof e&&(e=p(e)),"address"===e.name)return l(e.rawType,t,r).toArrayLike(n,"be",20).toString("hex");if("bool"===e.name)return l(e.rawType,t,r).toString()===new i(1).toString();if("string"===e.name){var d=l(e.rawType,t,r);return n.from(d,"utf8").toString()}if(e.isArray){for(o=[],a=e.size,"dynamic"===e.size&&(r=l("uint256",t,r).toNumber(),a=l("uint256",t,r).toNumber(),r+=32),f=0;fe.size)throw new Error("Decoded int exceeds width: "+e.size+" vs "+c.bitLength());return c}if(e.name.startsWith("int")){if(c=new i(t.slice(r,r+32),16,"be").fromTwos(256),c.bitLength()>e.size)throw new Error("Decoded uint exceeds width: "+e.size+" vs "+c.bitLength());return c}if(e.name.startsWith("ufixed")){if(a=new i(2).pow(new i(e.size[1])),c=l("uint256",t,r),!c.mod(a).isZero())throw new Error("Decimals not supported yet");return c.div(a)}if(e.name.startsWith("fixed")){if(a=new i(2).pow(new i(e.size[1])),c=l("int256",t,r),!c.mod(a).isZero())throw new Error("Decimals not supported yet");return c.div(a)}throw new Error("Unsupported or invalid type: "+e.name)}function p(e){var t,r,n;if(m(e)){t=s(e);var a=e.slice(0,e.lastIndexOf("["));return a=p(a),r={isArray:!0,name:e,size:t,memoryUsage:"dynamic"===t?32:a.memoryUsage*t,subArray:a},r}switch(e){case"address":n="uint160";break;case"bool":n="uint8";break;case"string":n="bytes";break}if(r={rawType:n,name:e,memoryUsage:32},e.startsWith("bytes")&&"bytes"!==e||e.startsWith("uint")||e.startsWith("int")?r.size=f(e):(e.startsWith("ufixed")||e.startsWith("fixed"))&&(r.size=d(e)),e.startsWith("bytes")&&"bytes"!==e&&(r.size<1||r.size>32))throw new Error("Invalid bytes width: "+r.size);if((e.startsWith("uint")||e.startsWith("int"))&&(r.size%8||r.size<8||r.size>256))throw new Error("Invalid int/uint width: "+r.size);return r}function x(e){return"string"===e||"bytes"===e||"dynamic"===s(e)}function m(e){return e.lastIndexOf("]")===e.length-1}function v(e,t){return e.startsWith("address")||e.startsWith("bytes")?"0x"+t.toString("hex"):t.toString()}function g(e){return e>="0"&&e<="9"}c.eventID=function(e,t){var r=e+"("+t.map(o).join(",")+")";return a.keccak256(n.from(r))},c.methodID=function(e,t){return c.eventID(e,t).slice(0,4)},c.rawEncode=function(e,t){var r=[],a=[],i=0;e.forEach((function(e){if(m(e)){var t=s(e);i+="dynamic"!==t?32*t:32}else i+=32}));for(var c=0;cb)throw new Error("Elements exceed array size: "+b)}var h=t.map((function(e){return c.solidityHexValue(d,e,256)}));return n.concat(h)}if("bytes"===e)return t;if("string"===e)return n.from(t,"utf8");if("bool"===e){r=r||8;var l=Array(r/4).join("0");return n.from(t?l+"1":l+"0","hex")}if("address"===e){var p=20;return r&&(p=r/8),a.setLengthLeft(t,p)}if(e.startsWith("bytes")){if(i=f(e),i<1||i>32)throw new Error("Invalid bytes width: "+i);return a.setLengthRight(t,i)}if(e.startsWith("uint")){if(i=f(e),i%8||i<8||i>256)throw new Error("Invalid uint width: "+i);if(o=u(t),o.bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+o.bitLength());return r=r||i,o.toArrayLike(n,"be",r/8)}if(e.startsWith("int")){if(i=f(e),i%8||i<8||i>256)throw new Error("Invalid int width: "+i);if(o=u(t),o.bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+o.bitLength());return r=r||i,o.toTwos(i).toArrayLike(n,"be",r/8)}throw new Error("Unsupported or invalid type: "+e)},c.solidityPack=function(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var r=[],a=0;a=8?a+=e[c].toUpperCase():a+=e[c];return a},t.isValidChecksumAddress=function(e,r){return t.isValidAddress(e)&&t.toChecksumAddress(e,r)===e},t.generateAddress=function(e,t){e=f.toBuffer(e);var r=new o(t);return r.isZero()?d.rlphash([e,null]).slice(-20):d.rlphash([e,n.from(r.toArray())]).slice(-20)},t.generateAddress2=function(e,t,r){var i=f.toBuffer(e),c=f.toBuffer(t),o=f.toBuffer(r);a(20===i.length),a(32===c.length);var s=d.keccak256(n.concat([n.from("ff","hex"),i,c,d.keccak256(o)]));return s.slice(-20)},t.isPrecompiled=function(e){var t=f.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},t.isValidPrivate=function(e){return c.privateKeyVerify(e)},t.isValidPublic=function(e,t){return void 0===t&&(t=!1),64===e.length?c.publicKeyVerify(n.concat([n.from([4]),e])):!!t&&c.publicKeyVerify(e)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),e=f.toBuffer(e),t&&64!==e.length&&(e=c.publicKeyConvert(e,!1).slice(1)),a(64===e.length),d.keccak(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToAddress=function(e){return t.publicToAddress(t.privateToPublic(e))},t.privateToPublic=function(e){return e=f.toBuffer(e),c.publicKeyCreate(e,!1).slice(1)},t.importPublic=function(e){return e=f.toBuffer(e),64!==e.length&&(e=c.publicKeyConvert(e,!1).slice(1)),e}},47833:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.baToJSON=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.stripZeros=t.unpad=t.setLengthRight=t.setLength=t.setLengthLeft=t.zeros=void 0;var a=r(43898),i=r(2396);t.zeros=function(e){return n.allocUnsafe(e).fill(0)},t.setLengthLeft=function(e,r,n){void 0===n&&(n=!1);var a=t.zeros(r);return e=t.toBuffer(e),n?e.length0&&"0"===t.toString())e=e.slice(1),t=e[0];return e},t.stripZeros=t.unpad,t.toBuffer=function(e){if(!n.isBuffer(e))if(Array.isArray(e))e=n.from(e);else if("string"===typeof e){if(!a.isHexString(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+e);e=n.from(a.padToEven(a.stripHexPrefix(e)),"hex")}else if("number"===typeof e)e=a.intToBuffer(e);else if(null===e||void 0===e)e=n.allocUnsafe(0);else if(i.isBN(e))e=e.toArrayLike(n);else{if(!e.toArray)throw new Error("invalid type");e=n.from(e.toArray())}return e},t.bufferToInt=function(e){return new i(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return e=t.toBuffer(e),"0x"+e.toString("hex")},t.fromSigned=function(e){return new i(e).fromTwos(256)},t.toUnsigned=function(e){return n.from(e.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!==typeof e||a.isHexPrefixed(e)?e:"0x"+e},t.baToJSON=function(e){if(n.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var r=[],a=0;a=i.length,"The field "+t.name+" must not have more "+t.length+" bytes")):t.allowZero&&0===i.length||!t.length||a(t.length===i.length,"The field "+t.name+" must have byte length of "+t.length),e.raw[r]=i}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:i,set:c}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:c,get:i})})),r)if("string"===typeof r&&(r=n.from(i.stripHexPrefix(r),"hex")),n.isBuffer(r)&&(r=c.decode(r)),Array.isArray(r)){if(r.length>e._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(t,r){e[e._fields[r]]=o.toBuffer(t)}))}else{if("object"!==typeof r)throw new Error("invalid data");var f=Object.keys(r);t.forEach((function(t){-1!==f.indexOf(t.name)&&(e[t.name]=r[t.name]),-1!==f.indexOf(t.alias)&&(e[t.alias]=r[t.alias])}))}}},93161:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(48675),r(3462),r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.ecdhUnsafe=t.ecdh=t.recover=t.verify=t.sign=t.signatureImportLax=t.signatureImport=t.signatureExport=t.signatureNormalize=t.publicKeyCombine=t.publicKeyTweakMul=t.publicKeyTweakAdd=t.publicKeyVerify=t.publicKeyConvert=t.publicKeyCreate=t.privateKeyTweakMul=t.privateKeyTweakAdd=t.privateKeyModInverse=t.privateKeyNegate=t.privateKeyImport=t.privateKeyExport=t.privateKeyVerify=void 0;var a=r(52010),i=r(69080),c=r(21236);t.privateKeyVerify=function(e){return 32===e.length&&a.privateKeyVerify(Uint8Array.from(e))},t.privateKeyExport=function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var r=i.privateKeyExport(e,t);return c.privateKeyExport(e,r,t)},t.privateKeyImport=function(e){if(e=c.privateKeyImport(e),null!==e&&32===e.length&&t.privateKeyVerify(e))return e;throw new Error("couldn't import from DER format")},t.privateKeyNegate=function(e){return n.from(a.privateKeyNegate(Uint8Array.from(e)))},t.privateKeyModInverse=function(e){if(32!==e.length)throw new Error("private key length is invalid");return n.from(i.privateKeyModInverse(Uint8Array.from(e)))},t.privateKeyTweakAdd=function(e,t){return n.from(a.privateKeyTweakAdd(Uint8Array.from(e),t))},t.privateKeyTweakMul=function(e,t){return n.from(a.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t)))},t.publicKeyCreate=function(e,t){return n.from(a.publicKeyCreate(Uint8Array.from(e),t))},t.publicKeyConvert=function(e,t){return n.from(a.publicKeyConvert(Uint8Array.from(e),t))},t.publicKeyVerify=function(e){return(33===e.length||65===e.length)&&a.publicKeyVerify(Uint8Array.from(e))},t.publicKeyTweakAdd=function(e,t,r){return n.from(a.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(t),r))},t.publicKeyTweakMul=function(e,t,r){return n.from(a.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t),r))},t.publicKeyCombine=function(e,t){var r=[];return e.forEach((function(e){r.push(Uint8Array.from(e))})),n.from(a.publicKeyCombine(r,t))},t.signatureNormalize=function(e){return n.from(a.signatureNormalize(Uint8Array.from(e)))},t.signatureExport=function(e){return n.from(a.signatureExport(Uint8Array.from(e)))},t.signatureImport=function(e){return n.from(a.signatureImport(Uint8Array.from(e)))},t.signatureImportLax=function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=c.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return i.signatureImport(t)},t.sign=function(e,t,r){if(null===r)throw new TypeError("options should be an Object");var i=void 0;if(r){if(i={},null===r.data)throw new TypeError("options.data should be a Buffer");if(r.data){if(32!=r.data.length)throw new RangeError("options.data length is invalid");i.data=new Uint8Array(r.data)}if(null===r.noncefn)throw new TypeError("options.noncefn should be a Function");r.noncefn&&(i.noncefn=function(e,t,a,i,c){var o=null!=a?n.from(a):null,f=null!=i?n.from(i):null,d=n.from("");return r.noncefn&&(d=r.noncefn(n.from(e),n.from(t),o,f,c)),new Uint8Array(d)})}var c=a.ecdsaSign(Uint8Array.from(e),Uint8Array.from(t),i);return{signature:n.from(c.signature),recovery:c.recid}},t.verify=function(e,t,r){return a.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),r)},t.recover=function(e,t,r,i){return n.from(a.ecdsaRecover(Uint8Array.from(t),r,Uint8Array.from(e),i))},t.ecdh=function(e,t){return n.from(a.ecdh(Uint8Array.from(e),Uint8Array.from(t),{}))},t.ecdhUnsafe=function(e,t,r){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return n.from(i.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(t),r))}},21236:function(e,t,r){"use strict";var n=r(15361)["Buffer"];Object.defineProperty(t,"__esModule",{value:!0});var a=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),i=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t.privateKeyExport=function(e,t,r){void 0===r&&(r=!0);var c=n.from(r?a:i);return e.copy(c,r?8:9),t.copy(c,r?181:214),c},t.privateKeyImport=function(e){var t=e.length,r=0;if(t2)return null;if(t1?e[r+n-2]<<8:0);return r+=n,t32||ta))return null;if(2!==e[i++])return null;var o=e[i++];if(128&o){if(c=o-128,i+c>a)return null;for(;c>0&&0===e[i];i+=1,c-=1);for(o=0;c>0;i+=1,c-=1)o=(o<<8)+e[i]}if(o>a-i)return null;var f=i;if(i+=o,2!==e[i++])return null;var d=e[i++];if(128&d){if(c=d-128,i+c>a)return null;for(;c>0&&0===e[i];i+=1,c-=1);for(d=0;c>0;i+=1,c-=1)d=(d<<8)+e[i]}if(d>a-i)return null;var s=i;for(i+=d;o>0&&0===e[f];o-=1,f+=1);if(o>32)return null;var u=e.slice(f,f+o);for(u.copy(t,32-u.length);d>0&&0===e[s];d-=1,s+=1);if(d>32)return null;var b=e.slice(s,s+d);return b.copy(r,32-b.length),{r:t,s:r}}},69080:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),Object.defineProperty(t,"__esModule",{value:!0});var a=r(2396),i=r(32127).ec,c=new i("secp256k1"),o=c.curve;t.privateKeyExport=function(e,t){void 0===t&&(t=!0);var r=new a(e);if(r.ucmp(o.n)>=0)throw new Error("couldn't export to DER format");var n=c.g.mul(r);return f(n.getX(),n.getY(),t)},t.privateKeyModInverse=function(e){var t=new a(e);if(t.ucmp(o.n)>=0||t.isZero())throw new Error("private key range is invalid");return t.invm(o.n).toArrayLike(n,"be",32)},t.signatureImport=function(e){var t=new a(e.r);t.ucmp(o.n)>=0&&(t=new a(0));var r=new a(e.s);return r.ucmp(o.n)>=0&&(r=new a(0)),n.concat([t.toArrayLike(n,"be",32),r.toArrayLike(n,"be",32)])},t.ecdhUnsafe=function(e,t,r){void 0===r&&(r=!0);var n=c.keyFromPublic(e),i=new a(t);if(i.ucmp(o.n)>=0||i.isZero())throw new Error("scalar was invalid (zero or overflow)");var d=n.pub.mul(i);return f(d.getX(),d.getY(),r)};var f=function(e,t,r){var a;return r?(a=n.alloc(33),a[0]=t.isOdd()?3:2,e.toArrayLike(n,"be",32).copy(a,1)):(a=n.alloc(65),a[0]=4,e.toArrayLike(n,"be",32).copy(a,1),t.toArrayLike(n,"be",32).copy(a,33)),a}},29847:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var a=r(93161),i=r(2396),c=r(47833),o=r(12338);function f(e,t){return t?e-(2*t+35):e-27}function d(e){return 0===e||1===e}t.ecsign=function(e,t,r){var n=a.sign(e,t),i=n.recovery,c={r:n.signature.slice(0,32),s:n.signature.slice(32,64),v:r?i+(2*r+35):i+27};return c},t.ecrecover=function(e,t,r,i,o){var s=n.concat([c.setLength(r,32),c.setLength(i,32)],64),u=f(t,o);if(!d(u))throw new Error("Invalid signature v value");var b=a.recover(e,s,u);return a.publicKeyConvert(b,!1).slice(1)},t.toRpcSig=function(e,t,r,a){var i=f(e,a);if(!d(i))throw new Error("Invalid signature v value");return c.bufferToHex(n.concat([c.setLengthLeft(t,32),c.setLengthLeft(r,32),c.toBuffer(e)]))},t.fromRpcSig=function(e){var t=c.toBuffer(e);if(65!==t.length)throw new Error("Invalid signature length");var r=t[64];return r<27&&(r+=27),{v:r,r:t.slice(0,32),s:t.slice(32,64)}},t.isValidSignature=function(e,t,r,n,a){void 0===n&&(n=!0);var c=new i("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new i("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!d(f(e,a)))return!1;var s=new i(t),u=new i(r);return!(s.isZero()||s.gt(o)||u.isZero()||u.gt(o))&&(!n||1!==u.cmp(c))},t.hashPersonalMessage=function(e){var t=n.from("Ethereum Signed Message:\n"+e.length.toString(),"utf-8");return o.keccak(n.concat([t,e]))}},60253:function(e,t,r){"use strict";var n=r(15361)["Buffer"];function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r(21703);var i=r(60345),c=r(42696),o=i.BN,f=new o("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),d=function(){function e(t){a(this,e),t=t||{};var r=[{name:"nonce",length:32,allowLess:!0,default:new n([])},{name:"gasPrice",length:32,allowLess:!0,default:new n([])},{name:"gasLimit",alias:"gas",length:32,allowLess:!0,default:new n([])},{name:"to",allowZero:!0,length:20,default:new n([])},{name:"value",length:32,allowLess:!0,default:new n([])},{name:"data",alias:"input",allowZero:!0,default:new n([])},{name:"v",allowZero:!0,default:new n([28])},{name:"r",length:32,allowZero:!0,allowLess:!0,default:new n([])},{name:"s",length:32,allowZero:!0,allowLess:!0,default:new n([])}];i.defineProperties(this,r,t),Object.defineProperty(this,"from",{enumerable:!0,configurable:!0,get:this.getSenderAddress.bind(this)});var c=i.bufferToInt(this.v),o=Math.floor((c-35)/2);o<0&&(o=0),this._chainId=o||t.chainId||0,this._homestead=!0}return e.prototype.toCreationAddress=function(){return""===this.to.toString("hex")},e.prototype.hash=function(e){void 0===e&&(e=!0);var t=void 0;if(e)t=this.raw;else if(this._chainId>0){var r=this.raw.slice();this.v=this._chainId,this.r=0,this.s=0,t=this.raw,this.raw=r}else t=this.raw.slice(0,6);return i.rlphash(t)},e.prototype.getChainId=function(){return this._chainId},e.prototype.getSenderAddress=function(){if(this._from)return this._from;var e=this.getSenderPublicKey();return this._from=i.publicToAddress(e),this._from},e.prototype.getSenderPublicKey=function(){if((!this._senderPubKey||!this._senderPubKey.length)&&!this.verifySignature())throw new Error("Invalid Signature");return this._senderPubKey},e.prototype.verifySignature=function(){var e=this.hash(!1);if(this._homestead&&1===new o(this.s).cmp(f))return!1;try{var t=i.bufferToInt(this.v);this._chainId>0&&(t-=2*this._chainId+8),this._senderPubKey=i.ecrecover(e,t,this.r,this.s)}catch(r){return!1}return!!this._senderPubKey},e.prototype.sign=function(e){var t=this.hash(!1),r=i.ecsign(t,e);this._chainId>0&&(r.v+=2*this._chainId+8),Object.assign(this,r)},e.prototype.getDataFee=function(){for(var e=this.raw[5],t=new o(0),r=0;r0&&t.push(["gas limit is too low. Need at least "+this.getBaseFee()]),void 0===e||!1===e?0===t.length:t.join(" ")},e}();e.exports=d},60345:function(e,t,r){"use strict";r(21703);var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=r(92802),i=a.keccak224,c=a.keccak384,o=a.keccak256,f=a.keccak512,d=r(69262),s=r(16978),u=r(98217),b=r(2396),h=r(65443),l=r(6779).Buffer;Object.assign(t,r(43898)),t.MAX_INTEGER=new b("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new b("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.SHA3_NULL_S=t.KECCAK256_NULL_S,t.KECCAK256_NULL=l.from(t.KECCAK256_NULL_S,"hex"),t.SHA3_NULL=t.KECCAK256_NULL,t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.SHA3_RLP_ARRAY_S=t.KECCAK256_RLP_ARRAY_S,t.KECCAK256_RLP_ARRAY=l.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.SHA3_RLP_ARRAY=t.KECCAK256_RLP_ARRAY,t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.SHA3_RLP_S=t.KECCAK256_RLP_S,t.KECCAK256_RLP=l.from(t.KECCAK256_RLP_S,"hex"),t.SHA3_RLP=t.KECCAK256_RLP,t.BN=b,t.rlp=u,t.secp256k1=d,t.zeros=function(e){return l.allocUnsafe(e).fill(0)},t.zeroAddress=function(){var e=20,r=t.zeros(e);return t.bufferToHex(r)},t.setLengthLeft=t.setLength=function(e,r,n){var a=t.zeros(r);return e=t.toBuffer(e),n?e.length0&&"0"===r.toString())e=e.slice(1),r=e[0];return e},t.toBuffer=function(e){if(!l.isBuffer(e))if(Array.isArray(e))e=l.from(e);else if("string"===typeof e)e=t.isHexString(e)?l.from(t.padToEven(t.stripHexPrefix(e)),"hex"):l.from(e);else if("number"===typeof e)e=t.intToBuffer(e);else if(null===e||void 0===e)e=l.allocUnsafe(0);else if(b.isBN(e))e=e.toArrayLike(l);else{if(!e.toArray)throw new Error("invalid type");e=l.from(e.toArray())}return e},t.bufferToInt=function(e){return new b(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return e=t.toBuffer(e),"0x"+e.toString("hex")},t.fromSigned=function(e){return new b(e).fromTwos(256)},t.toUnsigned=function(e){return l.from(e.toTwos(256).toArray())},t.keccak=function(e,r){switch(e=t.toBuffer(e),r||(r=256),r){case 224:return i(e);case 256:return o(e);case 384:return c(e);case 512:return f(e);default:throw new Error("Invald algorithm: keccak"+r)}},t.keccak256=function(e){return t.keccak(e)},t.sha3=t.keccak,t.sha256=function(e){return e=t.toBuffer(e),h("sha256").update(e).digest()},t.ripemd160=function(e,r){e=t.toBuffer(e);var n=h("rmd160").update(e).digest();return!0===r?t.setLength(n,32):n},t.rlphash=function(e){return t.keccak(u.encode(e))},t.isValidPrivate=function(e){return d.privateKeyVerify(e)},t.isValidPublic=function(e,t){return 64===e.length?d.publicKeyVerify(l.concat([l.from([4]),e])):!!t&&d.publicKeyVerify(e)},t.pubToAddress=t.publicToAddress=function(e,r){return e=t.toBuffer(e),r&&64!==e.length&&(e=d.publicKeyConvert(e,!1).slice(1)),s(64===e.length),t.keccak(e).slice(-20)};var p=t.privateToPublic=function(e){return e=t.toBuffer(e),d.publicKeyCreate(e,!1).slice(1)};t.importPublic=function(e){return e=t.toBuffer(e),64!==e.length&&(e=d.publicKeyConvert(e,!1).slice(1)),e},t.ecsign=function(e,t){var r=d.sign(e,t),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},t.hashPersonalMessage=function(e){var r=t.toBuffer("Ethereum Signed Message:\n"+e.length.toString());return t.keccak(l.concat([r,e]))},t.ecrecover=function(e,r,n,a){var i=l.concat([t.setLength(n,32),t.setLength(a,32)],64),c=r-27;if(0!==c&&1!==c)throw new Error("Invalid signature v value");var o=d.recover(e,i,c);return d.publicKeyConvert(o,!1).slice(1)},t.toRpcSig=function(e,r,n){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(l.concat([t.setLengthLeft(r,32),t.setLengthLeft(n,32),t.toBuffer(e-27)]))},t.fromRpcSig=function(e){if(e=t.toBuffer(e),65!==e.length)throw new Error("Invalid signature length");var r=e[64];return r<27&&(r+=27),{v:r,r:e.slice(0,32),s:e.slice(32,64)}},t.privateToAddress=function(e){return t.publicToAddress(p(e))},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){var r=t.zeroAddress();return r===t.addHexPrefix(e)},t.toChecksumAddress=function(e){e=t.stripHexPrefix(e).toLowerCase();for(var r=t.keccak(e).toString("hex"),n="0x",a=0;a=8?n+=e[a].toUpperCase():n+=e[a];return n},t.isValidChecksumAddress=function(e){return t.isValidAddress(e)&&t.toChecksumAddress(e)===e},t.generateAddress=function(e,r){return e=t.toBuffer(e),r=new b(r),r=r.isZero()?null:l.from(r.toArray()),t.rlphash([e,r]).slice(-20)},t.isPrecompiled=function(e){var r=t.unpad(e);return 1===r.length&&r[0]>=1&&r[0]<=8},t.addHexPrefix=function(e){return"string"!==typeof e||t.isHexPrefixed(e)?e:"0x"+e},t.isValidSignature=function(e,t,r,n){var a=new b("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),i=new b("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===r.length&&((27===e||28===e)&&(t=new b(t),r=new b(r),!(t.isZero()||t.gt(i)||r.isZero()||r.gt(i))&&(!1!==n||1!==new b(r).cmp(a))))},t.baToJSON=function(e){if(l.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var r=[],n=0;n=a.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===a.length||!r.length||s(r.length===a.length,"The field "+r.name+" must have byte length of "+r.length),e.raw[n]=a}e._fields.push(r.name),Object.defineProperty(e,r.name,{enumerable:!0,configurable:!0,get:a,set:i}),r.default&&(e[r.name]=r.default),r.alias&&Object.defineProperty(e,r.alias,{enumerable:!1,configurable:!0,set:i,get:a})})),a)if("string"===typeof a&&(a=l.from(t.stripHexPrefix(a),"hex")),l.isBuffer(a)&&(a=u.decode(a)),Array.isArray(a)){if(a.length>e._fields.length)throw new Error("wrong number of fields in data");a.forEach((function(r,n){e[e._fields[n]]=t.toBuffer(r)}))}else{if("object"!==("undefined"===typeof a?"undefined":n(a)))throw new Error("invalid data");var i=Object.keys(a);r.forEach((function(t){-1!==i.indexOf(t.name)&&(e[t.name]=a[t.name]),-1!==i.indexOf(t.alias)&&(e[t.alias]=a[t.alias])}))}}},69262:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(48675),r(3462),r(21703);var a=r(52010),i=r(11126),c=r(2031),o=function(e){return 32===e.length&&a.privateKeyVerify(Uint8Array.from(e))},f=function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var r=i.privateKeyExport(e,t);return c.privateKeyExport(e,r,t)},d=function(e){if(e=c.privateKeyImport(e),null!==e&&32===e.length&&o(e))return e;throw new Error("couldn't import from DER format")},s=function(e){return n.from(a.privateKeyNegate(Uint8Array.from(e)))},u=function(e){if(32!==e.length)throw new Error("private key length is invalid");return n.from(i.privateKeyModInverse(Uint8Array.from(e)))},b=function(e,t){return n.from(a.privateKeyTweakAdd(Uint8Array.from(e),t))},h=function(e,t){return n.from(a.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t)))},l=function(e,t){return n.from(a.publicKeyCreate(Uint8Array.from(e),t))},p=function(e,t){return n.from(a.publicKeyConvert(Uint8Array.from(e),t))},x=function(e){return(33===e.length||65===e.length)&&a.publicKeyVerify(Uint8Array.from(e))},m=function(e,t,r){return n.from(a.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(t),r))},v=function(e,t,r){return n.from(a.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t),r))},g=function(e,t){var r=[];return e.forEach((function(e){r.push(Uint8Array.from(e))})),n.from(a.publicKeyCombine(r,t))},y=function(e){return n.from(a.signatureNormalize(Uint8Array.from(e)))},w=function(e){return n.from(a.signatureExport(Uint8Array.from(e)))},_=function(e){return n.from(a.signatureImport(Uint8Array.from(e)))},M=function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=c.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return i.signatureImport(t)},k=function(e,t,r){if(null===r)throw new TypeError("options should be an Object");var i=void 0;if(r){if(i={},null===r.data)throw new TypeError("options.data should be a Buffer");if(r.data){if(32!==r.data.length)throw new RangeError("options.data length is invalid");i.data=new Uint8Array(r.data)}if(null===r.noncefn)throw new TypeError("options.noncefn should be a Function");r.noncefn&&(i.noncefn=function(e,t,a,i,c){var o=null!=a?n.from(a):null,f=null!=i?n.from(i):null,d=n.from("");return r.noncefn&&(d=r.noncefn(n.from(e),n.from(t),o,f,c)),Uint8Array.from(d)})}var c=a.ecdsaSign(Uint8Array.from(e),Uint8Array.from(t),i);return{signature:n.from(c.signature),recovery:c.recid}},A=function(e,t,r){return a.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),r)},E=function(e,t,r,i){return n.from(a.ecdsaRecover(Uint8Array.from(t),r,Uint8Array.from(e),i))},S=function(e,t){return n.from(a.ecdh(Uint8Array.from(e),Uint8Array.from(t),{}))},T=function(e,t,r){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return n.from(i.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(t),r))};e.exports={privateKeyVerify:o,privateKeyExport:f,privateKeyImport:d,privateKeyNegate:s,privateKeyModInverse:u,privateKeyTweakAdd:b,privateKeyTweakMul:h,publicKeyCreate:l,publicKeyConvert:p,publicKeyVerify:x,publicKeyTweakAdd:m,publicKeyTweakMul:v,publicKeyCombine:g,signatureNormalize:y,signatureExport:w,signatureImport:_,signatureImportLax:M,sign:k,verify:A,recover:E,ecdh:S,ecdhUnsafe:T}},2031:function(e,t,r){"use strict";var n=r(15361)["Buffer"],a=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),i=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t.privateKeyExport=function(e,t,r){var c=n.from(r?a:i);return e.copy(c,r?8:9),t.copy(c,r?181:214),c},t.privateKeyImport=function(e){var t=e.length,r=0;if(t2)return null;if(t1?e[r+n-2]<<8:0);return r+=n,t32||ta))return null;if(2!==e[i++])return null;var o=e[i++];if(128&o){if(c=o-128,i+c>a)return null;for(;c>0&&0===e[i];i+=1,c-=1);for(o=0;c>0;i+=1,c-=1)o=(o<<8)+e[i]}if(o>a-i)return null;var f=i;if(i+=o,2!==e[i++])return null;var d=e[i++];if(128&d){if(c=d-128,i+c>a)return null;for(;c>0&&0===e[i];i+=1,c-=1);for(d=0;c>0;i+=1,c-=1)d=(d<<8)+e[i]}if(d>a-i)return null;var s=i;for(i+=d;o>0&&0===e[f];o-=1,f+=1);if(o>32)return null;var u=e.slice(f,f+o);for(u.copy(t,32-u.length);d>0&&0===e[s];d-=1,s+=1);if(d>32)return null;var b=e.slice(s,s+d);return b.copy(r,32-b.length),{r:t,s:r}}},11126:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703);var a=r(2396),i=r(32127).ec,c=new i("secp256k1"),o=c.curve;t.privateKeyExport=function(e,t){var r=new a(e);if(r.ucmp(o.n)>=0)throw new Error("couldn't export to DER format");var n=c.g.mul(r);return f(n.getX(),n.getY(),t)},t.privateKeyModInverse=function(e){var t=new a(e);if(t.ucmp(o.n)>=0||t.isZero())throw new Error("private key range is invalid");return t.invm(o.n).toArrayLike(n,"be",32)},t.signatureImport=function(e){var t=new a(e.r);t.ucmp(o.n)>=0&&(t=new a(0));var r=new a(e.s);return r.ucmp(o.n)>=0&&(r=new a(0)),n.concat([t.toArrayLike(n,"be",32),r.toArrayLike(n,"be",32)])},t.ecdhUnsafe=function(e,t,r){var n=c.keyFromPublic(e),i=new a(t);if(i.ucmp(o.n)>=0||i.isZero())throw new Error("scalar was invalid (zero or overflow)");var d=n.pub.mul(i);return f(d.getX(),d.getY(),r)};var f=function(e,t,r){var a=void 0;return r?(a=n.alloc(33),a[0]=t.isOdd()?3:2,e.toArrayLike(n,"be",32).copy(a,1)):(a=n.alloc(65),a[0]=4,e.toArrayLike(n,"be",32).copy(a,1),t.toArrayLike(n,"be",32).copy(a,33)),a}},59426:function(e,t,r){"use strict";r(21703);var n=r(9642),a=r(70594),i=new n(0),c=new n(-1),o={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function f(e){var t=e?e.toLowerCase():"ether",r=o[t];if("string"!==typeof r)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(o,null,2));return new n(r,10)}function d(e){if("string"===typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"===typeof e)return String(e);if("object"===typeof e&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+typeof e+".")}function s(e,t,r){var n=a(e),d=n.lt(i),s=f(t),u=o[t].length-1||1,b=r||{};d&&(n=n.mul(c));var h=n.mod(s).toString(10);while(h.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var b=u[0],h=u[1];if(b||(b="0"),h||(h="0"),h.length>i)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");while(h.length=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:15&c}return n}function f(e,t,r,n){for(var a=0,i=Math.min(e.length,r),c=t;c=49?o-49+10:o>=17?o-17+10:o}return a}i.isBN=function(e){return e instanceof i||null!==e&&"object"===typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&a++,16===t?this._parseHex(e,a):this._parseBase(e,t,a),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a=0;a-=3)c=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=c<>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)a=o(e,r,r+6),this.words[n]|=a<>>26-i&4194303,i+=24,i>=26&&(i-=26,n++);r+6!==t&&(a=o(e,t,r+6),this.words[n]|=a<>>26-i&4194303),this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,c=i%n,o=Math.min(i,i-c)+r,d=0,s=r;s1&&0===this.words[this.length-1])this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],s=[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],u=[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 b(e){for(var t=new Array(e.bitLength()),r=0;r>>a}return t}function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],c=a*i,o=67108863&c,f=c/67108864|0;r.words[0]=o;for(var d=1;d>>26,u=67108863&f,b=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=b;h++){var l=d-h|0;a=0|e.words[l],i=0|t.words[h],c=a*i+u,s+=c/67108864|0,u=67108863&c}r.words[d]=0|u,f=0|s}return 0!==f?r.words[d]=0|f:r.length--,r.strip()}i.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var a=0,i=0,c=0;c>>24-a&16777215,r=0!==i||c!==this.length-1?d[6-f.length]+f+r:f+r,a+=2,a>=26&&(a-=26,c--)}0!==i&&(r=i.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],h=u[e];r="";var l=this.clone();l.negative=0;while(!l.isZero()){var p=l.modn(h).toString(e);l=l.idivn(h),r=l.isZero()?p+r:d[b-p.length]+p+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n("undefined"!==typeof c),this.toArrayLike(c,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var c,o,f="le"===t,d=new e(i),s=this.clone();if(f){for(o=0;!s.isZero();o++)c=s.andln(255),s.iushrn(8),d[o]=c;for(;o=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,c=0;c>26,this.words[c]=67108863&t;for(;0!==i&&c>26,this.words[c]=67108863&t;if(0===i&&c>>13,h=0|c[1],l=8191&h,p=h>>>13,x=0|c[2],m=8191&x,v=x>>>13,g=0|c[3],y=8191&g,w=g>>>13,_=0|c[4],M=8191&_,k=_>>>13,A=0|c[5],E=8191&A,S=A>>>13,T=0|c[6],C=8191&T,P=T>>>13,O=0|c[7],R=8191&O,I=O>>>13,B=0|c[8],L=8191&B,N=B>>>13,U=0|c[9],j=8191&U,D=U>>>13,F=0|o[0],H=8191&F,q=F>>>13,z=0|o[1],K=8191&z,$=z>>>13,G=0|o[2],V=8191&G,W=G>>>13,Z=0|o[3],J=8191&Z,Y=Z>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ae=0|o[6],ie=8191&ae,ce=ae>>>13,oe=0|o[7],fe=8191&oe,de=oe>>>13,se=0|o[8],ue=8191&se,be=se>>>13,he=0|o[9],le=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(u,H),a=Math.imul(u,q),a=a+Math.imul(b,H)|0,i=Math.imul(b,q);var xe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(l,H),a=Math.imul(l,q),a=a+Math.imul(p,H)|0,i=Math.imul(p,q),n=n+Math.imul(u,K)|0,a=a+Math.imul(u,$)|0,a=a+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0;var me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,H),a=Math.imul(m,q),a=a+Math.imul(v,H)|0,i=Math.imul(v,q),n=n+Math.imul(l,K)|0,a=a+Math.imul(l,$)|0,a=a+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(u,V)|0,a=a+Math.imul(u,W)|0,a=a+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ve=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(y,H),a=Math.imul(y,q),a=a+Math.imul(w,H)|0,i=Math.imul(w,q),n=n+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(l,V)|0,a=a+Math.imul(l,W)|0,a=a+Math.imul(p,V)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(u,J)|0,a=a+Math.imul(u,Y)|0,a=a+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ge=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(M,H),a=Math.imul(M,q),a=a+Math.imul(k,H)|0,i=Math.imul(k,q),n=n+Math.imul(y,K)|0,a=a+Math.imul(y,$)|0,a=a+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,n=n+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0,a=a+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,n=n+Math.imul(u,Q)|0,a=a+Math.imul(u,ee)|0,a=a+Math.imul(b,Q)|0,i=i+Math.imul(b,ee)|0;var ye=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,H),a=Math.imul(E,q),a=a+Math.imul(S,H)|0,i=Math.imul(S,q),n=n+Math.imul(M,K)|0,a=a+Math.imul(M,$)|0,a=a+Math.imul(k,K)|0,i=i+Math.imul(k,$)|0,n=n+Math.imul(y,V)|0,a=a+Math.imul(y,W)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,a=a+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,n=n+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0,a=a+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(u,re)|0,a=a+Math.imul(u,ne)|0,a=a+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var we=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,H),a=Math.imul(C,q),a=a+Math.imul(P,H)|0,i=Math.imul(P,q),n=n+Math.imul(E,K)|0,a=a+Math.imul(E,$)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(M,V)|0,a=a+Math.imul(M,W)|0,a=a+Math.imul(k,V)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,a=a+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,n=n+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,a=a+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0,a=a+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(u,ie)|0,a=a+Math.imul(u,ce)|0,a=a+Math.imul(b,ie)|0,i=i+Math.imul(b,ce)|0;var _e=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,H),a=Math.imul(R,q),a=a+Math.imul(I,H)|0,i=Math.imul(I,q),n=n+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,a=a+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,n=n+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,a=a+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,a=a+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,a=a+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,a=a+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(l,ie)|0,a=a+Math.imul(l,ce)|0,a=a+Math.imul(p,ie)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(u,fe)|0,a=a+Math.imul(u,de)|0,a=a+Math.imul(b,fe)|0,i=i+Math.imul(b,de)|0;var Me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,H),a=Math.imul(L,q),a=a+Math.imul(N,H)|0,i=Math.imul(N,q),n=n+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,a=a+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(C,V)|0,a=a+Math.imul(C,W)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(E,J)|0,a=a+Math.imul(E,Y)|0,a=a+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,n=n+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,a=a+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,a=a+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(m,ie)|0,a=a+Math.imul(m,ce)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(l,fe)|0,a=a+Math.imul(l,de)|0,a=a+Math.imul(p,fe)|0,i=i+Math.imul(p,de)|0,n=n+Math.imul(u,ue)|0,a=a+Math.imul(u,be)|0,a=a+Math.imul(b,ue)|0,i=i+Math.imul(b,be)|0;var ke=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,H),a=Math.imul(j,q),a=a+Math.imul(D,H)|0,i=Math.imul(D,q),n=n+Math.imul(L,K)|0,a=a+Math.imul(L,$)|0,a=a+Math.imul(N,K)|0,i=i+Math.imul(N,$)|0,n=n+Math.imul(R,V)|0,a=a+Math.imul(R,W)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(C,J)|0,a=a+Math.imul(C,Y)|0,a=a+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,n=n+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,a=a+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,a=a+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(y,ie)|0,a=a+Math.imul(y,ce)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(v,de)|0,n=n+Math.imul(l,ue)|0,a=a+Math.imul(l,be)|0,a=a+Math.imul(p,ue)|0,i=i+Math.imul(p,be)|0,n=n+Math.imul(u,le)|0,a=a+Math.imul(u,pe)|0,a=a+Math.imul(b,le)|0,i=i+Math.imul(b,pe)|0;var Ae=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),a=Math.imul(j,$),a=a+Math.imul(D,K)|0,i=Math.imul(D,$),n=n+Math.imul(L,V)|0,a=a+Math.imul(L,W)|0,a=a+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,n=n+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,a=a+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,a=a+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,a=a+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(M,ie)|0,a=a+Math.imul(M,ce)|0,a=a+Math.imul(k,ie)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(m,ue)|0,a=a+Math.imul(m,be)|0,a=a+Math.imul(v,ue)|0,i=i+Math.imul(v,be)|0,n=n+Math.imul(l,le)|0,a=a+Math.imul(l,pe)|0,a=a+Math.imul(p,le)|0,i=i+Math.imul(p,pe)|0;var Ee=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),a=Math.imul(j,W),a=a+Math.imul(D,V)|0,i=Math.imul(D,W),n=n+Math.imul(L,J)|0,a=a+Math.imul(L,Y)|0,a=a+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,n=n+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,a=a+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,a=a+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(E,ie)|0,a=a+Math.imul(E,ce)|0,a=a+Math.imul(S,ie)|0,i=i+Math.imul(S,ce)|0,n=n+Math.imul(M,fe)|0,a=a+Math.imul(M,de)|0,a=a+Math.imul(k,fe)|0,i=i+Math.imul(k,de)|0,n=n+Math.imul(y,ue)|0,a=a+Math.imul(y,be)|0,a=a+Math.imul(w,ue)|0,i=i+Math.imul(w,be)|0,n=n+Math.imul(m,le)|0,a=a+Math.imul(m,pe)|0,a=a+Math.imul(v,le)|0,i=i+Math.imul(v,pe)|0;var Se=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,J),a=Math.imul(j,Y),a=a+Math.imul(D,J)|0,i=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,a=a+Math.imul(N,Q)|0,i=i+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,a=a+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(C,ie)|0,a=a+Math.imul(C,ce)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,a=a+Math.imul(E,de)|0,a=a+Math.imul(S,fe)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(M,ue)|0,a=a+Math.imul(M,be)|0,a=a+Math.imul(k,ue)|0,i=i+Math.imul(k,be)|0,n=n+Math.imul(y,le)|0,a=a+Math.imul(y,pe)|0,a=a+Math.imul(w,le)|0,i=i+Math.imul(w,pe)|0;var Te=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Q),a=Math.imul(j,ee),a=a+Math.imul(D,Q)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,a=a+Math.imul(L,ne)|0,a=a+Math.imul(N,re)|0,i=i+Math.imul(N,ne)|0,n=n+Math.imul(R,ie)|0,a=a+Math.imul(R,ce)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(I,ce)|0,n=n+Math.imul(C,fe)|0,a=a+Math.imul(C,de)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(P,de)|0,n=n+Math.imul(E,ue)|0,a=a+Math.imul(E,be)|0,a=a+Math.imul(S,ue)|0,i=i+Math.imul(S,be)|0,n=n+Math.imul(M,le)|0,a=a+Math.imul(M,pe)|0,a=a+Math.imul(k,le)|0,i=i+Math.imul(k,pe)|0;var Ce=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),a=Math.imul(j,ne),a=a+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,a=a+Math.imul(L,ce)|0,a=a+Math.imul(N,ie)|0,i=i+Math.imul(N,ce)|0,n=n+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(I,de)|0,n=n+Math.imul(C,ue)|0,a=a+Math.imul(C,be)|0,a=a+Math.imul(P,ue)|0,i=i+Math.imul(P,be)|0,n=n+Math.imul(E,le)|0,a=a+Math.imul(E,pe)|0,a=a+Math.imul(S,le)|0,i=i+Math.imul(S,pe)|0;var Pe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,ie),a=Math.imul(j,ce),a=a+Math.imul(D,ie)|0,i=Math.imul(D,ce),n=n+Math.imul(L,fe)|0,a=a+Math.imul(L,de)|0,a=a+Math.imul(N,fe)|0,i=i+Math.imul(N,de)|0,n=n+Math.imul(R,ue)|0,a=a+Math.imul(R,be)|0,a=a+Math.imul(I,ue)|0,i=i+Math.imul(I,be)|0,n=n+Math.imul(C,le)|0,a=a+Math.imul(C,pe)|0,a=a+Math.imul(P,le)|0,i=i+Math.imul(P,pe)|0;var Oe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,fe),a=Math.imul(j,de),a=a+Math.imul(D,fe)|0,i=Math.imul(D,de),n=n+Math.imul(L,ue)|0,a=a+Math.imul(L,be)|0,a=a+Math.imul(N,ue)|0,i=i+Math.imul(N,be)|0,n=n+Math.imul(R,le)|0,a=a+Math.imul(R,pe)|0,a=a+Math.imul(I,le)|0,i=i+Math.imul(I,pe)|0;var Re=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,ue),a=Math.imul(j,be),a=a+Math.imul(D,ue)|0,i=Math.imul(D,be),n=n+Math.imul(L,le)|0,a=a+Math.imul(L,pe)|0,a=a+Math.imul(N,le)|0,i=i+Math.imul(N,pe)|0;var Ie=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,le),a=Math.imul(j,pe),a=a+Math.imul(D,le)|0,i=Math.imul(D,pe);var Be=(d+n|0)+((8191&a)<<13)|0;return d=(i+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=xe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=we,f[6]=_e,f[7]=Me,f[8]=ke,f[9]=Ae,f[10]=Ee,f[11]=Se,f[12]=Te,f[13]=Ce,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ie,f[18]=Be,0!==d&&(f[19]=d,r.length++),r};function p(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0,a+=c>>>26,c&=67108863}r.words[i]=o,n=c,c=a}return 0!==n?r.words[i]=n:r.length--,r.strip()}function x(e,t,r){var n=new m;return n.mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(l=h),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?l(this,e,t):n<63?h(this,e,t):n<1024?p(this,e,t):x(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,r,n,a,i){for(var c=0;c>>=1)a++;return 1<>>=13,r[2*c+1]=8191&i,i>>>=13;for(c=2*t;c>=26,t+=a/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=b(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var c=0;for(t=0;t>>26-r}c&&(this.words[t]=c,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,c=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<c)for(this.length-=c,d=0;d=0&&(0!==s||d>=a);d--){var u=0|this.words[d];this.words[d]=s<<26-i|u>>>i,s=u&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===o)return this.strip();for(n(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),a=e,c=0|a.words[a.length-1],o=this._countBits(c);r=26-o,0!==r&&(a=a.ushln(r),n.iushln(r),c=0|a.words[a.length-1]);var f,d=n.length-a.length;if("mod"!==t){f=new i(null),f.length=d+1,f.words=new Array(f.length);for(var s=0;s=0;b--){var h=67108864*(0|n.words[a.length+b])+(0|n.words[a.length+b-1]);h=Math.min(h/c|0,67108863),n._ishlnsubmul(a,h,b);while(0!==n.negative)h--,n.negative=0,n._ishlnsubmul(a,1,b),n.isZero()||(n.negative^=1);f&&(f.words[b]=h)}return f&&f.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.iadd(e)),{div:a,mod:c}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.isub(e)),{div:o.div,mod:c}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,c,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,a=this.length-1;a>=0;a--)r=(t*r+(0|this.words[a]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*t;this.words[r]=a/e|0,t=a%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a=new i(1),c=new i(0),o=new i(0),f=new i(1),d=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++d;var s=r.clone(),u=t.clone();while(!t.isZero()){for(var b=0,h=1;0===(t.words[0]&h)&&b<26;++b,h<<=1);if(b>0){t.iushrn(b);while(b-- >0)(a.isOdd()||c.isOdd())&&(a.iadd(s),c.isub(u)),a.iushrn(1),c.iushrn(1)}for(var l=0,p=1;0===(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(u)),o.iushrn(1),f.iushrn(1)}t.cmp(r)>=0?(t.isub(r),a.isub(o),c.isub(f)):(r.isub(t),o.isub(a),f.isub(c))}return{a:o,b:f,gcd:r.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a,c=new i(1),o=new i(0),f=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var d=0,s=1;0===(t.words[0]&s)&&d<26;++d,s<<=1);if(d>0){t.iushrn(d);while(d-- >0)c.isOdd()&&c.iadd(f),c.iushrn(1)}for(var u=0,b=1;0===(r.words[0]&b)&&u<26;++u,b<<=1);if(u>0){r.iushrn(u);while(u-- >0)o.isOdd()&&o.iadd(f),o.iushrn(1)}t.cmp(r)>=0?(t.isub(r),c.isub(o)):(r.isub(t),o.isub(c))}return a=0===t.cmpn(1)?c:o,a.cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[c]=o}return 0!==i&&(this.words[c]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},a(y,g),y.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=c}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}var a=this.m.subn(1),c=0;while(!a.isZero()&&0===a.andln(1))c++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),f=o.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();s=new i(2*s*s).toRed(this);while(0!==this.pow(s,d).cmp(f))s.redIAdd(f);var u=this.pow(s,a),b=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),l=c;while(0!==h.cmp(o)){for(var p=h,x=0;0!==p.cmp(o);x++)p=p.redSqr();n(x=0;a--){for(var s=t.words[a],u=d-1;u>=0;u--){var b=s>>u&1;c!==n[0]&&(c=this.sqr(c)),0!==b||0!==o?(o<<=1,o|=b,f++,(f===r||0===a&&0===u)&&(c=this.mul(c,n[o]),f=0,o=0)):f=0}d=26}return c},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new A(e)},a(A,k),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),c=a;return a.cmp(this.m)>=0?c=a.isub(this.m):a.cmpn(0)<0&&(c=a.iadd(this.m)),c._forceRed(this)},A.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}(e,this)},43898:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703);var a=r(44866),i=r(99468);function c(e){var t=e;if("string"!==typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function o(e){var t=e.toString(16);return"0x"+t}function f(e){var t=o(e);return new n(c(t.slice(2)),"hex")}function d(e){if("string"!==typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return n.byteLength(e,"utf8")}function s(e,t,r){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(r)?"some":"every"]((function(t){return e.indexOf(t)>=0}))}function u(e){var t=new n(c(i(e).replace(/^0+|0+$/g,"")),"hex");return t.toString("utf8")}function b(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r0&&o.length>a&&!o.warned){o.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=o.length,c(f)}return e}function h(){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 l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=h.bind(n);return a.listener=r,n.wrapFn=a,a}function p(e,t,r){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:"function"===typeof a?r?[a.listener||a]:[a]:r?g(a):m(a,a.length)}function x(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"===typeof r)return 1;if(void 0!==r)return r.length}return 0}function m(e,t){for(var r=new Array(t),n=0;n0&&(c=t[0]),c instanceof Error)throw c;var o=new Error("Unhandled error."+(c?" ("+c.message+")":""));throw o.context=c,o}var f=a[e];if(void 0===f)return!1;if("function"===typeof f)i(f,this,t);else{var d=f.length,s=m(f,d);for(r=0;r=0;i--)if(r[i]===t||r[i].listener===t){c=r[i].listener,a=i;break}if(a<0)return this;0===a?r.shift():v(r,a),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,c||t)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(e){var t,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[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var a,i=Object.keys(r);for(n=0;n=0;n--)this.removeListener(e,t[n]);return this},f.prototype.listeners=function(e){return p(this,e,!0)},f.prototype.rawListeners=function(e){return p(this,e,!1)},f.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):x.call(e,t)},f.prototype.listenerCount=x,f.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},13692:function(e,t,r){r(21703);var n=r(6779).Buffer,a=r(74993);function i(e,t,r,i){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");var c=r/8,o=n.alloc(c),f=n.alloc(i||0),d=n.alloc(0);while(c>0||i>0){var s=new a;s.update(d),s.update(e),t&&s.update(t),d=s.digest();var u=0;if(c>0){var b=o.length-c;u=Math.min(c,d.length),d.copy(o,b,0,u),c-=u}if(u0){var h=f.length-i,l=Math.min(i,d.length-u);d.copy(f,h,u,u+l),i-=l}}return d.fill(0),{key:o,iv:f}}e.exports=i},25383:function(e){e.exports=c,c.default=c,c.stable=s,c.stableStringify=s;var t="[...]",r="[Circular]",n=[],a=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function c(e,t,r,c){var o;"undefined"===typeof c&&(c=i()),f(e,"",0,[],void 0,0,c);try{o=0===a.length?JSON.stringify(e,t,r):JSON.stringify(e,b(t),r)}catch(s){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{while(0!==n.length){var d=n.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return o}function o(e,t,r,i){var c=Object.getOwnPropertyDescriptor(i,r);void 0!==c.get?c.configurable?(Object.defineProperty(i,r,{value:e}),n.push([i,r,t,c])):a.push([t,r,e]):(i[r]=e,n.push([i,r,t]))}function f(e,n,a,i,c,d,s){var u;if(d+=1,"object"===typeof e&&null!==e){for(u=0;us.depthLimit)return void o(t,e,n,c);if("undefined"!==typeof s.edgesLimit&&a+1>s.edgesLimit)return void o(t,e,n,c);if(i.push(e),Array.isArray(e))for(u=0;ut?1:0}function s(e,t,r,c){"undefined"===typeof c&&(c=i());var o,f=u(e,"",0,[],void 0,0,c)||e;try{o=0===a.length?JSON.stringify(f,t,r):JSON.stringify(f,b(t),r)}catch(s){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{while(0!==n.length){var d=n.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return o}function u(e,a,i,c,f,s,b){var h;if(s+=1,"object"===typeof e&&null!==e){for(h=0;hb.depthLimit)return void o(t,e,a,f);if("undefined"!==typeof b.edgesLimit&&i+1>b.edgesLimit)return void o(t,e,a,f);if(c.push(e),Array.isArray(e))for(h=0;h0)for(var n=0;n1&&"boolean"!==typeof t)throw new c('"allowMissing" argument must be a boolean');var r=E(e),n=r.length>0?r[0]:"",i=S("%"+n+"%",t),o=i.name,d=i.value,s=!1,u=i.alias;u&&(n=u[0],w(r,y([0,1],u)));for(var b=1,h=!0;b=r.length){var v=f(d,l);h=!!v,d=h&&"get"in v&&!("originalValue"in v.get)?v.get:d[l]}else h=g(d,l),d=d[l];h&&!s&&(p[o]=d)}}return d}},15743:function(e,t,r){var n;n="undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:"undefined"!==typeof self?self:{},e.exports=n},82763:function(e,t,r){"use strict";var n="undefined"!==typeof Symbol&&Symbol,a=r(33994);e.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&a())))}},33994:function(e){"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var a=Object.getOwnPropertySymbols(e);if(1!==a.length||a[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==n||!0!==i.enumerable)return!1}return!0}},92582:function(e,t,r){"use strict";var n=r(33994);e.exports=function(){return n()&&!!Symbol.toStringTag}},5769:function(e,t,r){"use strict";var n=r(49148);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},10761:function(e,t,r){"use strict";r(21703);var n=r(17662).Buffer,a=r(98141).Transform,i=r(81923);function c(e,t){if(!n.isBuffer(e)&&"string"!==typeof e)throw new TypeError(t+" must be a string or a buffer")}function o(e){a.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}i(o,a),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(a){n=a}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)},o.prototype.update=function(e,t){if(c(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));var r=this._block,a=0;while(this._blockOffset+e.length-a>=this._blockSize){for(var i=this._blockOffset;i0;++o)this._length[o]+=f,f=this._length[o]/4294967296|0,f>0&&(this._length[o]-=4294967296*f);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},17662:function(e,t,r){r(21703); /*! safe-buffer. MIT License. Feross Aboukhadijeh */ var n=r(15361),a=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function c(e,t,r){return a(e,t,r)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=c),c.prototype=Object.create(a.prototype),i(a,c),c.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return a(e,t,r)},c.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=a(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},c.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return a(e)},c.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},78730:function(e,t,r){var n=t;n.utils=r(13610),n.common=r(79291),n.sha=r(52762),n.ripemd=r(97),n.hmac=r(4133),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},79291:function(e,t,r){"use strict";var n=r(13610),a=r(14961);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=i,i.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var a=0;a>>24&255,n[a++]=e>>>16&255,n[a++]=e>>>8&255,n[a++]=255&e}else for(n[a++]=255&e,n[a++]=e>>>8&255,n[a++]=e>>>16&255,n[a++]=e>>>24&255,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,i=8;ithis.blockSize&&(e=(new this.Hash).update(e).digest()),a(e.length<=this.blockSize);for(var t=e.length;t>>3}function b(e){return a(e,17)^a(e,19)^e>>>10}t.ft_1=i,t.ch32=c,t.maj32=o,t.p32=f,t.s0_256=d,t.s1_256=s,t.g0_256=u,t.g1_256=b},13610:function(e,t,r){"use strict";var n=r(14961),a=r(81923);function i(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function c(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"===typeof e)if(t){if("hex"===t)for(e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!==0&&(e="0"+e),a=0;a>6|192,r[n++]=63&c|128):i(e,a)?(c=65536+((1023&c)<<10)+(1023&e.charCodeAt(++a)),r[n++]=c>>18|240,r[n++]=c>>12&63|128,r[n++]=c>>6&63|128,r[n++]=63&c|128):(r[n++]=c>>12|224,r[n++]=c>>6&63|128,r[n++]=63&c|128)}else for(a=0;a>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24;return t>>>0}function d(e,t){for(var r="",n=0;n>>0}return c}function h(e,t){for(var r=new Array(4*e.length),n=0,a=0;n>>24,r[a+1]=i>>>16&255,r[a+2]=i>>>8&255,r[a+3]=255&i):(r[a+3]=i>>>24,r[a+2]=i>>>16&255,r[a+1]=i>>>8&255,r[a]=255&i)}return r}function l(e,t){return e>>>t|e<<32-t}function p(e,t){return e<>>32-t}function x(e,t){return e+t>>>0}function m(e,t,r){return e+t+r>>>0}function v(e,t,r,n){return e+t+r+n>>>0}function g(e,t,r,n,a){return e+t+r+n+a>>>0}function y(e,t,r,n){var a=e[t],i=e[t+1],c=n+i>>>0,o=(c>>0,e[t+1]=c}function w(e,t,r,n){var a=t+n>>>0,i=(a>>0}function _(e,t,r,n){var a=t+n;return a>>>0}function M(e,t,r,n,a,i,c,o){var f=0,d=t;d=d+n>>>0,f+=d>>0,f+=d>>0,f+=d>>0}function k(e,t,r,n,a,i,c,o){var f=t+n+i+o;return f>>>0}function A(e,t,r,n,a,i,c,o,f,d){var s=0,u=t;u=u+n>>>0,s+=u>>0,s+=u>>0,s+=u>>0,s+=u>>0}function E(e,t,r,n,a,i,c,o,f,d){var s=t+n+i+o+d;return s>>>0}function S(e,t,r){var n=t<<32-r|e>>>r;return n>>>0}function T(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}function C(e,t,r){return e>>>r}function P(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}t.inherits=a,t.toArray=c,t.toHex=o,t.htonl=f,t.toHex32=d,t.zero2=s,t.zero8=u,t.join32=b,t.split32=h,t.rotr32=l,t.rotl32=p,t.sum32=x,t.sum32_3=m,t.sum32_4=v,t.sum32_5=g,t.sum64=y,t.sum64_hi=w,t.sum64_lo=_,t.sum64_4_hi=M,t.sum64_4_lo=k,t.sum64_5_hi=A,t.sum64_5_lo=E,t.rotr64_hi=S,t.rotr64_lo=T,t.shr64_hi=C,t.shr64_lo=P},72570:function(e,t,r){"use strict";r(21703);var n=r(78730),a=r(26605),i=r(14961);function c(e){if(!(this instanceof c))return new c(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=a.toArray(e.entropy,e.entropyEnc||"hex"),r=a.toArray(e.nonce,e.nonceEnc||"hex"),n=a.toArray(e.pers,e.persEnc||"hex");i(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=c,c.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},c.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=a.toArray(r,n||"hex"),this._update(r));var i=[];while(i.length=196608?r>=917760&&r<=917999?18874368:0:e[t[r>>4]][15&r]}return{mapStr:r,mapChar:n}}))},63304:function(e,t,r){"use strict";r(21703);const n=2147483647,a=36,i=1,c=26,o=38,f=700,d=72,s=128,u="-",b=/^xn--/,h=/[^\0-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=a-i,m=Math.floor,v=String.fromCharCode;function g(e){throw new RangeError(p[e])}function y(e,t){const r=[];let n=e.length;while(n--)r[n]=t(e[n]);return r}function w(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(l,".");const a=e.split("."),i=y(a,t).join(".");return n+i}function _(e){const t=[];let r=0;const n=e.length;while(r=55296&&a<=56319&&rString.fromCodePoint(...e),k=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:a},A=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},E=function(e,t,r){let n=0;for(e=r?m(e/f):e>>1,e+=m(e/t);e>x*c>>1;n+=a)e=m(e/x);return m(n+(x+1)*e/(e+o))},S=function(e){const t=[],r=e.length;let o=0,f=s,b=d,h=e.lastIndexOf(u);h<0&&(h=0);for(let n=0;n=128&&g("not-basic"),t.push(e.charCodeAt(n));for(let d=h>0?h+1:0;d=r&&g("invalid-input");const s=k(e.charCodeAt(d++));(s>=a||s>m((n-o)/t))&&g("overflow"),o+=s*t;const u=f<=b?i:f>=b+c?c:f-b;if(sm(n/h)&&g("overflow"),t*=h}const u=t.length+1;b=E(o-s,u,0==s),m(o/u)>n-f&&g("overflow"),f+=m(o/u),o%=u,t.splice(o++,0,f)}return String.fromCodePoint(...t)},T=function(e){const t=[];e=_(e);let r=e.length,o=s,f=0,b=d;for(const n of e)n<128&&t.push(v(n));let h=t.length,l=h;h&&t.push(u);while(l=o&&tm((n-f)/d)&&g("overflow"),f+=(r-o)*d,o=r;for(const s of e)if(sn&&g("overflow"),s==o){let e=f;for(let r=a;;r+=a){const n=r<=b?i:r>=b+c?c:r-b;if(e>23,b=s>>21&3,h=s>>5&65535,l=31&s,p=t.mapStr.substr(h,l);if(0===b||n&&1&u)throw new Error("Illegal char "+d);1===b?i.push(p):2===b?i.push(a?p:d):3===b&&i.push(d)}var x=i.join("").normalize("NFC");return x}function n(t,n,i){void 0===i&&(i=!1);var c=r(t,i,n),o=c.split(".");return o=o.map((function(t){return t.startsWith("xn--")?(t=e.decode(t.substring(4)),a(t,i,!1)):a(t,i,n),t})),o.join(".")}function a(e,n,a){if("-"===e[2]&&"-"===e[3])throw new Error("Failed to validate "+e);if(e.startsWith("-")||e.endsWith("-"))throw new Error("Failed to validate "+e);if(e.includes("."))throw new Error("Failed to validate "+e);if(r(e,n,a)!==e)throw new Error("Failed to validate "+e);var i=e.codePointAt(0);if(t.mapChar(i)&2<<23)throw new Error("Label contains illegal character: "+i)}function i(t,r){void 0===r&&(r={});var a,i=!("transitional"in r)||r.transitional,c="useStd3ASCII"in r&&r.useStd3ASCII,o="verifyDnsLength"in r&&r.verifyDnsLength,f=n(t,i,c).split("."),d=f.map(e.toASCII),s=d.join(".");if(o){if(s.length<1||s.length>253)throw new Error("DNS name has wrong length: "+s);for(a=0;a63)throw new Error("DNS label has wrong length: "+u)}}return s}function c(e,t){void 0===t&&(t={});var r="useStd3ASCII"in t&&t.useStd3ASCII;return n(e,!1,r)}return{toUnicode:c,toAscii:i}}))},27055:function(e,t){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ t.read=function(e,t,r,n,a){var i,c,o=8*a-n-1,f=(1<>1,s=-7,u=r?a-1:0,b=r?-1:1,h=e[t+u];for(u+=b,i=h&(1<<-s)-1,h>>=-s,s+=o;s>0;i=256*i+e[t+u],u+=b,s-=8);for(c=i&(1<<-s)-1,i>>=-s,s+=n;s>0;c=256*c+e[t+u],u+=b,s-=8);if(0===i)i=1-d;else{if(i===f)return c?NaN:1/0*(h?-1:1);c+=Math.pow(2,n),i-=d}return(h?-1:1)*c*Math.pow(2,i-n)},t.write=function(e,t,r,n,a,i){var c,o,f,d=8*i-a-1,s=(1<>1,b=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,l=n?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,c=s):(c=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-c))<1&&(c--,f*=2),t+=c+u>=1?b/f:b*Math.pow(2,1-u),t*f>=2&&(c++,f/=2),c+u>=s?(o=0,c=s):c+u>=1?(o=(t*f-1)*Math.pow(2,a),c+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,a),c=0));a>=8;e[r+h]=255&o,h+=l,o/=256,a-=8);for(c=c<0;e[r+h]=255&c,h+=l,c/=256,d-=8);e[r+h-l]|=128*p}},81923:function(e){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},32773:function(e,t,r){"use strict";var n=r(92582)(),a=r(15477),i=a("Object.prototype.toString"),c=function(e){return!(n&&e&&"object"===typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},o=function(e){return!!c(e)||null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},f=function(){return c(arguments)}();c.isLegacyArguments=o,e.exports=f?c:o},43940:function(e){e.exports=r;var t=Object.prototype.toString;function r(e){if(!e)return!1;var r=t.call(e);return"[object Function]"===r||"function"===typeof e&&"[object RegExp]"!==r||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}},84784:function(e,t,r){"use strict";var n,a=Object.prototype.toString,i=Function.prototype.toString,c=/^\s*(?:function)?\*/,o=r(92582)(),f=Object.getPrototypeOf,d=function(){if(!o)return!1;try{return Function("return function*() {}")()}catch(e){}};e.exports=function(e){if("function"!==typeof e)return!1;if(c.test(i.call(e)))return!0;if(!o){var t=a.call(e);return"[object GeneratorFunction]"===t}if(!f)return!1;if("undefined"===typeof n){var r=d();n=!!r&&f(r)}return f(e)===n}},44866:function(e,t,r){r(21703),e.exports=function(e){if("string"!==typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},18300:function(e,t,r){"use strict";var n=r(98625),a=r(24647),i=r(15477),c=i("Object.prototype.toString"),o=r(92582)(),f="undefined"===typeof globalThis?r.g:globalThis,d=a(),s=i("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1}return!!h&&p(e)}},6513:function(e,t,r){r(48675),r(3462),e.exports=i,i.strict=c,i.loose=o;var n=Object.prototype.toString,a={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function i(e){return c(e)||o(e)}function c(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function o(e){return a[n.call(e)]}},69893:function(e,t,r){var n,a=r(96027);r(21703),r(48675),r(3462), /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * * @version 0.8.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT */ function(){"use strict";var i="input is invalid type",c="finalize already called",o="object"===typeof window,f=o?window:{};f.JS_SHA3_NO_WINDOW&&(o=!1);var d=!o&&"object"===typeof self,s=!f.JS_SHA3_NO_NODE_JS&&"object"===typeof a&&a.versions&&a.versions.node;s?f=r.g:d&&(f=self);var u=!f.JS_SHA3_NO_COMMON_JS&&e.exports,b=r.amdO,h=!f.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,l="0123456789abcdef".split(""),p=[31,7936,2031616,520093696],x=[4,1024,262144,67108864],m=[1,256,65536,16777216],v=[6,1536,393216,100663296],g=[0,8,16,24],y=[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],w=[224,256,384,512],_=[128,256],M=["hex","buffer","arrayBuffer","array","digest"],k={128:168,256:136};!f.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!f.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var A=function(e,t,r){return function(n){return new z(e,t,e).update(n)[r]()}},E=function(e,t,r){return function(n,a){return new z(e,t,a).update(n)[r]()}},S=function(e,t,r){return function(t,n,a,i){return L["cshake"+e].update(t,n,a,i)[r]()}},T=function(e,t,r){return function(t,n,a,i){return L["kmac"+e].update(t,n,a,i)[r]()}},C=function(e,t,r,n){for(var a=0;a>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function K(e,t,r){z.call(this,e,t,r)}z.prototype.update=function(e){if(this.finalized)throw new Error(c);var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!h||!ArrayBuffer.isView(e)))throw new Error(i);t=!0}var n,a,o=this.blocks,f=this.byteCount,d=e.length,s=this.blockCount,u=0,b=this.s;while(u>2]|=e[u]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(o[n>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=f){for(this.start=n-f,this.block=o[s],n=0;n>=8,r=255&e;while(r>0)a.unshift(r),e>>=8,r=255&e,++n;return t?a.push(n):a.unshift(n),this.update(a),a.length},z.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!h||!ArrayBuffer.isView(e)))throw new Error(i);t=!0}var n=0,a=e.length;if(t)n=a;else for(var c=0;c=57344?n+=3:(o=65536+((1023&o)<<10|1023&e.charCodeAt(++c)),n+=4)}return n+=this.encode(8*n),this.update(e),n},z.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+l[15&e]+l[e>>12&15]+l[e>>8&15]+l[e>>20&15]+l[e>>16&15]+l[e>>28&15]+l[e>>24&15];c%t===0&&($(r),i=0)}return a&&(e=r[i],o+=l[e>>4&15]+l[15&e],a>1&&(o+=l[e>>12&15]+l[e>>8&15]),a>2&&(o+=l[e>>20&15]+l[e>>16&15])),o},z.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,a=this.extraBytes,i=0,c=0,o=this.outputBits>>3;e=a?new ArrayBuffer(n+1<<2):new ArrayBuffer(o);var f=new Uint32Array(e);while(c>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;o%r===0&&$(n)}return i&&(e=o<<2,t=n[c],f[e]=255&t,i>1&&(f[e+1]=t>>8&255),i>2&&(f[e+2]=t>>16&255)),f},K.prototype=new z,K.prototype.finalize=function(){return this.encode(this.outputBits,!0),z.prototype.finalize.call(this)};var $=function(e){var t,r,n,a,i,c,o,f,d,s,u,b,h,l,p,x,m,v,g,w,_,M,k,A,E,S,T,C,P,O,R,I,B,L,N,U,j,D,F,H,q,z,K,$,G,V,W,Z,J,Y,X,Q,ee,te,re,ne,ae,ie,ce,oe,fe,de,se;for(n=0;n<48;n+=2)a=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],c=e[2]^e[12]^e[22]^e[32]^e[42],o=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],d=e[5]^e[15]^e[25]^e[35]^e[45],s=e[6]^e[16]^e[26]^e[36]^e[46],u=e[7]^e[17]^e[27]^e[37]^e[47],b=e[8]^e[18]^e[28]^e[38]^e[48],h=e[9]^e[19]^e[29]^e[39]^e[49],t=b^(c<<1|o>>>31),r=h^(o<<1|c>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=a^(f<<1|d>>>31),r=i^(d<<1|f>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=c^(s<<1|u>>>31),r=o^(u<<1|s>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=f^(b<<1|h>>>31),r=d^(h<<1|b>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=s^(a<<1|i>>>31),r=u^(i<<1|a>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,l=e[0],p=e[1],V=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,C=e[20]<<3|e[21]>>>29,P=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,x=e[13]<<12|e[12]>>>20,m=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,O=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,de=e[42]<<2|e[43]>>>30,se=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,U=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,g=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,I=e[45]<<29|e[44]>>>3,B=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,E=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ae=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,$=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,S=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,ce=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,M=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=l^~x&v,e[1]=p^~m&g,e[10]=A^~S&C,e[11]=E^~T&P,e[20]=L^~U&D,e[21]=N^~j&F,e[30]=$^~V&Z,e[31]=G^~W&J,e[40]=te^~ne&ie,e[41]=re^~ae&ce,e[2]=x^~v&w,e[3]=m^~g&_,e[12]=S^~C&O,e[13]=T^~P&R,e[22]=U^~D&H,e[23]=j^~F&q,e[32]=V^~Z&Y,e[33]=W^~J&X,e[42]=ne^~ie&oe,e[43]=ae^~ce&fe,e[4]=v^~w&M,e[5]=g^~_&k,e[14]=C^~O&I,e[15]=P^~R&B,e[24]=D^~H&z,e[25]=F^~q&K,e[34]=Z^~Y&Q,e[35]=J^~X&ee,e[44]=ie^~oe&de,e[45]=ce^~fe&se,e[6]=w^~M&l,e[7]=_^~k&p,e[16]=O^~I&A,e[17]=R^~B&E,e[26]=H^~z&L,e[27]=q^~K&N,e[36]=Y^~Q&$,e[37]=X^~ee&G,e[46]=oe^~de&te,e[47]=fe^~se&re,e[8]=M^~l&x,e[9]=k^~p&m,e[18]=I^~A&S,e[19]=B^~E&T,e[28]=z^~L&U,e[29]=K^~N&j,e[38]=Q^~$&V,e[39]=ee^~G&W,e[48]=de^~te&ne,e[49]=se^~re&ae,e[0]^=y[n],e[1]^=y[n+1]};if(u)e.exports=L;else{for(U=0;U{try{const[a,i,o]=await c._runAllMiddleware(e,t,this._middleware);return i?(await c._runReturnHandlers(o),n(a)):r((async e=>{try{await c._runReturnHandlers(o)}catch(t){return e(t)}return e()}))}catch(a){return n(a)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(r){if(t)return t(r);throw r}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,r)=>{t(r)}))}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!==typeof e){const r=new i.EthereumRpcError(i.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:void 0,jsonrpc:"2.0",error:r})}if("string"!==typeof e.method){const r=new i.EthereumRpcError(i.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=Object.assign({},e),n={id:r.id,jsonrpc:r.jsonrpc};let a=null;try{await this._processRequest(r,n)}catch(c){a=c}return a&&(delete n.result,n.error||(n.error=i.serializeError(a))),t(a,n)}async _processRequest(e,t){const[r,n,a]=await c._runAllMiddleware(e,t,this._middleware);if(c._checkForCompletion(e,t,n),await c._runReturnHandlers(a),r)throw r}static async _runAllMiddleware(e,t,r){const n=[];let a=null,i=!1;for(const o of r)if([a,i]=await c._runMiddleware(e,t,o,n),i)break;return[a,i,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((a=>{const c=e=>{const r=e||t.error;r&&(t.error=i.serializeError(r)),a([r,!0])},f=r=>{t.error?c(t.error):(r&&("function"!==typeof r&&c(new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${o(e)}`,{request:e})),n.push(r)),a([null,!1]))};try{r(e,t,f,c)}catch(d){c(d)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${o(e)}`,{request:e});if(!r)throw new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${o(e)}`,{request:e})}}function o(e){return JSON.stringify(e,null,2)}t.JsonRpcEngine=c},26993:function(e,t){"use strict";function r(e){return async(t,r,n,a)=>{let i;const c=new Promise((e=>{i=e}));let o=null,f=!1;const d=async()=>{f=!0,n((e=>{o=e,i()})),await c};try{await e(t,r,d),f?(await c,o(null)):a(null)}catch(s){o?o(s):a(s)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.createAsyncMiddleware=void 0,t.createAsyncMiddleware=r},79430:function(e,t){"use strict";function r(e){return(t,r,n,a)=>{const i=e[t.method];return void 0===i?n():"function"===typeof i?i(t,r,n,a):(r.result=i,a())}}Object.defineProperty(t,"__esModule",{value:!0}),t.createScaffoldMiddleware=void 0,t.createScaffoldMiddleware=r},80321:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUniqueId=void 0;const r=4294967295;let n=Math.floor(Math.random()*r);function a(){return n=(n+1)%r,n}t.getUniqueId=a},71298:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createIdRemapMiddleware=void 0;const n=r(80321);function a(){return(e,t,r,a)=>{const i=e.id,c=n.getUniqueId();e.id=c,t.id=c,r((r=>{e.id=i,t.id=i,r()}))}}t.createIdRemapMiddleware=a},2482:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(71298),t),a(r(26993),t),a(r(79430),t),a(r(80321),t),a(r(71222),t),a(r(33848),t)},33848:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMiddleware=void 0;const n=r(71222);function a(e){const t=new n.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}t.mergeMiddleware=a},29648:function(e,t,r){"use strict";r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const n=r(25383);class a extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!==typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n.default(this.serialize(),o,2)}}t.EthereumRpcError=a;class i extends a{constructor(e,t,r){if(!c(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}function c(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function o(e,t){if("[Circular]"!==t)return t}t.EthereumProviderError=i},14668:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},43791:function(e,t,r){"use strict";r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const n=r(29648),a=r(10696),i=r(14668);function c(e,t){const[r,i]=f(t);return new n.EthereumRpcError(e,r||a.getMessageFromCode(e),i)}function o(e,t){const[r,i]=f(t);return new n.EthereumProviderError(e,r||a.getMessageFromCode(e),i)}function f(e){if(e){if("string"===typeof e)return[e];if("object"===typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!==typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}t.ethErrors={rpc:{parse:e=>c(i.errorCodes.rpc.parse,e),invalidRequest:e=>c(i.errorCodes.rpc.invalidRequest,e),invalidParams:e=>c(i.errorCodes.rpc.invalidParams,e),methodNotFound:e=>c(i.errorCodes.rpc.methodNotFound,e),internal:e=>c(i.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return c(t,e)},invalidInput:e=>c(i.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>c(i.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>c(i.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>c(i.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>c(i.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>c(i.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>o(i.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>o(i.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>o(i.errorCodes.provider.unsupportedMethod,e),disconnected:e=>o(i.errorCodes.provider.disconnected,e),chainDisconnected:e=>o(i.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:a}=e;if(!r||"string"!==typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,a)}}}},86901:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const n=r(29648);Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});const a=r(10696);Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return a.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return a.getMessageFromCode}});const i=r(43791);Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return i.ethErrors}});const c=r(14668);Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return c.errorCodes}})},10696:function(e,t,r){"use strict";r(21703),Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(14668),a=r(29648),i=n.errorCodes.rpc.internal,c="Unspecified error message. This is a bug, please report it.",o={code:i,message:f(i)};function f(e,r=c){if(Number.isInteger(e)){const r=e.toString();if(h(n.errorValues,r))return n.errorValues[r].message;if(u(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function d(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n.errorValues[t]||!!u(e)}function s(e,{fallbackError:t=o,shouldIncludeStack:r=!1}={}){var n,i;if(!t||!Number.isInteger(t.code)||"string"!==typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof a.EthereumRpcError)return e.serialize();const c={};if(e&&"object"===typeof e&&!Array.isArray(e)&&h(e,"code")&&d(e.code)){const t=e;c.code=t.code,t.message&&"string"===typeof t.message?(c.message=t.message,h(t,"data")&&(c.data=t.data)):(c.message=f(c.code),c.data={originalError:b(e)})}else{c.code=t.code;const r=null===(n=e)||void 0===n?void 0:n.message;c.message=r&&"string"===typeof r?r:t.message,c.data={originalError:b(e)}}const s=null===(i=e)||void 0===i?void 0:i.stack;return r&&e&&s&&"string"===typeof s&&(c.stack=s),c}function u(e){return e>=-32099&&e<=-32e3}function b(e){return e&&"object"===typeof e&&!Array.isArray(e)?Object.assign({},e):e}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=f,t.isValidCode=d,t.serializeError=s},21770:function(e){function t(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r="undefined"!==typeof e.start?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}e.exports=t},40391:function(e,t,r){r(21703);var n="undefined"!==typeof JSON?JSON:r(34286);e.exports=function(e,t){t||(t={}),"function"===typeof t&&(t={cmp:t});var r=t.space||"";"number"===typeof r&&(r=Array(r+1).join(" "));var c="boolean"===typeof t.cycles&&t.cycles,o=t.replacer||function(e,t){return t},f=t.cmp&&function(e){return function(t){return function(r,n){var a={key:r,value:t[r]},i={key:n,value:t[n]};return e(a,i)}}}(t.cmp),d=[];return function e(t,s,u,b){var h=r?"\n"+new Array(b+1).join(r):"",l=r?": ":":";if(u&&u.toJSON&&"function"===typeof u.toJSON&&(u=u.toJSON()),u=o.call(t,s,u),void 0!==u){if("object"!==typeof u||null===u)return n.stringify(u);if(a(u)){for(var p=[],x=0;x="0"&&r<="9")t+=r,o();if("."===r){t+=".";while(o()&&r>="0"&&r<="9")t+=r}if("e"===r||"E"===r){t+=r,o(),"-"!==r&&"+"!==r||(t+=r,o());while(r>="0"&&r<="9")t+=r,o()}if(e=+t,isFinite(e))return e;c("Bad number")},d=function(){var e,t,n,a="";if('"'===r)while(o()){if('"'===r)return o(),a;if("\\"===r)if(o(),"u"===r){for(n=0,t=0;t<4;t+=1){if(e=parseInt(o(),16),!isFinite(e))break;n=16*n+e}a+=String.fromCharCode(n)}else{if("string"!==typeof i[r])break;a+=i[r]}else a+=r}c("Bad string")},s=function(){while(r&&r<=" ")o()},u=function(){switch(r){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}c("Unexpected '"+r+"'")},b=function(){var e=[];if("["===r){if(o("["),s(),"]"===r)return o("]"),e;while(r){if(e.push(a()),s(),"]"===r)return o("]"),e;o(","),s()}}c("Bad array")},h=function(){var e,t={};if("{"===r){if(o("{"),s(),"}"===r)return o("}"),t;while(r){if(e=d(),s(),o(":"),Object.hasOwnProperty.call(t,e)&&c('Duplicate key "'+e+'"'),t[e]=a(),s(),"}"===r)return o("}"),t;o(","),s()}}c("Bad object")};a=function(){switch(s(),r){case"{":return h();case"[":return b();case'"':return d();case"-":return f();default:return r>="0"&&r<="9"?f():u()}},e.exports=function(e,i){var o;return n=e,t=0,r=" ",o=a(),s(),r&&c("Syntax error"),"function"===typeof i?function e(t,r){var n,a,c=t[r];if(c&&"object"===typeof c)for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(a=e(c,n),void 0!==a?c[n]=a:delete c[n]);return i.call(t,r,c)}({"":o},""):o}},69185:function(e,t,r){r(21703);var n,a,i,c=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function f(e){return c.lastIndex=0,c.test(e)?'"'+e.replace(c,(function(e){var t=o[e];return"string"===typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function d(e,t){var r,c,o,s,u,b=n,h=t[e];switch(h&&"object"===typeof h&&"function"===typeof h.toJSON&&(h=h.toJSON(e)),"function"===typeof i&&(h=i.call(t,e,h)),typeof h){case"string":return f(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(n+=a,u=[],"[object Array]"===Object.prototype.toString.apply(h)){for(s=h.length,r=0;rclass t extends a{constructor(t,r,n,a,i){super(i),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=a,this._options=i,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(a){n=a}r(n)}_flush(e){let t=null;try{this.push(this.digest())}catch(r){t=r}e(t)}update(e,t){if(!n.isBuffer(e)&&"string"!==typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},66627:function(e,t,r){var n=r(15361)["Buffer"];r(21703);const{Transform:a}=r(98141);e.exports=e=>class t extends a{constructor(t,r,n,a){super(a),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._options=a,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(a){n=a}r(n)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!n.isBuffer(e)&&"string"!==typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},27269:function(e,t){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];t.p1600=function(e){for(let t=0;t<24;++t){const n=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],i=e[2]^e[12]^e[22]^e[32]^e[42],c=e[3]^e[13]^e[23]^e[33]^e[43],o=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],s=e[7]^e[17]^e[27]^e[37]^e[47],u=e[8]^e[18]^e[28]^e[38]^e[48],b=e[9]^e[19]^e[29]^e[39]^e[49];let h=u^(i<<1|c>>>31),l=b^(c<<1|i>>>31);const p=e[0]^h,x=e[1]^l,m=e[10]^h,v=e[11]^l,g=e[20]^h,y=e[21]^l,w=e[30]^h,_=e[31]^l,M=e[40]^h,k=e[41]^l;h=n^(o<<1|f>>>31),l=a^(f<<1|o>>>31);const A=e[2]^h,E=e[3]^l,S=e[12]^h,T=e[13]^l,C=e[22]^h,P=e[23]^l,O=e[32]^h,R=e[33]^l,I=e[42]^h,B=e[43]^l;h=i^(d<<1|s>>>31),l=c^(s<<1|d>>>31);const L=e[4]^h,N=e[5]^l,U=e[14]^h,j=e[15]^l,D=e[24]^h,F=e[25]^l,H=e[34]^h,q=e[35]^l,z=e[44]^h,K=e[45]^l;h=o^(u<<1|b>>>31),l=f^(b<<1|u>>>31);const $=e[6]^h,G=e[7]^l,V=e[16]^h,W=e[17]^l,Z=e[26]^h,J=e[27]^l,Y=e[36]^h,X=e[37]^l,Q=e[46]^h,ee=e[47]^l;h=d^(n<<1|a>>>31),l=s^(a<<1|n>>>31);const te=e[8]^h,re=e[9]^l,ne=e[18]^h,ae=e[19]^l,ie=e[28]^h,ce=e[29]^l,oe=e[38]^h,fe=e[39]^l,de=e[48]^h,se=e[49]^l,ue=p,be=x,he=v<<4|m>>>28,le=m<<4|v>>>28,pe=g<<3|y>>>29,xe=y<<3|g>>>29,me=_<<9|w>>>23,ve=w<<9|_>>>23,ge=M<<18|k>>>14,ye=k<<18|M>>>14,we=A<<1|E>>>31,_e=E<<1|A>>>31,Me=T<<12|S>>>20,ke=S<<12|T>>>20,Ae=C<<10|P>>>22,Ee=P<<10|C>>>22,Se=R<<13|O>>>19,Te=O<<13|R>>>19,Ce=I<<2|B>>>30,Pe=B<<2|I>>>30,Oe=N<<30|L>>>2,Re=L<<30|N>>>2,Ie=U<<6|j>>>26,Be=j<<6|U>>>26,Le=F<<11|D>>>21,Ne=D<<11|F>>>21,Ue=H<<15|q>>>17,je=q<<15|H>>>17,De=K<<29|z>>>3,Fe=z<<29|K>>>3,He=$<<28|G>>>4,qe=G<<28|$>>>4,ze=W<<23|V>>>9,Ke=V<<23|W>>>9,$e=Z<<25|J>>>7,Ge=J<<25|Z>>>7,Ve=Y<<21|X>>>11,We=X<<21|Y>>>11,Ze=ee<<24|Q>>>8,Je=Q<<24|ee>>>8,Ye=te<<27|re>>>5,Xe=re<<27|te>>>5,Qe=ne<<20|ae>>>12,et=ae<<20|ne>>>12,tt=ce<<7|ie>>>25,rt=ie<<7|ce>>>25,nt=oe<<8|fe>>>24,at=fe<<8|oe>>>24,it=de<<14|se>>>18,ct=se<<14|de>>>18;e[0]=ue^~Me&Le,e[1]=be^~ke&Ne,e[10]=He^~Qe&pe,e[11]=qe^~et&xe,e[20]=we^~Ie&$e,e[21]=_e^~Be&Ge,e[30]=Ye^~he&Ae,e[31]=Xe^~le&Ee,e[40]=Oe^~ze&tt,e[41]=Re^~Ke&rt,e[2]=Me^~Le&Ve,e[3]=ke^~Ne&We,e[12]=Qe^~pe&Se,e[13]=et^~xe&Te,e[22]=Ie^~$e&nt,e[23]=Be^~Ge&at,e[32]=he^~Ae&Ue,e[33]=le^~Ee&je,e[42]=ze^~tt&me,e[43]=Ke^~rt&ve,e[4]=Le^~Ve&it,e[5]=Ne^~We&ct,e[14]=pe^~Se&De,e[15]=xe^~Te&Fe,e[24]=$e^~nt&ge,e[25]=Ge^~at&ye,e[34]=Ae^~Ue&Ze,e[35]=Ee^~je&Je,e[44]=tt^~me&Ce,e[45]=rt^~ve&Pe,e[6]=Ve^~it&ue,e[7]=We^~ct&be,e[16]=Se^~De&He,e[17]=Te^~Fe&qe,e[26]=nt^~ge&we,e[27]=at^~ye&_e,e[36]=Ue^~Ze&Ye,e[37]=je^~Je&Xe,e[46]=me^~Ce&Oe,e[47]=ve^~Pe&Re,e[8]=it^~ue&Me,e[9]=ct^~be&ke,e[18]=De^~He&Qe,e[19]=Fe^~qe&et,e[28]=ge^~we&Ie,e[29]=ye^~_e&Be,e[38]=Ze^~Ye&he,e[39]=Je^~Xe&le,e[48]=Ce^~Oe&ze,e[49]=Pe^~Re&Ke,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},79464:function(e,t,r){var n=r(15361)["Buffer"];const a=r(27269);function i(){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}i.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(let t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(a.p1600(this.state),this.count=0);return t},i.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i},41552:function(){(function(e,t){var r,n=e.document,a=n.documentElement,i=n.querySelector('meta[name="viewport"]'),c=n.querySelector('meta[name="flexible"]'),o=0,f=0,d=t.flexible||(t.flexible={});if(i){console.warn("将根据已有的meta标签来设置缩放比例");var s=i.getAttribute("content").match(/initial\-scale=([\d\.]+)/);s&&(f=parseFloat(s[1]),o=parseInt(1/f))}else if(c){var u=c.getAttribute("content");if(u){var b=u.match(/initial\-dpr=([\d\.]+)/),h=u.match(/maximum\-dpr=([\d\.]+)/);b&&(o=parseFloat(b[1]),f=parseFloat((1/o).toFixed(2))),h&&(o=parseFloat(h[1]),f=parseFloat((1/o).toFixed(2)))}}if(!o&&!f){e.navigator.appVersion.match(/android/gi);var l=e.navigator.appVersion.match(/iphone/gi),p=e.devicePixelRatio;o=l?p>=3&&(!o||o>=3)?3:p>=2&&(!o||o>=2)?2:1:1,f=1/o}if(a.setAttribute("data-dpr",o),!i)if(i=n.createElement("meta"),i.setAttribute("name","viewport"),i.setAttribute("content","initial-scale="+f+", maximum-scale="+f+", minimum-scale="+f+", user-scalable=no"),a.firstElementChild)a.firstElementChild.appendChild(i);else{var x=n.createElement("div");x.appendChild(i),n.write(x.innerHTML)}function m(){var t=a.getBoundingClientRect().width;t/o>540&&(t=540*o);var r=t/10;a.style.fontSize=r+"px",d.rem=e.rem=r}e.addEventListener("resize",(function(){clearTimeout(r),r=setTimeout(m,300)}),!1),e.addEventListener("pageshow",(function(e){e.persisted&&(clearTimeout(r),r=setTimeout(m,300))}),!1),"complete"===n.readyState?n.body.style.fontSize=12*o+"px":n.addEventListener("DOMContentLoaded",(function(e){n.body.style.fontSize=12*o+"px"}),!1),m(),d.dpr=e.dpr=o,d.refreshRem=m,d.rem2px=function(e){var t=parseFloat(e)*this.rem;return"string"===typeof e&&e.match(/rem$/)&&(t+="px"),t},d.px2rem=function(e){var t=parseFloat(e)/this.rem;return"string"===typeof e&&e.match(/px$/)&&(t+="rem"),t}})(window,window["lib"]||(window["lib"]={}))},99016:function(e,t,r){var n=r(69159),a=n.Symbol;e.exports=a},7498:function(e,t,r){var n=r(52802),a=r(68804),i=r(26602),c=r(21976),o=r(38286),f=r(56965),d=Object.prototype,s=d.hasOwnProperty;function u(e,t){var r=i(e),d=!r&&a(e),u=!r&&!d&&c(e),b=!r&&!d&&!u&&f(e),h=r||d||u||b,l=h?n(e.length,String):[],p=l.length;for(var x in e)!t&&!s.call(e,x)||h&&("length"==x||u&&("offset"==x||"parent"==x)||b&&("buffer"==x||"byteLength"==x||"byteOffset"==x)||o(x,p))||l.push(x);return l}e.exports=u},96423:function(e,t,r){var n=r(99016),a=r(52366),i=r(52886),c="[object Null]",o="[object Undefined]",f=n?n.toStringTag:void 0;function d(e){return null==e?void 0===e?o:c:f&&f in Object(e)?a(e):i(e)}e.exports=d},29986:function(e,t,r){var n=r(96423),a=r(74430),i="[object Arguments]";function c(e){return a(e)&&n(e)==i}e.exports=c},86930:function(e,t,r){var n=r(96423),a=r(84629),i=r(74430),c="[object Arguments]",o="[object Array]",f="[object Boolean]",d="[object Date]",s="[object Error]",u="[object Function]",b="[object Map]",h="[object Number]",l="[object Object]",p="[object RegExp]",x="[object Set]",m="[object String]",v="[object WeakMap]",g="[object ArrayBuffer]",y="[object DataView]",w="[object Float32Array]",_="[object Float64Array]",M="[object Int8Array]",k="[object Int16Array]",A="[object Int32Array]",E="[object Uint8Array]",S="[object Uint8ClampedArray]",T="[object Uint16Array]",C="[object Uint32Array]",P={};function O(e){return i(e)&&a(e.length)&&!!P[n(e)]}P[w]=P[_]=P[M]=P[k]=P[A]=P[E]=P[S]=P[T]=P[C]=!0,P[c]=P[o]=P[g]=P[f]=P[y]=P[d]=P[s]=P[u]=P[b]=P[h]=P[l]=P[p]=P[x]=P[m]=P[v]=!1,e.exports=O},841:function(e,t,r){var n=r(9192),a=r(47348),i=Object.prototype,c=i.hasOwnProperty;function o(e){if(!n(e))return a(e);var t=[];for(var r in Object(e))c.call(e,r)&&"constructor"!=r&&t.push(r);return t}e.exports=o},52802:function(e){function t(e,t){var r=-1,n=Array(e);while(++r-1&&e%1==0&&e-1&&e%1==0&&e<=t}e.exports=r},70150:function(e){function t(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=t},74430:function(e){function t(e){return null!=e&&"object"==typeof e}e.exports=t},56965:function(e,t,r){var n=r(86930),a=r(87362),i=r(71330),c=i&&i.isTypedArray,o=c?a(c):n;e.exports=o},24337:function(e,t,r){var n=r(7498),a=r(841),i=r(45372);function c(e){return i(e)?n(e):a(e)}e.exports=c},98869:function(e){function t(){}e.exports=t},22225:function(e){function t(){return!1}e.exports=t},74993:function(e,t,r){"use strict";var n=r(81923),a=r(10761),i=r(6779).Buffer,c=new Array(16);function o(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function f(e,t){return e<>>32-t}function d(e,t,r,n,a,i,c){return f(e+(t&r|~t&n)+a+i|0,c)+t|0}function s(e,t,r,n,a,i,c){return f(e+(t&n|r&~n)+a+i|0,c)+t|0}function u(e,t,r,n,a,i,c){return f(e+(t^r^n)+a+i|0,c)+t|0}function b(e,t,r,n,a,i,c){return f(e+(r^(t|~n))+a+i|0,c)+t|0}n(o,a),o.prototype._update=function(){for(var e=c,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,a=this._c,i=this._d;r=d(r,n,a,i,e[0],3614090360,7),i=d(i,r,n,a,e[1],3905402710,12),a=d(a,i,r,n,e[2],606105819,17),n=d(n,a,i,r,e[3],3250441966,22),r=d(r,n,a,i,e[4],4118548399,7),i=d(i,r,n,a,e[5],1200080426,12),a=d(a,i,r,n,e[6],2821735955,17),n=d(n,a,i,r,e[7],4249261313,22),r=d(r,n,a,i,e[8],1770035416,7),i=d(i,r,n,a,e[9],2336552879,12),a=d(a,i,r,n,e[10],4294925233,17),n=d(n,a,i,r,e[11],2304563134,22),r=d(r,n,a,i,e[12],1804603682,7),i=d(i,r,n,a,e[13],4254626195,12),a=d(a,i,r,n,e[14],2792965006,17),n=d(n,a,i,r,e[15],1236535329,22),r=s(r,n,a,i,e[1],4129170786,5),i=s(i,r,n,a,e[6],3225465664,9),a=s(a,i,r,n,e[11],643717713,14),n=s(n,a,i,r,e[0],3921069994,20),r=s(r,n,a,i,e[5],3593408605,5),i=s(i,r,n,a,e[10],38016083,9),a=s(a,i,r,n,e[15],3634488961,14),n=s(n,a,i,r,e[4],3889429448,20),r=s(r,n,a,i,e[9],568446438,5),i=s(i,r,n,a,e[14],3275163606,9),a=s(a,i,r,n,e[3],4107603335,14),n=s(n,a,i,r,e[8],1163531501,20),r=s(r,n,a,i,e[13],2850285829,5),i=s(i,r,n,a,e[2],4243563512,9),a=s(a,i,r,n,e[7],1735328473,14),n=s(n,a,i,r,e[12],2368359562,20),r=u(r,n,a,i,e[5],4294588738,4),i=u(i,r,n,a,e[8],2272392833,11),a=u(a,i,r,n,e[11],1839030562,16),n=u(n,a,i,r,e[14],4259657740,23),r=u(r,n,a,i,e[1],2763975236,4),i=u(i,r,n,a,e[4],1272893353,11),a=u(a,i,r,n,e[7],4139469664,16),n=u(n,a,i,r,e[10],3200236656,23),r=u(r,n,a,i,e[13],681279174,4),i=u(i,r,n,a,e[0],3936430074,11),a=u(a,i,r,n,e[3],3572445317,16),n=u(n,a,i,r,e[6],76029189,23),r=u(r,n,a,i,e[9],3654602809,4),i=u(i,r,n,a,e[12],3873151461,11),a=u(a,i,r,n,e[15],530742520,16),n=u(n,a,i,r,e[2],3299628645,23),r=b(r,n,a,i,e[0],4096336452,6),i=b(i,r,n,a,e[7],1126891415,10),a=b(a,i,r,n,e[14],2878612391,15),n=b(n,a,i,r,e[5],4237533241,21),r=b(r,n,a,i,e[12],1700485571,6),i=b(i,r,n,a,e[3],2399980690,10),a=b(a,i,r,n,e[10],4293915773,15),n=b(n,a,i,r,e[1],2240044497,21),r=b(r,n,a,i,e[8],1873313359,6),i=b(i,r,n,a,e[15],4264355552,10),a=b(a,i,r,n,e[6],2734768916,15),n=b(n,a,i,r,e[13],1309151649,21),r=b(r,n,a,i,e[4],4149444226,6),i=b(i,r,n,a,e[11],3174756917,10),a=b(a,i,r,n,e[2],718787259,15),n=b(n,a,i,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+a|0,this._d=this._d+i|0},o.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 e=i.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=o},68529:function(e,t,r){var n=r(2396),a=r(31482);function i(e){this.rand=e||new a.Rand}e.exports=i,i.create=function(e){return new i(e)},i.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var a=new n(this.rand.generate(r))}while(a.cmp(e)>=0);return a},i.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},i.prototype.test=function(e,t,r){var a=e.bitLength(),i=n.mont(e),c=new n(1).toRed(i);t||(t=Math.max(1,a/48|0));for(var o=e.subn(1),f=0;!o.testn(f);f++);for(var d=e.shrn(f),s=o.toRed(i),u=!0;t>0;t--){var b=this._randrange(new n(2),o);r&&r(b);var h=b.toRed(i).redPow(d);if(0!==h.cmp(c)&&0!==h.cmp(s)){for(var l=1;l0;t--){var s=this._randrange(new n(2),c),u=e.gcd(s);if(0!==u.cmpn(1))return u;var b=s.toRed(a).redPow(f);if(0!==b.cmp(i)&&0!==b.cmp(d)){for(var h=1;h>8,c=255&a;i?r.push(i,c):r.push(c)}return r}function a(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r=8&&(c[i++]=a>>>n-8&255,n-=8);return c.buffer}function a(e,t){const r=e.byteLength,n=new Uint8Array(e),a=t.indexOf("=")===t.length-1;a&&(t=t.substring(0,t.length-1));let i=0,c=0,o="";for(let f=0;f=5)o+=t[c>>>i-5&31],i-=5}if(i>0&&(o+=t[c<<5-i&31]),a)while(o.length%8!==0)o+="=";return o}r(48675),r(3462),r(21703),e.exports=function(e){return{encode(t){return a("string"===typeof t?Uint8Array.from(t):t,e)},decode(t){for(const r of t)if(e.indexOf(r)<0)throw new Error("invalid base32 character");return n(t,e)}}}},68627:function(e,t,r){"use strict";r(21703);const{Buffer:n}=r(15361);e.exports=function(e){const t=e.indexOf("=")>-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode(e){let a="";a="string"===typeof e?n.from(e).toString("base64"):e.toString("base64"),r&&(a=a.replace(/\+/g,"-").replace(/\//g,"_"));const i=a.indexOf("=");return i>0&&!t&&(a=a.substring(0,i)),a},decode(t){for(const r of t)if(e.indexOf(r)<0)throw new Error("invalid base64 character");return n.from(t,"base64")}}}},21985:function(e,t,r){"use strict";const n=r(91654),a=r(12516),i=r(69488),c=r(36359),o=r(68627),f=[["base1","1","","1"],["base2","0",a,"01"],["base8","7",a,"01234567"],["base10","9",a,"0123456789"],["base16","f",i,"0123456789abcdef"],["base32","b",c,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",c,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",c,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",c,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",c,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",a,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",a,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",o,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",o,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",o,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",o,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],d=f.reduce(((e,t)=>(e[t[0]]=new n(t[0],t[1],t[2],t[3]),e)),{}),s=f.reduce(((e,t)=>(e[t[1]]=d[t[0]],e)),{});e.exports={names:d,codes:s}},64869:function(e,t,r){"use strict";r(21703);const{Buffer:n}=r(15361),a=r(21985);t=e.exports=c,t.encode=o,t.decode=f,t.isEncoded=d,t.names=Object.freeze(Object.keys(a.names)),t.codes=Object.freeze(Object.keys(a.codes));const i=new Error("Unsupported encoding");function c(e,t){if(!t)throw new Error("requires an encoded buffer");const r=u(e),a=n.from(r.code),i=r.name;return s(i,t),n.concat([a,t])}function o(e,t){const r=u(e),a=r.name;return c(a,n.from(r.encode(t)))}function f(e){n.isBuffer(e)&&(e=e.toString());const t=e.substring(0,1);e=e.substring(1,e.length),"string"===typeof e&&(e=n.from(e));const r=u(t);return n.from(r.decode(e.toString()))}function d(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;const t=e.substring(0,1);try{const e=u(t);return e.name}catch(r){return!1}}function s(e,t){const r=u(e);r.decode(t.toString())}function u(e){let t;if(a.names[e])t=a.names[e];else{if(!a.codes[e])throw i;t=a.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}},42177:function(e,t,r){"use strict";const n=r(24070),a={};for(const[i,c]of Object.entries(n))a[i.toUpperCase().replace(/-/g,"_")]=c;e.exports=Object.freeze(a)},58429:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703);const a=r(42611),i=r(84644),c=r(20032),o=r(23036);t=e.exports,t.addPrefix=(e,t)=>{let r;if(n.isBuffer(e))r=o.varintBufferEncode(e);else{if(!c[e])throw new Error("multicodec not recognized");r=c[e]}return n.concat([r,t])},t.rmPrefix=e=>(a.decode(e),e.slice(a.decode.bytes)),t.getCodec=e=>{const t=a.decode(e),r=i.get(t);if(void 0===r)throw new Error(`Code ${t} not found`);return r},t.getName=e=>i.get(e),t.getNumber=e=>{const t=c[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return o.varintBufferDecode(t)[0]},t.getCode=e=>a.decode(e),t.getCodeVarint=e=>{const t=c[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=e=>a.encode(e);const f=r(42177);Object.assign(t,f),t.print=r(96376)},84644:function(e,t,r){"use strict";const n=r(24070),a=new Map;for(const i in n){const e=n[i];a.set(e,i)}e.exports=Object.freeze(a)},96376:function(e,t,r){"use strict";const n=r(24070),a={};for(const[i,c]of Object.entries(n))void 0===a[c]&&(a[c]=i);e.exports=Object.freeze(a)},23036:function(e,t,r){"use strict";var n=r(15361)["Buffer"];const a=r(42611);function i(e){return parseInt(e.toString("hex"),16)}function c(e){let t=e.toString(16);return t.length%2===1&&(t="0"+t),n.from(t,"hex")}function o(e){return n.from(a.encode(i(e)))}function f(e){return c(a.decode(e))}function d(e){return n.from(a.encode(e))}e.exports={numberToBuffer:c,bufferToNumber:i,varintBufferEncode:o,varintBufferDecode:f,varintEncode:d}},20032:function(e,t,r){"use strict";const n=r(24070),a=r(23036).varintEncode,i={};for(const c in n){const e=n[c];i[c]=a(e)}e.exports=Object.freeze(i)},42786:function(e){"use strict";class t{constructor(e,t,r,n){this.name=e,this.code=t,this.alphabet=n,r&&n&&(this.engine=r(n))}encode(e){return this.engine.encode(e)}decode(e){return this.engine.decode(e)}isImplemented(){return this.engine}}e.exports=t},32133:function(e,t,r){"use strict";r(21703);const{Buffer:n}=r(15361);e.exports=function(e){return{encode(e){return"string"===typeof e?n.from(e).toString("hex"):e.toString("hex")},decode(t){for(const r of t)if(e.indexOf(r)<0)throw new Error("invalid base16 character");return n.from(t,"hex")}}}},22059:function(e,t,r){"use strict";function n(e,t){e=e.replace(new RegExp("=","g"),"");const r=e.length;let n=0,a=0,i=0;const c=new Uint8Array(5*r/8|0);for(let o=0;o=8&&(c[i++]=a>>>n-8&255,n-=8);return c.buffer}function a(e,t){const r=e.byteLength,n=new Uint8Array(e),a=t.indexOf("=")===t.length-1;a&&(t=t.substring(0,t.length-1));let i=0,c=0,o="";for(let f=0;f=5)o+=t[c>>>i-5&31],i-=5}if(i>0&&(o+=t[c<<5-i&31]),a)while(o.length%8!==0)o+="=";return o}r(48675),r(3462),r(21703),e.exports=function(e){return{encode(t){return a("string"===typeof t?Uint8Array.from(t):t,e)},decode(t){for(const r of t)if(e.indexOf(r)<0)throw new Error("invalid base32 character");return n(t,e)}}}},67557:function(e,t,r){"use strict";r(21703);const{Buffer:n}=r(15361);e.exports=function(e){const t=e.indexOf("=")>-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode(e){let a="";a="string"===typeof e?n.from(e).toString("base64"):e.toString("base64"),r&&(a=a.replace(/\+/g,"-").replace(/\//g,"_"));const i=a.indexOf("=");return i>0&&!t&&(a=a.substring(0,i)),a},decode(t){for(const r of t)if(e.indexOf(r)<0)throw new Error("invalid base64 character");return n.from(t,"base64")}}}},9005:function(e,t,r){"use strict";const n=r(42786),a=r(12516),i=r(32133),c=r(22059),o=r(67557),f=[["base1","1","","1"],["base2","0",a,"01"],["base8","7",a,"01234567"],["base10","9",a,"0123456789"],["base16","f",i,"0123456789abcdef"],["base32","b",c,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",c,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",c,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",c,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",c,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",a,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",a,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",o,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",o,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",o,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",o,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],d=f.reduce(((e,t)=>(e[t[0]]=new n(t[0],t[1],t[2],t[3]),e)),{}),s=f.reduce(((e,t)=>(e[t[1]]=d[t[0]],e)),{});e.exports={names:d,codes:s}},74482:function(e,t,r){"use strict";r(21703);const{Buffer:n}=r(15361),a=r(9005);function i(e,t){if(!t)throw new Error("requires an encoded buffer");const r=s(e),a=n.from(r.code),i=r.name;return d(i,t),n.concat([a,t])}function c(e,t){const r=s(e),a=r.name;return i(a,n.from(r.encode(t)))}function o(e){n.isBuffer(e)&&(e=e.toString());const t=e.substring(0,1);e=e.substring(1,e.length),"string"===typeof e&&(e=n.from(e));const r=s(t);return n.from(r.decode(e.toString()))}function f(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;const t=e.substring(0,1);try{const e=s(t);return e.name}catch(r){return!1}}function d(e,t){const r=s(e);r.decode(t.toString())}function s(e){let t;if(a.names[e])t=a.names[e];else{if(!a.codes[e])throw new Error("Unsupported encoding");t=a.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}t=e.exports=i,t.encode=c,t.decode=o,t.isEncoded=f,t.names=Object.freeze(Object.keys(a.names)),t.codes=Object.freeze(Object.keys(a.codes))},46742:function(e,t){"use strict";t.names=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,md4:212,md5:213,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),t.codes=Object.freeze({0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",212:"md4",213:"md5",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46e3:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),t.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46e3:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},21272:function(e,t,r){"use strict";r(21703);const{Buffer:n}=r(15361),a=r(74482),i=r(42611),c=r(46742);function o(e){t.decode(e)}t.names=c.names,t.codes=c.codes,t.defaultLengths=c.defaultLengths,t.toHexString=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return e.toString("hex")},t.fromHexString=function(e){return n.from(e,"hex")},t.toB58String=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return a.encode("base58btc",e).toString().slice(1)},t.fromB58String=function(e){let t=e;return n.isBuffer(e)&&(t=e.toString()),a.decode("z"+t)},t.decode=function(e){if(!n.isBuffer(e))throw new Error("multihash must be a Buffer");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");const r=i.decode(e);if(!t.isValidCode(r))throw new Error(`multihash unknown function code: 0x${r.toString(16)}`);e=e.slice(i.decode.bytes);const a=i.decode(e);if(a<0)throw new Error(`multihash invalid length: ${a}`);if(e=e.slice(i.decode.bytes),e.length!==a)throw new Error(`multihash length inconsistent: 0x${e.toString("hex")}`);return{code:r,name:c.codes[r],length:a,digest:e}},t.encode=function(e,r,a){if(!e||void 0===r)throw new Error("multihash encode requires at least two args: digest, code");const c=t.coerceCode(r);if(!n.isBuffer(e))throw new Error("digest should be a Buffer");if(null==a&&(a=e.length),a&&e.length!==a)throw new Error("digest length should be equal to specified length.");return n.concat([n.from(i.encode(c)),n.from(i.encode(a)),e])},t.coerceCode=function(e){let r=e;if("string"===typeof e){if(void 0===c.names[e])throw new Error(`Unrecognized hash function named: ${e}`);r=c.names[e]}if("number"!==typeof r)throw new Error(`Hash function code should be a number. Got: ${r}`);if(void 0===c.codes[r]&&!t.isAppCode(r))throw new Error(`Unrecognized function code: ${r}`);return r},t.isAppCode=function(e){return e>0&&e<16},t.isValidCode=function(e){return!!t.isAppCode(e)||!!c.codes[e]},t.validate=o,t.prefix=function(e){return o(e),e.slice(0,2)}},5460:function(e,t,r){e=r.nmd(e),r(21703),function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var c;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{c=r(15361).Buffer}catch(E){}function o(e,t,r){for(var n=0,a=Math.min(e.length,r),i=t;i=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:15&c}return n}function f(e,t,r,n){for(var a=0,i=Math.min(e.length,r),c=t;c=49?o-49+10:o>=17?o-17+10:o}return a}i.isBN=function(e){return e instanceof i||null!==e&&"object"===typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&a++,16===t?this._parseHex(e,a):this._parseBase(e,t,a),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a=0;a-=3)c=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=c<>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)a=o(e,r,r+6),this.words[n]|=a<>>26-i&4194303,i+=24,i>=26&&(i-=26,n++);r+6!==t&&(a=o(e,t,r+6),this.words[n]|=a<>>26-i&4194303),this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,c=i%n,o=Math.min(i,i-c)+r,d=0,s=r;s1&&0===this.words[this.length-1])this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],s=[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],u=[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 b(e){for(var t=new Array(e.bitLength()),r=0;r>>a}return t}function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],c=a*i,o=67108863&c,f=c/67108864|0;r.words[0]=o;for(var d=1;d>>26,u=67108863&f,b=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=b;h++){var l=d-h|0;a=0|e.words[l],i=0|t.words[h],c=a*i+u,s+=c/67108864|0,u=67108863&c}r.words[d]=0|u,f=0|s}return 0!==f?r.words[d]=0|f:r.length--,r.strip()}i.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var a=0,i=0,c=0;c>>24-a&16777215,r=0!==i||c!==this.length-1?d[6-f.length]+f+r:f+r,a+=2,a>=26&&(a-=26,c--)}0!==i&&(r=i.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],h=u[e];r="";var l=this.clone();l.negative=0;while(!l.isZero()){var p=l.modn(h).toString(e);l=l.idivn(h),r=l.isZero()?p+r:d[b-p.length]+p+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n("undefined"!==typeof c),this.toArrayLike(c,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var c,o,f="le"===t,d=new e(i),s=this.clone();if(f){for(o=0;!s.isZero();o++)c=s.andln(255),s.iushrn(8),d[o]=c;for(;o=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,c=0;c>26,this.words[c]=67108863&t;for(;0!==i&&c>26,this.words[c]=67108863&t;if(0===i&&c>>13,h=0|c[1],l=8191&h,p=h>>>13,x=0|c[2],m=8191&x,v=x>>>13,g=0|c[3],y=8191&g,w=g>>>13,_=0|c[4],M=8191&_,k=_>>>13,A=0|c[5],E=8191&A,S=A>>>13,T=0|c[6],C=8191&T,P=T>>>13,O=0|c[7],R=8191&O,I=O>>>13,B=0|c[8],L=8191&B,N=B>>>13,U=0|c[9],j=8191&U,D=U>>>13,F=0|o[0],H=8191&F,q=F>>>13,z=0|o[1],K=8191&z,$=z>>>13,G=0|o[2],V=8191&G,W=G>>>13,Z=0|o[3],J=8191&Z,Y=Z>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ae=0|o[6],ie=8191&ae,ce=ae>>>13,oe=0|o[7],fe=8191&oe,de=oe>>>13,se=0|o[8],ue=8191&se,be=se>>>13,he=0|o[9],le=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(u,H),a=Math.imul(u,q),a=a+Math.imul(b,H)|0,i=Math.imul(b,q);var xe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(l,H),a=Math.imul(l,q),a=a+Math.imul(p,H)|0,i=Math.imul(p,q),n=n+Math.imul(u,K)|0,a=a+Math.imul(u,$)|0,a=a+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0;var me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,H),a=Math.imul(m,q),a=a+Math.imul(v,H)|0,i=Math.imul(v,q),n=n+Math.imul(l,K)|0,a=a+Math.imul(l,$)|0,a=a+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(u,V)|0,a=a+Math.imul(u,W)|0,a=a+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ve=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(y,H),a=Math.imul(y,q),a=a+Math.imul(w,H)|0,i=Math.imul(w,q),n=n+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(l,V)|0,a=a+Math.imul(l,W)|0,a=a+Math.imul(p,V)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(u,J)|0,a=a+Math.imul(u,Y)|0,a=a+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ge=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(M,H),a=Math.imul(M,q),a=a+Math.imul(k,H)|0,i=Math.imul(k,q),n=n+Math.imul(y,K)|0,a=a+Math.imul(y,$)|0,a=a+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,n=n+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0,a=a+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,n=n+Math.imul(u,Q)|0,a=a+Math.imul(u,ee)|0,a=a+Math.imul(b,Q)|0,i=i+Math.imul(b,ee)|0;var ye=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,H),a=Math.imul(E,q),a=a+Math.imul(S,H)|0,i=Math.imul(S,q),n=n+Math.imul(M,K)|0,a=a+Math.imul(M,$)|0,a=a+Math.imul(k,K)|0,i=i+Math.imul(k,$)|0,n=n+Math.imul(y,V)|0,a=a+Math.imul(y,W)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,a=a+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,n=n+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0,a=a+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(u,re)|0,a=a+Math.imul(u,ne)|0,a=a+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var we=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,H),a=Math.imul(C,q),a=a+Math.imul(P,H)|0,i=Math.imul(P,q),n=n+Math.imul(E,K)|0,a=a+Math.imul(E,$)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(M,V)|0,a=a+Math.imul(M,W)|0,a=a+Math.imul(k,V)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,a=a+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,n=n+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,a=a+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0,a=a+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(u,ie)|0,a=a+Math.imul(u,ce)|0,a=a+Math.imul(b,ie)|0,i=i+Math.imul(b,ce)|0;var _e=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,H),a=Math.imul(R,q),a=a+Math.imul(I,H)|0,i=Math.imul(I,q),n=n+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,a=a+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,n=n+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,a=a+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,a=a+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,a=a+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,a=a+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(l,ie)|0,a=a+Math.imul(l,ce)|0,a=a+Math.imul(p,ie)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(u,fe)|0,a=a+Math.imul(u,de)|0,a=a+Math.imul(b,fe)|0,i=i+Math.imul(b,de)|0;var Me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,H),a=Math.imul(L,q),a=a+Math.imul(N,H)|0,i=Math.imul(N,q),n=n+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,a=a+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(C,V)|0,a=a+Math.imul(C,W)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(E,J)|0,a=a+Math.imul(E,Y)|0,a=a+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,n=n+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,a=a+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,a=a+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(m,ie)|0,a=a+Math.imul(m,ce)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(l,fe)|0,a=a+Math.imul(l,de)|0,a=a+Math.imul(p,fe)|0,i=i+Math.imul(p,de)|0,n=n+Math.imul(u,ue)|0,a=a+Math.imul(u,be)|0,a=a+Math.imul(b,ue)|0,i=i+Math.imul(b,be)|0;var ke=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,H),a=Math.imul(j,q),a=a+Math.imul(D,H)|0,i=Math.imul(D,q),n=n+Math.imul(L,K)|0,a=a+Math.imul(L,$)|0,a=a+Math.imul(N,K)|0,i=i+Math.imul(N,$)|0,n=n+Math.imul(R,V)|0,a=a+Math.imul(R,W)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(C,J)|0,a=a+Math.imul(C,Y)|0,a=a+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,n=n+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,a=a+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,a=a+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(y,ie)|0,a=a+Math.imul(y,ce)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(v,de)|0,n=n+Math.imul(l,ue)|0,a=a+Math.imul(l,be)|0,a=a+Math.imul(p,ue)|0,i=i+Math.imul(p,be)|0,n=n+Math.imul(u,le)|0,a=a+Math.imul(u,pe)|0,a=a+Math.imul(b,le)|0,i=i+Math.imul(b,pe)|0;var Ae=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),a=Math.imul(j,$),a=a+Math.imul(D,K)|0,i=Math.imul(D,$),n=n+Math.imul(L,V)|0,a=a+Math.imul(L,W)|0,a=a+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,n=n+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,a=a+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,a=a+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,a=a+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(M,ie)|0,a=a+Math.imul(M,ce)|0,a=a+Math.imul(k,ie)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(m,ue)|0,a=a+Math.imul(m,be)|0,a=a+Math.imul(v,ue)|0,i=i+Math.imul(v,be)|0,n=n+Math.imul(l,le)|0,a=a+Math.imul(l,pe)|0,a=a+Math.imul(p,le)|0,i=i+Math.imul(p,pe)|0;var Ee=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),a=Math.imul(j,W),a=a+Math.imul(D,V)|0,i=Math.imul(D,W),n=n+Math.imul(L,J)|0,a=a+Math.imul(L,Y)|0,a=a+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,n=n+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,a=a+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,a=a+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(E,ie)|0,a=a+Math.imul(E,ce)|0,a=a+Math.imul(S,ie)|0,i=i+Math.imul(S,ce)|0,n=n+Math.imul(M,fe)|0,a=a+Math.imul(M,de)|0,a=a+Math.imul(k,fe)|0,i=i+Math.imul(k,de)|0,n=n+Math.imul(y,ue)|0,a=a+Math.imul(y,be)|0,a=a+Math.imul(w,ue)|0,i=i+Math.imul(w,be)|0,n=n+Math.imul(m,le)|0,a=a+Math.imul(m,pe)|0,a=a+Math.imul(v,le)|0,i=i+Math.imul(v,pe)|0;var Se=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,J),a=Math.imul(j,Y),a=a+Math.imul(D,J)|0,i=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,a=a+Math.imul(N,Q)|0,i=i+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,a=a+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(C,ie)|0,a=a+Math.imul(C,ce)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,a=a+Math.imul(E,de)|0,a=a+Math.imul(S,fe)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(M,ue)|0,a=a+Math.imul(M,be)|0,a=a+Math.imul(k,ue)|0,i=i+Math.imul(k,be)|0,n=n+Math.imul(y,le)|0,a=a+Math.imul(y,pe)|0,a=a+Math.imul(w,le)|0,i=i+Math.imul(w,pe)|0;var Te=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Q),a=Math.imul(j,ee),a=a+Math.imul(D,Q)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,a=a+Math.imul(L,ne)|0,a=a+Math.imul(N,re)|0,i=i+Math.imul(N,ne)|0,n=n+Math.imul(R,ie)|0,a=a+Math.imul(R,ce)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(I,ce)|0,n=n+Math.imul(C,fe)|0,a=a+Math.imul(C,de)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(P,de)|0,n=n+Math.imul(E,ue)|0,a=a+Math.imul(E,be)|0,a=a+Math.imul(S,ue)|0,i=i+Math.imul(S,be)|0,n=n+Math.imul(M,le)|0,a=a+Math.imul(M,pe)|0,a=a+Math.imul(k,le)|0,i=i+Math.imul(k,pe)|0;var Ce=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),a=Math.imul(j,ne),a=a+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,a=a+Math.imul(L,ce)|0,a=a+Math.imul(N,ie)|0,i=i+Math.imul(N,ce)|0,n=n+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(I,de)|0,n=n+Math.imul(C,ue)|0,a=a+Math.imul(C,be)|0,a=a+Math.imul(P,ue)|0,i=i+Math.imul(P,be)|0,n=n+Math.imul(E,le)|0,a=a+Math.imul(E,pe)|0,a=a+Math.imul(S,le)|0,i=i+Math.imul(S,pe)|0;var Pe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,ie),a=Math.imul(j,ce),a=a+Math.imul(D,ie)|0,i=Math.imul(D,ce),n=n+Math.imul(L,fe)|0,a=a+Math.imul(L,de)|0,a=a+Math.imul(N,fe)|0,i=i+Math.imul(N,de)|0,n=n+Math.imul(R,ue)|0,a=a+Math.imul(R,be)|0,a=a+Math.imul(I,ue)|0,i=i+Math.imul(I,be)|0,n=n+Math.imul(C,le)|0,a=a+Math.imul(C,pe)|0,a=a+Math.imul(P,le)|0,i=i+Math.imul(P,pe)|0;var Oe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,fe),a=Math.imul(j,de),a=a+Math.imul(D,fe)|0,i=Math.imul(D,de),n=n+Math.imul(L,ue)|0,a=a+Math.imul(L,be)|0,a=a+Math.imul(N,ue)|0,i=i+Math.imul(N,be)|0,n=n+Math.imul(R,le)|0,a=a+Math.imul(R,pe)|0,a=a+Math.imul(I,le)|0,i=i+Math.imul(I,pe)|0;var Re=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,ue),a=Math.imul(j,be),a=a+Math.imul(D,ue)|0,i=Math.imul(D,be),n=n+Math.imul(L,le)|0,a=a+Math.imul(L,pe)|0,a=a+Math.imul(N,le)|0,i=i+Math.imul(N,pe)|0;var Ie=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,le),a=Math.imul(j,pe),a=a+Math.imul(D,le)|0,i=Math.imul(D,pe);var Be=(d+n|0)+((8191&a)<<13)|0;return d=(i+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=xe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=we,f[6]=_e,f[7]=Me,f[8]=ke,f[9]=Ae,f[10]=Ee,f[11]=Se,f[12]=Te,f[13]=Ce,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ie,f[18]=Be,0!==d&&(f[19]=d,r.length++),r};function p(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0,a+=c>>>26,c&=67108863}r.words[i]=o,n=c,c=a}return 0!==n?r.words[i]=n:r.length--,r.strip()}function x(e,t,r){var n=new m;return n.mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(l=h),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?l(this,e,t):n<63?h(this,e,t):n<1024?p(this,e,t):x(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,r,n,a,i){for(var c=0;c>>=1)a++;return 1<>>=13,r[2*c+1]=8191&i,i>>>=13;for(c=2*t;c>=26,t+=a/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=b(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var c=0;for(t=0;t>>26-r}c&&(this.words[t]=c,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,c=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<c)for(this.length-=c,d=0;d=0&&(0!==s||d>=a);d--){var u=0|this.words[d];this.words[d]=s<<26-i|u>>>i,s=u&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===o)return this.strip();for(n(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),a=e,c=0|a.words[a.length-1],o=this._countBits(c);r=26-o,0!==r&&(a=a.ushln(r),n.iushln(r),c=0|a.words[a.length-1]);var f,d=n.length-a.length;if("mod"!==t){f=new i(null),f.length=d+1,f.words=new Array(f.length);for(var s=0;s=0;b--){var h=67108864*(0|n.words[a.length+b])+(0|n.words[a.length+b-1]);h=Math.min(h/c|0,67108863),n._ishlnsubmul(a,h,b);while(0!==n.negative)h--,n.negative=0,n._ishlnsubmul(a,1,b),n.isZero()||(n.negative^=1);f&&(f.words[b]=h)}return f&&f.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.iadd(e)),{div:a,mod:c}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.isub(e)),{div:o.div,mod:c}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,c,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,a=this.length-1;a>=0;a--)r=(t*r+(0|this.words[a]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*t;this.words[r]=a/e|0,t=a%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a=new i(1),c=new i(0),o=new i(0),f=new i(1),d=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++d;var s=r.clone(),u=t.clone();while(!t.isZero()){for(var b=0,h=1;0===(t.words[0]&h)&&b<26;++b,h<<=1);if(b>0){t.iushrn(b);while(b-- >0)(a.isOdd()||c.isOdd())&&(a.iadd(s),c.isub(u)),a.iushrn(1),c.iushrn(1)}for(var l=0,p=1;0===(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(u)),o.iushrn(1),f.iushrn(1)}t.cmp(r)>=0?(t.isub(r),a.isub(o),c.isub(f)):(r.isub(t),o.isub(a),f.isub(c))}return{a:o,b:f,gcd:r.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a,c=new i(1),o=new i(0),f=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var d=0,s=1;0===(t.words[0]&s)&&d<26;++d,s<<=1);if(d>0){t.iushrn(d);while(d-- >0)c.isOdd()&&c.iadd(f),c.iushrn(1)}for(var u=0,b=1;0===(r.words[0]&b)&&u<26;++u,b<<=1);if(u>0){r.iushrn(u);while(u-- >0)o.isOdd()&&o.iadd(f),o.iushrn(1)}t.cmp(r)>=0?(t.isub(r),c.isub(o)):(r.isub(t),o.isub(c))}return a=0===t.cmpn(1)?c:o,a.cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[c]=o}return 0!==i&&(this.words[c]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new k(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},a(y,g),y.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=c}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return v[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}var a=this.m.subn(1),c=0;while(!a.isZero()&&0===a.andln(1))c++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),f=o.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();s=new i(2*s*s).toRed(this);while(0!==this.pow(s,d).cmp(f))s.redIAdd(f);var u=this.pow(s,a),b=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),l=c;while(0!==h.cmp(o)){for(var p=h,x=0;0!==p.cmp(o);x++)p=p.redSqr();n(x=0;a--){for(var s=t.words[a],u=d-1;u>=0;u--){var b=s>>u&1;c!==n[0]&&(c=this.sqr(c)),0!==b||0!==o?(o<<=1,o|=b,f++,(f===r||0===a&&0===u)&&(c=this.mul(c,n[o]),f=0,o=0)):f=0}d=26}return c},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new A(e)},a(A,k),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),c=a;return a.cmp(this.m)>=0?c=a.isub(this.m):a.cmpn(0)<0&&(c=a.iadd(this.m)),c._forceRed(this)},A.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}(e,this)},70594:function(e,t,r){r(21703);var n=r(5460),a=r(99468);e.exports=function(e){if("string"===typeof e||"number"===typeof e){var t=new n(1),r=String(e).toLowerCase().trim(),i="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),c=a(r);if("-"===c.substr(0,1)&&(c=a(c.slice(1)),t=new n(-1,10)),c=""===c?"0":c,!c.match(/^-?[0-9]+$/)&&c.match(/^[0-9A-Fa-f]+$/)||c.match(/^[a-fA-F]+$/)||!0===i&&c.match(/^[0-9A-Fa-f]+$/))return new n(c,16).mul(t);if((c.match(/^-?[0-9]+$/)||""===c)&&!1===i)return new n(c,10).mul(t)}else if("object"===typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new n(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},67293:function(e,t,r){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */r(21703);var n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function c(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==n.join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(i){return!1}}e.exports=o()?Object.assign:function(e,t){for(var r,o,f=c(e),d=1;ds&&(V("Max buffer length exceeded: textNode"),e=Math.max(e,i.length)),L.length>s&&(V("Max buffer length exceeded: numberNode"),e=Math.max(e,L.length)),B=s-e+z}function V(e){void 0!==i&&(o(i),f(),i=void 0),t=Error(e+"\nLn: "+$+"\nCol: "+K+"\nChr: "+r),d(Object(n["o"])(void 0,void 0,t))}function W(){if(j===h)return o({}),f(),void(U=!0);j===l&&0===q||V("Unexpected end"),void 0!==i&&(o(i),f(),i=void 0),U=!0}function Z(e){return"\r"===e||"\n"===e||" "===e||"\t"===e}function J(e){if(!t){if(U)return V("Cannot write after close");var n=0;r=e[0];while(r){if(n>0&&(a=r),r=e[n++],!r)break;switch(z++,"\n"===r?($++,K=0):K++,j){case h:if("{"===r)j=p;else if("["===r)j=m;else if(!Z(r))return V("Non-whitespace before {[.");continue;case y:case p:if(Z(r))continue;if(j===y)D.push(w);else{if("}"===r){o({}),f(),j=D.pop()||l;continue}D.push(x)}if('"'!==r)return V('Malformed object key should start with " ');j=g;continue;case w:case x:if(Z(r))continue;if(":"===r)j===x?(D.push(x),void 0!==i&&(o({}),c(i),i=void 0),q++):void 0!==i&&(c(i),i=void 0),j=l;else if("}"===r)void 0!==i&&(o(i),f(),i=void 0),f(),q--,j=D.pop()||l;else{if(","!==r)return V("Bad object");j===x&&D.push(x),void 0!==i&&(o(i),f(),i=void 0),j=y}continue;case m:case l:if(Z(r))continue;if(j===m){if(o([]),q++,j=l,"]"===r){f(),q--,j=D.pop()||l;continue}D.push(v)}if('"'===r)j=g;else if("{"===r)j=p;else if("["===r)j=m;else if("t"===r)j=_;else if("f"===r)j=A;else if("n"===r)j=C;else if("-"===r)L+=r;else if("0"===r)L+=r,j=I;else{if(-1==="123456789".indexOf(r))return V("Bad value");L+=r,j=I}continue;case v:if(","===r)D.push(v),void 0!==i&&(o(i),f(),i=void 0),j=l;else{if("]"!==r){if(Z(r))continue;return V("Bad array")}void 0!==i&&(o(i),f(),i=void 0),f(),q--,j=D.pop()||l}continue;case g:void 0===i&&(i="");var d=n-1;e:while(1){while(H>0)if(F+=r,r=e.charAt(n++),4===H?(i+=String.fromCharCode(parseInt(F,16)),H=0,d=n-1):H++,!r)break e;if('"'===r&&!N){j=D.pop()||l,i+=e.substring(d,n-1);break}if("\\"===r&&!N&&(N=!0,i+=e.substring(d,n-1),r=e.charAt(n++),!r))break;if(N){if(N=!1,"n"===r?i+="\n":"r"===r?i+="\r":"t"===r?i+="\t":"f"===r?i+="\f":"b"===r?i+="\b":"u"===r?(H=1,F=""):i+=r,r=e.charAt(n++),d=n-1,r)continue;break}u.lastIndex=n;var s=u.exec(e);if(!s){n=e.length+1,i+=e.substring(d,n-1);break}if(n=s.index+1,r=e.charAt(s.index),!r){i+=e.substring(d,n-1);break}}continue;case _:if(!r)continue;if("r"!==r)return V("Invalid true started with t"+r);j=M;continue;case M:if(!r)continue;if("u"!==r)return V("Invalid true started with tr"+r);j=k;continue;case k:if(!r)continue;if("e"!==r)return V("Invalid true started with tru"+r);o(!0),f(),j=D.pop()||l;continue;case A:if(!r)continue;if("a"!==r)return V("Invalid false started with f"+r);j=E;continue;case E:if(!r)continue;if("l"!==r)return V("Invalid false started with fa"+r);j=S;continue;case S:if(!r)continue;if("s"!==r)return V("Invalid false started with fal"+r);j=T;continue;case T:if(!r)continue;if("e"!==r)return V("Invalid false started with fals"+r);o(!1),f(),j=D.pop()||l;continue;case C:if(!r)continue;if("u"!==r)return V("Invalid null started with n"+r);j=P;continue;case P:if(!r)continue;if("l"!==r)return V("Invalid null started with nu"+r);j=O;continue;case O:if(!r)continue;if("l"!==r)return V("Invalid null started with nul"+r);o(null),f(),j=D.pop()||l;continue;case R:if("."!==r)return V("Leading zero not followed by .");L+=r,j=I;continue;case I:if(-1!=="0123456789".indexOf(r))L+=r;else if("."===r){if(-1!==L.indexOf("."))return V("Invalid number has two dots");L+=r}else if("e"===r||"E"===r){if(-1!==L.indexOf("e")||-1!==L.indexOf("E"))return V("Invalid number has two exponential");L+=r}else if("+"===r||"-"===r){if("e"!==a&&"E"!==a)return V("Invalid symbol in number");L+=r}else L&&(o(parseFloat(L)),f(),L=""),n--,j=D.pop()||l;continue;default:return V("Unknown state: "+j)}}z>=B&&G()}}e(n["m"]).on(J),e(n["n"]).on(W)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d}));var n=r(19),a=r(3),i=r(2),c=r(20),o=r(0);function f(){return new XMLHttpRequest}function d(e,t,r,f,d,s,u){var b=e(a["m"]).emit,h=e(a["b"]).emit,l=0,p=!0;function x(){if("2"===String(t.status)[0]){var e=t.responseText,r=(" "+e.substr(l)).substr(1);r&&b(r),l=Object(i["e"])(e)}}function m(t){try{p&&e(a["c"]).emit(t.status,Object(c["a"])(t.getAllResponseHeaders())),p=!1}catch(r){}}e(a["a"]).on((function(){t.onreadystatechange=null,t.abort()})),"onprogress"in t&&(t.onprogress=x),t.onreadystatechange=function(){switch(t.readyState){case 2:case 3:return m(t);case 4:m(t);var r="2"===String(t.status)[0];r?(x(),e(a["n"]).emit()):h(Object(a["o"])(t.status,t.responseText))}};try{for(var v in t.open(r,f,!0),s)t.setRequestHeader(v,s[v]);Object(n["a"])(window.location,Object(n["b"])(f))||t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.withCredentials=u,t.send(d)}catch(g){window.setTimeout(Object(o["j"])(h,Object(a["o"])(void 0,void 0,g)),0)}}},function(e,t,r){"use strict";function n(e,t){function r(e){return{"http:":80,"https:":443}[e]}function n(t){return String(t.port||r(t.protocol||e.protocol))}return!!(t.protocol&&t.protocol!==e.protocol||t.host&&t.host!==e.host||t.host&&n(t)!==n(e))}function a(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/,r=t.exec(e)||[];return{protocol:r[1]||"",host:r[2]||"",port:r[3]||""}}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a}))},function(e,t,r){"use strict";function n(e){var t={};return e&&e.split("\r\n").forEach((function(e){var r=e.indexOf(": ");t[e.substring(0,r)]=e.substring(r+2)})),t}r.d(t,"a",(function(){return n}))}])["default"]}))},15678:function(e,t,r){"use strict";var n=r(18625);t.certificate=r(89866);var a=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=a;var i=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=i;var c=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}));t.PublicKey=c;var o=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),f=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=f;var d=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=d;var s=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=s,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var u=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(b),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=u;var b=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},89866:function(e,t,r){"use strict";var n=r(18625),a=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),i=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),c=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),o=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(c),this.key("subjectPublicKey").bitstr())})),f=n.define("RelativeDistinguishedName",(function(){this.setof(i)})),d=n.define("RDNSequence",(function(){this.seqof(f)})),s=n.define("Name",(function(){this.choice({rdnSequence:this.use(d)})})),u=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(a),this.key("notAfter").use(a))})),b=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(c),this.key("issuer").use(s),this.key("validity").use(u),this.key("subject").use(s),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(b).optional())})),l=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(c),this.key("signatureValue").bitstr())}));e.exports=l},83311:function(e,t,r){var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,c=r(13692),o=r(24699),f=r(6779).Buffer;e.exports=function(e,t){var r,d=e.toString(),s=d.match(n);if(s){var u="aes"+s[1],b=f.from(s[2],"hex"),h=f.from(s[3].replace(/[\r\n]/g,""),"base64"),l=c(t,b.slice(0,8),parseInt(s[1],10)).key,p=[],x=o.createDecipheriv(u,l,b);p.push(x.update(h)),p.push(x.final()),r=f.concat(p)}else{var m=d.match(i);r=f.from(m[2].replace(/[\r\n]/g,""),"base64")}var v=d.match(a)[1];return{tag:v,data:r}}},2616:function(e,t,r){r(21703);var n=r(15678),a=r(22562),i=r(83311),c=r(24699),o=r(15043),f=r(6779).Buffer;function d(e){var t;"object"!==typeof e||f.isBuffer(e)||(t=e.passphrase,e=e.key),"string"===typeof e&&(e=f.from(e));var r,a,c=i(e,t),o=c.tag,d=c.data;switch(o){case"CERTIFICATE":a=n.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(a||(a=n.PublicKey.decode(d,"der")),r=a.algorithm.algorithm.join("."),r){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(a.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return a.subjectPrivateKey=a.subjectPublicKey,{type:"ec",data:a};case"1.2.840.10040.4.1":return a.algorithm.params.pub_key=n.DSAparam.decode(a.subjectPublicKey.data,"der"),{type:"dsa",data:a.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":d=n.EncryptedPrivateKey.decode(d,"der"),d=s(d,t);case"PRIVATE KEY":switch(a=n.PrivateKey.decode(d,"der"),r=a.algorithm.algorithm.join("."),r){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(a.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:a.algorithm.curve,privateKey:n.ECPrivateKey.decode(a.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return a.algorithm.params.priv_key=n.DSAparam.decode(a.subjectPrivateKey,"der"),{type:"dsa",params:a.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return d=n.ECPrivateKey.decode(d,"der"),{curve:d.parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+o)}}function s(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=a[e.algorithm.decrypt.cipher.algo.join(".")],d=e.algorithm.decrypt.cipher.iv,s=e.subjectPrivateKey,u=parseInt(i.split("-")[1],10)/8,b=o.pbkdf2Sync(t,r,n,u,"sha1"),h=c.createDecipheriv(i,b,d),l=[];return l.push(h.update(s)),l.push(h.final()),f.concat(l)}e.exports=d,d.signature=n.signature},65177:function(e){var t=function(e){return e.replace(/^\s+|\s+$/g,"")},r=function(e){return"[object Array]"===Object.prototype.toString.call(e)};e.exports=function(e){if(!e)return{};for(var n={},a=t(e).split("\n"),i=0;i=6?"utf-8":"binary"}else n="utf-8";e.exports=n},88369:function(e,t,r){r(21703);var n=Math.pow(2,30)-1;e.exports=function(e,t){if("number"!==typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!==typeof t)throw new TypeError("Key length not a number");if(t<0||t>n||t!==t)throw new TypeError("Bad key length")}},26560:function(e,t,r){var n=r(56515),a=r(3128),i=r(61720),c=r(6779).Buffer,o=r(88369),f=r(53677),d=r(56816),s=c.alloc(128),u={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function b(e,t,r){var n=h(e),a="sha512"===e||"sha384"===e?128:64;t.length>a?t=n(t):t.lengthfunction(){const r=t.promiseModule,n=new Array(arguments.length);for(let e=0;e{t.errorFirst?n.push((function(e,n){if(t.multiArgs){const t=new Array(arguments.length-1);for(let e=1;e{r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);const n=e=>{const t=t=>"string"===typeof t?e===t:t.test(e);return r.include?r.include.some(t):!r.exclude.some(t)};let a;a="function"===typeof e?function(){return r.excludeMain?e.apply(this,arguments):t(e,r).apply(this,arguments)}:Object.create(Object.getPrototypeOf(e));for(const i in e){const c=e[i];a[i]="function"===typeof c&&n(i)?t(c,r):c}return a}},45626:function(e,t,r){"use strict";r.r(t),r.d(t,{Children:function(){return ge},Component:function(){return g},Fragment:function(){return v},PureComponent:function(){return le},Suspense:function(){return _e},SuspenseList:function(){return Ae},cloneElement:function(){return He},createContext:function(){return D},createElement:function(){return p},createFactory:function(){return De},createPortal:function(){return Ce},createRef:function(){return m},default:function(){return $e},findDOMNode:function(){return ze},forwardRef:function(){return me},hydrate:function(){return Ie},isValidElement:function(){return Fe},lazy:function(){return ke},memo:function(){return pe},render:function(){return Re},unmountComponentAtNode:function(){return qe},unstable_batchedUpdates:function(){return Ke},useCallback:function(){return ne},useContext:function(){return ae},useDebugValue:function(){return ie},useEffect:function(){return X},useErrorBoundary:function(){return ce},useImperativeHandle:function(){return te},useLayoutEffect:function(){return Q},useMemo:function(){return re},useReducer:function(){return Y},useRef:function(){return ee},useState:function(){return J},version:function(){return je}});r(21703);var n,a,i,c,o,f,d,s={},u=[],b=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function h(e,t){for(var r in t)e[r]=t[r];return e}function l(e){var t=e.parentNode;t&&t.removeChild(e)}function p(e,t,r){var n,a=arguments,i={};for(n in t)"key"!==n&&"ref"!==n&&(i[n]=t[n]);if(arguments.length>3)for(r=[r],n=3;n2&&(t.children=u.slice.call(arguments,2)),r={},t)"key"!==n&&"ref"!==n&&(r[n]=t[n]);return x(e.type,r,t.key||e.key,t.ref||e.ref,null)}function D(e){var t={},r={__c:"__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,a=this;return this.getChildContext||(n=[],this.getChildContext=function(){return t[r.__c]=a,t},this.shouldComponentUpdate=function(e){a.props.value!==e.value&&n.some((function(t){t.context=e.value,_(t)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Consumer.contextType=r,r.Provider.__=r,r}n={__e:function(e,t){for(var r,n;t=t.__;)if((r=t.__c)&&!r.__)try{if(r.constructor&&null!=r.constructor.getDerivedStateFromError&&(n=!0,r.setState(r.constructor.getDerivedStateFromError(e))),null!=r.componentDidCatch&&(n=!0,r.componentDidCatch(e)),n)return _(r.__E=r)}catch(t){e=t}throw e}},g.prototype.setState=function(e,t){var r;r=this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(r,this.props)),e&&h(r,e),null!=e&&this.__v&&(t&&this.__h.push(t),_(this))},g.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_(this))},g.prototype.render=v,a=[],i=0,c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=s,d=0;var F,H,q,z=0,K=[],$=n.__r,G=n.diffed,V=n.__c,W=n.unmount;function Z(e,t){n.__h&&n.__h(H,e,z||t),z=0;var r=H.__H||(H.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function J(e){return z=1,Y(ue,e)}function Y(e,t,r){var n=Z(F++,2);return n.__c||(n.__c=H,n.__=[r?r(t):ue(void 0,t),function(t){var r=e(n.__[0],t);n.__[0]!==r&&(n.__[0]=r,n.__c.setState({}))}]),n.__}function X(e,t){var r=Z(F++,3);!n.__s&&se(r.__H,t)&&(r.__=e,r.__H=t,H.__H.__h.push(r))}function Q(e,t){var r=Z(F++,4);!n.__s&&se(r.__H,t)&&(r.__=e,r.__H=t,H.__h.push(r))}function ee(e){return z=5,re((function(){return{current:e}}),[])}function te(e,t,r){z=6,Q((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==r?r:r.concat(e))}function re(e,t){var r=Z(F++,7);return se(r.__H,t)?(r.__H=t,r.__h=e,r.__=e()):r.__}function ne(e,t){return z=8,re((function(){return e}),t)}function ae(e){var t=H.context[e.__c],r=Z(F++,9);return r.__c=e,t?(null==r.__&&(r.__=!0,t.sub(H)),t.props.value):e.__}function ie(e,t){n.useDebugValue&&n.useDebugValue(t?t(e):e)}function ce(e){var t=Z(F++,10),r=J();return t.__=e,H.componentDidCatch||(H.componentDidCatch=function(e){t.__&&t.__(e),r[1](e)}),[r[0],function(){r[1](void 0)}]}function oe(){K.some((function(e){if(e.__P)try{e.__H.__h.forEach(fe),e.__H.__h.forEach(de),e.__H.__h=[]}catch(a){return e.__H.__h=[],n.__e(a,e.__v),!0}})),K=[]}function fe(e){e.t&&e.t()}function de(e){var t=e.__();"function"==typeof t&&(e.t=t)}function se(e,t){return!e||t.some((function(t,r){return t!==e[r]}))}function ue(e,t){return"function"==typeof t?t(e):t}function be(e,t){for(var r in t)e[r]=t[r];return e}function he(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}n.__r=function(e){$&&$(e),F=0,(H=e.__c).__H&&(H.__H.__h.forEach(fe),H.__H.__h.forEach(de),H.__H.__h=[])},n.diffed=function(e){G&&G(e);var t=e.__c;if(t){var r=t.__H;r&&r.__h.length&&(1!==K.push(t)&&q===n.requestAnimationFrame||((q=n.requestAnimationFrame)||function(e){var t,r=function(){clearTimeout(n),cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);"undefined"!=typeof window&&(t=requestAnimationFrame(r))})(oe))}},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(fe),e.__h=e.__h.filter((function(e){return!e.__||de(e)}))}catch(o){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(o,e.__v)}})),V&&V(e,t)},n.unmount=function(e){W&&W(e);var t=e.__c;if(t){var r=t.__H;if(r)try{r.__.forEach((function(e){return e.t&&e.t()}))}catch(e){n.__e(e,t.__v)}}};var le=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).isPureReactComponent=!0,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.shouldComponentUpdate=function(e,t){return he(this.props,e)||he(this.state,t)},n}(g);function pe(e,t){function r(e){var r=this.props.ref,n=r==e.ref;return!n&&r&&(r.call?r(null):r.current=null),t?!t(this.props,e)||!n:he(this.props,e)}function n(t){return this.shouldComponentUpdate=r,p(e,be({},t))}return n.prototype.isReactComponent=!0,n.displayName="Memo("+(e.displayName||e.name)+")",n.t=!0,n}var xe=n.__b;function me(e){function t(t){var r=be({},t);return delete r.ref,e(r,t.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}n.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ve=function(e,t){return e?A(e).reduce((function(e,r,n){return e.concat(t(r,n))}),[]):null},ge={map:ve,forEach:ve,count:function(e){return e?A(e).length:0},only:function(e){if(1!==(e=A(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:A},ye=n.__e;function we(e){return e&&((e=be({},e)).__c=null,e.__k=e.__k&&e.__k.map(we)),e}function _e(){this.__u=0,this.o=null,this.__b=null}function Me(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function ke(e){var t,r,n;function a(a){if(t||(t=e()).then((function(e){r=e.default||e}),(function(e){n=e})),n)throw n;if(!r)throw t;return p(r,a)}return a.displayName="Lazy",a.t=!0,a}function Ae(){this.i=null,this.l=null}n.__e=function(e,t,r){if(e.then)for(var n,a=t;a=a.__;)if((n=a.__c)&&n.__c)return n.__c(e,t.__c);ye(e,t,r)},(_e.prototype=new g).__c=function(e,t){var r=this;null==r.o&&(r.o=[]),r.o.push(t);var n=Me(r.__v),a=!1,i=function(){a||(a=!0,n?n(c):c())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){i(),t.__c&&t.__c()};var c=function(){var e;if(!--r.__u)for(r.__v.__k[0]=r.state.u,r.setState({u:r.__b=null});e=r.o.pop();)e.forceUpdate()};r.__u++||r.setState({u:r.__b=r.__v.__k[0]}),e.then(i,i)},_e.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=we(this.__b),this.__b=null),[p(g,null,t.u?null:e.children),t.u&&e.fallback]};var Ee=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]1)for(var r=1;r=t.length){i++;break}var c=t.slice(2,a-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&i++,c.length<8&&i++,i)throw new Error("decryption error");return t.slice(a)}function h(e,t){e=s.from(e),t=s.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));var a=-1;while(++ah||new c(t).cmp(f.modulus)>=0)throw new Error("decryption error");i=r?d(new c(t),f):o(t,f);var l=s.alloc(h-i.length);if(i=s.concat([l,i],h),4===a)return u(f,i);if(1===a)return b(f,i,r);if(3===a)return i;throw new Error("unknown padding")}},48936:function(e,t,r){r(21703);var n=r(2616),a=r(67602),i=r(65443),c=r(96884),o=r(98479),f=r(2396),d=r(74466),s=r(28593),u=r(6779).Buffer;function b(e,t){var r=e.modulus.byteLength(),n=t.length,d=i("sha1").update(u.alloc(0)).digest(),s=d.length,b=2*s;if(n>r-b-2)throw new Error("message too long");var h=u.alloc(r-n-b-2),l=r-s-1,p=a(s),x=o(u.concat([d,h,u.alloc(1,1),t],l),c(p,l)),m=o(p,c(x,s));return new f(u.concat([u.alloc(1),m,x],r))}function h(e,t,r){var n,a=t.length,i=e.modulus.byteLength();if(a>i-11)throw new Error("message too long");return n=r?u.alloc(i-a-3,255):l(i-a-3),new f(u.concat([u.from([0,r?1:2]),n,u.alloc(1),t],i))}function l(e){var t,r=u.allocUnsafe(e),n=0,i=a(2*e),c=0;while(n=0)throw new Error("data too long for modulus")}return r?s(i,c):d(i,c)}},74466:function(e,t,r){var n=r(2396),a=r(6779).Buffer;function i(e,t){return a.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}e.exports=i},98479:function(e){e.exports=function(e,t){var r=e.length,n=-1;while(++n>>7-e%8&1)},put:function(e,t){for(var r=0;r>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},83880:function(e,t,r){r(21703);var n=r(73385);function a(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=n.alloc(e*e),this.reservedBit=n.alloc(e*e)}a.prototype.set=function(e,t,r,n){var a=e*this.size+t;this.data[a]=r,n&&(this.reservedBit[a]=!0)},a.prototype.get=function(e,t){return this.data[e*this.size+t]},a.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},a.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=a},7591:function(e,t,r){var n=r(73385),a=r(15461);function i(e){this.mode=a.BYTE,this.data=n.from(e)}i.getBitsLength=function(e){return 8*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(var t=0,r=this.data.length;t=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{return n(e)}catch(a){return r}}},13375:function(e,t,r){var n=r(14288).getSymbolSize,a=7;t.getPositions=function(e){var t=n(e);return[[0,0],[t-a,0],[0,t-a]]}},57874:function(e,t,r){var n=r(14288),a=1335,i=21522,c=n.getBCHDigit(a);t.getEncodedBits=function(e,t){var r=e.bit<<3|t,o=r<<10;while(n.getBCHDigit(o)-c>=0)o^=a<=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},e.exports=i},1840:function(e,t,r){r(21703),t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var n={N1:3,N2:3,N3:40,N4:10};function a(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2===0;case t.Patterns.PATTERN001:return r%2===0;case t.Patterns.PATTERN010:return n%3===0;case t.Patterns.PATTERN011:return(r+n)%3===0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2===0;case t.Patterns.PATTERN101:return r*n%2+r*n%3===0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2===0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){for(var t=e.size,r=0,a=0,i=0,c=null,o=null,f=0;f=5&&(r+=n.N1+(a-5)),c=s,a=1),s=e.get(d,f),s===o?i++:(i>=5&&(r+=n.N1+(i-5)),o=s,i=1)}a>=5&&(r+=n.N1+(a-5)),i>=5&&(r+=n.N1+(i-5))}return r},t.getPenaltyN2=function(e){for(var t=e.size,r=0,a=0;a=10&&(1488===a||93===a)&&r++,i=i<<1&2047|e.get(o,c),o>=10&&(1488===i||93===i)&&r++}return r*n.N3},t.getPenaltyN4=function(e){for(var t=0,r=e.data.length,a=0;a=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return a.testNumeric(e)?t.NUMERIC:a.testAlphanumeric(e)?t.ALPHANUMERIC:a.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return i(e)}catch(n){return r}}},39186:function(e,t,r){var n=r(15461);function a(e){this.mode=n.NUMERIC,this.data=e.toString()}a.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){var t,r,n;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),n=parseInt(r,10),e.put(n,10);var a=this.data.length-t;a>0&&(r=this.data.substr(t),n=parseInt(r,10),e.put(n,3*a+1))},e.exports=a},30823:function(e,t,r){var n=r(73385),a=r(17512);t.mul=function(e,t){for(var r=n.alloc(e.length+t.length-1),i=0;i=0){for(var i=r[0],c=0;c=0&&o<=6&&(0===f||6===f)||f>=0&&f<=6&&(0===o||6===o)||o>=2&&o<=4&&f>=2&&f<=4?e.set(i+o,c+f,!0,!0):e.set(i+o,c+f,!1,!0))}function g(e){for(var t=e.size,r=8;r>o&1),e.set(r,n,a,!0),e.set(n,r,a,!0)}function _(e,t,r){var n,a,i=e.size,c=l.getEncodedBits(t,r);for(n=0;n<15;n++)a=1===(c>>n&1),n<6?e.set(n,8,a,!0):n<8?e.set(n+1,8,a,!0):e.set(i-15+n,8,a,!0),n<8?e.set(8,i-n-1,a,!0):n<9?e.set(8,15-n-1+1,a,!0):e.set(8,15-n-1,a,!0);e.set(i-8,8,1,!0)}function M(e,t){for(var r=e.size,n=-1,a=r-1,i=7,c=0,o=r-1;o>0;o-=2){6===o&&o--;while(1){for(var f=0;f<2;f++)if(!e.isReserved(a,o-f)){var d=!1;c>>i&1)),e.set(a,o-f,d),i--,-1===i&&(c++,i=7)}if(a+=n,a<0||r<=a){a-=n,n=-n;break}}}}function k(e,t,r){var n=new c;r.forEach((function(t){n.put(t.mode.bit,4),n.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(n)}));var i=a.getSymbolTotalCodewords(e),o=u.getTotalCodewordsCount(e,t),f=8*(i-o);n.getLengthInBits()+4<=f&&n.put(0,4);while(n.getLengthInBits()%8!==0)n.putBit(0);for(var d=(f-n.getLengthInBits())/8,s=0;s=7&&w(l,t),M(l,u),isNaN(n)&&(n=s.getBestMask(l,_.bind(null,l,r))),s.applyMask(n,l),_(l,r,n),{modules:l,version:t,errorCorrectionLevel:r,maskPattern:n,segments:i}}t.create=function(e,t){if("undefined"===typeof e||""===e)throw new Error("No input text");var r,n,c=i.M;return"undefined"!==typeof t&&(c=i.from(t.errorCorrectionLevel,i.M),r=h.from(t.version),n=s.from(t.maskPattern),t.toSJISFunc&&a.setToSJISFunction(t.toSJISFunc)),E(e,r,c,n)}},14365:function(e,t,r){r(21703);var n=r(73385),a=r(30823),i=r(15361).Buffer;function c(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}c.prototype.initialize=function(e){this.degree=e,this.genPoly=a.generateECPolynomial(this.degree)},c.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var t=n.alloc(this.degree),r=i.concat([e,t],e.length+this.degree),c=a.mod(r,this.genPoly),o=this.degree-c.length;if(o>0){var f=n.alloc(this.degree);return c.copy(f,o),f}return c},e.exports=c},3555:function(e,t){var r="[0-9]+",n="[A-Z $%*+\\-./:]+",a="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";a=a.replace(/u/g,"\\u");var i="(?:(?![A-Z0-9 $%*+\\-./:]|"+a+")(?:.|[\r\n]))+";t.KANJI=new RegExp(a,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(r,"g"),t.ALPHANUMERIC=new RegExp(n,"g");var c=new RegExp("^"+a+"$"),o=new RegExp("^"+r+"$"),f=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return c.test(e)},t.testNumeric=function(e){return o.test(e)},t.testAlphanumeric=function(e){return f.test(e)}},58439:function(e,t,r){r(21703);var n=r(15461),a=r(39186),i=r(6355),c=r(7591),o=r(59176),f=r(3555),d=r(14288),s=r(98716);function u(e){return unescape(encodeURIComponent(e)).length}function b(e,t,r){var n,a=[];while(null!==(n=e.exec(r)))a.push({data:n[0],index:n.index,mode:t,length:n[0].length});return a}function h(e){var t,r,a=b(f.NUMERIC,n.NUMERIC,e),i=b(f.ALPHANUMERIC,n.ALPHANUMERIC,e);d.isKanjiModeEnabled()?(t=b(f.BYTE,n.BYTE,e),r=b(f.KANJI,n.KANJI,e)):(t=b(f.BYTE_KANJI,n.BYTE,e),r=[]);var c=a.concat(i,t,r);return c.sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function l(e,t){switch(t){case n.NUMERIC:return a.getBitsLength(e);case n.ALPHANUMERIC:return i.getBitsLength(e);case n.KANJI:return o.getBitsLength(e);case n.BYTE:return c.getBitsLength(e)}}function p(e){return e.reduce((function(e,t){var r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}function x(e){for(var t=[],r=0;r40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return a[e]},t.getBCHDigit=function(e){var t=0;while(0!==e)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!==typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return"undefined"!==typeof n},t.toSJIS=function(e){return n(e)}},25057:function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},49693:function(e,t,r){r(21703);var n=r(14288),a=r(49757),i=r(72839),c=r(15461),o=r(25057),f=r(35267),d=7973,s=n.getBCHDigit(d);function u(e,r,n){for(var a=1;a<=40;a++)if(r<=t.getCapacity(a,n,e))return a}function b(e,t){return c.getCharCountIndicator(e,t)+4}function h(e,t){var r=0;return e.forEach((function(e){var n=b(e.mode,t);r+=n+e.getBitsLength()})),r}function l(e,r){for(var n=1;n<=40;n++){var a=h(e,n);if(a<=t.getCapacity(n,r,c.MIXED))return n}}t.from=function(e,t){return o.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!o.isValid(e))throw new Error("Invalid QR Code version");"undefined"===typeof r&&(r=c.BYTE);var i=n.getSymbolTotalCodewords(e),f=a.getTotalCodewordsCount(e,t),d=8*(i-f);if(r===c.MIXED)return d;var s=d-b(r,e);switch(r){case c.NUMERIC:return Math.floor(s/10*3);case c.ALPHANUMERIC:return Math.floor(s/11*2);case c.KANJI:return Math.floor(s/13);case c.BYTE:default:return Math.floor(s/8)}},t.getBestVersionForData=function(e,t){var r,n=i.from(t,i.M);if(f(e)){if(e.length>1)return l(e,n);if(0===e.length)return 1;r=e[0]}else r=e;return u(r.mode,r.getLength(),n)},t.getEncodedBits=function(e){if(!o.isValid(e)||e<7)throw new Error("Invalid QR Code version");var t=e<<12;while(n.getBCHDigit(t)-s>=0)t^=d<0&&d>0&&e[f-1]||(n+=c?i("M",d+r,.5+s+r):i("m",a,0),a=0,c=!1),d+1':"",u="',b='viewBox="0 0 '+d+" "+d+'"',h=i.width?'width="'+i.width+'" height="'+i.width+'" ':"",l=''+s+u+"\n";return"function"===typeof r&&r(null,l),l}},28920:function(e,t,r){function n(e){if("number"===typeof e&&(e=e.toString()),"string"!==typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");var r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}r(21703),t.getOptions=function(e){e||(e={}),e.color||(e.color={});var t="undefined"===typeof e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:r,scale:r?4:a,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){var n=t.getScale(e,r);return Math.floor((e+2*r.margin)*n)},t.qrToImageData=function(e,r,n){for(var a=r.modules.size,i=r.modules.data,c=t.getScale(a,n),o=Math.floor((a+2*n.margin)*c),f=n.margin*c,d=[n.color.light,n.color.dark],s=0;s=f&&u>=f&&s=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function f(e){return e!==e}function d(e,t){var r;return c.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=c.prototype):(r=e,null===r&&(r=new c(t)),r.length=t),r}function s(e,t){var r=d(e,t<0?0:0|o(t));if(!c.TYPED_ARRAY_SUPPORT)for(var n=0;n55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(c+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function x(e){if(c.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var t=e.length;return 0===t?0:p(e).length}function m(e,t,r,n){for(var a=0;a=t.length||a>=e.length)break;t[a+r]=e[a]}return a}function v(e,t,r,n){return m(p(t,e.length-r),e,r,n)}function g(e,t,r,n){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?h(e,t,r,n):"string"===typeof t?u(e,t,r):l(e,t)}c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),c.prototype.write=function(e,t,r){void 0===t||void 0===r&&"string"===typeof t?(r=this.length,t=0):isFinite(t)&&(t|=0,isFinite(r)?r|=0:r=void 0);var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return v(this,e,t,r)},c.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--a)e[a+t]=this[a+r];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(a=t;anull===e||void 0===e;function o(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const a=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[s(t,e),"[",a,"]"].join("")]:[...r,[s(t,e),"[",s(a,e),"]=",s(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[s(t,e),"[]"].join("")]:[...r,[s(t,e),"[]=",s(n,e)].join("")];case"comma":case"separator":return t=>(r,n)=>null===n||void 0===n||0===n.length?r:0===r.length?[[s(t,e),"=",s(n,e)].join("")]:[[r,s(n,e)].join(e.arrayFormatSeparator)];default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,s(t,e)]:[...r,[s(t,e),"=",s(n,e)].join("")]}}function f(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const a="string"===typeof r&&r.split("").indexOf(e.arrayFormatSeparator)>-1,i=a?r.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===r?r:u(r,e);n[t]=i};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}function d(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function s(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function u(e,t){return t.decode?a(e):e}function b(e){return Array.isArray(e)?e.sort():"object"===typeof e?b(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function h(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function l(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}function p(e){e=h(e);const t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function x(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function m(e,t){t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t),d(t.arrayFormatSeparator);const r=f(t),n=Object.create(null);if("string"!==typeof e)return n;if(e=e.trim().replace(/^[?#&]/,""),!e)return n;for(const a of e.split("&")){let[e,c]=i(t.decode?a.replace(/\+/g," "):a,"=");c=void 0===c?null:["comma","separator"].includes(t.arrayFormat)?c:u(c,t),r(u(e,t),c,n)}for(const a of Object.keys(n)){const e=n[a];if("object"===typeof e&&null!==e)for(const r of Object.keys(e))e[r]=x(e[r],t);else n[a]=x(e,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const r=n[t];return Boolean(r)&&"object"===typeof r&&!Array.isArray(r)?e[t]=b(r):e[t]=r,e}),Object.create(null))}t.extract=p,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t),d(t.arrayFormatSeparator);const r=r=>t.skipNull&&c(e[r])||t.skipEmptyString&&""===e[r],n=o(t),a={};for(const c of Object.keys(e))r(c)||(a[c]=e[c]);const i=Object.keys(a);return!1!==t.sort&&i.sort(t.sort),i.map((r=>{const a=e[r];return void 0===a?"":null===a?s(r,t):Array.isArray(a)?a.reduce(n(r),[]).join("&"):s(r,t)+"="+s(a,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=i(e,"#");return Object.assign({url:r.split("?")[0]||"",query:m(p(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=h(e.url).split("?")[0]||"",a=t.extract(e.url),i=t.parse(a,{sort:!1}),c=Object.assign(i,e.query);let o=t.stringify(c,r);o&&(o=`?${o}`);let f=l(e.url);return e.fragmentIdentifier&&(f=`#${s(e.fragmentIdentifier,r)}`),`${n}${o}${f}`}},67602:function(e,t,r){"use strict";var n=r(96027);r(21703);var a=65536,i=4294967295;function c(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}var o=r(6779).Buffer,f=r.g.crypto||r.g.msCrypto;function d(e,t){if(e>i)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>a)for(var c=0;cs||e<0)throw new TypeError("offset must be a uint32");if(e>f||e>t)throw new RangeError("offset out of range")}function b(e,t,r){if("number"!==typeof e||e!==e)throw new TypeError("size must be a number");if(e>s||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>f)throw new RangeError("buffer too small")}function h(e,t,n,a){if(!o.isBuffer(e)&&!(e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"===typeof t)a=t,t=0,n=e.length;else if("function"===typeof n)a=n,n=e.length-t;else if("function"!==typeof a)throw new TypeError('"cb" argument must be a function');return u(t,e.length),b(n,t,e.length),l(e,t,n,a)}function l(e,t,r,a){if(n.browser){var i=e.buffer,o=new Uint8Array(i,t,r);return d.getRandomValues(o),a?void n.nextTick((function(){a(null,e)})):e}if(!a){var f=c(r);return f.copy(e,t),e}c(r,(function(r,n){if(r)return a(r);n.copy(e,t),a(null,e)}))}function p(e,t,n){if("undefined"===typeof t&&(t=0),!o.isBuffer(e)&&!(e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return u(t,e.length),void 0===n&&(n=e.length-t),b(n,t,e.length),l(e,t,n)}d&&d.getRandomValues||!n.browser?(t.randomFill=h,t.randomFillSync=p):(t.randomFill=a,t.randomFillSync=a)},55314:function(e,t,r){"use strict";function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}r(21703);var a={};function i(e,t,r){function i(e,r,n){return"string"===typeof t?t:t(e,r,n)}r||(r=Error);var c=function(e){function t(t,r,n){return e.call(this,i(t,r,n))||this}return n(t,e),t}(r);c.prototype.name=r.name,c.prototype.code=e,a[e]=c}function c(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}function o(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function f(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function d(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,a;if("string"===typeof t&&o(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be",f(e," argument"))a="The ".concat(e," ").concat(n," ").concat(c(t,"type"));else{var i=d(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(c(t,"type"))}return a+=". Received type ".concat(typeof r),a}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=a},31418:function(e,t,r){"use strict";var n=r(96027),a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=s;var i=r(50187),c=r(69621);r(81923)(s,i);for(var o=a(c.prototype),f=0;f0)if("string"===typeof t||c.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=d(t)),n)c.endEmitted?A(e,new k):O(e,c,t,!0);else if(c.ended)A(e,new _);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?O(e,c,t,!1):D(e,c)):O(e,c,t,!1)}else n||(c.reading=!1,D(e,c));return!c.ended&&(c.length=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function L(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=B(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function N(e,t){if(u("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?U(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,j(e)))}}function U(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,a.nextTick(j,e))}function j(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,G(e)}function D(e,t){t.readingMore||(t.readingMore=!0,a.nextTick(F,e,t))}function F(e,t){while(!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function z(e){u("readable nexttick read 0"),e.read(0)}function K(e,t){t.resumeScheduled||(t.resumeScheduled=!0,a.nextTick($,e,t))}function $(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),G(e),t.flowing&&!t.reading&&e.read(0)}function G(e){var t=e._readableState;u("flow",t.flowing);while(t.flowing&&null!==e.read());}function V(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function W(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,a.nextTick(Z,t,e))}function Z(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function J(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?W(this):U(this),null;if(e=L(e,t),0===e&&t.ended)return 0===t.length&&W(this),null;var n,a=t.needReadable;return u("need readable",a),(0===t.length||t.length-e0?V(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&W(this)),null!==n&&this.emit("data",n),n},C.prototype._read=function(e){A(this,new M("_read()"))},C.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,t);var c=(!t||!1!==t.end)&&e!==a.stdout&&e!==a.stderr,o=c?d:v;function f(e,t){u("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,h())}function d(){u("onend"),e.end()}n.endEmitted?a.nextTick(o):r.once("end",o),e.on("unpipe",f);var s=H(r);e.on("drain",s);var b=!1;function h(){u("cleanup"),e.removeListener("close",x),e.removeListener("finish",m),e.removeListener("drain",s),e.removeListener("error",p),e.removeListener("unpipe",f),r.removeListener("end",d),r.removeListener("end",v),r.removeListener("data",l),b=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}function l(t){u("ondata");var a=e.write(t);u("dest.write",a),!1===a&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==J(n.pipes,e))&&!b&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function p(t){u("onerror",t),v(),e.removeListener("error",p),0===i(e,"error")&&A(e,t)}function x(){e.removeListener("finish",m),v()}function m(){u("onfinish"),e.removeListener("close",x),v()}function v(){u("unpipe"),r.unpipe(e)}return r.on("data",l),S(e,"error",p),e.once("close",x),e.once("finish",m),e.emit("pipe",r),n.flowing||(u("pipe resume"),r.resume()),e},C.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?U(this):n.reading||a.nextTick(z,this))),r},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(e,t){var r=c.prototype.removeListener.call(this,e,t);return"readable"===e&&a.nextTick(q,this),r},C.prototype.removeAllListeners=function(e){var t=c.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||a.nextTick(q,this),t},C.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,K(this,e)),e.paused=!1,this},C.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var a in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(a){if(u("wrapped data"),r.decoder&&(a=r.decoder.write(a)),(!r.objectMode||null!==a&&void 0!==a)&&(r.objectMode||a&&a.length)){var i=t.push(a);i||(n=!0,e.pause())}})),e)void 0===this[a]&&"function"===typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var i=0;i-1))throw new k(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(e,t,r){r(new v("_write()"))},T.prototype._writev=null,T.prototype.end=function(e,t,r){var n=this._writableState;return"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||K(this,n,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=h.destroy,T.prototype._undestroy=h.undestroy,T.prototype._destroy=function(e,t){t(e)}},9637:function(e,t,r){"use strict";var n,a=r(96027);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=r(83210),o=Symbol("lastResolve"),f=Symbol("lastReject"),d=Symbol("error"),s=Symbol("ended"),u=Symbol("lastPromise"),b=Symbol("handlePromise"),h=Symbol("stream");function l(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var r=e[h].read();null!==r&&(e[u]=null,e[o]=null,e[f]=null,t(l(r,!1)))}}function x(e){a.nextTick(p,e)}function m(e,t){return function(r,n){e.then((function(){t[s]?r(l(void 0,!0)):t[b](r,n)}),n)}}var v=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((n={get stream(){return this[h]},next:function(){var e=this,t=this[d];if(null!==t)return Promise.reject(t);if(this[s])return Promise.resolve(l(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){a.nextTick((function(){e[d]?r(e[d]):t(l(void 0,!0))}))}));var r,n=this[u];if(n)r=new Promise(m(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(l(i,!1));r=new Promise(this[b])}return this[u]=r,r}},i(n,Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(l(void 0,!0))}))}))})),n),v),y=function(e){var t,r=Object.create(g,(t={},i(t,h,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,f,{value:null,writable:!0}),i(t,d,{value:null,writable:!0}),i(t,s,{value:e._readableState.endEmitted,writable:!0}),i(t,b,{value:function(e,t){var n=r[h].read();n?(r[u]=null,r[o]=null,r[f]=null,e(l(n,!1))):(r[o]=e,r[f]=t)},writable:!0}),t));return r[u]=null,c(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[f];return null!==t&&(r[u]=null,r[o]=null,r[f]=null,t(e)),void(r[d]=e)}var n=r[o];null!==n&&(r[u]=null,r[o]=null,r[f]=null,n(l(void 0,!0))),r[s]=!0})),e.on("readable",x.bind(null,r)),r};e.exports=y},98947:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";var t=this.head,r=""+t.data;while(t=t.next)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);var t=s.allocUnsafe(e>>>0),r=this.head,n=0;while(r)l(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return ea.length?a.length:e;if(i===a.length?n+=a:n+=a.slice(0,e),e-=i,0===e){i===a.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=a.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,n=1;r.data.copy(t),e-=r.data.length;while(r=r.next){var a=r.data,i=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,i),e-=i,0===e){i===a.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=a.slice(i));break}++n}return this.length-=n,t}},{key:h,value:function(e,t){return b(this,a({},t,{depth:0,customInspect:!1}))}}]),e}()},47508:function(e,t,r){"use strict";var n=r(96027);function a(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(f,this,e)):n.nextTick(f,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(c,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(c,r),t(e)):n.nextTick(c,r)})),this)}function i(e,t){f(e,t),c(e)}function c(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(){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 f(e,t){e.emit("error",t)}function d(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}e.exports={destroy:a,undestroy:o,errorOrDestroy:d}},83210:function(e,t,r){"use strict";var n=r(55314).q.ERR_STREAM_PREMATURE_CLOSE;function a(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),a=0;a0;return s(e,c,o,(function(e){n||(n=e),e&&i.forEach(u),c||(i.forEach(u),a(n))}))}));return t.reduce(b)}e.exports=l},21938:function(e,t,r){"use strict";var n=r(55314).q.ERR_INVALID_OPT_VALUE;function a(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}function i(e,t,r,i){var c=a(t,i,r);if(null!=c){if(!isFinite(c)||Math.floor(c)!==c||c<0){var o=i?r:"highWaterMark";throw new n(o,c)}return Math.floor(c)}return e.objectMode?16:16384}e.exports={getHighWaterMark:i}},13066:function(e,t,r){e.exports=r(43793).EventEmitter},98141:function(e,t,r){t=e.exports=r(50187),t.Stream=t,t.Readable=t,t.Writable=r(69621),t.Duplex=r(31418),t.Transform=r(87825),t.PassThrough=r(80214),t.finished=r(83210),t.pipeline=r(26708)},3128:function(e,t,r){"use strict";var n=r(15361).Buffer,a=r(81923),i=r(10761),c=new Array(16),o=[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],f=[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],d=[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],s=[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],u=[0,1518500249,1859775393,2400959708,2840853838],b=[1352829926,1548603684,1836072691,2053994217,0];function h(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function l(e,t){return e<>>32-t}function p(e,t,r,n,a,i,c,o){return l(e+(t^r^n)+i+c|0,o)+a|0}function x(e,t,r,n,a,i,c,o){return l(e+(t&r|~t&n)+i+c|0,o)+a|0}function m(e,t,r,n,a,i,c,o){return l(e+((t|~r)^n)+i+c|0,o)+a|0}function v(e,t,r,n,a,i,c,o){return l(e+(t&n|r&~n)+i+c|0,o)+a|0}function g(e,t,r,n,a,i,c,o){return l(e+(t^(r|~n))+i+c|0,o)+a|0}a(h,i),h.prototype._update=function(){for(var e=c,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,a=0|this._c,i=0|this._d,h=0|this._e,y=0|this._a,w=0|this._b,_=0|this._c,M=0|this._d,k=0|this._e,A=0;A<80;A+=1){var E,S;A<16?(E=p(r,n,a,i,h,e[o[A]],u[0],d[A]),S=g(y,w,_,M,k,e[f[A]],b[0],s[A])):A<32?(E=x(r,n,a,i,h,e[o[A]],u[1],d[A]),S=v(y,w,_,M,k,e[f[A]],b[1],s[A])):A<48?(E=m(r,n,a,i,h,e[o[A]],u[2],d[A]),S=m(y,w,_,M,k,e[f[A]],b[2],s[A])):A<64?(E=v(r,n,a,i,h,e[o[A]],u[3],d[A]),S=x(y,w,_,M,k,e[f[A]],b[3],s[A])):(E=g(r,n,a,i,h,e[o[A]],u[4],d[A]),S=p(y,w,_,M,k,e[f[A]],b[4],s[A])),r=h,h=i,i=l(a,10),a=n,n=E,y=k,k=M,M=l(_,10),_=w,w=S}var T=this._b+a+M|0;this._b=this._c+i+k|0,this._c=this._d+h+y|0,this._d=this._e+r+w|0,this._e=this._a+n+_|0,this._a=T},h.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 e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},98217:function(e,t,r){"use strict";var n=r(15361)["Buffer"];r(21703),r(48675),r(3462);var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getLength=t.decode=t.encode=void 0;var i=a(r(63250));function c(e){if(Array.isArray(e)){for(var t=[],r=0;re.length)throw new Error("invalid rlp: total length is larger than the data");if(i=e.slice(r,s),0===i.length)throw new Error("invalid rlp, List has a invalid length");while(i.length)c=u(i),f.push(c.data),i=c.remainder;return{data:f,remainder:e.slice(s)}}function b(e){return"0x"===e.slice(0,2)}function h(e){return"string"!==typeof e?e:b(e)?e.slice(2):e}function l(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function p(e){return e.length%2?"0"+e:e}function x(e){var t=l(e);return n.from(t,"hex")}function m(e){if(!n.isBuffer(e)){if("string"===typeof e)return b(e)?n.from(p(h(e)),"hex"):n.from(e);if("number"===typeof e||"bigint"===typeof e)return e?x(e):n.from([]);if(null===e||void 0===e)return n.from([]);if(e instanceof Uint8Array)return n.from(e);if(i.default.isBN(e))return n.from(e.toArray());throw new Error("invalid type")}return e}t.encode=c,t.decode=d,t.getLength=s},63250:function(e,t,r){e=r.nmd(e),r(21703),function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var c;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{c="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(6567).Buffer}catch(P){}function o(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function f(e,t,r){var n=o(e,r);return r-1>=t&&(n|=o(e,r-1)<<4),n}function d(e,t,r,a){for(var i=0,c=0,o=Math.min(e.length,r),f=t;f=49?d-49+10:d>=17?d-17+10:d,n(d>=0&&c0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&(a++,this.negative=1),a=0;a-=3)c=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=c<>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-o&67108863,o+=24,o>=26&&(o-=26,i++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=f(e,t,n)<=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8;else{var o=e.length-t;for(n=o%2===0?t+1:t;n=18?(i-=18,c+=1,this.words[c]|=a>>>26):i+=8}this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,c=i%n,o=Math.min(i,i-c)+r,f=0,s=r;s1&&0===this.words[this.length-1])this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(P){i.prototype.inspect=u}else i.prototype.inspect=u;function u(){return(this.red?""}var b=["","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];i.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var a=0,i=0,c=0;c>>24-a&16777215,r=0!==i||c!==this.length-1?b[6-f.length]+f+r:f+r,a+=2,a>=26&&(a-=26,c--)}0!==i&&(r=i.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=h[e],s=l[e];r="";var u=this.clone();u.negative=0;while(!u.isZero()){var p=u.modrn(s).toString(e);u=u.idivn(s),r=u.isZero()?p+r:b[d-p.length]+p+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},c&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(c,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var p=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};function x(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],c=a*i,o=67108863&c,f=c/67108864|0;r.words[0]=o;for(var d=1;d>>26,u=67108863&f,b=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=b;h++){var l=d-h|0;a=0|e.words[l],i=0|t.words[h],c=a*i+u,s+=c/67108864|0,u=67108863&c}r.words[d]=0|u,f=0|s}return 0!==f?r.words[d]=0|f:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,r){this._strip();var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var c=p(e,i),o="le"===t?"LE":"BE";return this["_toArrayLike"+o](c,a),c},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=c>>>24,i+=2)}if(r=0&&(e[r--]=c>>8&255),r>=0&&(e[r--]=c>>16&255),6===i?(r>=0&&(e[r--]=c>>24&255),n=0,i=0):(n=c>>>24,i+=2)}if(r>=0){e[r--]=n;while(r>=0)e[r--]=0}},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,c=0;c>26,this.words[c]=67108863&t;for(;0!==i&&c>26,this.words[c]=67108863&t;if(0===i&&c>>13,h=0|c[1],l=8191&h,p=h>>>13,x=0|c[2],m=8191&x,v=x>>>13,g=0|c[3],y=8191&g,w=g>>>13,_=0|c[4],M=8191&_,k=_>>>13,A=0|c[5],E=8191&A,S=A>>>13,T=0|c[6],C=8191&T,P=T>>>13,O=0|c[7],R=8191&O,I=O>>>13,B=0|c[8],L=8191&B,N=B>>>13,U=0|c[9],j=8191&U,D=U>>>13,F=0|o[0],H=8191&F,q=F>>>13,z=0|o[1],K=8191&z,$=z>>>13,G=0|o[2],V=8191&G,W=G>>>13,Z=0|o[3],J=8191&Z,Y=Z>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ae=0|o[6],ie=8191&ae,ce=ae>>>13,oe=0|o[7],fe=8191&oe,de=oe>>>13,se=0|o[8],ue=8191&se,be=se>>>13,he=0|o[9],le=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(u,H),a=Math.imul(u,q),a=a+Math.imul(b,H)|0,i=Math.imul(b,q);var xe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(l,H),a=Math.imul(l,q),a=a+Math.imul(p,H)|0,i=Math.imul(p,q),n=n+Math.imul(u,K)|0,a=a+Math.imul(u,$)|0,a=a+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0;var me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,H),a=Math.imul(m,q),a=a+Math.imul(v,H)|0,i=Math.imul(v,q),n=n+Math.imul(l,K)|0,a=a+Math.imul(l,$)|0,a=a+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(u,V)|0,a=a+Math.imul(u,W)|0,a=a+Math.imul(b,V)|0,i=i+Math.imul(b,W)|0;var ve=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(y,H),a=Math.imul(y,q),a=a+Math.imul(w,H)|0,i=Math.imul(w,q),n=n+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(l,V)|0,a=a+Math.imul(l,W)|0,a=a+Math.imul(p,V)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(u,J)|0,a=a+Math.imul(u,Y)|0,a=a+Math.imul(b,J)|0,i=i+Math.imul(b,Y)|0;var ge=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(M,H),a=Math.imul(M,q),a=a+Math.imul(k,H)|0,i=Math.imul(k,q),n=n+Math.imul(y,K)|0,a=a+Math.imul(y,$)|0,a=a+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,n=n+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0,a=a+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,n=n+Math.imul(u,Q)|0,a=a+Math.imul(u,ee)|0,a=a+Math.imul(b,Q)|0,i=i+Math.imul(b,ee)|0;var ye=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,H),a=Math.imul(E,q),a=a+Math.imul(S,H)|0,i=Math.imul(S,q),n=n+Math.imul(M,K)|0,a=a+Math.imul(M,$)|0,a=a+Math.imul(k,K)|0,i=i+Math.imul(k,$)|0,n=n+Math.imul(y,V)|0,a=a+Math.imul(y,W)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,n=n+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,a=a+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,n=n+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0,a=a+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(u,re)|0,a=a+Math.imul(u,ne)|0,a=a+Math.imul(b,re)|0,i=i+Math.imul(b,ne)|0;var we=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,H),a=Math.imul(C,q),a=a+Math.imul(P,H)|0,i=Math.imul(P,q),n=n+Math.imul(E,K)|0,a=a+Math.imul(E,$)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(M,V)|0,a=a+Math.imul(M,W)|0,a=a+Math.imul(k,V)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,a=a+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,n=n+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,a=a+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0,a=a+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(u,ie)|0,a=a+Math.imul(u,ce)|0,a=a+Math.imul(b,ie)|0,i=i+Math.imul(b,ce)|0;var _e=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,H),a=Math.imul(R,q),a=a+Math.imul(I,H)|0,i=Math.imul(I,q),n=n+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,a=a+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,n=n+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,a=a+Math.imul(S,V)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,a=a+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,a=a+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,a=a+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(l,ie)|0,a=a+Math.imul(l,ce)|0,a=a+Math.imul(p,ie)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(u,fe)|0,a=a+Math.imul(u,de)|0,a=a+Math.imul(b,fe)|0,i=i+Math.imul(b,de)|0;var Me=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,H),a=Math.imul(L,q),a=a+Math.imul(N,H)|0,i=Math.imul(N,q),n=n+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,a=a+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(C,V)|0,a=a+Math.imul(C,W)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(E,J)|0,a=a+Math.imul(E,Y)|0,a=a+Math.imul(S,J)|0,i=i+Math.imul(S,Y)|0,n=n+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,a=a+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,a=a+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(m,ie)|0,a=a+Math.imul(m,ce)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(l,fe)|0,a=a+Math.imul(l,de)|0,a=a+Math.imul(p,fe)|0,i=i+Math.imul(p,de)|0,n=n+Math.imul(u,ue)|0,a=a+Math.imul(u,be)|0,a=a+Math.imul(b,ue)|0,i=i+Math.imul(b,be)|0;var ke=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,H),a=Math.imul(j,q),a=a+Math.imul(D,H)|0,i=Math.imul(D,q),n=n+Math.imul(L,K)|0,a=a+Math.imul(L,$)|0,a=a+Math.imul(N,K)|0,i=i+Math.imul(N,$)|0,n=n+Math.imul(R,V)|0,a=a+Math.imul(R,W)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(C,J)|0,a=a+Math.imul(C,Y)|0,a=a+Math.imul(P,J)|0,i=i+Math.imul(P,Y)|0,n=n+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,a=a+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,a=a+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(y,ie)|0,a=a+Math.imul(y,ce)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(w,ce)|0,n=n+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(v,de)|0,n=n+Math.imul(l,ue)|0,a=a+Math.imul(l,be)|0,a=a+Math.imul(p,ue)|0,i=i+Math.imul(p,be)|0,n=n+Math.imul(u,le)|0,a=a+Math.imul(u,pe)|0,a=a+Math.imul(b,le)|0,i=i+Math.imul(b,pe)|0;var Ae=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),a=Math.imul(j,$),a=a+Math.imul(D,K)|0,i=Math.imul(D,$),n=n+Math.imul(L,V)|0,a=a+Math.imul(L,W)|0,a=a+Math.imul(N,V)|0,i=i+Math.imul(N,W)|0,n=n+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,a=a+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,a=a+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,a=a+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(M,ie)|0,a=a+Math.imul(M,ce)|0,a=a+Math.imul(k,ie)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(m,ue)|0,a=a+Math.imul(m,be)|0,a=a+Math.imul(v,ue)|0,i=i+Math.imul(v,be)|0,n=n+Math.imul(l,le)|0,a=a+Math.imul(l,pe)|0,a=a+Math.imul(p,le)|0,i=i+Math.imul(p,pe)|0;var Ee=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),a=Math.imul(j,W),a=a+Math.imul(D,V)|0,i=Math.imul(D,W),n=n+Math.imul(L,J)|0,a=a+Math.imul(L,Y)|0,a=a+Math.imul(N,J)|0,i=i+Math.imul(N,Y)|0,n=n+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,a=a+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,a=a+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(E,ie)|0,a=a+Math.imul(E,ce)|0,a=a+Math.imul(S,ie)|0,i=i+Math.imul(S,ce)|0,n=n+Math.imul(M,fe)|0,a=a+Math.imul(M,de)|0,a=a+Math.imul(k,fe)|0,i=i+Math.imul(k,de)|0,n=n+Math.imul(y,ue)|0,a=a+Math.imul(y,be)|0,a=a+Math.imul(w,ue)|0,i=i+Math.imul(w,be)|0,n=n+Math.imul(m,le)|0,a=a+Math.imul(m,pe)|0,a=a+Math.imul(v,le)|0,i=i+Math.imul(v,pe)|0;var Se=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,J),a=Math.imul(j,Y),a=a+Math.imul(D,J)|0,i=Math.imul(D,Y),n=n+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,a=a+Math.imul(N,Q)|0,i=i+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,a=a+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,n=n+Math.imul(C,ie)|0,a=a+Math.imul(C,ce)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(P,ce)|0,n=n+Math.imul(E,fe)|0,a=a+Math.imul(E,de)|0,a=a+Math.imul(S,fe)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(M,ue)|0,a=a+Math.imul(M,be)|0,a=a+Math.imul(k,ue)|0,i=i+Math.imul(k,be)|0,n=n+Math.imul(y,le)|0,a=a+Math.imul(y,pe)|0,a=a+Math.imul(w,le)|0,i=i+Math.imul(w,pe)|0;var Te=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Q),a=Math.imul(j,ee),a=a+Math.imul(D,Q)|0,i=Math.imul(D,ee),n=n+Math.imul(L,re)|0,a=a+Math.imul(L,ne)|0,a=a+Math.imul(N,re)|0,i=i+Math.imul(N,ne)|0,n=n+Math.imul(R,ie)|0,a=a+Math.imul(R,ce)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(I,ce)|0,n=n+Math.imul(C,fe)|0,a=a+Math.imul(C,de)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(P,de)|0,n=n+Math.imul(E,ue)|0,a=a+Math.imul(E,be)|0,a=a+Math.imul(S,ue)|0,i=i+Math.imul(S,be)|0,n=n+Math.imul(M,le)|0,a=a+Math.imul(M,pe)|0,a=a+Math.imul(k,le)|0,i=i+Math.imul(k,pe)|0;var Ce=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),a=Math.imul(j,ne),a=a+Math.imul(D,re)|0,i=Math.imul(D,ne),n=n+Math.imul(L,ie)|0,a=a+Math.imul(L,ce)|0,a=a+Math.imul(N,ie)|0,i=i+Math.imul(N,ce)|0,n=n+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(I,de)|0,n=n+Math.imul(C,ue)|0,a=a+Math.imul(C,be)|0,a=a+Math.imul(P,ue)|0,i=i+Math.imul(P,be)|0,n=n+Math.imul(E,le)|0,a=a+Math.imul(E,pe)|0,a=a+Math.imul(S,le)|0,i=i+Math.imul(S,pe)|0;var Pe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,ie),a=Math.imul(j,ce),a=a+Math.imul(D,ie)|0,i=Math.imul(D,ce),n=n+Math.imul(L,fe)|0,a=a+Math.imul(L,de)|0,a=a+Math.imul(N,fe)|0,i=i+Math.imul(N,de)|0,n=n+Math.imul(R,ue)|0,a=a+Math.imul(R,be)|0,a=a+Math.imul(I,ue)|0,i=i+Math.imul(I,be)|0,n=n+Math.imul(C,le)|0,a=a+Math.imul(C,pe)|0,a=a+Math.imul(P,le)|0,i=i+Math.imul(P,pe)|0;var Oe=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,fe),a=Math.imul(j,de),a=a+Math.imul(D,fe)|0,i=Math.imul(D,de),n=n+Math.imul(L,ue)|0,a=a+Math.imul(L,be)|0,a=a+Math.imul(N,ue)|0,i=i+Math.imul(N,be)|0,n=n+Math.imul(R,le)|0,a=a+Math.imul(R,pe)|0,a=a+Math.imul(I,le)|0,i=i+Math.imul(I,pe)|0;var Re=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,ue),a=Math.imul(j,be),a=a+Math.imul(D,ue)|0,i=Math.imul(D,be),n=n+Math.imul(L,le)|0,a=a+Math.imul(L,pe)|0,a=a+Math.imul(N,le)|0,i=i+Math.imul(N,pe)|0;var Ie=(d+n|0)+((8191&a)<<13)|0;d=(i+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,le),a=Math.imul(j,pe),a=a+Math.imul(D,le)|0,i=Math.imul(D,pe);var Be=(d+n|0)+((8191&a)<<13)|0;return d=(i+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=xe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=we,f[6]=_e,f[7]=Me,f[8]=ke,f[9]=Ae,f[10]=Ee,f[11]=Se,f[12]=Te,f[13]=Ce,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ie,f[18]=Be,0!==d&&(f[19]=d,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0,a+=c>>>26,c&=67108863}r.words[i]=o,n=c,c=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function y(e,t,r){return g(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(v=m),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?v(this,e,t):n<63?m(this,e,t):n<1024?g(this,e,t):y(this,e,t),r},w.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},w.prototype.permute=function(e,t,r,n,a,i){for(var c=0;c>>=1)a++;return 1<>>=13,r[2*c+1]=8191&i,i>>>=13;for(c=2*t;c>=26,r+=i/67108864|0,r+=c>>>26,this.words[a]=67108863&c}return 0!==r&&(this.words[a]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=x(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var c=0;for(t=0;t>>26-r}c&&(this.words[t]=c,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t=0),a=t?(t-t%26)/26:0;var i=e%26,c=Math.min((e-i)/26,this.length),o=67108863^67108863>>>i<c)for(this.length-=c,d=0;d=0&&(0!==s||d>=a);d--){var u=0|this.words[d];this.words[d]=s<<26-i|u>>>i,s=u&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[a+r]=67108863&i}for(;a>26,this.words[a+r]=67108863&i;if(0===o)return this._strip();for(n(-1===o),o=0,a=0;a>26,this.words[a]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),a=e,c=0|a.words[a.length-1],o=this._countBits(c);r=26-o,0!==r&&(a=a.ushln(r),n.iushln(r),c=0|a.words[a.length-1]);var f,d=n.length-a.length;if("mod"!==t){f=new i(null),f.length=d+1,f.words=new Array(f.length);for(var s=0;s=0;b--){var h=67108864*(0|n.words[a.length+b])+(0|n.words[a.length+b-1]);h=Math.min(h/c|0,67108863),n._ishlnsubmul(a,h,b);while(0!==n.negative)h--,n.negative=0,n._ishlnsubmul(a,1,b),n.isZero()||(n.negative^=1);f&&(f.words[b]=h)}return f&&f._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.iadd(e)),{div:a,mod:c}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(c=o.mod.neg(),r&&0!==c.negative&&c.isub(e)),{div:o.div,mod:c}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,c,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,a=0,i=this.length-1;i>=0;i--)a=(r*a+(0|this.words[i]))%e;return t?-a:a},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,a=this.length-1;a>=0;a--){var i=(0|this.words[a])+67108864*r;this.words[a]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a=new i(1),c=new i(0),o=new i(0),f=new i(1),d=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++d;var s=r.clone(),u=t.clone();while(!t.isZero()){for(var b=0,h=1;0===(t.words[0]&h)&&b<26;++b,h<<=1);if(b>0){t.iushrn(b);while(b-- >0)(a.isOdd()||c.isOdd())&&(a.iadd(s),c.isub(u)),a.iushrn(1),c.iushrn(1)}for(var l=0,p=1;0===(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(u)),o.iushrn(1),f.iushrn(1)}t.cmp(r)>=0?(t.isub(r),a.isub(o),c.isub(f)):(r.isub(t),o.isub(a),f.isub(c))}return{a:o,b:f,gcd:r.iushln(d)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var a,c=new i(1),o=new i(0),f=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var d=0,s=1;0===(t.words[0]&s)&&d<26;++d,s<<=1);if(d>0){t.iushrn(d);while(d-- >0)c.isOdd()&&c.iadd(f),c.iushrn(1)}for(var u=0,b=1;0===(r.words[0]&b)&&u<26;++u,b<<=1);if(u>0){r.iushrn(u);while(u-- >0)o.isOdd()&&o.iadd(f),o.iushrn(1)}t.cmp(r)>=0?(t.isub(r),c.isub(o)):(r.isub(t),o.isub(c))}return a=0===t.cmpn(1)?c:o,a.cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[c]=o}return 0!==i&&(this.words[c]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:ae.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new T(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function M(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){M.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){M.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){M.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){M.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},M.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},M.prototype.split=function(e,t){e.iushrn(this.n,0,t)},M.prototype.imulK=function(e){return e.imul(this.k)},a(k,M),k.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),a=0;a>>22,i=c}i>>>=22,e.words[a-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new A;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return _[e]=t,t},T.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(s(e,e.umod(this.m)._forceRed(this)),e)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}var a=this.m.subn(1),c=0;while(!a.isZero()&&0===a.andln(1))c++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),f=o.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();s=new i(2*s*s).toRed(this);while(0!==this.pow(s,d).cmp(f))s.redIAdd(f);var u=this.pow(s,a),b=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),l=c;while(0!==h.cmp(o)){for(var p=h,x=0;0!==p.cmp(o);x++)p=p.redSqr();n(x=0;a--){for(var s=t.words[a],u=d-1;u>=0;u--){var b=s>>u&1;c!==n[0]&&(c=this.sqr(c)),0!==b||0!==o?(o<<=1,o|=b,f++,(f===r||0===a&&0===u)&&(c=this.mul(c,n[o]),f=0,o=0)):f=0}d=26}return c},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new C(e)},a(C,T),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),c=a;return a.cmp(this.m)>=0?c=a.isub(this.m):a.cmpn(0)<0&&(c=a.iadd(this.m)),c._forceRed(this)},C.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}(e,this)},6779:function(e,t,r){r(21703);var n=r(15361),a=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function c(e,t,r){return a(e,t,r)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=c),i(a,c),c.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return a(e,t,r)},c.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=a(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},c.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return a(e)},c.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},43353:function(e,t,r){r(21703);const n=r(9242),a=r(43793);var i="object"===typeof Reflect?Reflect:null,c=i&&"function"===typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};function o(){a.call(this)}function f(e,t,r){try{c(e,t,r)}catch(n){setTimeout((()=>{throw n}))}}function d(e,t){for(var r=new Array(t),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var c=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw c.context=i,c}var o=a[e];if(void 0===o)return!1;if("function"===typeof o)f(o,this,t);else{var s=o.length,u=d(o,s);for(r=0;r=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=c(e);return t&&0!==t.length?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!o.kStringMaxLength)try{o.kStringMaxLength=n.binding("buffer").kStringMaxLength}catch(d){}o.constants||(o.constants={MAX_LENGTH:o.kMaxLength},o.kStringMaxLength&&(o.constants.MAX_STRING_LENGTH=o.kStringMaxLength)),e.exports=o},80014:function(e,t,r){"use strict";r(48675),r(3462),r(21703),r(84633),function(t){const r=2147483647;function n(e){const t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);let r=1779033703,n=3144134277,a=1013904242,i=2773480762,c=1359893119,o=2600822924,f=528734635,d=1541459225;const s=new Uint32Array(64);function u(e){let u=0,b=e.length;while(b>=64){let h,l,p,x,m,v=r,g=n,y=a,w=i,_=c,M=o,k=f,A=d;for(l=0;l<16;l++)p=u+4*l,s[l]=(255&e[p])<<24|(255&e[p+1])<<16|(255&e[p+2])<<8|255&e[p+3];for(l=16;l<64;l++)h=s[l-2],x=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,h=s[l-15],m=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,s[l]=(x+s[l-7]|0)+(m+s[l-16]|0)|0;for(l=0;l<64;l++)x=(((_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&M^~_&k)|0)+(A+(t[l]+s[l]|0)|0)|0,m=((v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+(v&g^v&y^g&y)|0,A=k,k=M,M=_,_=w+x|0,w=y,y=g,g=v,v=x+m|0;r=r+v|0,n=n+g|0,a=a+y|0,i=i+w|0,c=c+_|0,o=o+M|0,f=f+k|0,d=d+A|0,u+=64,b-=64}}u(e);let b,h=e.length%64,l=e.length/536870912|0,p=e.length<<3,x=h<56?56:120,m=e.slice(e.length-h,e.length);for(m.push(128),b=h+1;b>>24&255),m.push(l>>>16&255),m.push(l>>>8&255),m.push(l>>>0&255),m.push(p>>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),u(m),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,d>>>24&255,d>>>16&255,d>>>8&255,d>>>0&255]}function a(e,t,r){e=e.length<=64?e:n(e);const a=64+t.length+4,i=new Array(a),c=new Array(64);let o,f=[];for(o=0;o<64;o++)i[o]=54;for(o=0;o=a-4;e--){if(i[e]++,i[e]<=255)return;i[e]=0}}while(r>=32)d(),f=f.concat(n(c.concat(n(i)))),r-=32;return r>0&&(d(),f=f.concat(n(c.concat(n(i))).slice(0,r))),f}function i(e,t,r,n,a){let i;for(d(e,16*(2*r-1),a,0,16),i=0;i<2*r;i++)f(e,16*i,a,16),o(a,n),d(a,0,e,t+16*i,16);for(i=0;i>>32-t}function o(e,t){d(e,0,t,0,16);for(let r=8;r>0;r-=2)t[4]^=c(t[0]+t[12],7),t[8]^=c(t[4]+t[0],9),t[12]^=c(t[8]+t[4],13),t[0]^=c(t[12]+t[8],18),t[9]^=c(t[5]+t[1],7),t[13]^=c(t[9]+t[5],9),t[1]^=c(t[13]+t[9],13),t[5]^=c(t[1]+t[13],18),t[14]^=c(t[10]+t[6],7),t[2]^=c(t[14]+t[10],9),t[6]^=c(t[2]+t[14],13),t[10]^=c(t[6]+t[2],18),t[3]^=c(t[15]+t[11],7),t[7]^=c(t[3]+t[15],9),t[11]^=c(t[7]+t[3],13),t[15]^=c(t[11]+t[7],18),t[1]^=c(t[0]+t[3],7),t[2]^=c(t[1]+t[0],9),t[3]^=c(t[2]+t[1],13),t[0]^=c(t[3]+t[2],18),t[6]^=c(t[5]+t[4],7),t[7]^=c(t[6]+t[5],9),t[4]^=c(t[7]+t[6],13),t[5]^=c(t[4]+t[7],18),t[11]^=c(t[10]+t[9],7),t[8]^=c(t[11]+t[10],9),t[9]^=c(t[8]+t[11],13),t[10]^=c(t[9]+t[8],18),t[12]^=c(t[15]+t[14],7),t[13]^=c(t[12]+t[15],9),t[14]^=c(t[13]+t[12],13),t[15]^=c(t[14]+t[13],18);for(let r=0;r<16;++r)e[r]+=t[r]}function f(e,t,r,n){for(let a=0;a=256)return!1}return!0}function u(e,t){if("number"!==typeof e||e%1)throw new Error("invalid "+t);return e}function b(e,t,n,c,o,b,h){if(n=u(n,"N"),c=u(c,"r"),o=u(o,"p"),b=u(b,"dkLen"),0===n||0!==(n&n-1))throw new Error("N must be power of 2");if(n>r/128/c)throw new Error("N too large");if(c>r/128/o)throw new Error("r too large");if(!s(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!s(t))throw new Error("salt must be an array or buffer");t=Array.prototype.slice.call(t);let l=a(e,t,128*o*c);const p=new Uint32Array(32*o*c);for(let r=0;rC&&(t=C);for(let e=0;eC&&(t=C);for(let e=0;e>0&255),l.push(p[e]>>8&255),l.push(p[e]>>16&255),l.push(p[e]>>24&255);const r=a(e,l,b);return h&&h(null,1,r),r}h&&P(O)};if(!h)while(1){const e=O();if(void 0!=e)return e}O()}const h={scrypt:function(e,t,r,n,a,i,c){return new Promise((function(o,f){let d=0;c&&c(0),b(e,t,r,n,a,i,(function(e,t,r){if(e)f(e);else if(r)c&&1!==d&&c(1),o(new Uint8Array(r));else if(c&&t!==d)return d=t,c(t)}))}))},syncScrypt:function(e,t,r,n,a,i){return new Uint8Array(b(e,t,r,n,a,i))}};e.exports=h}()},55899:function(e,t,r){e.exports=r(49338)(r(26951))},26951:function(e,t,r){r(48675),r(3462),r(21703);const n=r(32127).ec,a=new n("secp256k1"),i=a.curve,c=i.n.constructor;function o(e,t){let r=new c(t);if(r.cmp(i.p)>=0)return null;r=r.toRed(i.red);let n=r.redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===e!==n.isOdd()&&(n=n.redNeg()),a.keyPair({pub:{x:r,y:n}})}function f(e,t,r){let n=new c(t),o=new c(r);if(n.cmp(i.p)>=0||o.cmp(i.p)>=0)return null;if(n=n.toRed(i.red),o=o.toRed(i.red),(6===e||7===e)&&o.isOdd()!==(7===e))return null;const f=n.redSqr().redIMul(n);return o.redSqr().redISub(f.redIAdd(i.b)).isZero()?a.keyPair({pub:{x:n,y:o}}):null}function d(e){const t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:o(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:f(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){const r=t.encode(null,33===e.length);for(let n=0;n=0)return 1;if(r.iadd(new c(e)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul(e,t){let r=new c(t);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new c(e)),r.cmp(i.n)>=0&&(r=r.umod(i.n));const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify(e){const t=d(e);return null===t?1:0},publicKeyCreate(e,t){const r=new c(t);if(r.cmp(i.n)>=0||r.isZero())return 1;const n=a.keyFromPrivate(t).getPublic();return s(e,n),0},publicKeyConvert(e,t){const r=d(t);if(null===r)return 1;const n=r.getPublic();return s(e,n),0},publicKeyNegate(e,t){const r=d(t);if(null===r)return 1;const n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine(e,t){const r=new Array(t.length);for(let a=0;a=0)return 2;const a=n.getPublic().add(i.g.mul(r));return a.isInfinity()?2:(s(e,a),0)},publicKeyTweakMul(e,t,r){const n=d(t);if(null===n)return 1;if(r=new c(r),r.cmp(i.n)>=0||r.isZero())return 2;const a=n.getPublic().mul(r);return s(e,a),0},signatureNormalize(e){const t=new c(e.subarray(0,32)),r=new c(e.subarray(32,64));return t.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(a.nh)&&e.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,t){const r=t.subarray(0,32),n=t.subarray(32,64);if(new c(r).cmp(i.n)>=0)return 1;if(new c(n).cmp(i.n)>=0)return 1;const{output:a}=e;let o=a.subarray(4,37);o[0]=0,o.set(r,1);let f=33,d=0;for(;f>1&&0===o[d]&&!(128&o[d+1]);--f,++d);if(o=o.subarray(d),128&o[0])return 1;if(f>1&&0===o[0]&&!(128&o[1]))return 1;let s=a.subarray(39,72);s[0]=0,s.set(n,1);let u=33,b=0;for(;u>1&&0===s[b]&&!(128&s[b+1]);--u,++b);return s=s.subarray(b),128&s[0]||u>1&&0===s[0]&&!(128&s[1])?1:(e.outputlen=6+f+u,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=o.length,a.set(o,4),a[4+f]=2,a[5+f]=s.length,a.set(s,6+f),0)},signatureImport(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;const r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;const n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;let a=t.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;let o=t.subarray(6+r);if(33===o.length&&0===o[0]&&(o=o.slice(1)),o.length>32)throw new Error("S length is too long");let f=new c(a);f.cmp(i.n)>=0&&(f=new c(0));let d=new c(t.subarray(6+r));return d.cmp(i.n)>=0&&(d=new c(0)),e.set(f.toArrayLike(Uint8Array,"be",32),0),e.set(d.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(e,t,r,n,o){if(o){const e=o;o=a=>{const i=e(t,r,null,n,a),o=i instanceof Uint8Array&&32===i.length;if(!o)throw new Error("This is the way");return new c(i)}}const f=new c(r);if(f.cmp(i.n)>=0||f.isZero())return 1;let d;try{d=a.sign(t,r,{canonical:!0,k:o,pers:n})}catch(s){return 1}return e.signature.set(d.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(d.s.toArrayLike(Uint8Array,"be",32),32),e.recid=d.recoveryParam,0},ecdsaVerify(e,t,r){const n={r:e.subarray(0,32),s:e.subarray(32,64)},o=new c(n.r),f=new c(n.s);if(o.cmp(i.n)>=0||f.cmp(i.n)>=0)return 1;if(1===f.cmp(a.nh)||o.isZero()||f.isZero())return 3;const s=d(r);if(null===s)return 2;const u=s.getPublic(),b=a.verify(t,n,u);return b?0:3},ecdsaRecover(e,t,r,n){const o={r:t.slice(0,32),s:t.slice(32,64)},f=new c(o.r),d=new c(o.s);if(f.cmp(i.n)>=0||d.cmp(i.n)>=0)return 1;if(f.isZero()||d.isZero())return 2;let u;try{u=a.recoverPubKey(n,o,r)}catch(b){return 2}return s(e,u),0},ecdh(e,t,r,n,o,f,s){const u=d(t);if(null===u)return 1;const b=new c(r);if(b.cmp(i.n)>=0||b.isZero())return 2;const h=u.getPublic().mul(b);if(void 0===o){const t=h.encode(null,!0),r=a.hash().update(t).digest();for(let n=0;n<32;++n)e[n]=r[n]}else{f||(f=new Uint8Array(32));const t=h.getX().toArray("be",32);for(let e=0;e<32;++e)f[e]=t[e];s||(s=new Uint8Array(32));const r=h.getY().toArray("be",32);for(let e=0;e<32;++e)s[e]=r[e];const a=o(f,s,n),i=a instanceof Uint8Array&&a.length===e.length;if(!i)return 2;e.set(a)}return 0}}},49338:function(e,t,r){r(21703),r(48675),r(3462);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 a(e,t){if(!e)throw new Error(t)}function i(e,t,r){if(a(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==r)if(Array.isArray(r)){const n=r.join(", "),i=`Expected ${e} to be an Uint8Array with length [${n}]`;a(r.includes(t.length),i)}else{const n=`Expected ${e} to be an Uint8Array with length ${r}`;a(t.length===r,n)}}function c(e){a("Boolean"===f(e),"Expected compressed to be a Boolean")}function o(e=(e=>new Uint8Array(e)),t){return"function"===typeof e&&(e=e(t)),i("output",e,t),e}function f(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=e=>({contextRandomize(t){switch(a(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&i("seed",t,32),e.contextRandomize(t)){case 1:throw new Error(n.CONTEXT_RANDOMIZE_UNKNOW)}},privateKeyVerify(t){return i("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate(t){switch(i("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(n.IMPOSSIBLE_CASE)}},privateKeyTweakAdd(t,r){switch(i("private key",t,32),i("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(n.TWEAK_ADD)}},privateKeyTweakMul(t,r){switch(i("private key",t,32),i("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(n.TWEAK_MUL)}},publicKeyVerify(t){return i("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate(t,r=!0,a){switch(i("private key",t,32),c(r),a=o(a,r?33:65),e.publicKeyCreate(a,t)){case 0:return a;case 1:throw new Error(n.SECKEY_INVALID);case 2:throw new Error(n.PUBKEY_SERIALIZE)}},publicKeyConvert(t,r=!0,a){switch(i("public key",t,[33,65]),c(r),a=o(a,r?33:65),e.publicKeyConvert(a,t)){case 0:return a;case 1:throw new Error(n.PUBKEY_PARSE);case 2:throw new Error(n.PUBKEY_SERIALIZE)}},publicKeyNegate(t,r=!0,a){switch(i("public key",t,[33,65]),c(r),a=o(a,r?33:65),e.publicKeyNegate(a,t)){case 0:return a;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(t,r=!0,f){a(Array.isArray(t),"Expected public keys to be an Array"),a(t.length>0,"Expected public keys array will have more than zero items");for(const e of t)i("public key",e,[33,65]);switch(c(r),f=o(f,r?33:65),e.publicKeyCombine(f,t)){case 0:return f;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(t,r,a=!0,f){switch(i("public key",t,[33,65]),i("tweak",r,32),c(a),f=o(f,a?33:65),e.publicKeyTweakAdd(f,t,r)){case 0:return f;case 1:throw new Error(n.PUBKEY_PARSE);case 2:throw new Error(n.TWEAK_ADD)}},publicKeyTweakMul(t,r,a=!0,f){switch(i("public key",t,[33,65]),i("tweak",r,32),c(a),f=o(f,a?33:65),e.publicKeyTweakMul(f,t,r)){case 0:return f;case 1:throw new Error(n.PUBKEY_PARSE);case 2:throw new Error(n.TWEAK_MUL)}},signatureNormalize(t){switch(i("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(n.SIG_PARSE)}},signatureExport(t,r){i("signature",t,64),r=o(r,72);const a={output:r,outputlen:72};switch(e.signatureExport(a,t)){case 0:return r.slice(0,a.outputlen);case 1:throw new Error(n.SIG_PARSE);case 2:throw new Error(n.IMPOSSIBLE_CASE)}},signatureImport(t,r){switch(i("signature",t),r=o(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(n.SIG_PARSE);case 2:throw new Error(n.IMPOSSIBLE_CASE)}},ecdsaSign(t,r,c={},d){i("message",t,32),i("private key",r,32),a("Object"===f(c),"Expected options to be an Object"),void 0!==c.data&&i("options.data",c.data),void 0!==c.noncefn&&a("Function"===f(c.noncefn),"Expected options.noncefn to be a Function"),d=o(d,64);const s={signature:d,recid:null};switch(e.ecdsaSign(s,t,r,c.data,c.noncefn)){case 0:return s;case 1:throw new Error(n.SIGN);case 2:throw new Error(n.IMPOSSIBLE_CASE)}},ecdsaVerify(t,r,a){switch(i("signature",t,64),i("message",r,32),i("public key",a,[33,65]),e.ecdsaVerify(t,r,a)){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(t,r,d,s=!0,u){switch(i("signature",t,64),a("Number"===f(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),i("message",d,32),c(s),u=o(u,s?33:65),e.ecdsaRecover(u,t,r,d)){case 0:return u;case 1:throw new Error(n.SIG_PARSE);case 2:throw new Error(n.RECOVER);case 3:throw new Error(n.IMPOSSIBLE_CASE)}},ecdh(t,r,c={},d){switch(i("public key",t,[33,65]),i("private key",r,32),a("Object"===f(c),"Expected options to be an Object"),void 0!==c.data&&i("options.data",c.data),void 0!==c.hashfn?(a("Function"===f(c.hashfn),"Expected options.hashfn to be a Function"),void 0!==c.xbuf&&i("options.xbuf",c.xbuf,32),void 0!==c.ybuf&&i("options.ybuf",c.ybuf,32),i("output",d)):d=o(d,32),e.ecdh(d,t,r,c.data,c.hashfn,c.xbuf,c.ybuf)){case 0:return d;case 1:throw new Error(n.PUBKEY_PARSE);case 2:throw new Error(n.ECDH)}}})},46941:function(e,t,r){var n=r(96027);r(21703),function(t){"use strict";var r=function(e){setTimeout(e,0)};function a(e){var t={capacity:e||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===t.firstHere){t.current++,t.firstHere=!0;var e=1}else e=0;var r={n:1};"function"==typeof arguments[0]?r.task=arguments[0]:r.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?r.task=arguments[1]:r.n=arguments[1]);var n=r.task;if(r.task=function(){n(t.leave)},t.current+r.n-e>t.capacity)return 1===e&&(t.current--,t.firstHere=!1),t.queue.push(r);t.current+=r.n-e,r.task(t.leave),1===e&&(t.firstHere=!1)},leave:function(e){if(e=e||1,t.current-=e,t.queue.length){var n=t.queue[0];n.n+t.current>t.capacity||(t.queue.shift(),t.current+=n.n,r(n.task))}else if(t.current<0)throw new Error("leave called too many times.")},available:function(e){return e=e||1,t.current+e<=t.capacity}};return t}"undefined"!=typeof n&&n&&"function"==typeof n.nextTick&&(r=n.nextTick),e.exports=a}()},37833:function(e,t,r){r(21703);var n=r(6779).Buffer;function a(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}a.prototype.update=function(e,t){"string"===typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,a=this._blockSize,i=e.length,c=this._len,o=0;o=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,a=(r-n)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},a.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=a},61720:function(e,t,r){r(21703);var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(96664),n.sha1=r(18272),n.sha224=r(52935),n.sha256=r(872),n.sha384=r(6461),n.sha512=r(82522)},96664:function(e,t,r){var n=r(81923),a=r(37833),i=r(6779).Buffer,c=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function f(){this.init(),this._w=o,a.call(this,64,56)}function d(e){return e<<5|e>>>27}function s(e){return e<<30|e>>>2}function u(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,a),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,a=0|this._c,i=0|this._d,o=0|this._e,f=0;f<16;++f)t[f]=e.readInt32BE(4*f);for(;f<80;++f)t[f]=t[f-3]^t[f-8]^t[f-14]^t[f-16];for(var b=0;b<80;++b){var h=~~(b/20),l=d(r)+u(h,n,a,i)+o+t[b]+c[h]|0;o=i,i=a,a=s(n),n=r,r=l}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0},f.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},18272:function(e,t,r){var n=r(81923),a=r(37833),i=r(6779).Buffer,c=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function f(){this.init(),this._w=o,a.call(this,64,56)}function d(e){return e<<1|e>>>31}function s(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function b(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,a),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,a=0|this._c,i=0|this._d,o=0|this._e,f=0;f<16;++f)t[f]=e.readInt32BE(4*f);for(;f<80;++f)t[f]=d(t[f-3]^t[f-8]^t[f-14]^t[f-16]);for(var h=0;h<80;++h){var l=~~(h/20),p=s(r)+b(l,n,a,i)+o+t[h]+c[l]|0;o=i,i=a,a=u(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0},f.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},52935:function(e,t,r){var n=r(81923),a=r(872),i=r(37833),c=r(6779).Buffer,o=new Array(64);function f(){this.init(),this._w=o,i.call(this,64,56)}n(f,a),f.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},f.prototype._hash=function(){var e=c.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=f},872:function(e,t,r){var n=r(81923),a=r(37833),i=r(6779).Buffer,c=[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],o=new Array(64);function f(){this.init(),this._w=o,a.call(this,64,56)}function d(e,t,r){return r^e&(t^r)}function s(e,t,r){return e&t|r&(e|t)}function u(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function b(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function l(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}n(f,a),f.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},f.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,a=0|this._c,i=0|this._d,o=0|this._e,f=0|this._f,p=0|this._g,x=0|this._h,m=0;m<16;++m)t[m]=e.readInt32BE(4*m);for(;m<64;++m)t[m]=l(t[m-2])+t[m-7]+h(t[m-15])+t[m-16]|0;for(var v=0;v<64;++v){var g=x+b(o)+d(o,f,p)+c[v]+t[v]|0,y=u(r)+s(r,n,a)|0;x=p,p=f,f=o,o=i+g|0,i=a,a=n,n=r,r=g+y|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0,this._f=f+this._f|0,this._g=p+this._g|0,this._h=x+this._h|0},f.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=f},6461:function(e,t,r){var n=r(81923),a=r(82522),i=r(37833),c=r(6779).Buffer,o=new Array(160);function f(){this.init(),this._w=o,i.call(this,128,112)}n(f,a),f.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},f.prototype._hash=function(){var e=c.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=f},82522:function(e,t,r){var n=r(81923),a=r(37833),i=r(6779).Buffer,c=[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],o=new Array(160);function f(){this.init(),this._w=o,a.call(this,128,112)}function d(e,t,r){return r^e&(t^r)}function s(e,t,r){return e&t|r&(e|t)}function u(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function b(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function x(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(f,a),f.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},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,a=0|this._ch,i=0|this._dh,o=0|this._eh,f=0|this._fh,v=0|this._gh,g=0|this._hh,y=0|this._al,w=0|this._bl,_=0|this._cl,M=0|this._dl,k=0|this._el,A=0|this._fl,E=0|this._gl,S=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;T<160;T+=2){var C=t[T-30],P=t[T-30+1],O=h(C,P),R=l(P,C);C=t[T-4],P=t[T-4+1];var I=p(C,P),B=x(P,C),L=t[T-14],N=t[T-14+1],U=t[T-32],j=t[T-32+1],D=R+N|0,F=O+L+m(D,R)|0;D=D+B|0,F=F+I+m(D,B)|0,D=D+j|0,F=F+U+m(D,j)|0,t[T]=F,t[T+1]=D}for(var H=0;H<160;H+=2){F=t[H],D=t[H+1];var q=s(r,n,a),z=s(y,w,_),K=u(r,y),$=u(y,r),G=b(o,k),V=b(k,o),W=c[H],Z=c[H+1],J=d(o,f,v),Y=d(k,A,E),X=S+V|0,Q=g+G+m(X,S)|0;X=X+Y|0,Q=Q+J+m(X,Y)|0,X=X+Z|0,Q=Q+W+m(X,Z)|0,X=X+D|0,Q=Q+F+m(X,D)|0;var ee=$+z|0,te=K+q+m(ee,$)|0;g=v,S=E,v=f,E=A,f=o,A=k,k=M+X|0,o=i+Q+m(k,M)|0,i=a,M=_,a=n,_=w,n=r,w=y,y=X+ee|0,r=Q+te+m(y,X)|0}this._al=this._al+y|0,this._bl=this._bl+w|0,this._cl=this._cl+_|0,this._dl=this._dl+M|0,this._el=this._el+k|0,this._fl=this._fl+A|0,this._gl=this._gl+E|0,this._hl=this._hl+S|0,this._ah=this._ah+r+m(this._al,y)|0,this._bh=this._bh+n+m(this._bl,w)|0,this._ch=this._ch+a+m(this._cl,_)|0,this._dh=this._dh+i+m(this._dl,M)|0,this._eh=this._eh+o+m(this._el,k)|0,this._fh=this._fh+f+m(this._fl,A)|0,this._gh=this._gh+v+m(this._gl,E)|0,this._hh=this._hh+g+m(this._hl,S)|0},f.prototype._hash=function(){var e=i.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=f},36189:function(e,t,r){"use strict";r(21703),e.exports=(e,t)=>{if("string"!==typeof e||"string"!==typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},19069:function(e){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},25605:function(e,t,r){"use strict";r(21703);var n=r(54304).Buffer,a=n.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){if(!e)return"utf8";var t;while(1)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function c(e){var t=i(e);if("string"!==typeof t&&(n.isEncoding===a||!a(e)))throw new Error("Unknown encoding: "+e);return t||e}function o(e){var t;switch(this.encoding=c(e),this.encoding){case"utf16le":this.text=l,this.end=p,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=x,this.end=m,t=3;break;default:return this.write=v,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function f(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function d(e,t,r){var n=t.length-1;if(n=0?(a>0&&(e.lastNeed=a-1),a):--n=0?(a>0&&(e.lastNeed=a-2),a):--n=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0))}function s(e,t,r){if(128!==(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"�"}}function u(e){var t=this.lastTotal-this.lastNeed,r=s(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function b(e,t){var r=d(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function l(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function x(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function v(e){return e.toString(this.encoding)}function g(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r */ var n=r(15361),a=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function c(e,t,r){return a(e,t,r)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=c),c.prototype=Object.create(a.prototype),i(a,c),c.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return a(e,t,r)},c.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=a(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},c.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return a(e)},c.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},99468:function(e,t,r){var n=r(44866);e.exports=function(e){return"string"!==typeof e?e:n(e)?e.slice(2):e}},81776:function(e,t,r){var n=function(){throw"This swarm.js function isn't available on the browser."},a={readFile:n},i={download:n,safeDownloadArchived:n,directoryTree:n},c={platform:n,arch:n},o={join:n,slice:n},f={spawn:n},d={lookup:n},s={},u=null,b=r(13123),h=r(33239),l=r(9193),p=r(77166),x=r(1717);e.exports=x({fs:a,files:i,os:c,path:o,child_process:f,defaultArchives:s,mimetype:d,request:b,downloadUrl:u,bytes:h,hash:l,pick:p})},77166:function(e,t,r){r(48675),r(3462);var n=function(e){return function(){return new Promise((function(t,r){var n,a=function(r){var n={},a=r.target.files.length,i=0;[].map.call(r.target.files,(function(r){var c=new FileReader;c.onload=function(c){var o=new Uint8Array(c.target.result);if("directory"===e){var f=r.webkitRelativePath;n[f.slice(f.indexOf("/")+1)]={type:"text/plain",data:o},++i===a&&t(n)}else if("file"===e){var d=r.webkitRelativePath;t({type:mimetype.lookup(d),data:o})}else t(o)},c.readAsArrayBuffer(r)}))};"directory"===e?(n=document.createElement("input"),n.addEventListener("change",a),n.type="file",n.webkitdirectory=!0,n.mozdirectory=!0,n.msdirectory=!0,n.odirectory=!0,n.directory=!0):(n=document.createElement("input"),n.addEventListener("change",a),n.type="file");var i=document.createEvent("MouseEvents");i.initEvent("click",!0,!1),n.dispatchEvent(i)}))}};e.exports={data:n("data"),file:n("file"),directory:n("directory")}},9193:function(e,t,r){var n=r(50849).keccak256,a=r(33239),i=function(e,t){var r=a.reverse(a.pad(6,a.fromNumber(e))),i=a.flatten([r,"0x0000",t]);return n(i).slice(2)},c=function e(t){"string"===typeof t&&"0x"!==t.slice(0,2)?t=a.fromString(t):"string"!==typeof t&&void 0!==t.length&&(t=a.fromUint8Array(t));var r=a.length(t);if(r<=4096)return i(r,t);var n=4096;while(128*n=400?n(new Error("Error ".concat(a.statusCode,"."))):r(new Uint8Array(t))}))}))}},v=function(e){return function(t){var r=function t(r){return function(n){return function(a){var i=function(e){return{type:e.contentType,hash:e.hash}},c=function(e){return void 0===e.path?Promise.resolve():"application/bzz-manifest+json"===e.contentType?t(e.hash)(n+e.path)(a):Promise.resolve(h(n+e.path)(i(e))(a))};return m(e)(r).then((function(e){return JSON.parse(D(e)).entries})).then((function(e){return Promise.all(e.map(c))})).then((function(){return a}))}}};return r(t)("")({})}},g=function(e){return function(t){return v(e)(t).then((function(e){return l(Object.keys(e))(Object.keys(e).map((function(t){return e[t].hash})))}))}},y=function(e){return function(t){return v(e)(t).then((function(t){var r=Object.keys(t),n=r.map((function(e){return t[e].hash})),a=r.map((function(e){return t[e].type})),i=n.map(m(e)),c=function(e){return e.map((function(e,t){return{type:a[t],data:e}}))};return Promise.all(i).then((function(e){return l(r)(c(e))}))}))}},w=function(e){return function(t){return function(n){return r.download(x(e)(t))(n)}}},_=function(e){return function(t){return function(r){return g(e)(t).then((function(t){var n=[];for(var i in t)if(i.length>0){var c=a.join(r,i);n.push(w(e)(t[i])(c))}return Promise.all(n).then((function(){return r}))}))}}},M=function(e){return function(t){return new Promise((function(r,n){var a={body:"string"===typeof t?F(t):t,method:"POST"};f("".concat(e,"/bzz-raw:/"),a,(function(e,t){return e?n(e):r(t)}))}))}},k=function(e){return function(t){return function(r){return function(n){var a=function a(i){var c="/"===r[0]?r:"/"+r,o="".concat(e,"/bzz:/").concat(t).concat(c),d={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return new Promise((function(e,t){f(o,d,(function(r,n){return r?t(r):-1!==n.indexOf("error")?t(n):e(n)}))}))["catch"]((function(e){return i>0&&a(i-1)}))};return a(3)}}}},A=function(e){return function(t){return S(e)({"":t})}},E=function(e){return function(r){return t.readFile(r).then((function(t){return A(e)({type:c.lookup(r),data:t})}))}},S=function(e){return function(t){return M(e)("{}").then((function(r){var n=function(r){return function(n){return k(e)(n)(r)(t[r])}},a=function(e,t){return e.then(n(t))};return Object.keys(t).reduce(a,Promise.resolve(r))}))}},T=function(e){return function(r){return t.readFile(r).then(M(e))}},C=function(e){return function(n){return function(a){return r.directoryTree(a).then((function(e){return Promise.all(e.map((function(e){return t.readFile(e)}))).then((function(t){var r=e.map((function(e){return e.slice(a.length)})),n=e.map((function(e){return c.lookup(e)||"text/plain"}));return l(r)(t.map((function(e,t){return{type:n[t],data:e}})))}))})).then((function(e){return p(n?{"":e[n]}:{})(e)})).then(S(e))}}},P=function(e){return function(t){if("data"===t.pick)return b.data().then(M(e));if("file"===t.pick)return b.file().then(A(e));if("directory"===t.pick)return b.directory().then(S(e));if(t.path)switch(t.kind){case"data":return T(e)(t.path);case"file":return E(e)(t.path);case"directory":return C(e)(t.defaultFile)(t.path)}else{if(t.length||"string"===typeof t)return M(e)(t);if(t instanceof Object)return S(e)(t)}return Promise.reject(new Error("Bad arguments"))}},O=function(e){return function(t){return function(r){return U(e)(t).then((function(n){return n?r?_(e)(t)(r):y(e)(t):r?w(e)(t)(r):m(e)(t)}))}}},R=function(e,t){var a=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),i=(t||o)[a],c=d+i.archive+".tar.gz",f=i.archiveMD5,s=i.binaryMD5;return r.safeDownloadArchived(c)(f)(s)(e)},I=function(e){return new Promise((function(t,r){var n=i.spawn,a=function(e){return function(t){return-1!==(""+t).indexOf(e)}},c=e.account,o=e.password,f=e.dataDir,d=e.ensApi,s=e.privateKey,u=0,b=1,h=2,l="Passphrase",p="Swarm http proxy started",x=u,m=n(e.binPath,["--bzzaccount",c||s,"--datadir",f,"--ens-api",d]),v=function(e){x===u&&a(l)(e)?setTimeout((function(){x=b,m.stdin.write(o+"\n")}),500):a(p)(e)&&(x=h,clearTimeout(y),t(m))};m.stdout.on("data",v),m.stderr.on("data",v);var g=function(){return r(new Error("Couldn't start swarm process."))},y=setTimeout(g,2e4)}))},B=function(e){return new Promise((function(t,r){e.stderr.removeAllListeners("data"),e.stdout.removeAllListeners("data"),e.stdin.removeAllListeners("error"),e.removeAllListeners("error"),e.removeAllListeners("exit"),e.kill("SIGINT");var n=setTimeout((function(){return e.kill("SIGKILL")}),8e3);e.once("close",(function(){clearTimeout(n),t()}))}))},L=function(e){return function(t){return N("http://localhost:8500").then((function(r){return r?t(H("http://localhost:8500")).then((function(){})):R(e.binPath,e.archives).onData((function(t){return(e.onProgress||function(){})(t.length)})).then((function(){return I(e)})).then((function(e){return t(H("http://localhost:8500")).then((function(){return e}))})).then(B)}))}},N=function(e){var t="test",r="c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7";return M(e)(t).then((function(e){return e===r}))["catch"]((function(){return!1}))},U=function(e){return function(t){return m(e)(t).then((function(e){try{return!!JSON.parse(D(e)).entries}catch(t){return!1}}))}},j=function(e){return function(t,r,n,a,i){var c;return"undefined"!==typeof t&&(c=e(t)),"undefined"!==typeof r&&(c=e(r)),"undefined"!==typeof n&&(c=e(n)),"undefined"!==typeof a&&(c=e(a)),"undefined"!==typeof i&&(c=e(i)),c}},D=function(e){return s.toString(s.fromUint8Array(e))},F=function(e){return s.toUint8Array(s.fromString(e))},H=function(e){return{download:function(t,r){return O(e)(t)(r)},downloadData:j(m(e)),downloadDataToDisk:j(w(e)),downloadDirectory:j(y(e)),downloadDirectoryToDisk:j(_(e)),downloadEntries:j(v(e)),downloadRoutes:j(g(e)),isAvailable:function(){return N(e)},upload:function(t){return P(e)(t)},uploadData:j(M(e)),uploadFile:j(A(e)),uploadFileFromDisk:j(A(e)),uploadDataFromDisk:j(T(e)),uploadDirectory:j(S(e)),uploadDirectoryFromDisk:j(C(e)),uploadToManifest:j(k(e)),pick:b,hash:u,fromString:F,toString:D}};return{at:H,local:L,download:O,downloadBinary:R,downloadData:m,downloadDataToDisk:w,downloadDirectory:y,downloadDirectoryToDisk:_,downloadEntries:v,downloadRoutes:g,isAvailable:N,startProcess:I,stopProcess:B,upload:P,uploadData:M,uploadDataFromDisk:T,uploadFile:A,uploadFileFromDisk:E,uploadDirectory:S,uploadDirectoryFromDisk:C,uploadToManifest:k,pick:b,hash:u,fromString:F,toString:D}}},83545:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n=0;o--)(a=e[o])&&(c=(i<3?a(c):i>3?a(t,r,c):a(t,r))||c);return i>3&&c&&Object.defineProperty(t,r,c),c}function f(e,t){return function(r,n){t(r,n,e)}}function d(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function s(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function c(e){try{f(n.next(e))}catch(t){i(t)}}function o(e){try{f(n["throw"](e))}catch(t){i(t)}}function f(e){e.done?r(e.value):a(e.value).then(c,o)}f((n=n.apply(e,t||[])).next())}))}function u(e,t){var r,n,a,i,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(e){return function(t){return f([e,t])}}function f(i){if(r)throw new TypeError("Generator is already executing.");while(c)try{if(r=1,n&&(a=2&i[0]?n["return"]:i[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,n=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(a=c.trys,!(a=a.length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),c=[];try{while((void 0===t||t-- >0)&&!(n=i.next()).done)c.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i["return"])&&r.call(i)}finally{if(a)throw a.error}}return c}function x(){for(var e=[],t=0;t1||o(e,t)}))})}function o(e,t){try{f(a[e](t))}catch(r){u(i[0][3],r)}}function f(e){e.value instanceof g?Promise.resolve(e.value.v).then(d,s):u(i[0][2],e)}function d(e){o("next",e)}function s(e){o("throw",e)}function u(e,t){e(t),i.shift(),i.length&&o(i[0][0],i[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,a){t[n]=e[n]?function(t){return(r=!r)?{value:g(e[n](t)),done:"return"===n}:a?a(t):t}:a}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"===typeof l?l(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){t=e[r](t),a(n,i,t.done,t.value)}))}}function a(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e["default"]=t};function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return k(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function S(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function T(e,t,r,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r}},75519:function(e,t,r){var n=r(15361)["Buffer"],a=r(6513).strict;e.exports=function(e){if(a(e)){var t=n.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return n.from(e)}},27285:function(e){function t(e,t){if(t){t=t.trim().replace(/^(\?|#|&)/,""),t=t?"?"+t:t;var r=e.split(/[\?\#]/),n=r[0];t&&/\:\/\/[^\/]*$/.test(n)&&(n+="/");var a=e.match(/(\#.*)$/);e=n+t,a&&(e+=a[0])}return e}e.exports=t},62059:function(e,t,r){r(21703),function(e){var t,r,n,a=String.fromCharCode;function i(e){var t,r,n=[],a=0,i=e.length;while(a=55296&&t<=56319&&a65535&&(t-=65536,i+=a(t>>>10&1023|55296),t=56320|1023&t),i+=a(t);return i}function o(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function f(e,t){return a(e>>t&63|128)}function d(e){if(0==(4294967168&e))return a(e);var t="";return 0==(4294965248&e)?t=a(e>>6&31|192):0==(4294901760&e)?(o(e),t=a(e>>12&15|224),t+=f(e,6)):0==(4292870144&e)&&(t=a(e>>18&7|240),t+=f(e,12),t+=f(e,6)),t+=a(63&e|128),t}function s(e){var t,r=i(e),n=r.length,a=-1,c="";while(++a=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function b(){var e,a,i,c,f;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,0==(128&e))return e;if(192==(224&e)){if(a=u(),f=(31&e)<<6|a,f>=128)return f;throw Error("Invalid continuation byte")}if(224==(240&e)){if(a=u(),i=u(),f=(15&e)<<12|a<<6|i,f>=2048)return o(f),f;throw Error("Invalid continuation byte")}if(240==(248&e)&&(a=u(),i=u(),c=u(),f=(7&e)<<18|a<<12|i<<6|c,f>=65536&&f<=1114111))return f;throw Error("Invalid UTF-8 detected")}function h(e){t=i(e),r=t.length,n=0;var a,o=[];while(!1!==(a=b()))o.push(a);return c(o)}e.version="3.0.0",e.encode=s,e.decode=h}(t)},74633:function(e,t,r){function n(e,t){if(a("noDeprecation"))return e;var r=!1;function n(){if(!r){if(a("throwDeprecation"))throw new Error(t);a("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function a(e){try{if(!r.g.localStorage)return!1}catch(n){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}r(21703),e.exports=n},42051:function(e){e.exports=function(e){return e&&"object"===typeof e&&"function"===typeof e.copy&&"function"===typeof e.fill&&"function"===typeof e.readUInt8}},10606:function(e,t,r){"use strict";r(48675),r(3462),r(21703);var n=r(32773),a=r(84784),i=r(12591),c=r(18300);function o(e){return e.call.bind(e)}var f="undefined"!==typeof BigInt,d="undefined"!==typeof Symbol,s=o(Object.prototype.toString),u=o(Number.prototype.valueOf),b=o(String.prototype.valueOf),h=o(Boolean.prototype.valueOf);if(f)var l=o(BigInt.prototype.valueOf);if(d)var p=o(Symbol.prototype.valueOf);function x(e,t){if("object"!==typeof e)return!1;try{return t(e),!0}catch(r){return!1}}function m(e){return"undefined"!==typeof Promise&&e instanceof Promise||null!==e&&"object"===typeof e&&"function"===typeof e.then&&"function"===typeof e.catch}function v(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):c(e)||H(e)}function g(e){return"Uint8Array"===i(e)}function y(e){return"Uint8ClampedArray"===i(e)}function w(e){return"Uint16Array"===i(e)}function _(e){return"Uint32Array"===i(e)}function M(e){return"Int8Array"===i(e)}function k(e){return"Int16Array"===i(e)}function A(e){return"Int32Array"===i(e)}function E(e){return"Float32Array"===i(e)}function S(e){return"Float64Array"===i(e)}function T(e){return"BigInt64Array"===i(e)}function C(e){return"BigUint64Array"===i(e)}function P(e){return"[object Map]"===s(e)}function O(e){return"undefined"!==typeof Map&&(P.working?P(e):e instanceof Map)}function R(e){return"[object Set]"===s(e)}function I(e){return"undefined"!==typeof Set&&(R.working?R(e):e instanceof Set)}function B(e){return"[object WeakMap]"===s(e)}function L(e){return"undefined"!==typeof WeakMap&&(B.working?B(e):e instanceof WeakMap)}function N(e){return"[object WeakSet]"===s(e)}function U(e){return N(e)}function j(e){return"[object ArrayBuffer]"===s(e)}function D(e){return"undefined"!==typeof ArrayBuffer&&(j.working?j(e):e instanceof ArrayBuffer)}function F(e){return"[object DataView]"===s(e)}function H(e){return"undefined"!==typeof DataView&&(F.working?F(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=a,t.isTypedArray=c,t.isPromise=m,t.isArrayBufferView=v,t.isUint8Array=g,t.isUint8ClampedArray=y,t.isUint16Array=w,t.isUint32Array=_,t.isInt8Array=M,t.isInt16Array=k,t.isInt32Array=A,t.isFloat32Array=E,t.isFloat64Array=S,t.isBigInt64Array=T,t.isBigUint64Array=C,P.working="undefined"!==typeof Map&&P(new Map),t.isMap=O,R.working="undefined"!==typeof Set&&R(new Set),t.isSet=I,B.working="undefined"!==typeof WeakMap&&B(new WeakMap),t.isWeakMap=L,N.working="undefined"!==typeof WeakSet&&N(new WeakSet),t.isWeakSet=U,j.working="undefined"!==typeof ArrayBuffer&&j(new ArrayBuffer),t.isArrayBuffer=D,F.working="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof DataView&&F(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=H;var q="undefined"!==typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function z(e){return"[object SharedArrayBuffer]"===s(e)}function K(e){return"undefined"!==typeof q&&("undefined"===typeof z.working&&(z.working=z(new q)),z.working?z(e):e instanceof q)}function $(e){return"[object AsyncFunction]"===s(e)}function G(e){return"[object Map Iterator]"===s(e)}function V(e){return"[object Set Iterator]"===s(e)}function W(e){return"[object Generator]"===s(e)}function Z(e){return"[object WebAssembly.Module]"===s(e)}function J(e){return x(e,u)}function Y(e){return x(e,b)}function X(e){return x(e,h)}function Q(e){return f&&x(e,l)}function ee(e){return d&&x(e,p)}function te(e){return J(e)||Y(e)||X(e)||Q(e)||ee(e)}function re(e){return"undefined"!==typeof Uint8Array&&(D(e)||K(e))}t.isSharedArrayBuffer=K,t.isAsyncFunction=$,t.isMapIterator=G,t.isSetIterator=V,t.isGeneratorObject=W,t.isWebAssemblyCompiledModule=Z,t.isNumberObject=J,t.isStringObject=Y,t.isBooleanObject=X,t.isBigIntObject=Q,t.isSymbolObject=ee,t.isBoxedPrimitive=te,t.isAnyArrayBuffer=re,["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},9242:function(e,t,r){var n=r(96027);r(21703);var a=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}})),o=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&t._extend(n,r),E(n.showHidden)&&(n.showHidden=!1),E(n.depth)&&(n.depth=2),E(n.colors)&&(n.colors=!1),E(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),h(n,e,n.depth)}function s(e,t){var r=d.styles[t];return r?"["+d.colors[r][0]+"m"+e+"["+d.colors[r][1]+"m":e}function u(e,t){return e}function b(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}function h(e,r,n){if(e.customInspect&&r&&O(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var a=r.inspect(n,e);return k(a)||(a=h(e,a,n)),a}var i=l(e,r);if(i)return i;var c=Object.keys(r),o=b(c);if(e.showHidden&&(c=Object.getOwnPropertyNames(r)),P(r)&&(c.indexOf("message")>=0||c.indexOf("description")>=0))return p(r);if(0===c.length){if(O(r)){var f=r.name?": "+r.name:"";return e.stylize("[Function"+f+"]","special")}if(S(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(C(r))return e.stylize(Date.prototype.toString.call(r),"date");if(P(r))return p(r)}var d,s="",u=!1,y=["{","}"];if(g(r)&&(u=!0,y=["[","]"]),O(r)){var w=r.name?": "+r.name:"";s=" [Function"+w+"]"}return S(r)&&(s=" "+RegExp.prototype.toString.call(r)),C(r)&&(s=" "+Date.prototype.toUTCString.call(r)),P(r)&&(s=" "+p(r)),0!==c.length||u&&0!=r.length?n<0?S(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),d=u?x(e,r,n,o,c):c.map((function(t){return m(e,r,n,o,t,u)})),e.seen.pop(),v(d,s,y)):y[0]+s+y[1]}function l(e,t){if(E(t))return e.stylize("undefined","undefined");if(k(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return M(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):w(t)?e.stylize("null","null"):void 0}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function x(e,t,r,n,a){for(var i=[],c=0,o=t.length;c-1&&(o=i?o.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+o.split("\n").map((function(e){return" "+e})).join("\n"))):o=e.stylize("[Circular]","special")),E(c)){if(i&&a.match(/^\d+$/))return o;c=JSON.stringify(""+a),c.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(c=c.substr(1,c.length-2),c=e.stylize(c,"name")):(c=c.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),c=e.stylize(c,"string"))}return c+": "+o}function v(e,t,r){var n=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return n>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function g(e){return Array.isArray(e)}function y(e){return"boolean"===typeof e}function w(e){return null===e}function _(e){return null==e}function M(e){return"number"===typeof e}function k(e){return"string"===typeof e}function A(e){return"symbol"===typeof e}function E(e){return void 0===e}function S(e){return T(e)&&"[object RegExp]"===I(e)}function T(e){return"object"===typeof e&&null!==e}function C(e){return T(e)&&"[object Date]"===I(e)}function P(e){return T(e)&&("[object Error]"===I(e)||e instanceof Error)}function O(e){return"function"===typeof e}function R(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e}function I(e){return Object.prototype.toString.call(e)}function B(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!c[e])if(o.test(e)){var r=n.pid;c[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else c[e]=function(){};return c[e]},t.inspect=d,d.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]},d.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(10606),t.isArray=g,t.isBoolean=y,t.isNull=w,t.isNullOrUndefined=_,t.isNumber=M,t.isString=k,t.isSymbol=A,t.isUndefined=E,t.isRegExp=S,t.types.isRegExp=S,t.isObject=T,t.isDate=C,t.types.isDate=C,t.isError=P,t.types.isNativeError=P,t.isFunction=O,t.isPrimitive=R,t.isBuffer=r(42051);var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var e=new Date,t=[B(e.getHours()),B(e.getMinutes()),B(e.getSeconds())].join(":");return[e.getDate(),L[e.getMonth()],t].join(" ")}function U(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",N(),t.format.apply(t,arguments))},t.inherits=r(81923),t._extend=function(e,t){if(!t||!T(t))return e;var r=Object.keys(t),n=r.length;while(n--)e[r[n]]=t[r[n]];return e};var j="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function D(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function F(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r{if(t.content)return!0;const{content:r,showZero:n}=e;return(0,o.Xq)(r)&&""!==r&&(n||0!==r)},n=()=>{const{dot:n,max:a,content:i}=e;if(!n&&r())return t.content?t.content():(0,o.Xq)(a)&&(0,o.kE)(i)&&+i>a?`${a}+`:i},i=(0,a.Fl)((()=>{const r={background:e.color};if(e.offset){const[n,a]=e.offset;t.default?(r.top=(0,f.Nn)(a),r.right="number"===typeof n?(0,f.Nn)(-n):n.startsWith("-")?n.replace("-",""):`-${n}`):(r.marginTop=(0,f.Nn)(a),r.marginLeft=(0,f.Nn)(n))}return r})),c=()=>{if(r()||e.dot)return(0,a.Wm)("div",{class:s([e.position,{dot:e.dot,fixed:!!t.default}]),style:i.value},[n()])};return()=>{if(t.default){const{tag:r}=e;return(0,a.Wm)(r,{class:s("wrapper")},{default:()=>[t.default(),c()]})}return c()}}});const h=(0,n.n)(b)},97286:function(e,t,r){"use strict";r.d(t,{Z:function(){return A}});var n=r(8395),a=r(73396),i=r(62981),c=r(24452),o=r(65737),f=r(54005),d=r(11047),s=r(31900),u=r(10176),b=r(43603);const[h,l]=(0,i["do"])("loading"),p=Array(12).fill(null).map(((e,t)=>(0,a.Wm)("i",{class:l("line",String(t+1))},null))),x=(0,a.Wm)("svg",{class:l("circular"),viewBox:"25 25 50 50"},[(0,a.Wm)("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),m={size:o.Or,type:(0,o.SQ)("circular"),color:String,vertical:Boolean,textSize:o.Or,textColor:String};var v=(0,a.aZ)({name:h,props:m,setup(e,{slots:t}){const r=(0,a.Fl)((()=>(0,c.l7)({color:e.color},(0,b.Xn)(e.size)))),n=()=>{var r;if(t.default)return(0,a.Wm)("span",{class:l("text"),style:{fontSize:(0,b.Nn)(e.textSize),color:null!=(r=e.textColor)?r:e.color}},[t.default()])};return()=>{const{type:t,vertical:i}=e;return(0,a.Wm)("div",{class:l([t,{vertical:i}])},[(0,a.Wm)("span",{class:l("spinner",t),style:r.value},["spinner"===t?p:x]),n()])}}});const g=(0,n.n)(v);const[y,w]=(0,i["do"])("button"),_=(0,c.l7)({},s.g2,{tag:(0,o.SQ)("button"),text:String,icon:String,type:(0,o.SQ)("default"),size:(0,o.SQ)("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:(0,o.SQ)("button"),loadingSize:o.Or,loadingText:String,loadingType:String,iconPosition:(0,o.SQ)("left")});var M=(0,a.aZ)({name:y,props:_,emits:["click"],setup(e,{emit:t,slots:r}){const n=(0,s.yj)(),i=()=>r.loading?r.loading():(0,a.Wm)(g,{size:e.loadingSize,type:e.loadingType,class:w("loading")},null),c=()=>e.loading?i():r.icon?(0,a.Wm)("div",{class:w("icon")},[r.icon()]):e.icon?(0,a.Wm)(u.J,{name:e.icon,class:w("icon"),classPrefix:e.iconPrefix},null):void 0,o=()=>{let t;if(t=e.loading?e.loadingText:r.default?r.default():e.text,t)return(0,a.Wm)("span",{class:w("text")},[t])},b=()=>{const{color:t,plain:r}=e;if(t){const e={color:r?t:"white"};return r||(e.background=t),t.includes("gradient")?e.border=0:e.borderColor=t,e}},h=r=>{e.loading?(0,f.PF)(r):e.disabled||(t("click",r),n())};return()=>{const{tag:t,type:r,size:n,block:i,round:f,plain:s,square:u,loading:l,disabled:p,hairline:x,nativeType:m,iconPosition:v}=e,g=[w([r,n,{plain:s,block:i,round:f,square:u,loading:l,disabled:p,hairline:x}]),{[d._K]:x}];return(0,a.Wm)(t,{type:m,class:g,style:b(),disabled:p,onClick:h},{default:()=>[(0,a.Wm)("div",{class:w("content")},["left"===v&&c(),o(),"right"===v&&c()])]})}}});const k=(0,n.n)(M);var A=k},61873:function(e,t,r){"use strict";r(31958),r(20368),r(56742)},28355:function(e,t,r){"use strict";r.d(t,{Z:function(){return l},x:function(){return b}});var n=r(73396),a=r(62981),i=r(65737),c=r(24452),o=r(36300),f=r(31900),d=r(10176);const[s,u]=(0,a["do"])("cell"),b={icon:String,size:String,title:i.Or,value:i.Or,label:i.Or,center:Boolean,isLink:Boolean,border:i.J5,required:Boolean,iconPrefix:String,valueClass:i.Vg,labelClass:i.Vg,titleClass:i.Vg,titleStyle:null,arrowDirection:String,clickable:{type:Boolean,default:null}},h=(0,c.l7)({},b,f.g2);var l=(0,n.aZ)({name:s,props:h,setup(e,{slots:t}){const r=(0,f.yj)(),a=()=>{const r=t.label||(0,o.Xq)(e.label);if(r)return(0,n.Wm)("div",{class:[u("label"),e.labelClass]},[t.label?t.label():e.label])},i=()=>{if(t.title||(0,o.Xq)(e.title))return(0,n.Wm)("div",{class:[u("title"),e.titleClass],style:e.titleStyle},[t.title?t.title():(0,n.Wm)("span",null,[e.title]),a()])},c=()=>{const r=t.value||t.default,a=r||(0,o.Xq)(e.value);if(a){const a=t.title||(0,o.Xq)(e.title);return(0,n.Wm)("div",{class:[u("value",{alone:!a}),e.valueClass]},[r?r():(0,n.Wm)("span",null,[e.value])])}},s=()=>t.icon?t.icon():e.icon?(0,n.Wm)(d.J,{name:e.icon,class:u("left-icon"),classPrefix:e.iconPrefix},null):void 0,b=()=>{if(t["right-icon"])return t["right-icon"]();if(e.isLink){const t=e.arrowDirection?`arrow-${e.arrowDirection}`:"arrow";return(0,n.Wm)(d.J,{name:t,class:u("right-icon")},null)}};return()=>{var a,o;const{size:f,center:d,border:h,isLink:l,required:p}=e,x=null!=(a=e.clickable)?a:l,m={center:d,required:p,clickable:x,borderless:!h};return f&&(m[f]=!!f),(0,n.Wm)("div",{class:u(m),role:x?"button":void 0,tabindex:x?0:void 0,onClick:r},[s(),i(),c(),b(),null==(o=t.extra)?void 0:o.call(t)])}}})},26631:function(e,t,r){"use strict";r.d(t,{b:function(){return i}});var n=r(8395),a=r(28355);const i=(0,n.n)(a.Z)},71503:function(e,t,r){"use strict";r.d(t,{Z:function(){return _}});var n=r(8395),a=r(73396),i=r(49242),c=r(44870),o=r(28355),f=r(62981),d=r(24452),s=r(65737),u=r(3682),b=r(75634),h=r(10998),l=r(45978),p=r(26631);const[x,m]=(0,f["do"])("collapse-item"),v=["icon","title","value","label","right-icon"],g=(0,d.l7)({},o.x,{name:s.Or,isLink:s.J5,disabled:Boolean,readonly:Boolean,lazyRender:s.J5});var y=(0,a.aZ)({name:x,props:g,setup(e,{slots:t}){const r=(0,c.iH)(),n=(0,c.iH)(),{parent:f,index:s}=(0,b.NB)(u.g);if(!f)return void 0;const x=(0,a.Fl)((()=>{var t;return null!=(t=e.name)?t:s.value})),g=(0,a.Fl)((()=>f.isExpanded(x.value))),y=(0,c.iH)(g.value),w=(0,l.W)((()=>y.value||!e.lazyRender)),_=()=>{g.value?r.value&&(r.value.style.height=""):y.value=!1};(0,a.YP)(g,((e,t)=>{if(null===t)return;e&&(y.value=!0);const i=e?a.Y3:b.Wn;i((()=>{if(!n.value||!r.value)return;const{offsetHeight:t}=n.value;if(t){const n=`${t}px`;r.value.style.height=e?"0":n,(0,b.d1)((()=>{r.value&&(r.value.style.height=e?n:"0")}))}else _()}))}));const M=(e=!g.value)=>{f.toggle(x.value,e)},k=()=>{e.disabled||e.readonly||M()},A=()=>{const{border:r,disabled:n,readonly:i}=e,c=(0,d.ei)(e,Object.keys(o.x));return i&&(c.isLink=!1),(n||i)&&(c.clickable=!1),(0,a.Wm)(p.b,(0,a.dG)({role:"button",class:m("title",{disabled:n,expanded:g.value,borderless:!r}),"aria-expanded":String(g.value),onClick:k},c),(0,d.ei)(t,v))},E=w((()=>{var e;return(0,a.wy)((0,a.Wm)("div",{ref:r,class:m("wrapper"),onTransitionend:_},[(0,a.Wm)("div",{ref:n,class:m("content")},[null==(e=t.default)?void 0:e.call(t)])]),[[i.F8,y.value]])}));return(0,h.F)({toggle:M}),()=>(0,a.Wm)("div",{class:[m({border:s.value&&e.border})]},[A(),E()])}});const w=(0,n.n)(y);var _=w},57133:function(e,t,r){"use strict";r(31958),r(20368),r(56742),r(3094)},3682:function(e,t,r){"use strict";r.d(t,{Z:function(){return b},g:function(){return s}});var n=r(73396),a=r(62981),i=r(65737),c=r(11047),o=r(75634);const[f,d]=(0,a["do"])("collapse"),s=Symbol(f),u={border:i.J5,accordion:Boolean,modelValue:{type:[String,Number,Array],default:""}};var b=(0,n.aZ)({name:f,props:u,emits:["change","update:modelValue"],setup(e,{emit:t,slots:r}){const{linkChildren:a}=(0,o.$E)(s),i=e=>{t("change",e),t("update:modelValue",e)},f=(t,r)=>{const{accordion:n,modelValue:a}=e;i(n?t===a?"":t:r?a.concat(t):a.filter((e=>e!==t)))},u=t=>{const{accordion:r,modelValue:n}=e;return r?n===t:n.includes(t)};return a({toggle:f,isExpanded:u}),()=>{var t;return(0,n.Wm)("div",{class:[d(),{[c.r5]:e.border}]},[null==(t=r.default)?void 0:t.call(r)])}}})},44202:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(8395),a=r(3682);const i=(0,n.n)(a.Z);var c=i},72121:function(e,t,r){"use strict";r(31958)},57064:function(e,t,r){"use strict";r.d(t,{S:function(){return a},h:function(){return i}});var n=r(73396);const a=Symbol();function i(e){const t=(0,n.f3)(a,null);t&&(0,n.YP)(t,(t=>{t&&e()}))}},10998:function(e,t,r){"use strict";r.d(t,{F:function(){return i}});var n=r(73396),a=r(24452);function i(e){const t=(0,n.FN)();t&&(0,a.l7)(t.proxy,e)}},54049:function(e,t,r){"use strict";r.d(t,{M:function(){return i}});var n=r(73396);let a=0;function i(){const e=(0,n.FN)(),{name:t="unknown"}=(null==e?void 0:e.type)||{};return`${t}-${++a}`}},45978:function(e,t,r){"use strict";r.d(t,{W:function(){return i}});var n=r(44870),a=r(73396);function i(e){const t=(0,n.iH)(!1);return(0,a.YP)(e,(e=>{e&&(t.value=e)}),{immediate:!0}),e=>()=>t.value?e():null}},31900:function(e,t,r){"use strict";r.d(t,{BC:function(){return i},g2:function(){return a},yj:function(){return c}});var n=r(73396);const a={to:[String,Object],url:String,replace:Boolean};function i({to:e,url:t,replace:r,$router:n}){e&&n?n[r?"replace":"push"](e):t&&(r?location.replace(t):location.href=t)}function c(){const e=(0,n.FN)().proxy;return()=>i(e)}},65307:function(e,t,r){"use strict";r.d(t,{o:function(){return i}});var n=r(44870);function a(e,t){return e>t?"horizontal":t>e?"vertical":""}function i(){const e=(0,n.iH)(0),t=(0,n.iH)(0),r=(0,n.iH)(0),i=(0,n.iH)(0),c=(0,n.iH)(0),o=(0,n.iH)(0),f=(0,n.iH)(""),d=()=>"vertical"===f.value,s=()=>"horizontal"===f.value,u=()=>{r.value=0,i.value=0,c.value=0,o.value=0,f.value=""},b=r=>{u(),e.value=r.touches[0].clientX,t.value=r.touches[0].clientY},h=n=>{const d=n.touches[0];r.value=d.clientX<0?0:d.clientX-e.value,i.value=d.clientY-t.value,c.value=Math.abs(r.value),o.value=Math.abs(i.value);const s=10;(!f.value||c.value{r.move(t);const n=r.deltaY.value>0?"10":"01",a=(0,u.rP)(t.target,e.value),{scrollHeight:i,offsetHeight:c,scrollTop:o}=a;let f="11";0===o?f=c>=i?"00":"01":o+c>=i&&(f="10"),"11"===f||!r.isVertical()||parseInt(f,2)&parseInt(n,2)||(0,w.PF)(t,!0)},i=()=>{document.addEventListener("touchstart",r.start),document.addEventListener("touchmove",n,{passive:!1}),_||document.body.classList.add(M),_++},c=()=>{_&&(document.removeEventListener("touchstart",r.start),document.removeEventListener("touchmove",n),_--,_||document.body.classList.remove(M))},o=()=>t()&&i(),f=()=>t()&&c();(0,u.Ib)(o),(0,a.se)(f),(0,a.Jd)(f),(0,a.YP)(t,(e=>{e?i():c()}))}var A=r(45978),E=r(57064),S=r(3412);const T=(0,x.l7)({},p,{round:Boolean,position:(0,f.SQ)("center"),closeIcon:(0,f.SQ)("cross"),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:(0,f.SQ)("top-right"),safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[C,P]=(0,o["do"])("popup");let O=2e3;var R=(0,a.aZ)({name:C,inheritAttrs:!1,props:T,emits:["open","close","opened","closed","keydown","update:show","click-overlay","click-close-icon"],setup(e,{emit:t,attrs:r,slots:n}){let o,f;const d=(0,c.iH)(),s=(0,c.iH)(),h=(0,A.W)((()=>e.show||!e.lazyRender)),p=(0,a.Fl)((()=>{const t={zIndex:d.value};if((0,m.Xq)(e.duration)){const r="center"===e.position?"animationDuration":"transitionDuration";t[r]=`${e.duration}s`}return t})),x=()=>{o||(void 0!==e.zIndex&&(O=+e.zIndex),o=!0,d.value=++O,t("open"))},y=()=>{o&&(0,v.I)(e.beforeClose,{done(){o=!1,t("close"),t("update:show",!1)}})},w=r=>{t("click-overlay",r),e.closeOnClickOverlay&&y()},_=()=>{if(e.overlay)return(0,a.Wm)(S.a,{show:e.show,class:e.overlayClass,zIndex:d.value,duration:e.duration,customStyle:e.overlayStyle,onClick:w},{default:n["overlay-content"]})},M=e=>{t("click-close-icon",e),y()},T=()=>{if(e.closeable)return(0,a.Wm)(l.J,{role:"button",tabindex:0,name:e.closeIcon,class:[P("close-icon",e.closeIconPosition),g.e9],classPrefix:e.iconPrefix,onClick:M},null)},C=()=>t("opened"),R=()=>t("closed"),I=e=>t("keydown",e),B=h((()=>{var t;const{round:c,position:o,safeAreaInsetTop:f,safeAreaInsetBottom:d}=e;return(0,a.wy)((0,a.Wm)("div",(0,a.dG)({ref:s,style:p.value,class:[P({round:c,[o]:o}),{"van-safe-area-top":f,"van-safe-area-bottom":d}],onKeydown:I},r),[null==(t=n.default)?void 0:t.call(n),T()]),[[i.F8,e.show]])})),L=()=>{const{position:t,transition:r,transitionAppear:n}=e,c="center"===t?"van-fade":`van-popup-slide-${t}`;return(0,a.Wm)(i.uT,{name:r||c,appear:n,onAfterEnter:C,onAfterLeave:R},{default:B})};return(0,a.YP)((()=>e.show),(e=>{e&&!o&&(x(),0===r.tabindex&&(0,a.Y3)((()=>{var e;null==(e=s.value)||e.focus()}))),!e&&o&&(o=!1,t("close"))})),(0,b.F)({popupRef:s}),k(s,(()=>e.show&&e.lockScroll)),(0,u.OR)("popstate",(()=>{e.closeOnPopstate&&(y(),f=!1)})),(0,a.bv)((()=>{e.show&&x()})),(0,a.dl)((()=>{f&&(t("update:show",!0),f=!1)})),(0,a.se)((()=>{e.show&&(y(),f=!0)})),(0,a.JJ)(E.S,(()=>e.show)),()=>e.teleport?(0,a.Wm)(a.lR,{to:e.teleport},{default:()=>[_(),L()]}):(0,a.Wm)(a.HY,null,[_(),L()])}});const I=(0,n.n)(R);const[B,L]=(0,o["do"])("dropdown-item"),N={title:String,options:(0,f.Ce)(),disabled:Boolean,teleport:[String,Object],lazyRender:f.J5,modelValue:f.Vg,titleClass:f.Vg};var U=(0,a.aZ)({name:B,props:N,emits:["open","opened","close","closed","change","update:modelValue"],setup(e,{emit:t,slots:r}){const n=(0,c.qj)({showPopup:!1,transition:!0,showWrapper:!1}),{parent:o,index:f}=(0,u.NB)(s.L);if(!o)return void 0;const p=e=>()=>t(e),x=p("open"),m=p("close"),v=p("opened"),g=()=>{n.showWrapper=!1,t("closed")},y=t=>{e.teleport&&t.stopPropagation()},w=(e=!n.showPopup,t={})=>{e!==n.showPopup&&(n.showPopup=e,n.transition=!t.immediate,e&&(n.showWrapper=!0))},_=()=>{if(r.title)return r.title();if(e.title)return e.title;const t=e.options.find((t=>t.value===e.modelValue));return t?t.text:""},M=r=>{const{activeColor:i}=o.props,c=r.value===e.modelValue,f=()=>{n.showPopup=!1,r.value!==e.modelValue&&(t("update:modelValue",r.value),t("change",r.value))},d=()=>{if(c)return(0,a.Wm)(l.J,{class:L("icon"),color:i,name:"success"},null)};return(0,a.Wm)(h.b,{role:"menuitem",key:r.value,icon:r.icon,title:r.text,class:L("option",{active:c}),style:{color:c?i:""},tabindex:c?0:-1,clickable:!0,onClick:f},{value:d})},k=()=>{const{offset:t}=o,{zIndex:c,overlay:s,duration:u,direction:b,closeOnClickOverlay:h}=o.props,l=(0,d.As)(c);return"down"===b?l.top=`${t.value}px`:l.bottom=`${t.value}px`,(0,a.wy)((0,a.Wm)("div",{style:l,class:L([b]),onClick:y},[(0,a.Wm)(I,{show:n.showPopup,"onUpdate:show":e=>n.showPopup=e,role:"menu",class:L("content"),overlay:s,position:"down"===b?"top":"bottom",duration:n.transition?u:0,lazyRender:e.lazyRender,overlayStyle:{position:"absolute"},"aria-labelledby":`${o.id}-${f.value}`,closeOnClickOverlay:h,onOpen:x,onClose:m,onOpened:v,onClosed:g},{default:()=>{var t;return[e.options.map(M),null==(t=r.default)?void 0:t.call(r)]}})]),[[i.F8,n.showWrapper]])};return(0,b.F)({state:n,toggle:w,renderTitle:_}),()=>e.teleport?(0,a.Wm)(a.lR,{to:e.teleport},{default:()=>[k()]}):k()}});const j=(0,n.n)(U);var D=j},12623:function(e,t,r){"use strict";r(31958),r(20368),r(56742),r(3094),r(76196),r(53532)},79199:function(e,t,r){"use strict";r.d(t,{L:function(){return p},Z:function(){return x}});var n=r(73396),a=r(44870),i=r(62981),c=r(65737),o=r(36300),f=r(54005),d=r(11047),s=r(54049),u=r(75634);const[b,h]=(0,i["do"])("dropdown-menu"),l={overlay:c.J5,zIndex:c.Or,duration:(0,c.SI)(.2),direction:(0,c.SQ)("down"),activeColor:String,closeOnClickOutside:c.J5,closeOnClickOverlay:c.J5},p=Symbol(b);var x=(0,n.aZ)({name:b,props:l,setup(e,{slots:t}){const r=(0,s.M)(),i=(0,a.iH)(),c=(0,a.iH)(),b=(0,a.iH)(0),{children:l,linkChildren:x}=(0,u.$E)(p),m=(0,u.eo)(i),v=(0,n.Fl)((()=>l.some((e=>e.state.showWrapper)))),g=(0,n.Fl)((()=>{if(v.value&&(0,o.Xq)(e.zIndex))return{zIndex:+e.zIndex+1}})),y=()=>{e.closeOnClickOutside&&l.forEach((e=>{e.toggle(!1)}))},w=()=>{if(c.value){const t=(0,u.EL)(c);"down"===e.direction?b.value=t.bottom:b.value=f.uK.value-t.top}},_=()=>{v.value&&w()},M=e=>{l.forEach(((t,r)=>{r===e?(w(),t.toggle()):t.state.showPopup&&t.toggle(!1,{immediate:!0})}))},k=(t,a)=>{const{showPopup:i}=t.state,{disabled:c,titleClass:o}=t;return(0,n.Wm)("div",{id:`${r}-${a}`,role:"button",tabindex:c?void 0:0,class:[h("item",{disabled:c}),{[d.e9]:!c}],onClick:()=>{c||M(a)}},[(0,n.Wm)("span",{class:[h("title",{down:i===("down"===e.direction),active:i}),o],style:{color:i?e.activeColor:""}},[(0,n.Wm)("div",{class:"van-ellipsis"},[t.renderTitle()])])])};return x({id:r,props:e,offset:b}),(0,u.Vd)(i,y),(0,u.OR)("scroll",_,{target:m}),()=>{var e;return(0,n.Wm)("div",{ref:i,class:h()},[(0,n.Wm)("div",{ref:c,style:g.value,class:h("bar",{opened:v.value})},[l.map(k)]),null==(e=t.default)?void 0:e.call(t)])}}})},96606:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(8395),a=r(79199);const i=(0,n.n)(a.Z);var c=i},74376:function(e,t,r){"use strict";r(31958),r(53532)},10176:function(e,t,r){"use strict";r.d(t,{J:function(){return g}});var n=r(8395),a=r(73396),i=r(62981),c=r(65737),o=r(43603),f=r(29061);const[d,s]=(0,i["do"])("config-provider"),u=Symbol(d),b={tag:(0,c.SQ)("div"),themeVars:Object,iconPrefix:String};function h(e){const t={};return Object.keys(e).forEach((r=>{t[`--van-${(0,o.GL)(r)}`]=e[r]})),t}(0,a.aZ)({name:d,props:b,setup(e,{slots:t}){const r=(0,a.Fl)((()=>{if(e.themeVars)return h(e.themeVars)}));return(0,a.JJ)(u,e),()=>(0,a.Wm)(e.tag,{class:s(),style:r.value},{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t)]}})}});const[l,p]=(0,i["do"])("icon"),x=e=>null==e?void 0:e.includes("/"),m={dot:Boolean,tag:(0,c.SQ)("i"),name:String,size:c.Or,badge:c.Or,color:String,badgeProps:Object,classPrefix:String};var v=(0,a.aZ)({name:l,props:m,setup(e,{slots:t}){const r=(0,a.f3)(u,null),n=(0,a.Fl)((()=>e.classPrefix||(null==r?void 0:r.iconPrefix)||p()));return()=>{const{tag:r,dot:i,name:c,size:d,badge:s,color:u}=e,b=x(c);return(0,a.Wm)(f.C,(0,a.dG)({dot:i,tag:r,class:[n.value,b?"":`${n.value}-${c}`],style:{color:u,fontSize:(0,o.Nn)(d)},content:s},e.badgeProps),{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t),b&&(0,a.Wm)("img",{class:p("image"),src:c},null)]}})}}});const g=(0,n.n)(v)},3412:function(e,t,r){"use strict";r.d(t,{a:function(){return m},Z:function(){return v}});var n=r(8395),a=r(73396),i=r(49242),c=r(62981),o=r(65737),f=r(54005),d=r(24452),s=r(43603),u=r(36300),b=r(45978);const[h,l]=(0,c["do"])("overlay"),p={show:Boolean,zIndex:o.Or,duration:o.Or,className:o.Vg,lockScroll:o.J5,lazyRender:o.J5,customStyle:Object};var x=(0,a.aZ)({name:h,props:p,setup(e,{slots:t}){const r=(0,b.W)((()=>e.show||!e.lazyRender)),n=e=>{(0,f.PF)(e,!0)},c=r((()=>{var r;const c=(0,d.l7)((0,s.As)(e.zIndex),e.customStyle);return(0,u.Xq)(e.duration)&&(c.animationDuration=`${e.duration}s`),(0,a.wy)((0,a.Wm)("div",{style:c,class:[l(),e.className],onTouchmove:e.lockScroll?n:d.ZT},[null==(r=t.default)?void 0:r.call(t)]),[[i.F8,e.show]])}));return()=>(0,a.Wm)(i.uT,{name:"van-fade",appear:!0},{default:c})}});const m=(0,n.n)(x);var v=m},53772:function(e,t,r){"use strict";r(31958),r(76196)},18700:function(e,t,r){"use strict";r.d(t,{P:function(){return x},Z:function(){return m}});var n=r(73396),a=r(44870),i=r(62981),c=r(65737),o=r(43603),f=r(54005),d=r(75634),s=r(65307),u=r(10998),b=r(57064);const[h,l]=(0,i["do"])("swipe"),p={loop:c.J5,width:c.Or,height:c.Or,vertical:Boolean,autoplay:(0,c.SI)(0),duration:(0,c.SI)(500),touchable:c.J5,lazyRender:Boolean,initialSwipe:(0,c.SI)(0),indicatorColor:String,showIndicators:c.J5,stopPropagation:c.J5},x=Symbol(h);var m=(0,n.aZ)({name:h,props:p,emits:["change"],setup(e,{emit:t,slots:r}){const i=(0,a.iH)(),c=(0,a.qj)({rect:null,width:0,height:0,offset:0,active:0,swiping:!1}),h=(0,s.o)(),{children:p,linkChildren:m}=(0,d.$E)(x),v=(0,n.Fl)((()=>p.length)),g=(0,n.Fl)((()=>c[e.vertical?"height":"width"])),y=(0,n.Fl)((()=>e.vertical?h.deltaY.value:h.deltaX.value)),w=(0,n.Fl)((()=>{if(c.rect){const t=e.vertical?c.rect.height:c.rect.width;return t-g.value*v.value}return 0})),_=(0,n.Fl)((()=>Math.ceil(Math.abs(w.value)/g.value))),M=(0,n.Fl)((()=>v.value*g.value)),k=(0,n.Fl)((()=>(c.active+v.value)%v.value)),A=(0,n.Fl)((()=>{const t=e.vertical?"vertical":"horizontal";return h.direction.value===t})),E=(0,n.Fl)((()=>{const t={transitionDuration:`${c.swiping?0:e.duration}ms`,transform:`translate${e.vertical?"Y":"X"}(${c.offset}px)`};if(g.value){const r=e.vertical?"height":"width",n=e.vertical?"width":"height";t[r]=`${M.value}px`,t[n]=e[n]?`${e[n]}px`:""}return t})),S=t=>{const{active:r}=c;return t?e.loop?(0,o.uZ)(r+t,-1,v.value):(0,o.uZ)(r+t,0,_.value):r},T=(t,r=0)=>{let n=t*g.value;e.loop||(n=Math.min(n,-w.value));let a=r-n;return e.loop||(a=(0,o.uZ)(a,w.value,0)),a},C=({pace:r=0,offset:n=0,emitChange:a})=>{if(v.value<=1)return;const{active:i}=c,o=S(r),f=T(o,n);if(e.loop){if(p[0]&&f!==w.value){const e=f0;p[v.value-1].setOffset(e?-M.value:0)}}c.active=o,c.offset=f,a&&o!==i&&t("change",k.value)},P=()=>{c.swiping=!0,c.active<=-1?C({pace:v.value}):c.active>=v.value&&C({pace:-v.value})},O=()=>{P(),h.reset(),(0,d.d1)((()=>{c.swiping=!1,C({pace:-1,emitChange:!0})}))},R=()=>{P(),h.reset(),(0,d.d1)((()=>{c.swiping=!1,C({pace:1,emitChange:!0})}))};let I;const B=()=>clearTimeout(I),L=()=>{B(),e.autoplay>0&&v.value>1&&(I=setTimeout((()=>{R(),L()}),+e.autoplay))},N=(t=+e.initialSwipe)=>{if(!i.value)return;const r=()=>{var r,n;if(!(0,f.xj)(i)){const t={width:i.value.offsetWidth,height:i.value.offsetHeight};c.rect=t,c.width=+(null!=(r=e.width)?r:t.width),c.height=+(null!=(n=e.height)?n:t.height)}v.value&&(t=Math.min(v.value-1,t)),c.active=t,c.swiping=!0,c.offset=T(t),p.forEach((e=>{e.setOffset(0)})),L()};(0,f.xj)(i)?(0,n.Y3)().then(r):r()},U=()=>N(c.active);let j;const D=t=>{e.touchable&&(h.start(t),j=Date.now(),B(),P())},F=t=>{e.touchable&&c.swiping&&(h.move(t),A.value&&((0,f.PF)(t,e.stopPropagation),C({offset:y.value})))},H=()=>{if(!e.touchable||!c.swiping)return;const t=Date.now()-j,r=y.value/t,n=Math.abs(r)>.25||Math.abs(y.value)>g.value/2;if(n&&A.value){const t=e.vertical?h.offsetY.value:h.offsetX.value;let r=0;r=e.loop?t>0?y.value>0?-1:1:0:-Math[y.value>0?"ceil":"floor"](y.value/g.value),C({pace:r,emitChange:!0})}else y.value&&C({pace:0});c.swiping=!1,L()},q=(t,r={})=>{P(),h.reset(),(0,d.d1)((()=>{let n;n=e.loop&&t===v.value?0===c.active?0:t:t%v.value,r.immediate?(0,d.d1)((()=>{c.swiping=!1})):c.swiping=!1,C({pace:n-c.active,emitChange:!0})}))},z=(t,r)=>{const a=r===k.value,i=a?{backgroundColor:e.indicatorColor}:void 0;return(0,n.Wm)("i",{style:i,class:l("indicator",{active:a})},null)},K=()=>r.indicator?r.indicator({active:k.value,total:v.value}):e.showIndicators&&v.value>1?(0,n.Wm)("div",{class:l("indicators",{vertical:e.vertical})},[Array(v.value).fill("").map(z)]):void 0;return(0,u.F)({prev:O,next:R,state:c,resize:U,swipeTo:q}),m({size:g,props:e,count:v,activeIndicator:k}),(0,n.YP)((()=>e.initialSwipe),(e=>N(+e))),(0,n.YP)(v,(()=>N(c.active))),(0,n.YP)((()=>e.autoplay),L),(0,n.YP)([f.bn,f.uK],U),(0,n.YP)((0,d.d9)(),(e=>{"visible"===e?L():B()})),(0,n.bv)(N),(0,n.dl)((()=>N(c.active))),(0,b.h)((()=>N(c.active))),(0,n.se)(B),(0,n.Jd)(B),()=>{var t;return(0,n.Wm)("div",{ref:i,class:l()},[(0,n.Wm)("div",{style:E.value,class:l("track",{vertical:e.vertical}),onTouchstart:D,onTouchmove:F,onTouchend:H,onTouchcancel:H},[null==(t=r.default)?void 0:t.call(r)]),K()])}}})},3233:function(e,t,r){"use strict";r.d(t,{Z:function(){return E}});var n=r(8395),a=r(73396),i=r(49242),c=r(44870),o=r(62981),f=r(24452),d=r(65737),s=r(42238),u=r(75634),b=r(54049),h=r(10998),l=r(31900);const p=Symbol();var x=r(18700);const[m,v]=(0,o["do"])("swipe-item");var g=(0,a.aZ)({name:m,setup(e,{slots:t}){let r;const n=(0,c.qj)({offset:0,inited:!1,mounted:!1}),{parent:i,index:o}=(0,u.NB)(x.P);if(!i)return void 0;const f=(0,a.Fl)((()=>{const e={},{vertical:t}=i.props;return i.size.value&&(e[t?"height":"width"]=`${i.size.value}px`),n.offset&&(e.transform=`translate${t?"Y":"X"}(${n.offset}px)`),e})),d=(0,a.Fl)((()=>{const{loop:e,lazyRender:t}=i.props;if(!t||r)return!0;if(!n.mounted)return!1;const a=i.activeIndicator.value,c=i.count.value-1,f=0===a&&e?c:a-1,d=a===c&&e?0:a+1;return r=o.value===a||o.value===f||o.value===d,r})),s=e=>{n.offset=e};return(0,a.bv)((()=>{(0,a.Y3)((()=>{n.mounted=!0}))})),(0,h.F)({setOffset:s}),()=>{var e;return(0,a.Wm)("div",{class:v(),style:f.value},[d.value?null==(e=t.default)?void 0:e.call(t):null])}}});const y=(0,n.n)(g);const[w,_]=(0,o["do"])("tab"),M=(0,f.l7)({},l.g2,{dot:Boolean,name:d.Or,badge:d.Or,title:String,disabled:Boolean,titleClass:d.Vg,titleStyle:[String,Object],showZeroBadge:d.J5});var k=(0,a.aZ)({name:w,props:M,setup(e,{slots:t}){const r=(0,b.M)(),n=(0,c.iH)(!1),{parent:o,index:f}=(0,u.NB)(s.R);if(!o)return void 0;const d=()=>{var t;return null!=(t=e.name)?t:f.value},l=()=>{n.value=!0,o.props.lazyRender&&(0,a.Y3)((()=>{o.onRendered(d(),e.title)}))},x=(0,a.Fl)((()=>{const e=d()===o.currentName.value;return e&&!n.value&&l(),e}));return(0,a.YP)((()=>e.title),(()=>{o.setLine(),o.scrollIntoView()})),(0,a.JJ)(p,x),()=>{var e;const c=`${o.id}-${f.value}`,{animated:d,swipeable:s,scrollspy:u,lazyRender:b}=o.props;if(!t.default&&!d)return;const l=u||x.value;if(d||s)return(0,a.Wm)(y,{id:r,role:"tabpanel",class:_("panel-wrapper",{inactive:!x.value}),tabindex:x.value?0:-1,"aria-hidden":!x.value,"aria-labelledby":c},{default:()=>{var e;return[(0,a.Wm)("div",{class:_("panel")},[null==(e=t.default)?void 0:e.call(t)])]}});const p=n.value||u||!b,m=p?null==(e=t.default)?void 0:e.call(t):null;return(0,h.F)({id:r}),(0,a.wy)((0,a.Wm)("div",{id:r,role:"tabpanel",class:_("panel"),tabindex:l?0:-1,"aria-labelledby":c},[m]),[[i.F8,l]])}}});const A=(0,n.n)(k);var E=A},13599:function(e,t,r){"use strict";r(31958),r(20368),r(51771),r(89137),r(25338)},42238:function(e,t,r){"use strict";r.d(t,{R:function(){return F},Z:function(){return H}});var n=r(73396),a=r(44870),i=r(62981),c=r(65737),o=r(43603),f=r(54005),d=r(36300),s=r(12556),u=r(24452),b=r(11047),h=r(75634);function l(e,t,r){let n=0;const a=e.scrollLeft,i=0===r?1:Math.round(1e3*r/16);function c(){e.scrollLeft+=(t-a)/i,++nt||!i&&at?(0,h.Wn)(d):n&&(0,h.Wn)(n)}d()}var x=r(54049),m=r(31900);function v(){const e=(0,a.iH)([]),t=[];(0,n.Xn)((()=>{e.value=[]}));const r=r=>(t[r]||(t[r]=t=>{e.value[r]=t}),t[r]);return[e,r]}var g=r(10998),y=r(57064),w=r(8395);function _(e,t){if(!u._f||!window.IntersectionObserver)return;const r=new IntersectionObserver((e=>{t(e[0].intersectionRatio>0)}),{root:document.body}),a=()=>{e.value&&r.observe(e.value)},i=()=>{e.value&&r.unobserve(e.value)};(0,n.se)(i),(0,n.Jd)(i),(0,h.Ib)(a)}const[M,k]=(0,i["do"])("sticky"),A={zIndex:c.Or,position:(0,c.SQ)("top"),container:Object,offsetTop:(0,c.SI)(0),offsetBottom:(0,c.SI)(0)};var E=(0,n.aZ)({name:M,props:A,emits:["scroll","change"],setup(e,{emit:t,slots:r}){const i=(0,a.iH)(),c=(0,h.eo)(i),d=(0,a.qj)({fixed:!1,width:0,height:0,transform:0}),s=(0,n.Fl)((()=>(0,o.LU)("top"===e.position?e.offsetTop:e.offsetBottom))),b=(0,n.Fl)((()=>{const{fixed:e,height:t,width:r}=d;if(e)return{width:`${r}px`,height:`${t}px`}})),l=(0,n.Fl)((()=>{if(!d.fixed)return;const t=(0,u.l7)((0,o.As)(e.zIndex),{width:`${d.width}px`,height:`${d.height}px`,[e.position]:`${s.value}px`});return d.transform&&(t.transform=`translate3d(0, ${d.transform}px, 0)`),t})),p=e=>t("scroll",{scrollTop:e,isFixed:d.fixed}),x=()=>{if(!i.value||(0,f.xj)(i))return;const{container:t,position:r}=e,n=(0,h.EL)(i),a=(0,f.cx)(window);if(d.width=n.width,d.height=n.height,"top"===r)if(t){const e=(0,h.EL)(t),r=e.bottom-s.value-d.height;d.fixed=s.value>n.top&&e.bottom>0,d.transform=r<0?r:0}else d.fixed=s.value>n.top;else{const{clientHeight:e}=document.documentElement;if(t){const r=(0,h.EL)(t),a=e-r.top-s.value-d.height;d.fixed=e-s.valuer.top,d.transform=a<0?-a:0}else d.fixed=e-s.valued.fixed),(e=>t("change",e))),(0,h.OR)("scroll",x,{target:c}),_(i,x),()=>{var e;return(0,n.Wm)("div",{ref:i,style:b.value},[(0,n.Wm)("div",{class:k({fixed:d.fixed}),style:l.value},[null==(e=r.default)?void 0:e.call(r)])])}}});const S=(0,w.n)(E);var T=r(29061);const[C,P]=(0,i["do"])("tab");var O=(0,n.aZ)({name:C,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:c.Or,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:c.J5},setup(e,{slots:t}){const r=(0,n.Fl)((()=>{const t={},{type:r,color:n,disabled:a,isActive:i,activeColor:c,inactiveColor:o}=e,f="card"===r;n&&f&&(t.borderColor=n,a||(i?t.backgroundColor=n:t.color=n));const d=i?c:o;return d&&(t.color=d),t})),a=()=>{const r=(0,n.Wm)("span",{class:P("text",{ellipsis:!e.scrollable})},[t.title?t.title():e.title]);return e.dot||(0,d.Xq)(e.badge)&&""!==e.badge?(0,n.Wm)(T.C,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:()=>[r]}):r};return()=>(0,n.Wm)("div",{id:e.id,role:"tab",class:[P([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:r.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[a()])}}),R=r(18700);const I=(0,w.n)(R.Z);const[B,L]=(0,i["do"])("tabs");var N=(0,n.aZ)({name:B,props:{count:(0,c.ir)(Number),inited:Boolean,animated:Boolean,duration:(0,c.ir)(c.Or),swipeable:Boolean,lazyRender:Boolean,currentIndex:(0,c.ir)(Number)},emits:["change"],setup(e,{emit:t,slots:r}){const i=(0,a.iH)(),c=e=>t("change",e),o=()=>{var t;const a=null==(t=r.default)?void 0:t.call(r);return e.animated||e.swipeable?(0,n.Wm)(I,{ref:i,loop:!1,class:L("track"),duration:1e3*+e.duration,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:c},{default:()=>[a]}):a},f=t=>{const r=i.value;r&&r.state.active!==t&&r.swipeTo(t,{immediate:!e.inited})};return(0,n.YP)((()=>e.currentIndex),f),(0,n.bv)((()=>{f(e.currentIndex)})),()=>(0,n.Wm)("div",{class:L("content",{animated:e.animated||e.swipeable})},[o()])}});const[U,j]=(0,i["do"])("tabs"),D={type:(0,c.SQ)("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:(0,c.SI)(0),duration:(0,c.SI)(.3),animated:Boolean,ellipsis:c.J5,swipeable:Boolean,scrollspy:Boolean,offsetTop:(0,c.SI)(0),background:String,lazyRender:c.J5,lineWidth:c.Or,lineHeight:c.Or,beforeChange:Function,swipeThreshold:(0,c.SI)(5),titleActiveColor:String,titleInactiveColor:String},F=Symbol(U);var H=(0,n.aZ)({name:U,props:D,emits:["click","change","scroll","disabled","rendered","click-tab","update:active"],setup(e,{emit:t,slots:r}){let i,c,w;const _=(0,a.iH)(),M=(0,a.iH)(),k=(0,a.iH)(),A=(0,x.M)(),E=(0,h.eo)(_),[T,C]=v(),{children:P,linkChildren:R}=(0,h.$E)(F),I=(0,a.qj)({inited:!1,position:"",lineStyle:{},currentIndex:-1}),B=(0,n.Fl)((()=>P.length>e.swipeThreshold||!e.ellipsis||e.shrink)),L=(0,n.Fl)((()=>({borderColor:e.color,background:e.background}))),U=(e,t)=>{var r;return null!=(r=e.name)?r:t},D=(0,n.Fl)((()=>{const e=P[I.currentIndex];if(e)return U(e,I.currentIndex)})),H=(0,n.Fl)((()=>(0,o.LU)(e.offsetTop))),q=(0,n.Fl)((()=>e.sticky?H.value+i:0)),z=t=>{const r=M.value,n=T.value;if(!B.value||!r||!n||!n[I.currentIndex])return;const a=n[I.currentIndex].$el,i=a.offsetLeft-(r.offsetWidth-a.offsetWidth)/2;l(r,i,t?0:+e.duration)},K=()=>{const t=I.inited;(0,n.Y3)((()=>{const r=T.value;if(!r||!r[I.currentIndex]||"line"!==e.type||(0,f.xj)(_.value))return;const n=r[I.currentIndex].$el,{lineWidth:a,lineHeight:i}=e,c=n.offsetLeft+n.offsetWidth/2,s={width:(0,o.Nn)(a),backgroundColor:e.color,transform:`translateX(${c}px) translateX(-50%)`};if(t&&(s.transitionDuration=`${e.duration}s`),(0,d.Xq)(i)){const e=(0,o.Nn)(i);s.height=e,s.borderRadius=e}I.lineStyle=s}))},$=e=>{const t=e=0&&e{const n=$(r);if(!(0,d.Xq)(n))return;const a=P[n],i=U(a,n),c=null!==I.currentIndex;I.currentIndex=n,i!==e.active&&(t("update:active",i),c&&t("change",i,a.title))},V=e=>{const t=P.find(((t,r)=>U(t,r)===e)),r=t?P.indexOf(t):0;G(r)},W=(t=!1)=>{if(e.scrollspy){const r=P[I.currentIndex].$el;if(r&&E.value){const n=(0,f.U4)(r,E.value)-q.value;c=!0,p(E.value,n,t?0:+e.duration,(()=>{c=!1}))}}},Z=(r,n,a)=>{const{title:i,disabled:c}=P[n],o=U(P[n],n);c?t("disabled",o,i):((0,s.I)(e.beforeChange,{args:[o],done:()=>{G(n),W()}}),t("click",o,i),(0,m.BC)(r)),t("click-tab",{name:o,title:i,event:a,disabled:c})},J=e=>{w=e.isFixed,t("scroll",e)},Y=e=>{(0,n.Y3)((()=>{V(e),W(!0)}))},X=()=>{for(let e=0;eq.value)return 0===e?0:e-1}return P.length-1},Q=()=>{if(e.scrollspy&&!c){const e=X();G(e)}},ee=()=>P.map(((t,r)=>(0,n.Wm)(O,(0,n.dG)({id:`${A}-${r}`,ref:C(r),type:e.type,color:e.color,style:t.titleStyle,class:t.titleClass,shrink:e.shrink,isActive:r===I.currentIndex,controls:t.id,scrollable:B.value,activeColor:e.titleActiveColor,inactiveColor:e.titleInactiveColor,onClick:e=>Z(t,r,e)},(0,u.ei)(t,["dot","badge","title","disabled","showZeroBadge"])),{title:t.$slots.title}))),te=()=>{if("line"===e.type&&P.length)return(0,n.Wm)("div",{class:j("line"),style:I.lineStyle},null)},re=()=>{var t,a;const{type:i,border:c}=e;return(0,n.Wm)("div",{ref:k,class:[j("wrap"),{[b.r5]:"line"===i&&c}]},[(0,n.Wm)("div",{ref:M,role:"tablist",class:j("nav",[i,{shrink:e.shrink,complete:B.value}]),style:L.value,"aria-orientation":"horizontal"},[null==(t=r["nav-left"])?void 0:t.call(r),ee(),te(),null==(a=r["nav-right"])?void 0:a.call(r)])])};(0,n.YP)([()=>e.color,f.bn],K),(0,n.YP)((()=>e.active),(e=>{e!==D.value&&V(e)})),(0,n.YP)((()=>P.length),(()=>{I.inited&&(V(e.active),K(),(0,n.Y3)((()=>{z(!0)})))})),(0,n.YP)((()=>I.currentIndex),(()=>{z(),K(),w&&!e.scrollspy&&(0,f.kn)(Math.ceil((0,f.U4)(_.value)-H.value))}));const ne=()=>{V(e.active),(0,n.Y3)((()=>{I.inited=!0,k.value&&(i=(0,h.EL)(k.value).height),z(!0)}))},ae=(e,r)=>t("rendered",e,r);return(0,g.F)({resize:K,scrollTo:Y}),(0,n.dl)(K),(0,y.h)(K),(0,h.Ib)(ne),(0,h.OR)("scroll",Q,{target:E}),R({id:A,props:e,setLine:K,onRendered:ae,currentName:D,scrollIntoView:z}),()=>{var t;return(0,n.Wm)("div",{ref:_,class:j([e.type])},[e.sticky?(0,n.Wm)(S,{container:_.value,offsetTop:H.value,onScroll:J},{default:()=>{var e;return[re(),null==(e=r["nav-bottom"])?void 0:e.call(r)]}}):[re(),null==(t=r["nav-bottom"])?void 0:t.call(r)],(0,n.Wm)(N,{count:P.length,inited:I.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:I.currentIndex,onChange:G},{default:()=>{var e;return[null==(e=r.default)?void 0:e.call(r)]}})])}}})},10987:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(8395),a=r(42238);const i=(0,n.n)(a.Z);var c=i},55522:function(e,t,r){"use strict";r(31958),r(20368),r(51771),r(89137),r(25338)},24452:function(e,t,r){"use strict";function n(){}r.d(t,{U2:function(){return c},ZT:function(){return n},_f:function(){return i},ei:function(){return o},l7:function(){return a}});const a=Object.assign,i="undefined"!==typeof window;function c(e,t){const r=t.split(".");let n=e;return r.forEach((e=>{var t;n=null!=(t=n[e])?t:""})),n}function o(e,t,r){return t.reduce(((t,n)=>(r&&void 0===e[n]||(t[n]=e[n]),t)),{})}},11047:function(e,t,r){"use strict";r.d(t,{_K:function(){return a},e9:function(){return c},r5:function(){return i}});const n="van-hairline",a=`${n}--surround`,i=`${n}--top-bottom`,c="van-haptics-feedback";Symbol("van-form")},62981:function(e,t,r){"use strict";r.d(t,{do:function(){return v}});var n=r(24452),a=r(43603),i=r(36300),c=r(44870);const{hasOwnProperty:o}=Object.prototype;function f(e,t,r){const n=t[r];(0,i.Xq)(n)&&(o.call(e,r)&&(0,i.Kn)(n)?e[r]=d(Object(e[r]),n):e[r]=n)}function d(e,t){return Object.keys(t).forEach((r=>{f(e,t,r)})),e}var s={name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",addContact:"添加联系人",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,t)=>`${e}年${t}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanCascader:{select:"请选择"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用",enable:"可用",disabled:"不可用",placeholder:"输入优惠码"},vanAddressEdit:{area:"地区",postal:"邮政编码",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",postalEmpty:"邮政编码不正确",addressDetail:"详细地址",defaultAddress:"设为默认收货地址"},vanAddressList:{add:"新增地址"}};const u=(0,c.iH)("zh-CN"),b=(0,c.qj)({"zh-CN":s}),h={messages(){return b[u.value]},use(e,t){u.value=e,this.add({[e]:t})},add(e={}){d(b,e)}};var l=h;function p(e){const t=(0,a._A)(e)+".";return(e,...r)=>{const a=l.messages(),c=(0,n.U2)(a,t+e)||(0,n.U2)(a,e);return(0,i.mf)(c)?c(...r):c}}function x(e,t){return t?"string"===typeof t?` ${e}--${t}`:Array.isArray(t)?t.reduce(((t,r)=>t+x(e,r)),""):Object.keys(t).reduce(((r,n)=>r+(t[n]?x(e,n):"")),""):""}function m(e){return(t,r)=>(t&&"string"!==typeof t&&(r=t,t=""),t=t?`${e}__${t}`:e,`${t}${x(t,r)}`)}function v(e){const t=`van-${e}`;return[t,m(t),p(t)]}},54005:function(e,t,r){"use strict";r.d(t,{PF:function(){return b},QU:function(){return o},U4:function(){return s},bn:function(){return l},cx:function(){return c},kn:function(){return d},uK:function(){return p},xj:function(){return h}});var n=r(75634),a=r(44870),i=r(36300);function c(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function o(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function f(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function d(e){o(window,e),o(document.body,e)}function s(e,t){if(e===window)return 0;const r=t?c(t):f();return(0,n.EL)(e).top+r}(0,i.gn)();const u=e=>e.stopPropagation();function b(e,t){("boolean"!==typeof e.cancelable||e.cancelable)&&e.preventDefault(),t&&u(e)}function h(e){const t=(0,a.SU)(e);if(!t)return!1;const r=window.getComputedStyle(t),n="none"===r.display,i=null===t.offsetParent&&"fixed"!==r.position;return n||i}const{width:l,height:p}=(0,n.iP)()},43603:function(e,t,r){"use strict";r.d(t,{As:function(){return f},GL:function(){return m},LU:function(){return l},Nn:function(){return c},Xn:function(){return o},_A:function(){return x},uZ:function(){return v}});var n=r(24452),a=r(54005),i=r(36300);function c(e){if((0,i.Xq)(e))return(0,i.kE)(e)?`${e}px`:String(e)}function o(e){if((0,i.Xq)(e)){const t=c(e);return{width:t,height:t}}}function f(e){const t={};return void 0!==e&&(t.zIndex=+e),t}let d;function s(){if(!d){const e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;d=parseFloat(t)}return d}function u(e){return e=e.replace(/rem/g,""),+e*s()}function b(e){return e=e.replace(/vw/g,""),+e*a.bn.value/100}function h(e){return e=e.replace(/vh/g,""),+e*a.uK.value/100}function l(e){if("number"===typeof e)return e;if(n._f){if(e.includes("rem"))return u(e);if(e.includes("vw"))return b(e);if(e.includes("vh"))return h(e)}return parseFloat(e)}const p=/-(\w)/g,x=e=>e.replace(p,((e,t)=>t.toUpperCase())),m=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");const v=(e,t,r)=>Math.min(Math.max(e,t),r)},12556:function(e,t,r){"use strict";r.d(t,{I:function(){return i}});var n=r(24452),a=r(36300);function i(e,{args:t=[],done:r,canceled:i}){if(e){const c=e.apply(null,t);(0,a.tI)(c)?c.then((e=>{e?r():i&&i()})).catch(n.ZT):c?r():i&&i()}else r()}},65737:function(e,t,r){"use strict";r.d(t,{Ce:function(){return o},J5:function(){return i},Or:function(){return a},SI:function(){return f},SQ:function(){return d},Vg:function(){return n},ir:function(){return c}});const n=null,a=[Number,String],i={type:Boolean,default:!0},c=e=>({type:e,required:!0}),o=()=>({type:Array,default:()=>[]}),f=e=>({type:a,default:e}),d=e=>({type:String,default:e})},36300:function(e,t,r){"use strict";r.d(t,{Kn:function(){return c},Xq:function(){return a},gn:function(){return d},kE:function(){return f},mf:function(){return i},tI:function(){return o}});var n=r(24452);const a=e=>void 0!==e&&null!==e,i=e=>"function"===typeof e,c=e=>null!==e&&"object"===typeof e,o=e=>c(e)&&i(e.then)&&i(e.catch);const f=e=>"number"===typeof e||/^\d+(\.\d+)?$/.test(e),d=()=>!!n._f&&/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase())},8395:function(e,t,r){"use strict";r.d(t,{n:function(){return a}});var n=r(43603);function a(e){return e.install=t=>{const{name:r}=e;t.component(r,e),t.component((0,n._A)(`-${r}`),e)},e}},12706:function(e,t,r){r(21703),e.exports=i;var n=128,a=127;function i(e,t){var r,c=0,o=(t=t||0,0),f=t,d=e.length;do{if(f>=d)throw i.bytes=0,new RangeError("Could not decode varint");r=e[f++],c+=o<28?(r&a)<=n);return i.bytes=f-t,c}},30799:function(e){e.exports=i;var t=128,r=127,n=~r,a=Math.pow(2,31);function i(e,r,c){r=r||[],c=c||0;var o=c;while(e>=a)r[c++]=255&e|t,e/=128;while(e&n)r[c++]=255&e|t,e>>>=7;return r[c]=0|e,i.bytes=c-o+1,r}},42611:function(e,t,r){e.exports={encode:r(30799),decode:r(12706),encodingLength:r(63303)}},63303:function(e){var t=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),a=Math.pow(2,28),i=Math.pow(2,35),c=Math.pow(2,42),o=Math.pow(2,49),f=Math.pow(2,56),d=Math.pow(2,63);e.exports=function(e){return es;)if((o=f[s++])!=o)return!0}else for(;d>s;s++)if((e||s in f)&&f[s]===r)return e||s||0;return!e&&-1}};e.exports={includes:c(!0),indexOf:c(!1)}},4805:function(e,t,r){var n=r(2938),a=r(5044),i=r(1324),c=r(97),o=r(4822),f=[].push,d=function(e){var t=1==e,r=2==e,d=3==e,s=4==e,u=6==e,b=7==e,h=5==e||u;return function(l,p,x,m){for(var v,g,y=i(l),w=a(y),_=n(p,x,3),M=c(w.length),k=0,A=m||o,E=t?A(l,M):r||b?A(l,0):void 0;M>k;k++)if((h||k in w)&&(g=_(v=w[k],k,y),e))if(t)E[k]=g;else if(g)switch(e){case 3:return!0;case 5:return v;case 6:return k;case 2:f.call(E,v)}else switch(e){case 4:return!1;case 7:f.call(E,v)}return u?-1:d||s?s:E}};e.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6),filterOut:d(7)}},9269:function(e,t,r){var n=r(6544),a=r(3649),i=r(4061),c=a("species");e.exports=function(e){return i>=51||!n((function(){var t=[];return(t.constructor={})[c]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},4822:function(e,t,r){var n=r(794),a=r(4521),i=r(3649)("species");e.exports=function(e,t){var r;return a(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!a(r.prototype)?n(r)&&null===(r=r[i])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===t?0:t)}},3616:function(e,t,r){var n=r(3649)("iterator"),a=!1;try{var i=0,c={next:function(){return{done:!!i++}},return:function(){a=!0}};c[n]=function(){return this},Array.from(c,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}return r}},9624:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},3058:function(e,t,r){var n=r(8191),a=r(9624),i=r(3649)("toStringTag"),c="Arguments"==a(function(){return arguments}());e.exports=n?a:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:c?a(t):"Object"==(n=a(t))&&"function"==typeof t.callee?"Arguments":n}},3478:function(e,t,r){var n=r(4402),a=r(929),i=r(6683),c=r(4615);e.exports=function(e,t){for(var r=a(t),o=c.f,f=i.f,d=0;d=74)&&(n=c.match(/Chrome\/(\d+)/))&&(a=n[1]),e.exports=a&&+a},5690:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7263:function(e,t,r){var n=r(7583),a=r(6683).f,i=r(57),c=r(1270),o=r(460),f=r(3478),d=r(4451);e.exports=function(e,t){var r,s,u,b,h,l=e.target,p=e.global,x=e.stat;if(r=p?n:x?n[l]||o(l,{}):(n[l]||{}).prototype)for(s in t){if(b=t[s],u=e.noTargetGet?(h=a(r,s))&&h.value:r[s],!d(p?s:l+(x?".":"#")+s,e.forced)&&void 0!==u){if(typeof b==typeof u)continue;f(b,u)}(e.sham||u&&u.sham)&&i(b,"sham",!0),c(r,s,b,e)}}},6544:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},2938:function(e,t,r){var n=r(6163);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,a){return e.call(t,r,n,a)}}return function(){return e.apply(t,arguments)}}},5897:function(e,t,r){var n=r(1287),a=r(7583),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(n[e])||i(a[e]):n[e]&&n[e][t]||a[e]&&a[e][t]}},8272:function(e,t,r){var n=r(3058),a=r(339),i=r(3649)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[n(e)]}},7583:function(e,t,r){var n=function(e){return e&&e.Math==Math&&e};e.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")()},4402:function(e,t,r){var n=r(1324),a={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return a.call(n(e),t)}},4639:function(e){e.exports={}},2716:function(e,t,r){var n=r(7583);e.exports=function(e,t){var r=n.console;r&&r.error&&(1===arguments.length?r.error(e):r.error(e,t))}},482:function(e,t,r){var n=r(5897);e.exports=n("document","documentElement")},275:function(e,t,r){var n=r(8494),a=r(6544),i=r(6668);e.exports=!n&&!a((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},5044:function(e,t,r){var n=r(6544),a=r(9624),i="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?i.call(e,""):Object(e)}:Object},9734:function(e,t,r){var n=r(1314),a=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return a.call(e)}),e.exports=n.inspectSource},2743:function(e,t,r){var n,a,i,c=r(9491),o=r(7583),f=r(794),d=r(57),s=r(4402),u=r(1314),b=r(9137),h=r(4639),l="Object already initialized",p=o.WeakMap;if(c||u.state){var x=u.state||(u.state=new p),m=x.get,v=x.has,g=x.set;n=function(e,t){if(v.call(x,e))throw new TypeError(l);return t.facade=e,g.call(x,e,t),t},a=function(e){return m.call(x,e)||{}},i=function(e){return v.call(x,e)}}else{var y=b("state");h[y]=!0,n=function(e,t){if(s(e,y))throw new TypeError(l);return t.facade=e,d(e,y,t),t},a=function(e){return s(e,y)?e[y]:{}},i=function(e){return s(e,y)}}e.exports={set:n,get:a,has:i,enforce:function(e){return i(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!f(t)||(r=a(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}}},114:function(e,t,r){var n=r(3649),a=r(339),i=n("iterator"),c=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||c[i]===e)}},4521:function(e,t,r){var n=r(9624);e.exports=Array.isArray||function(e){return"Array"==n(e)}},4451:function(e,t,r){var n=r(6544),a=/#|\.prototype\./,i=function(e,t){var r=o[c(e)];return r==d||r!=f&&("function"==typeof t?n(t):!!t)},c=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},o=i.data={},f=i.NATIVE="N",d=i.POLYFILL="P";e.exports=i},794:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},6268:function(e){e.exports=!1},4026:function(e,t,r){var n=r(2569),a=r(114),i=r(97),c=r(2938),o=r(8272),f=r(7093),d=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,r){var s,u,b,h,l,p,x,m=r&&r.that,v=!(!r||!r.AS_ENTRIES),g=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),w=c(t,m,1+v+y),_=function(e){return s&&f(s),new d(!0,e)},M=function(e){return v?(n(e),y?w(e[0],e[1],_):w(e[0],e[1])):y?w(e,_):w(e)};if(g)s=e;else{if("function"!=typeof(u=o(e)))throw TypeError("Target is not iterable");if(a(u)){for(b=0,h=i(e.length);h>b;b++)if((l=M(e[b]))&&l instanceof d)return l;return new d(!1)}s=u.call(e)}for(p=s.next;!(x=p.call(s)).done;){try{l=M(x.value)}catch(e){throw f(s),e}if("object"==typeof l&&l&&l instanceof d)return l}return new d(!1)}},7093:function(e,t,r){var n=r(2569);e.exports=function(e){var t=e.return;if(void 0!==t)return n(t.call(e)).value}},2365:function(e,t,r){"use strict";var n,a,i,c=r(6544),o=r(729),f=r(57),d=r(4402),s=r(3649),u=r(6268),b=s("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(a=o(o(i)))!==Object.prototype&&(n=a):h=!0);var l=null==n||c((function(){var e={};return n[b].call(e)!==e}));l&&(n={}),u&&!l||d(n,b)||f(n,b,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},339:function(e){e.exports={}},2095:function(e,t,r){var n,a,i,c,o,f,d,s,u=r(7583),b=r(6683).f,h=r(8117).set,l=r(7020),p=r(6846),x=r(5354),m=u.MutationObserver||u.WebKitMutationObserver,v=u.document,g=u.process,y=u.Promise,w=b(u,"queueMicrotask"),_=w&&w.value;_||(n=function(){var e,t;for(x&&(e=g.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?c():i=void 0,e}}i=void 0,e&&e.enter()},l||x||p||!m||!v?y&&y.resolve?((d=y.resolve(void 0)).constructor=y,s=d.then,c=function(){s.call(d,n)}):c=x?function(){g.nextTick(n)}:function(){h.call(u,n)}:(o=!0,f=v.createTextNode(""),new m(n).observe(f,{characterData:!0}),c=function(){f.data=o=!o})),e.exports=_||function(e){var t={fn:e,next:void 0};i&&(i.next=t),a||(a=t,c()),i=t}},783:function(e,t,r){var n=r(7583);e.exports=n.Promise},8640:function(e,t,r){var n=r(4061),a=r(6544);e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},9491:function(e,t,r){var n=r(7583),a=r(9734),i=n.WeakMap;e.exports="function"==typeof i&&/native code/.test(a(i))},5084:function(e,t,r){"use strict";var n=r(6163),a=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new a(e)}},3590:function(e,t,r){var n,a=r(2569),i=r(8728),c=r(5690),o=r(4639),f=r(482),d=r(6668),s=r(9137),u=s("IE_PROTO"),b=function(){},h=function(e){return"