chains/component---src-pages-index-tsx-8470bd1d1e26b2eedfd7.js

3 lines
1.1 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! For license information please see component---src-pages-index-tsx-8470bd1d1e26b2eedfd7.js.LICENSE.txt */
(self.webpackChunkchainlist=self.webpackChunkchainlist||[]).push([[691],{67228:function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},22858:function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},23646:function(t,e,r){var n=r(67228);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.__esModule=!0,t.exports.default=t.exports},48926:function(t){function e(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void r(c)}s.done?e(u):Promise.resolve(u).then(n,i)}t.exports=function(t){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=t.apply(r,n);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},34575:function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},69100:function(t,e,r){var n=r(99489),i=r(57067);function o(e,r,a){return i()?(t.exports=o=Reflect.construct,t.exports.__esModule=!0,t.exports.default=t.exports):(t.exports=o=function(t,e,r){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return r&&n(o,r.prototype),o},t.exports.__esModule=!0,t.exports.default=t.exports),o.apply(null,arguments)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},93913:function(t){function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},59713:function(t){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},16525:function(t,e,r){var n=r(58331);function i(){return"undefined"!=typeof Reflect&&Reflect.get?(t.exports=i=Reflect.get,t.exports.__esModule=!0,t.exports.default=t.exports):(t.exports=i=function(t,e,r){var i=n(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},t.exports.__esModule=!0,t.exports.default=t.exports),i.apply(this,arguments)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},29754:function(t){function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2205:function(t,e,r){var n=r(99489);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},70430:function(t){t.exports=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")},t.exports.__esModule=!0,t.exports.default=t.exports},57067:function(t){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.__esModule=!0,t.exports.default=t.exports},46860:function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},13884:function(t){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}},t.exports.__esModule=!0,t.exports.default=t.exports},80521:function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},98206:function(t){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},78585:function(t,e,r){var n=r(50008).default,i=r(81506);t.exports=function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},63038:function(t,e,r){var n=r(22858),i=r(13884),o=r(60379),a=r(80521);t.exports=function(t,e){return n(t)||i(t,e)||o(t,e)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},58331:function(t,e,r){var n=r(29754);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t},t.exports.__esModule=!0,t.exports.default=t.exports},319:function(t,e,r){var n=r(23646),i=r(46860),o=r(60379),a=r(98206);t.exports=function(t){return n(t)||i(t)||o(t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},50008:function(t){function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},60379:function(t,e,r){var n=r(67228);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},65957:function(t,e,r){var n=r(29754),i=r(99489),o=r(70430),a=r(69100);function s(e){var r="function"==typeof Map?new Map:void 0;return t.exports=s=function(t){if(null===t||!o(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return a(t,arguments,n(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),i(e,t)},t.exports.__esModule=!0,t.exports.default=t.exports,s(e)}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports},87757:function(t,e,r){t.exports=r(35666)},18475:function(t,e,r){"use strict";r.d(e,{Z:function(){return i}});var n=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(t){var e={};return function(r){return void 0===e[r]&&(e[r]=t(r)),e[r]}}((function(t){return n.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}))},40685:function(t,e,r){"use strict";var n=r(34575),i=r(93913),o=r(2205),a=r(78585),s=r(29754);function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=s(t);if(e){var i=s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a(this,r)}}function c(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout((function(){throw n}))}}function f(t){for(var e=t.length,r=new Array(e),n=0;n<e;n+=1)r[n]=t[n];return r}Object.defineProperty(e,"__esModule",{value:!0});var l=function(t){o(r,t);var e=u(r);function r(){return n(this,r),e.apply(this,arguments)}return i(r,[{key:"emit",value:function(t){var e="error"===t,r=this._events;if(void 0!==r)e=e&&void 0===r.error;else if(!e)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];if(e){var a;if(i.length>0&&(a=i[0]),a instanceof Error)throw a;var s=new Error("Unhandled error.".concat(a?" (".concat(a.message,")"):""));throw s.context=a,s}var u=r[t];if(void 0===u)return!1;if("function"==typeof u)c(u,this,i);else for(var l=u.length,h=f(u),d=0;d<l;d+=1)c(h[d],this,i);return!0}}]),r}(r(7555).EventEmitter);e.default=l},53166:function(t,e,r){"use strict";r.r(e),r.d(e,{detectEnv:function(){return y},detectOS:function(){return g},formatIOSMobile:function(){return H},formatMobileRegistry:function(){return Y},formatMobileRegistryEntry:function(){return $},getClientMeta:function(){return B},getCrypto:function(){return C},getCryptoOrThrow:function(){return I},getDappRegistryUrl:function(){return J},getDocument:function(){return S},getDocumentOrThrow:function(){return A},getFromWindow:function(){return E},getFromWindowOrThrow:function(){return M},getLocal:function(){return q},getLocalStorage:function(){return L},getLocalStorageOrThrow:function(){return N},getLocation:function(){return O},getLocationOrThrow:function(){return T},getMobileLinkRegistry:function(){return K},getMobileRegistryEntry:function(){return W},getNavigator:function(){return P},getNavigatorOrThrow:function(){return R},getWalletRegistryUrl:function(){return Z},isAndroid:function(){return b},isBrowser:function(){return k},isIOS:function(){return w},isMobile:function(){return _},isNode:function(){return x},mobileLinkChoiceKey:function(){return z},removeLocal:function(){return D},safeJsonParse:function(){return j},safeJsonStringify:function(){return U},saveMobileLinkInfo:function(){return V},setLocal:function(){return F}});var n=r(75048),i=r(34801),o=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n},a=function(t,e,r){this.name=t,this.version=e,this.os=r,this.type="browser"},s=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},u=function(t,e,r,n){this.name=t,this.version=e,this.os=r,this.bot=n,this.type="bot-device"},c=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},f=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},l=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,h=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],d=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function p(t){return t?m(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new f:"undefined"!=typeof navigator?m(navigator.userAgent):"undefined"!=typeof process&&process.version?new s(process.version.slice(1)):null}function v(t){return""!==t&&h.reduce((function(e,r){var n=r[0],i=r[1];if(e)return e;var o=i.exec(t);return!!o&&[n,o]}),!1)}function m(t){var e=v(t);if(!e)return null;var r=e[0],n=e[1];if("searchbot"===r)return new c;var i=n[1]&&n[1].split(/[._]/).slice(0,3);i?i.length<3&&(i=o(i,function(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}(3-i.length))):i=[];var s=i.join("."),f=function(t){for(var e=0,r=d.length;e<r;e++){var n=d[e],i=n[0];if(n[1].exec(t))return i}return null}(t),h=l.exec(t);return h&&h[1]?new u(r,s,f,h[1]):new a(r,s,f)}function y(t){return p(t)}function g(){var t=y();return t&&t.os?t.os:void 0}function b(){var t=g();return!!t&&t.toLowerCase().includes("android")}function w(){var t=g();return!!t&&(t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function _(){return!!g()&&(b()||w())}function x(){var t=y();return!(!t||!t.name)&&"node"===t.name.toLowerCase()}function k(){return!x()&&!!P()}var E=i.getFromWindow,M=i.getFromWindowOrThrow,A=i.getDocumentOrThrow,S=i.getDocument,R=i.getNavigatorOrThrow,P=i.getNavigator,T=i.getLocationOrThrow,O=i.getLocation,I=i.getCryptoOrThrow,C=i.getCrypto,N=i.getLocalStorageOrThrow,L=i.getLocalStorage;function B(){return n.D()}var j=function(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type ".concat(typeof t));try{return JSON.parse(t)}catch(e){return t}},U=function(t){return"string"==typeof t?t:JSON.stringify(t)};function F(t,e){var r=U(e),n=L();n&&n.setItem(t,r)}function q(t){var e=null,r=L();return r&&(e=r.getItem(t)),e?j(e):e}function D(t){var e=L();e&&e.removeItem(t)}var z="WALLETCONNECT_DEEPLINK_CHOICE";function H(t,e){var r=encodeURIComponent(t);return e.universalLink?"".concat(e.universalLink,"/wc?uri=").concat(r):e.deepLink?"".concat(e.deepLink).concat(e.deepLink.endsWith(":")?"//":"/","wc?uri=").concat(r):""}function V(t){var e=t.href.split("?")[0];F(z,Object.assign(Object.assign({},t),{href:e}))}function W(t,e){return t.filter((function(t){return t.name.toLowerCase().includes(e.toLowerCase())}))[0]}function K(t,e){var r=t;return e&&(r=e.map((function(e){return W(t,e)})).filter(Boolean)),r}var G="https://registry.walletconnect.com";function Z(){return G+"/api/v2/wallets"}function J(){return G+"/api/v2/dapps"}function $(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mobile";return{name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:null!==(e=t.image_url.sm)&&void 0!==e?e:"",universalLink:t[r].universal||"",deepLink:t[r].native||""}}function Y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mobile";return Object.values(t).filter((function(t){return!!t[e].universal||!!t[e].native})).map((function(t){return $(t,e)}))}},59797:function(t,e,r){"use strict";var n=r(62426).Buffer,i=r(319);r(48702),r(55674);var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.removeHexLeadingZeros=e.sanitizeHex=e.addHexPrefix=e.removeHexPrefix=e.padRight=e.padLeft=e.sanitizeBytes=e.swapHex=e.swapBytes=e.splitBytes=e.calcByteLength=e.trimRight=e.trimLeft=e.concatArrays=e.concatBuffers=e.getEncoding=e.getType=e.isArrayBuffer=e.isTypedArray=e.isBuffer=e.isHexString=e.isBinaryString=e.binaryToNumber=e.binaryToUtf8=e.binaryToHex=e.binaryToArray=e.binaryToBuffer=e.numberToBinary=e.numberToUtf8=e.numberToHex=e.numberToArray=e.numberToBuffer=e.utf8ToBinary=e.utf8ToNumber=e.utf8ToHex=e.utf8ToArray=e.utf8ToBuffer=e.hexToBinary=e.hexToNumber=e.hexToUtf8=e.hexToArray=e.hexToBuffer=e.arrayToBinary=e.arrayToNumber=e.arrayToUtf8=e.arrayToHex=e.arrayToBuffer=e.bufferToBinary=e.bufferToNumber=e.bufferToUtf8=e.bufferToHex=e.bufferToArray=void 0;var a=o(r(28395)),s=o(r(50800)),u="hex",c="utf8",f="0";function l(t){return new Uint8Array(t)}function h(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.toString(u);return e?q(r):r}function d(t){return t.toString(c)}function p(t){return t.readUIntBE(0,t.length)}function v(t){return s.default(t)}function m(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return h(v(t),e)}function y(t){return d(v(t))}function g(t){return p(v(t))}function b(t){return Array.from(t).map(M).join("")}function w(t){return n.from(F(t),u)}function _(t){return l(w(t))}function x(t){return b(_(t))}function k(t){return n.from(t,c)}function E(t){return l(k(t))}function M(t){return j((t>>>0).toString(2))}function A(t){return v(S(t))}function S(t){return new Uint8Array(L(t).map((function(t){return parseInt(t,2)})))}function R(t,e){return m(S(t),e)}function P(t){return!("string"!=typeof t||!new RegExp(/^[01]+$/).test(t))&&t.length%8==0}function T(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}function O(t){return n.isBuffer(t)}function I(t){return a.default.strict(t)&&!O(t)}function C(t){return!I(t)&&!O(t)&&void 0!==t.byteLength}function N(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,r=t%e;return r?(t-r)/e*e+e:t}function L(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,r=j(t).match(new RegExp(".{".concat(e,"}"),"gi"));return Array.from(r||[])}function B(t){return L(t).map(D).join("")}function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;return U(t,N(t.length,e),r)}function U(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;return z(t,e,!0,r)}function F(t){return t.replace(/^0x/,"")}function q(t){return t.startsWith("0x")?t:"0x".concat(t)}function D(t){return t.split("").reverse().join("")}function z(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f,i=e-t.length,o=t;if(i>0){var a=n.repeat(i);o=r?a+t:t+a}return o}e.bufferToArray=l,e.bufferToHex=h,e.bufferToUtf8=d,e.bufferToNumber=p,e.bufferToBinary=function(t){return b(l(t))},e.arrayToBuffer=v,e.arrayToHex=m,e.arrayToUtf8=y,e.arrayToNumber=g,e.arrayToBinary=b,e.hexToBuffer=w,e.hexToArray=_,e.hexToUtf8=function(t){return d(w(t))},e.hexToNumber=function(t){return g(_(t))},e.hexToBinary=x,e.utf8ToBuffer=k,e.utf8ToArray=E,e.utf8ToHex=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return h(k(t),e)},e.utf8ToNumber=function(t){var e=parseInt(t,10);return function(t,e){if(!t)throw new Error(e)}(!function(t){return void 0===t}(e),"Number can only safely store up to 53 bits"),e},e.utf8ToBinary=function(t){return b(E(t))},e.numberToBuffer=function(t){return A(M(t))},e.numberToArray=function(t){return S(M(t))},e.numberToHex=function(t,e){return R(M(t),e)},e.numberToUtf8=function(t){return"".concat(t)},e.numberToBinary=M,e.binaryToBuffer=A,e.binaryToArray=S,e.binaryToHex=R,e.binaryToUtf8=function(t){return y(S(t))},e.binaryToNumber=function(t){return g(S(t))},e.isBinaryString=P,e.isHexString=T,e.isBuffer=O,e.isTypedArray=I,e.isArrayBuffer=C,e.getType=function(t){return O(t)?"buffer":I(t)?"typed-array":C(t)?"array-buffer":Array.isArray(t)?"array":typeof t},e.getEncoding=function(t){return P(t)?"binary":T(t)?u:c},e.concatBuffers=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=n.concat(e);return i},e.concatArrays=function(){for(var t=[],e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((function(e){return t=t.concat(Array.from(e))})),new Uint8Array(i(t))},e.trimLeft=function(t,e){var r=t.length-e;return r>0&&(t=t.slice(r)),t},e.trimRight=function(t,e){return t.slice(0,e)},e.calcByteLength=N,e.splitBytes=L,e.swapBytes=B,e.swapHex=function(t){return R(B(x(t)))},e.sanitizeBytes=j,e.padLeft=U,e.padRight=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;return z(t,e,!1,r)},e.removeHexPrefix=F,e.addHexPrefix=q,e.sanitizeHex=function(t){return(t=j(t=F(t),2))&&(t=q(t)),t},e.removeHexLeadingZeros=function(t){var e=t.startsWith("0x");return t=(t=F(t)).startsWith(f)?t.substring(1):t,e?q(t):t}},90528:function(t,e,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 i(){var t=n();return t.subtle||t.webkitSubtle}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowserCryptoAvailable=e.getSubtleCrypto=e.getBrowerCrypto=void 0,e.getBrowerCrypto=n,e.getSubtleCrypto=i,e.isBrowserCryptoAvailable=function(){return!!n()&&!!i()}},65955:function(t,e){"use strict";function r(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function n(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=e.isNode=e.isReactNative=void 0,e.isReactNative=r,e.isNode=n,e.isBrowser=function(){return!r()&&!n()}},70213:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(90528),e),i(r(65955),e)},14578:function(t,e,r){function n(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var i=r(53166),o=n(r(30631)),a=n(r(21455)),s=r(15007);"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var u="walletconnect-wrapper",c="walletconnect-style-sheet",f="walletconnect-qrcode-modal",l="walletconnect-qrcode-text";function h(t){return s.createElement("div",{className:"walletconnect-modal__header"},s.createElement("img",{src:"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",className:"walletconnect-modal__headerLogo"}),s.createElement("p",null,"WalletConnect"),s.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:t.onClose},s.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},s.createElement("div",{className:"walletconnect-modal__close__line1"}),s.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function d(t){return s.createElement("a",{className:"walletconnect-connect__button",href:t.href,id:"walletconnect-connect-button-"+t.name,onClick:t.onClick,rel:"noopener noreferrer",style:{backgroundColor:t.color},target:"_blank"},t.name)}function p(t){var e=t.color,r=t.href,n=t.name,i=t.logo,o=t.onClick;return s.createElement("a",{className:"walletconnect-modal__base__row",href:r,onClick:o,rel:"noopener noreferrer",target:"_blank"},s.createElement("h3",{className:"walletconnect-modal__base__row__h3"},n),s.createElement("div",{className:"walletconnect-modal__base__row__right"},s.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+i+"') "+e,backgroundSize:"100%"}}),s.createElement("img",{src:"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",className:"walletconnect-modal__base__row__right__caret"})))}function v(t){var e=t.color,r=t.href,n=t.name,i=t.logo,o=t.onClick,a=window.innerWidth<768?(n.length>8?2.5:2.7)+"vw":"inherit";return s.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:r,onClick:o,rel:"noopener noreferrer",target:"_blank"},s.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+i+"') "+e,backgroundSize:"100%"}}),s.createElement("div",{style:{fontSize:a},className:"walletconnect-connect__button__text"},n))}function m(t){var e=i.isAndroid(),r=s.useState(""),n=r[0],o=r[1],a=s.useState(""),u=a[0],c=a[1],f=s.useState(1),h=f[0],m=f[1],y=u?t.links.filter((function(t){return t.name.toLowerCase().includes(u.toLowerCase())})):t.links,g=t.errorMessage,b=u||y.length>5,w=Math.ceil(y.length/12),_=[12*(h-1)+1,12*h],x=y.length?y.filter((function(t,e){return e+1>=_[0]&&e+1<=_[1]})):[],k=!(e||!(w>1)),E=void 0;return s.createElement("div",null,s.createElement("p",{id:l,className:"walletconnect-qrcode__text"},e?t.text.connect_mobile_wallet:t.text.choose_preferred_wallet),!e&&s.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:n,onChange:function(t){o(t.target.value),clearTimeout(E),t.target.value?E=setTimeout((function(){c(t.target.value),m(1)}),1e3):(o(""),c(""),m(1))}}),s.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(e?"__android":b&&y.length?"__wrap":"")},e?s.createElement(d,{name:t.text.connect,color:"rgb(64, 153, 255)",href:t.uri,onClick:s.useCallback((function(){i.saveMobileLinkInfo({name:"Unknown",href:t.uri})}),[])}):x.length?x.map((function(e){var r=e.color,n=e.name,o=e.shortName,a=e.logo,u=i.formatIOSMobile(t.uri,e),c=s.useCallback((function(){i.saveMobileLinkInfo({name:n,href:u})}),[x]);return b?s.createElement(v,{color:r,href:u,name:o||n,logo:a,onClick:c}):s.createElement(p,{color:r,href:u,name:n,logo:a,onClick:c})})):s.createElement(s.Fragment,null,s.createElement("p",null,g.length?t.errorMessage:t.links.length&&!y.length?t.text.no_wallets_found:t.text.loading))),k&&s.createElement("div",{className:"walletconnect-modal__footer"},Array(w).fill(0).map((function(t,e){var r=e+1,n=h===r;return s.createElement("a",{style:{margin:"auto 10px",fontWeight:n?"bold":"normal"},onClick:function(){return m(r)}},r)}))))}function y(t){var e=!!t.message.trim();return s.createElement("div",{className:"walletconnect-qrcode__notification"+(e?" notification__show":"")},t.message)}function g(t){var e=s.useState(""),r=e[0],n=e[1],i=s.useState(""),u=i[0],c=i[1];s.useEffect((function(){try{return Promise.resolve(function(t){try{var e="";return Promise.resolve(o.toString(t,{margin:0,type:"svg"})).then((function(t){return"string"==typeof t&&(e=t.replace("<svg",'<svg class="walletconnect-qrcode__image"')),e}))}catch(r){return Promise.reject(r)}}(t.uri)).then((function(t){c(t)}))}catch(e){Promise.reject(e)}}),[]);return s.createElement("div",null,s.createElement("p",{id:l,className:"walletconnect-qrcode__text"},t.text.scan_qrcode_with_wallet),s.createElement("div",{dangerouslySetInnerHTML:{__html:u}}),s.createElement("div",{className:"walletconnect-modal__footer"},s.createElement("a",{onClick:function(){a(t.uri)?(n(t.text.copied_to_clipboard),setInterval((function(){return n("")}),1200)):(n("Error"),setInterval((function(){return n("")}),1200))}},t.text.copy_to_clipboard)),s.createElement(y,{message:r}))}function b(t){var e=i.isAndroid(),r=i.isMobile(),n=r?t.qrcodeModalOptions&&t.qrcodeModalOptions.mobileLinks?t.qrcodeModalOptions.mobileLinks:void 0:t.qrcodeModalOptions&&t.qrcodeModalOptions.desktopLinks?t.qrcodeModalOptions.desktopLinks:void 0,o=s.useState(!1),a=o[0],u=o[1],c=s.useState(!1),l=c[0],d=c[1],p=s.useState(!r),v=p[0],y=p[1],b={mobile:r,text:t.text,uri:t.uri,qrcodeModalOptions:t.qrcodeModalOptions},w=s.useState(""),_=w[0],x=w[1],k=s.useState(!1),E=k[0],M=k[1],A=s.useState([]),S=A[0],R=A[1],P=s.useState(""),T=P[0],O=P[1],I=function(){l||a||n&&!n.length||S.length>0||s.useEffect((function(){!function(){try{if(e)return Promise.resolve();u(!0);var o=function(t,e){try{var r=t()}catch(n){return e(n)}return r&&r.then?r.then(void 0,e):r}((function(){var e=t.qrcodeModalOptions&&t.qrcodeModalOptions.registryUrl?t.qrcodeModalOptions.registryUrl:i.getWalletRegistryUrl();return Promise.resolve(fetch(e)).then((function(e){return Promise.resolve(e.json()).then((function(e){var o=e.listings,a=r?"mobile":"desktop",s=i.getMobileLinkRegistry(i.formatMobileRegistry(o,a),n);u(!1),d(!0),O(s.length?"":t.text.no_supported_wallets),R(s);var c=1===s.length;c&&(x(i.formatIOSMobile(t.uri,s[0])),y(!0)),M(c)}))}))}),(function(e){u(!1),d(!0),O(t.text.something_went_wrong),console.error(e)}));Promise.resolve(o&&o.then?o.then((function(){})):void 0)}catch(a){return Promise.reject(a)}}()}))};I();var C=r?v:!v;return s.createElement("div",{id:f,className:"walletconnect-qrcode__base animated fadeIn"},s.createElement("div",{className:"walletconnect-modal__base"},s.createElement(h,{onClose:t.onClose}),E&&v?s.createElement("div",{className:"walletconnect-modal__single_wallet"},s.createElement("a",{onClick:function(){return i.saveMobileLinkInfo({name:S[0].name,href:_})},href:_,rel:"noopener noreferrer",target:"_blank"},t.text.connect_with+" "+(E?S[0].name:"")+" ")):e||a||!a&&S.length?s.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(C?" right__selected":"")},s.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),r?s.createElement(s.Fragment,null,s.createElement("a",{onClick:function(){return y(!1),I()}},t.text.mobile),s.createElement("a",{onClick:function(){return y(!0)}},t.text.qrcode)):s.createElement(s.Fragment,null,s.createElement("a",{onClick:function(){return y(!0)}},t.text.qrcode),s.createElement("a",{onClick:function(){return y(!1),I()}},t.text.desktop))):null,s.createElement("div",null,v||!e&&!a&&!S.length?s.createElement(g,Object.assign({},b)):s.createElement(m,Object.assign({},b,{links:S,errorMessage:T})))))}var w={de:{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"},en:{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"},es:{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"},fr:{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é"},ko:{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:"지갑을 찾을 수 없습니다"},pt:{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"},zh:{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:"没有找到钱包"},fa:{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:"هیچ کیف پولی پیدا نشد"}};function _(){var t=i.getDocumentOrThrow(),e=t.getElementById(f);e&&(e.className=e.className.replace("fadeIn","fadeOut"),setTimeout((function(){var e=t.getElementById(u);e&&t.body.removeChild(e)}),300))}function x(t){return function(){_(),t&&t()}}function k(t,e,r){!function(){var t=i.getDocumentOrThrow(),e=t.getElementById(c);e&&t.head.removeChild(e);var r=t.createElement("style");r.setAttribute("id",c),r.innerText=':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',t.head.appendChild(r)}();var n,o=function(){var t=i.getDocumentOrThrow(),e=t.createElement("div");return e.setAttribute("id",u),t.body.appendChild(e),e}();s.render(s.createElement(b,{text:(n=i.getNavigatorOrThrow().language.split("-")[0]||"en",w[n]||w.en),uri:t,onClose:x(e),qrcodeModalOptions:r}),o)}var E=function(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node};var M={open:function(t,e,r){console.log(t),E()?function(t){o.toString(t,{type:"terminal"}).then(console.log)}(t):k(t,e,r)},close:function(){E()||_()}};t.exports=M},32861:function(t){"use strict";t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},89784:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(36563).Buffer}catch(E){}function s(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var a=t.charCodeAt(o)-48;n<<=4,n|=a>=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a<o;a++){var s=t.charCodeAt(a)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,f=r;f<s;f+=n)c=u(t,f,f+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var l=1;for(c=u(t,f,t.length,e),f=0;f<a;f++)l*=e;this.imuln(l),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=f[t],d=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var v=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?v+r:c[h-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s<o;s++)c[s]=0}else{for(s=0;s<o-i;s++)c[s]=0;for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[o-s-1]=a}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a<n.length;a++)o=(e=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,r){var n,i,o,a=t.words,s=e.words,u=r.words,c=0,f=0|a[0],l=8191&f,h=f>>>13,d=0|a[1],p=8191&d,v=d>>>13,m=0|a[2],y=8191&m,g=m>>>13,b=0|a[3],w=8191&b,_=b>>>13,x=0|a[4],k=8191&x,E=x>>>13,M=0|a[5],A=8191&M,S=M>>>13,R=0|a[6],P=8191&R,T=R>>>13,O=0|a[7],I=8191&O,C=O>>>13,N=0|a[8],L=8191&N,B=N>>>13,j=0|a[9],U=8191&j,F=j>>>13,q=0|s[0],D=8191&q,z=q>>>13,H=0|s[1],V=8191&H,W=H>>>13,K=0|s[2],G=8191&K,Z=K>>>13,J=0|s[3],$=8191&J,Y=J>>>13,X=0|s[4],Q=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,vt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(l,D))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,D)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,z))+Math.imul(v,D)|0,o=Math.imul(v,z);var yt=(c+(n=n+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,D),i=(i=Math.imul(y,z))+Math.imul(g,D)|0,o=Math.imul(g,z),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,W)|0;var gt=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(w,D),i=(i=Math.imul(w,z))+Math.imul(_,D)|0,o=Math.imul(_,z),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Z)|0;var bt=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(k,D),i=(i=Math.imul(k,z))+Math.imul(E,D)|0,o=Math.imul(E,z),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,Y)|0;var wt=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,z))+Math.imul(S,D)|0,o=Math.imul(S,z),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0;var _t=(c+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(P,D),i=(i=Math.imul(P,z))+Math.imul(T,D)|0,o=Math.imul(T,z),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0;var xt=(c+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(I,D),i=(i=Math.imul(I,z))+Math.imul(C,D)|0,o=Math.imul(C,z),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0;var kt=(c+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,D),i=(i=Math.imul(L,z))+Math.imul(B,D)|0,o=Math.imul(B,z),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ct)|0;var Et=(c+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(U,D),i=(i=Math.imul(U,z))+Math.imul(F,D)|0,o=Math.imul(F,z),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ht)|0;var Mt=(c+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,vt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,vt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,ht)|0;var At=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,vt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,vt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,Z))+Math.imul(F,G)|0,o=Math.imul(F,Z),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,vt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,vt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ht)|0;var Rt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,vt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,vt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ct)|0,n=n+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ht)|0;var Pt=(c+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,vt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,vt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ht)|0;var Tt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,vt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,vt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ht)|0;var Ot=(c+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,vt)|0)+Math.imul(T,pt)|0))<<13)|0;c=((o=o+Math.imul(T,vt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(B,lt)|0,o=o+Math.imul(B,ht)|0;var It=(c+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,vt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,vt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(U,lt),i=(i=Math.imul(U,ht))+Math.imul(F,lt)|0,o=Math.imul(F,ht);var Ct=(c+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,vt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,vt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863;var Nt=(c+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,vt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,vt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=mt,u[1]=yt,u[2]=gt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=xt,u[7]=kt,u[8]=Et,u[9]=Mt,u[10]=At,u[11]=St,u[12]=Rt,u[13]=Pt,u[14]=Tt,u[15]=Ot,u[16]=It,u[17]=Ct,u[18]=Nt,0!==c&&(u[19]=c,r.length++),r};function p(t,e,r){return(new v).mulp(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var f=o-c,l=(0|t.words[f])*(0|e.words[c]),h=67108863&l;s=67108863&(h=h+s|0),i+=(a=(a=a+(l/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e),r},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a<o;a++)n[a]=e[t[a]],i[a]=r[t[a]]},v.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var l=u,h=c,d=0;d<a;d++){var p=r[f+d],v=n[f+d],m=r[f+d+a],y=n[f+d+a],g=l*m-h*y;y=l*y+h*m,m=g,r[f+d]=p+m,n[f+d]=v+y,r[f+d+a]=p-m,n[f+d+a]=v-y,d!==s&&(g=u*l-c*h,h=u*h+c*l,l=g)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),l=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,f,l,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*l[d];u[d]=s[d]*l[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<r;this.words[e]=u|a,a=s>>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,a=t.length+r;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+s;var u=(0|t.words[i])*e;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0==(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(g,y),g.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var a=0|t.words[i];t.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,y),i(w,y),i(_,y),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new g;else if("p224"===t)e=new b;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return m[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var v=d,m=0;0!==v.cmp(s);m++)v=v.redSqr();n(m<p);var y=this.pow(l,new o(1).iushln(p-m-1));h=h.redMul(y),l=y.redSqr(),d=d.redMul(l),p=m}return h},x.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},x.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},i(k,x),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},23351:function(t,e,r){"use strict";var n=r(63038),i=r(319);function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var s=r(68936),u=r(7091),c=r(34734);function f(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(t,e){return e.encode?e.strict?s(t):encodeURIComponent(t):t}function h(t,e){return e.decode?u(t):t}function d(t){return Array.isArray(t)?t.sort():"object"==typeof t?d(Object.keys(t)).sort((function(t,e){return Number(t)-Number(e)})).map((function(e){return t[e]})):t}function p(t){var e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function v(t){var e=(t=p(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function m(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function y(t,e){f((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);var r=function(t){var e;switch(t.arrayFormat){case"index":return function(t,r,n){e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return function(t,r,n){e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};case"comma":case"separator":return function(e,r,n){var i="string"==typeof r&&r.split("").indexOf(t.arrayFormatSeparator)>-1?r.split(t.arrayFormatSeparator).map((function(e){return h(e,t)})):null===r?r:h(r,t);n[e]=i};default:return function(t,e,r){void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e),i=Object.create(null);if("string"!=typeof t)return i;if(!(t=t.trim().replace(/^[?#&]/,"")))return i;var a,s=o(t.split("&"));try{for(s.s();!(a=s.n()).done;){var u=a.value,l=c(e.decode?u.replace(/\+/g," "):u,"="),p=n(l,2),v=p[0],y=p[1];y=void 0===y?null:["comma","separator"].includes(e.arrayFormat)?y:h(y,e),r(h(v,e),y,i)}}catch(M){s.e(M)}finally{s.f()}for(var g=0,b=Object.keys(i);g<b.length;g++){var w=b[g],_=i[w];if("object"==typeof _&&null!==_)for(var x=0,k=Object.keys(_);x<k.length;x++){var E=k[x];_[E]=m(_[E],e)}else i[w]=m(_,e)}return!1===e.sort?i:(!0===e.sort?Object.keys(i).sort():Object.keys(i).sort(e.sort)).reduce((function(t,e){var r=i[e];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?t[e]=d(r):t[e]=r,t}),Object.create(null))}e.extract=v,e.parse=y,e.stringify=function(t,e){if(!t)return"";f((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);for(var r=function(r){return e.skipNull&&null==t[r]||e.skipEmptyString&&""===t[r]},n=function(t){switch(t.arrayFormat){case"index":return function(e){return function(r,n){var o=r.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:[].concat(i(r),null===n?[[l(e,t),"[",o,"]"].join("")]:[[l(e,t),"[",l(o,t),"]=",l(n,t)].join("")])}};case"bracket":return function(e){return function(r,n){return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:[].concat(i(r),null===n?[[l(e,t),"[]"].join("")]:[[l(e,t),"[]=",l(n,t)].join("")])}};case"comma":case"separator":return function(e){return function(r,n){return null==n||0===n.length?r:0===r.length?[[l(e,t),"=",l(n,t)].join("")]:[[r,l(n,t)].join(t.arrayFormatSeparator)]}};default:return function(e){return function(r,n){return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:[].concat(i(r),null===n?[l(e,t)]:[[l(e,t),"=",l(n,t)].join("")])}}}}(e),o={},a=0,s=Object.keys(t);a<s.length;a++){var u=s[a];r(u)||(o[u]=t[u])}var c=Object.keys(o);return!1!==e.sort&&c.sort(e.sort),c.map((function(r){var i=t[r];return void 0===i?"":null===i?l(r,e):Array.isArray(i)?i.reduce(n(r),[]).join("&"):l(r,e)+"="+l(i,e)})).filter((function(t){return t.length>0})).join("&")},e.parseUrl=function(t,e){e=Object.assign({decode:!0},e);var r=c(t,"#"),i=n(r,2),o=i[0],a=i[1];return Object.assign({url:o.split("?")[0]||"",query:y(v(t),e)},e&&e.parseFragmentIdentifier&&a?{fragmentIdentifier:h(a,e)}:{})},e.stringifyUrl=function(t,r){r=Object.assign({encode:!0,strict:!0},r);var n=p(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),a=Object.assign(o,t.query),s=e.stringify(a,r);s&&(s="?".concat(s));var u=function(t){var e="",r=t.indexOf("#");return-1!==r&&(e=t.slice(r)),e}(t.url);return t.fragmentIdentifier&&(u="#".concat(l(t.fragmentIdentifier,r))),"".concat(n).concat(s).concat(u)}},34801:function(t,e){"use strict";function r(t){var e=void 0;return"undefined"!=typeof window&&void 0!==window[t]&&(e=window[t]),e}function n(t){var e=r(t);if(!e)throw new Error("".concat(t," is not defined in Window"));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.getLocalStorage=e.getLocalStorageOrThrow=e.getCrypto=e.getCryptoOrThrow=e.getLocation=e.getLocationOrThrow=e.getNavigator=e.getNavigatorOrThrow=e.getDocument=e.getDocumentOrThrow=e.getFromWindowOrThrow=e.getFromWindow=void 0,e.getFromWindow=r,e.getFromWindowOrThrow=n,e.getDocumentOrThrow=function(){return n("document")},e.getDocument=function(){return r("document")},e.getNavigatorOrThrow=function(){return n("navigator")},e.getNavigator=function(){return r("navigator")},e.getLocationOrThrow=function(){return n("location")},e.getLocation=function(){return r("location")},e.getCryptoOrThrow=function(){return n("crypto")},e.getCrypto=function(){return r("crypto")},e.getLocalStorageOrThrow=function(){return n("localStorage")},e.getLocalStorage=function(){return r("localStorage")}},75048:function(t,e,r){"use strict";e.D=void 0;var n=r(34801);e.D=function(){var t,e;try{t=n.getDocumentOrThrow(),e=n.getLocationOrThrow()}catch(o){return null}function r(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(var i=t.getElementsByTagName("meta"),o=function(t){var e=i[t],n=["itemprop","property","name"].map((function(t){return e.getAttribute(t)})).filter((function(t){return!!t&&r.includes(t)}));if(n.length&&n){var o=e.getAttribute("content");if(o)return{v:o}}},a=0;a<i.length;a++){var s=o(a);if("object"==typeof s)return s.v}return""}var i=function(){var e=r("name","og:site_name","og:title","twitter:title");return e||(e=t.title),e}();return{description:r("description","og:description","twitter:description","keywords"),url:e.origin,icons:function(){for(var r=t.getElementsByTagName("link"),n=[],i=0;i<r.length;i++){var o=r[i],a=o.getAttribute("rel");if(a&&a.toLowerCase().indexOf("icon")>-1){var s=o.getAttribute("href");if(s)if(-1===s.toLowerCase().indexOf("https:")&&-1===s.toLowerCase().indexOf("http:")&&0!==s.indexOf("//")){var u=e.protocol+"//"+e.host;if(0===s.indexOf("/"))u+=s;else{var c=e.pathname.split("/");c.pop(),u+=c.join("/")+"/"+s}n.push(u)}else if(0===s.indexOf("//")){var f=e.protocol+s;n.push(f)}else n.push(s)}}return n}(),name:i}}},43438:function(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i,o,a=r(97300).codes,s=a.ERR_AMBIGUOUS_ARGUMENT,u=a.ERR_INVALID_ARG_TYPE,c=a.ERR_INVALID_ARG_VALUE,f=a.ERR_INVALID_RETURN_VALUE,l=a.ERR_MISSING_ARGS,h=r(67056),d=r(15895).inspect,p=r(15895).types,v=p.isPromise,m=p.isRegExp,y=Object.assign?Object.assign:r(770).assign,g=Object.is?Object.is:r(2548);new Map;function b(){var t=r(3451);i=t.isDeepEqual,o=t.isDeepStrictEqual}var w=!1,_=t.exports=M,x={};function k(t){if(t.message instanceof Error)throw t.message;throw new h(t)}function E(t,e,r,n){if(!r){var i=!1;if(0===e)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new h({actual:r,expected:!0,message:n,operator:"==",stackStartFn:t});throw o.generatedMessage=i,o}}function M(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];E.apply(void 0,[M,e.length].concat(e))}_.fail=function t(e,r,n,i,o){var a,s=arguments.length;if(0===s)a="Failed";else if(1===s)n=e,e=void 0;else{if(!1===w){w=!0;var u=process.emitWarning?process.emitWarning:console.warn.bind(console);u("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}2===s&&(i="!=")}if(n instanceof Error)throw n;var c={actual:e,expected:r,operator:void 0===i?"fail":i,stackStartFn:o||t};void 0!==n&&(c.message=n);var f=new h(c);throw a&&(f.message=a,f.generatedMessage=!0),f},_.AssertionError=h,_.ok=M,_.equal=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");e!=r&&k({actual:e,expected:r,message:n,operator:"==",stackStartFn:t})},_.notEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");e==r&&k({actual:e,expected:r,message:n,operator:"!=",stackStartFn:t})},_.deepEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===i&&b(),i(e,r)||k({actual:e,expected:r,message:n,operator:"deepEqual",stackStartFn:t})},_.notDeepEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===i&&b(),i(e,r)&&k({actual:e,expected:r,message:n,operator:"notDeepEqual",stackStartFn:t})},_.deepStrictEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===i&&b(),o(e,r)||k({actual:e,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:t})},_.notDeepStrictEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===i&&b();o(e,r)&&k({actual:e,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:t})},_.strictEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");g(e,r)||k({actual:e,expected:r,message:n,operator:"strictEqual",stackStartFn:t})},_.notStrictEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");g(e,r)&&k({actual:e,expected:r,message:n,operator:"notStrictEqual",stackStartFn:t})};var A=function t(e,r,n){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r.forEach((function(t){t in e&&(void 0!==n&&"string"==typeof n[t]&&m(e[t])&&e[t].test(n[t])?i[t]=n[t]:i[t]=e[t])}))};function S(t,e,r,n,i,a){if(!(r in t)||!o(t[r],e[r])){if(!n){var s=new A(t,i),u=new A(e,i,t),c=new h({actual:s,expected:u,operator:"deepStrictEqual",stackStartFn:a});throw c.actual=t,c.expected=e,c.operator=a.name,c}k({actual:t,expected:e,message:n,operator:a.name,stackStartFn:a})}}function R(t,e,r,o){if("function"!=typeof e){if(m(e))return e.test(t);if(2===arguments.length)throw new u("expected",["Function","RegExp"],e);if("object"!==n(t)||null===t){var a=new h({actual:t,expected:e,message:r,operator:"deepStrictEqual",stackStartFn:o});throw a.operator=o.name,a}var s=Object.keys(e);if(e instanceof Error)s.push("name","message");else if(0===s.length)throw new c("error",e,"may not be an empty object");return void 0===i&&b(),s.forEach((function(n){"string"==typeof t[n]&&m(e[n])&&e[n].test(t[n])||S(t,e,n,r,s,o)})),!0}return void 0!==e.prototype&&t instanceof e||!Error.isPrototypeOf(e)&&!0===e.call({},t)}function P(t){if("function"!=typeof t)throw new u("fn","Function",t);try{t()}catch(e){return e}return x}function T(t){return v(t)||null!==t&&"object"===n(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function O(t){return Promise.resolve().then((function(){var e;if("function"==typeof t){if(!T(e=t()))throw new f("instance of Promise","promiseFn",e)}else{if(!T(t))throw new u("promiseFn",["Function","Promise"],t);e=t}return Promise.resolve().then((function(){return e})).then((function(){return x})).catch((function(t){return t}))}))}function I(t,e,r,i){if("string"==typeof r){if(4===arguments.length)throw new u("error",["Object","Error","Function","RegExp"],r);if("object"===n(e)&&null!==e){if(e.message===r)throw new s("error/message",'The error message "'.concat(e.message,'" is identical to the message.'))}else if(e===r)throw new s("error/message",'The error "'.concat(e,'" is identical to the message.'));i=r,r=void 0}else if(null!=r&&"object"!==n(r)&&"function"!=typeof r)throw new u("error",["Object","Error","Function","RegExp"],r);if(e===x){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=i?": ".concat(i):".";var a="rejects"===t.name?"rejection":"exception";k({actual:void 0,expected:r,operator:t.name,message:"Missing expected ".concat(a).concat(o),stackStartFn:t})}if(r&&!R(e,r,i,t))throw e}function C(t,e,r,n){if(e!==x){if("string"==typeof r&&(n=r,r=void 0),!r||R(e,r)){var i=n?": ".concat(n):".",o="doesNotReject"===t.name?"rejection":"exception";k({actual:e,expected:r,operator:t.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(e&&e.message,'"'),stackStartFn:t})}throw e}}function N(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];E.apply(void 0,[N,e.length].concat(e))}_.throws=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];I.apply(void 0,[t,P(e)].concat(n))},_.rejects=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return O(e).then((function(e){return I.apply(void 0,[t,e].concat(n))}))},_.doesNotThrow=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];C.apply(void 0,[t,P(e)].concat(n))},_.doesNotReject=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return O(e).then((function(e){return C.apply(void 0,[t,e].concat(n))}))},_.ifError=function t(e){if(null!=e){var r="ifError got unwanted exception: ";"object"===n(e)&&"string"==typeof e.message?0===e.message.length&&e.constructor?r+=e.constructor.name:r+=e.message:r+=d(e);var i=new h({actual:e,expected:null,operator:"ifError",message:r,stackStartFn:t}),o=e.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var s=i.stack.split("\n"),u=0;u<a.length;u++){var c=s.indexOf(a[u]);if(-1!==c){s=s.slice(0,c);break}}i.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw i}},_.strict=y(N,_,{equal:_.strictEqual,deepEqual:_.deepStrictEqual,notEqual:_.notStrictEqual,notDeepEqual:_.notDeepStrictEqual}),_.strict.strict=_.strict},67056:function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==h(e)&&"function"!=typeof e?a(t):e}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t){var e="function"==typeof Map?new Map:void 0;return s=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return c(t,arguments,l(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,t)},s(t)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function c(t,e,r){return c=u()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&f(i,r.prototype),i},c.apply(null,arguments)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}var d=r(15895).inspect,p=r(97300).codes.ERR_INVALID_ARG_TYPE;function v(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}var m="",y="",g="",b="",w={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function x(t){return d(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function k(t,e,r){var n="",i="",o=0,a="",s=!1,u=x(t),c=u.split("\n"),f=x(e).split("\n"),l=0,d="";if("strictEqual"===r&&"object"===h(t)&&"object"===h(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===c.length&&1===f.length&&c[0]!==f[0]){var p=c[0].length+f[0].length;if(p<=10){if(!("object"===h(t)&&null!==t||"object"===h(e)&&null!==e||0===t&&0===e))return"".concat(w[r],"\n\n")+"".concat(c[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r){if(p<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;c[0][l]===f[0][l];)l++;l>2&&(d="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",l),"^"),l=0)}}}for(var _=c[c.length-1],k=f[f.length-1];_===k&&(l++<2?a="\n ".concat(_).concat(a):n=_,c.pop(),f.pop(),0!==c.length&&0!==f.length);)_=c[c.length-1],k=f[f.length-1];var E=Math.max(c.length,f.length);if(0===E){var M=u.split("\n");if(M.length>30)for(M[26]="".concat(m,"...").concat(b);M.length>27;)M.pop();return"".concat(w.notIdentical,"\n\n").concat(M.join("\n"),"\n")}l>3&&(a="\n".concat(m,"...").concat(b).concat(a),s=!0),""!==n&&(a="\n ".concat(n).concat(a),n="");var A=0,S=w[r]+"\n".concat(y,"+ actual").concat(b," ").concat(g,"- expected").concat(b),R=" ".concat(m,"...").concat(b," Lines skipped");for(l=0;l<E;l++){var P=l-o;if(c.length<l+1)P>1&&l>2&&(P>4?(i+="\n".concat(m,"...").concat(b),s=!0):P>3&&(i+="\n ".concat(f[l-2]),A++),i+="\n ".concat(f[l-1]),A++),o=l,n+="\n".concat(g,"-").concat(b," ").concat(f[l]),A++;else if(f.length<l+1)P>1&&l>2&&(P>4?(i+="\n".concat(m,"...").concat(b),s=!0):P>3&&(i+="\n ".concat(c[l-2]),A++),i+="\n ".concat(c[l-1]),A++),o=l,i+="\n".concat(y,"+").concat(b," ").concat(c[l]),A++;else{var T=f[l],O=c[l],I=O!==T&&(!v(O,",")||O.slice(0,-1)!==T);I&&v(T,",")&&T.slice(0,-1)===O&&(I=!1,O+=","),I?(P>1&&l>2&&(P>4?(i+="\n".concat(m,"...").concat(b),s=!0):P>3&&(i+="\n ".concat(c[l-2]),A++),i+="\n ".concat(c[l-1]),A++),o=l,i+="\n".concat(y,"+").concat(b," ").concat(O),n+="\n".concat(g,"-").concat(b," ").concat(T),A+=2):(i+=n,n="",1!==P&&0!==l||(i+="\n ".concat(O),A++))}if(A>20&&l<E-2)return"".concat(S).concat(R,"\n").concat(i,"\n").concat(m,"...").concat(b).concat(n,"\n")+"".concat(m,"...").concat(b)}return"".concat(S).concat(s?R:"","\n").concat(i).concat(n).concat(a).concat(d)}var E=function(t){function e(t){var r;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),"object"!==h(t)||null===t)throw new p("options","Object",t);var n=t.message,i=t.operator,s=t.stackStartFn,u=t.actual,c=t.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)r=o(this,l(e).call(this,String(n)));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(m="",y="",b="",g=""):(m="",y="",b="",g="")),"object"===h(u)&&null!==u&&"object"===h(c)&&null!==c&&"stack"in u&&u instanceof Error&&"stack"in c&&c instanceof Error&&(u=_(u),c=_(c)),"deepStrictEqual"===i||"strictEqual"===i)r=o(this,l(e).call(this,k(u,c,i)));else if("notDeepStrictEqual"===i||"notStrictEqual"===i){var d=w[i],v=x(u).split("\n");if("notStrictEqual"===i&&"object"===h(u)&&null!==u&&(d=w.notStrictEqualObject),v.length>30)for(v[26]="".concat(m,"...").concat(b);v.length>27;)v.pop();r=1===v.length?o(this,l(e).call(this,"".concat(d," ").concat(v[0]))):o(this,l(e).call(this,"".concat(d,"\n\n").concat(v.join("\n"),"\n")))}else{var E=x(u),M="",A=w[i];"notDeepEqual"===i||"notEqual"===i?(E="".concat(w[i],"\n\n").concat(E)).length>1024&&(E="".concat(E.slice(0,1021),"...")):(M="".concat(x(c)),E.length>512&&(E="".concat(E.slice(0,509),"...")),M.length>512&&(M="".concat(M.slice(0,509),"...")),"deepEqual"===i||"equal"===i?E="".concat(A,"\n\n").concat(E,"\n\nshould equal\n\n"):M=" ".concat(i," ").concat(M)),r=o(this,l(e).call(this,"".concat(E).concat(M)))}return Error.stackTraceLimit=f,r.generatedMessage=!n,Object.defineProperty(a(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=u,r.expected=c,r.operator=i,Error.captureStackTrace&&Error.captureStackTrace(a(r),s),r.stack,r.name="AssertionError",o(r)}var r,s,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(e,t),r=e,s=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:d.custom,value:function(t,e){return d(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),i.forEach((function(e){n(t,e,r[e])}))}return t}({},e,{customInspect:!1,depth:0}))}}],s&&i(r.prototype,s),u&&i(r,u),e}(s(Error));t.exports=E},97300:function(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}var s,u,c={};function f(t,e,r){r||(r=Error);var n=function(r){function n(r,a,s){var u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),u=i(this,o(n).call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,a,s))),u.code=t,u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(n,r),n}(r);c[t]=n}function l(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",(function(t,e,i){var o,a,u,c;if(void 0===s&&(s=r(43438)),s("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(a="not ",e.substr(!u||u<0?0:+u,a.length)===a)?(o="must not be",e=e.replace(/^not /,"")):o="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))c="The ".concat(t," ").concat(o," ").concat(l(e,"type"));else{var f=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";c='The "'.concat(t,'" ').concat(f," ").concat(o," ").concat(l(e,"type"))}return c+=". Received type ".concat(n(i))}),TypeError),f("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===u&&(u=r(15895));var i=u.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),f("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),f("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];void 0===s&&(s=r(43438)),s(e.length>0,"At least one arg needs to be specified");var i="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,o-1).join(", "),i+=", and ".concat(e[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),t.exports.codes=c},3451:function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(u){i=!0,o=u}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var o=void 0!==/a/g.flags,a=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},s=function(t){var e=[];return t.forEach((function(t,r){return e.push([r,t])})),e},u=Object.is?Object.is:r(2548),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(8525);function l(t){return t.call.bind(t)}var h=l(Object.prototype.hasOwnProperty),d=l(Object.prototype.propertyIsEnumerable),p=l(Object.prototype.toString),v=r(15895).types,m=v.isAnyArrayBuffer,y=v.isArrayBufferView,g=v.isDate,b=v.isMap,w=v.isRegExp,_=v.isSet,x=v.isNativeError,k=v.isBoxedPrimitive,E=v.isNumberObject,M=v.isStringObject,A=v.isBooleanObject,S=v.isBigIntObject,R=v.isSymbolObject,P=v.isFloat32Array,T=v.isFloat64Array;function O(t){if(0===t.length||t.length>10)return!0;for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(r<48||r>57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function I(t){return Object.keys(t).filter(O).concat(c(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function C(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function N(t,e,r,n){if(t===e)return 0!==t||(!r||u(t,e));if(r){if("object"!==i(t))return"number"==typeof t&&f(t)&&f(e);if("object"!==i(e)||null===t||null===e)return!1;if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1}else{if(null===t||"object"!==i(t))return(null===e||"object"!==i(e))&&t==e;if(null===e||"object"!==i(e))return!1}var a,s,c,l,h=p(t);if(h!==p(e))return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;var d=I(t),v=I(e);return d.length===v.length&&B(t,e,r,n,1,d)}if("[object Object]"===h&&(!b(t)&&b(e)||!_(t)&&_(e)))return!1;if(g(t)){if(!g(e)||Date.prototype.getTime.call(t)!==Date.prototype.getTime.call(e))return!1}else if(w(t)){if(!w(e)||(c=t,l=e,!(o?c.source===l.source&&c.flags===l.flags:RegExp.prototype.toString.call(c)===RegExp.prototype.toString.call(l))))return!1}else if(x(t)||t instanceof Error){if(t.message!==e.message||t.name!==e.name)return!1}else{if(y(t)){if(r||!P(t)&&!T(t)){if(!function(t,e){return t.byteLength===e.byteLength&&0===C(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}(t,e))return!1}else if(!function(t,e){if(t.byteLength!==e.byteLength)return!1;for(var r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}(t,e))return!1;var O=I(t),N=I(e);return O.length===N.length&&B(t,e,r,n,0,O)}if(_(t))return!(!_(e)||t.size!==e.size)&&B(t,e,r,n,2);if(b(t))return!(!b(e)||t.size!==e.size)&&B(t,e,r,n,3);if(m(t)){if(s=e,(a=t).byteLength!==s.byteLength||0!==C(new Uint8Array(a),new Uint8Array(s)))return!1}else if(k(t)&&!function(t,e){return E(t)?E(e)&&u(Number.prototype.valueOf.call(t),Number.prototype.valueOf.call(e)):M(t)?M(e)&&String.prototype.valueOf.call(t)===String.prototype.valueOf.call(e):A(t)?A(e)&&Boolean.prototype.valueOf.call(t)===Boolean.prototype.valueOf.call(e):S(t)?S(e)&&BigInt.prototype.valueOf.call(t)===BigInt.prototype.valueOf.call(e):R(e)&&Symbol.prototype.valueOf.call(t)===Symbol.prototype.valueOf.call(e)}(t,e))return!1}return B(t,e,r,n,0)}function L(t,e){return e.filter((function(e){return d(t,e)}))}function B(t,e,r,n,i,o){if(5===arguments.length){o=Object.keys(t);var a=Object.keys(e);if(o.length!==a.length)return!1}for(var s=0;s<o.length;s++)if(!h(e,o[s]))return!1;if(r&&5===arguments.length){var u=c(t);if(0!==u.length){var f=0;for(s=0;s<u.length;s++){var l=u[s];if(d(t,l)){if(!d(e,l))return!1;o.push(l),f++}else if(d(e,l))return!1}var p=c(e);if(u.length!==p.length&&L(e,p).length!==f)return!1}else{var v=c(e);if(0!==v.length&&0!==L(e,v).length)return!1}}if(0===o.length&&(0===i||1===i&&0===t.length||0===t.size))return!0;if(void 0===n)n={val1:new Map,val2:new Map,position:0};else{var m=n.val1.get(t);if(void 0!==m){var y=n.val2.get(e);if(void 0!==y)return m===y}n.position++}n.val1.set(t,n.position),n.val2.set(e,n.position);var g=z(t,e,r,o,n,i);return n.val1.delete(t),n.val2.delete(e),g}function j(t,e,r,n){for(var i=a(t),o=0;o<i.length;o++){var s=i[o];if(N(e,s,r,n))return t.delete(s),!0}return!1}function U(t){switch(i(t)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":t=+t;case"number":if(f(t))return!1}return!0}function F(t,e,r){var n=U(r);return null!=n?n:e.has(n)&&!t.has(n)}function q(t,e,r,n,i){var o=U(r);if(null!=o)return o;var a=e.get(o);return!(void 0===a&&!e.has(o)||!N(n,a,!1,i))&&(!t.has(o)&&N(n,a,!1,i))}function D(t,e,r,n,i,o){for(var s=a(t),u=0;u<s.length;u++){var c=s[u];if(N(r,c,i,o)&&N(n,e.get(c),i,o))return t.delete(c),!0}return!1}function z(t,e,r,o,u,c){var f=0;if(2===c){if(!function(t,e,r,n){for(var o=null,s=a(t),u=0;u<s.length;u++){var c=s[u];if("object"===i(c)&&null!==c)null===o&&(o=new Set),o.add(c);else if(!e.has(c)){if(r)return!1;if(!F(t,e,c))return!1;null===o&&(o=new Set),o.add(c)}}if(null!==o){for(var f=a(e),l=0;l<f.length;l++){var h=f[l];if("object"===i(h)&&null!==h){if(!j(o,h,r,n))return!1}else if(!r&&!t.has(h)&&!j(o,h,r,n))return!1}return 0===o.size}return!0}(t,e,r,u))return!1}else if(3===c){if(!function(t,e,r,o){for(var a=null,u=s(t),c=0;c<u.length;c++){var f=n(u[c],2),l=f[0],h=f[1];if("object"===i(l)&&null!==l)null===a&&(a=new Set),a.add(l);else{var d=e.get(l);if(void 0===d&&!e.has(l)||!N(h,d,r,o)){if(r)return!1;if(!q(t,e,l,h,o))return!1;null===a&&(a=new Set),a.add(l)}}}if(null!==a){for(var p=s(e),v=0;v<p.length;v++){var m=n(p[v],2),y=(l=m[0],m[1]);if("object"===i(l)&&null!==l){if(!D(a,t,l,y,r,o))return!1}else if(!(r||t.has(l)&&N(t.get(l),y,!1,o)||D(a,t,l,y,!1,o)))return!1}return 0===a.size}return!0}(t,e,r,u))return!1}else if(1===c)for(;f<t.length;f++){if(!h(t,f)){if(h(e,f))return!1;for(var l=Object.keys(t);f<l.length;f++){var d=l[f];if(!h(e,d)||!N(t[d],e[d],r,u))return!1}return l.length===Object.keys(e).length}if(!h(e,f)||!N(t[f],e[f],r,u))return!1}for(f=0;f<o.length;f++){var p=o[f];if(!N(t[p],e[p],r,u))return!1}return!0}t.exports={isDeepEqual:function(t,e){return N(t,e,false)},isDeepStrictEqual:function(t,e){return N(t,e,true)}}},61083:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(79900),i=r(88992),o=function(){function t(){this._semaphore=new i.default(1)}return t.prototype.acquire=function(){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(e){switch(e.label){case 0:return[4,this._semaphore.acquire()];case 1:return t=e.sent(),[2,t[1]]}}))}))},t.prototype.runExclusive=function(t){return this._semaphore.runExclusive((function(){return t()}))},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();e.default=o},88992:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(79900),i=function(){function t(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return t.prototype.acquire=function(){var t=this,e=this.isLocked(),r=new Promise((function(e){return t._queue.push(e)}));return e||this._dispatch(),r},t.prototype.runExclusive=function(t){return n.__awaiter(this,void 0,void 0,(function(){var e,r,i;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,this.acquire()];case 1:e=n.sent(),r=e[0],i=e[1],n.label=2;case 2:return n.trys.push([2,,4,5]),[4,t(r)];case 3:return[2,n.sent()];case 4:return i(),[7];case 5:return[2]}}))}))},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},t.prototype._dispatch=function(){var t=this,e=this._queue.shift();if(e){var r=!1;this._currentReleaser=function(){r||(r=!0,t._value++,t._dispatch())},e([this._value--,this._currentReleaser])}},t}();e.default=i},8255:function(t,e,r){"use strict";e.WU=void 0;var n=r(61083);Object.defineProperty(e,"WU",{enumerable:!0,get:function(){return n.default}});var i=r(88992);var o=r(10298)},10298:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withTimeout=void 0;var n=r(79900);e.withTimeout=function(t,e,r){var i=this;return void 0===r&&(r=new Error("timeout")),{acquire:function(){return new Promise((function(o,a){return n.__awaiter(i,void 0,void 0,(function(){var i,s;return n.__generator(this,(function(n){switch(n.label){case 0:return i=!1,setTimeout((function(){i=!0,a(r)}),e),[4,t.acquire()];case 1:return s=n.sent(),i?(Array.isArray(s)?s[1]:s)():o(s),[2]}}))}))}))},runExclusive:function(t){return n.__awaiter(this,void 0,void 0,(function(){var e,r;return n.__generator(this,(function(n){switch(n.label){case 0:e=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)?(e=r[1],[4,t(r[0])]):[3,4];case 3:return[2,n.sent()];case 4:return e=r,[4,t()];case 5:return[2,n.sent()];case 6:return[3,8];case 7:return e(),[7];case 8:return[2]}}))}))},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}},37720:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,i.default)((function(e,r){var i;try{i=t.apply(this,e)}catch(o){return r(o)}(0,n.default)(i)&&"function"==typeof i.then?i.then((function(t){s(r,null,t)}),(function(t){s(r,t.message?t:new Error(t))})):r(null,i)}))};var n=a(r(13218)),i=a(r(40836)),o=a(r(82260));function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e,r){try{t(e,r)}catch(n){(0,o.default)(u,n)}}function u(t){throw t}t.exports=e.default},75139:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,a){(0,n.default)(e)(t,(0,i.default)((0,o.default)(r)),a)};var n=a(r(33558)),i=a(r(53791)),o=a(r(36897));function a(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},17149:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){((0,n.default)(t)?h:d)(t,(0,f.default)(e),r)};var n=l(r(98612)),i=l(r(10541)),o=l(r(70583)),a=l(r(23461)),s=l(r(50308)),u=l(r(41253)),c=l(r(38361)),f=l(r(36897));function l(t){return t&&t.__esModule?t:{default:t}}function h(t,e,r){r=(0,u.default)(r||s.default);var n=0,o=0,a=t.length;function f(t,e){t?r(t):++o!==a&&e!==i.default||r(null)}for(0===a&&r(null);n<a;n++)e(t[n],n,(0,c.default)(f))}var d=(0,a.default)(o.default,1/0);t.exports=e.default},70583:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,o){(0,n.default)(e)(t,(0,i.default)(r),o)};var n=o(r(33558)),i=o(r(36897));function o(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},25205:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(r(75139)),i=o(r(23461));function o(t){return t&&t.__esModule?t:{default:t}}e.default=(0,i.default)(n.default,1),t.exports=e.default},10541:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={},t.exports=e.default},23461:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return function(r,n,i){return t(r,e,n,i)}},t.exports=e.default},5736:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,r,o){return t(n.default,e,(0,i.default)(r),o)}};var n=o(r(17149)),i=o(r(36897));function o(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},33558:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,r,u){if(u=(0,i.default)(u||n.default),t<=0||!e)return u(null);var c=(0,o.default)(e),f=!1,l=0,h=!1;function d(t,e){if(l-=1,t)f=!0,u(t);else{if(e===s.default||f&&l<=0)return f=!0,u(null);h||p()}}function p(){for(h=!0;l<t&&!f;){var e=c();if(null===e)return f=!0,void(l<=0&&u(null));l+=1,r(e.value,e.key,(0,a.default)(d))}h=!1}p()}};var n=u(r(50308)),i=u(r(41253)),o=u(r(51143)),a=u(r(38361)),s=u(r(10541));function u(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},70712:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return r&&t[r]&&t[r]()};var r="function"==typeof Symbol&&Symbol.iterator;t.exports=e.default},40836:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){var e=(0,o.default)(arguments),r=e.pop();t.call(this,e,r)}};var n,i=r(31020),o=(n=i)&&n.__esModule?n:{default:n};t.exports=e.default},51143:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if((0,n.default)(t))return function(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}(t);var e=(0,i.default)(t);return e?function(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}(e):(r=t,a=(0,o.default)(r),s=-1,u=a.length,function(){var t=a[++s];return s<u?{value:r[t],key:t}:null});var r,a,s,u};var n=a(r(98612)),i=a(r(70712)),o=a(r(3674));function a(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},81268:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,o){o=o||n.default,e=e||[];var a=[],s=0,u=(0,i.default)(r);t(e,(function(t,e,r){var n=s++;u(t,(function(t,e){a[n]=e,r(t)}))}),(function(t){o(t,a)}))};var n=o(r(50308)),i=o(r(36897));function o(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},41253:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){if(null!==t){var e=t;t=null,e.apply(this,arguments)}}},t.exports=e.default},38361:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}},t.exports=e.default},97218:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){r=r||n.default;var s=(0,i.default)(e)?[]:{};t(e,(function(t,e,r){(0,a.default)(t)((function(t,n){arguments.length>2&&(n=(0,o.default)(arguments,1)),s[e]=n,r(t)}))}),(function(t){r(t,s)}))};var n=s(r(50308)),i=s(r(98612)),o=s(r(31020)),a=s(r(36897));function s(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},82260:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasNextTick=e.hasSetImmediate=void 0,e.fallback=c,e.wrap=f;var n,i=r(31020),o=(n=i)&&n.__esModule?n:{default:n};var a,s=e.hasSetImmediate="function"==typeof setImmediate&&setImmediate,u=e.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;function c(t){setTimeout(t,0)}function f(t){return function(e){var r=(0,o.default)(arguments,1);t((function(){e.apply(null,r)}))}}a=s?setImmediate:u?process.nextTick:c,e.default=f(a)},31020:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){e|=0;for(var r=Math.max(t.length-e,0),n=Array(r),i=0;i<r;i++)n[i]=t[e+i];return n},t.exports=e.default},53791:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,r,n){return t(e,n)}},t.exports=e.default},36897:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=void 0;var n,i=r(37720),o=(n=i)&&n.__esModule?n:{default:n};var a="function"==typeof Symbol;function s(t){return a&&"AsyncFunction"===t[Symbol.toStringTag]}e.default=function(t){return s(t)?(0,o.default)(t):t},e.isAsync=s},76800:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(r(5736)),i=o(r(81268));function o(t){return t&&t.__esModule?t:{default:t}}e.default=(0,n.default)(i.default),t.exports=e.default},26070:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,i.default)(n.default,t,e)};var n=o(r(17149)),i=o(r(97218));function o(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},33376:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(e=(0,o.default)(e||i.default),!(0,n.default)(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function c(e){var n=(0,u.default)(t[r++]);e.push((0,s.default)(f)),n.apply(null,e)}function f(n){if(n||r===t.length)return e.apply(null,arguments);c((0,a.default)(arguments,1))}c([])};var n=c(r(1469)),i=c(r(50308)),o=c(r(41253)),a=c(r(31020)),s=c(r(38361)),u=c(r(36897));function c(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},97302:function(t,e,r){"use strict";r(65743);var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e<n.length;e++)"function"==typeof i[n[e]]&&(t[t.length]=n[e]);return t}},19095:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=u(t),a=o[0],s=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),f=0,l=s>0?a-4:a;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[f++]=255&e);1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(c(t,s,s+a>u?u:s+a));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},15246:function(t){"use strict";for(var e="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<e.length;n++){var i=e.charAt(n);if(void 0!==r[i])throw new TypeError(i+" is ambiguous");r[i]=n}function o(t){var e=t>>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function a(t){for(var e=1,r=0;r<t.length;++r){var n=t.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+t+")";e=o(e)^n>>5}for(e=o(e),r=0;r<t.length;++r){var i=t.charCodeAt(r);e=o(e)^31&i}return e}function s(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var n=t.toLowerCase(),i=t.toUpperCase();if(t!==n&&t!==i)return"Mixed-case string "+t;var s=(t=n).lastIndexOf("1");if(-1===s)return"No separator character for "+t;if(0===s)return"Missing prefix for "+t;var u=t.slice(0,s),c=t.slice(s+1);if(c.length<6)return"Data too short";var f=a(u);if("string"==typeof f)return f;for(var l=[],h=0;h<c.length;++h){var d=c.charAt(h),p=r[d];if(void 0===p)return"Unknown character "+d;f=o(f)^p,h+6>=c.length||l.push(p)}return 1!==f?"Invalid checksum for "+t:{prefix:u,words:l}}function u(t,e,r,n){for(var i=0,o=0,a=(1<<r)-1,s=[],u=0;u<t.length;++u)for(i=i<<e|t[u],o+=e;o>=r;)o-=r,s.push(i>>o&a);if(n)o>0&&s.push(i<<r-o&a);else{if(o>=e)return"Excess padding";if(i<<r-o&a)return"Non-zero padding"}return s}t.exports={decodeUnsafe:function(){var t=s.apply(null,arguments);if("object"==typeof t)return t},decode:function(t){var e=s.apply(null,arguments);if("object"==typeof e)return e;throw new Error(e)},encode:function(t,r,n){if(n=n||90,t.length+7+r.length>n)throw new TypeError("Exceeds length limit");var i=a(t=t.toLowerCase());if("string"==typeof i)throw new Error(i);for(var s=t+"1",u=0;u<r.length;++u){var c=r[u];if(c>>5!=0)throw new Error("Non 5-bit word");i=o(i)^c,s+=e.charAt(c)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u){s+=e.charAt(i>>5*(5-u)&31)}return s},toWordsUnsafe:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e},toWords:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e;throw new Error(e)},fromWordsUnsafe:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e},fromWords:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}}},85639:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(46601).Buffer}catch(M){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a<o;a++){var s=t.charCodeAt(a)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=n)u=c(t,f,f+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=c(t,f,t.length,e),f=0;f<a;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","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"],l=[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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>24-i&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=l[t],d=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var v=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?v+r:f[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s<o;s++)c[s]=0}else{for(s=0;s<o-i;s++)c[s]=0;for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[o-s-1]=a}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a<n.length;a++)o=(e=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,a=t.words,s=e.words,u=r.words,c=0,f=0|a[0],l=8191&f,h=f>>>13,d=0|a[1],p=8191&d,v=d>>>13,m=0|a[2],y=8191&m,g=m>>>13,b=0|a[3],w=8191&b,_=b>>>13,x=0|a[4],k=8191&x,E=x>>>13,M=0|a[5],A=8191&M,S=M>>>13,R=0|a[6],P=8191&R,T=R>>>13,O=0|a[7],I=8191&O,C=O>>>13,N=0|a[8],L=8191&N,B=N>>>13,j=0|a[9],U=8191&j,F=j>>>13,q=0|s[0],D=8191&q,z=q>>>13,H=0|s[1],V=8191&H,W=H>>>13,K=0|s[2],G=8191&K,Z=K>>>13,J=0|s[3],$=8191&J,Y=J>>>13,X=0|s[4],Q=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,vt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(l,D))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,D)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,z))+Math.imul(v,D)|0,o=Math.imul(v,z);var yt=(c+(n=n+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,D),i=(i=Math.imul(y,z))+Math.imul(g,D)|0,o=Math.imul(g,z),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,W)|0;var gt=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(w,D),i=(i=Math.imul(w,z))+Math.imul(_,D)|0,o=Math.imul(_,z),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Z)|0;var bt=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(k,D),i=(i=Math.imul(k,z))+Math.imul(E,D)|0,o=Math.imul(E,z),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,Y)|0;var wt=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,z))+Math.imul(S,D)|0,o=Math.imul(S,z),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0;var _t=(c+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(P,D),i=(i=Math.imul(P,z))+Math.imul(T,D)|0,o=Math.imul(T,z),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0;var xt=(c+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(I,D),i=(i=Math.imul(I,z))+Math.imul(C,D)|0,o=Math.imul(C,z),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0;var kt=(c+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,D),i=(i=Math.imul(L,z))+Math.imul(B,D)|0,o=Math.imul(B,z),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ct)|0;var Et=(c+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(U,D),i=(i=Math.imul(U,z))+Math.imul(F,D)|0,o=Math.imul(F,z),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ht)|0;var Mt=(c+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,vt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,vt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,ht)|0;var At=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,vt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,vt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,Z))+Math.imul(F,G)|0,o=Math.imul(F,Z),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,vt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,vt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ht)|0;var Rt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,vt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,vt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ct)|0,n=n+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ht)|0;var Pt=(c+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,vt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,vt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ht)|0;var Tt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,vt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,vt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ht)|0;var Ot=(c+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,vt)|0)+Math.imul(T,pt)|0))<<13)|0;c=((o=o+Math.imul(T,vt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(B,lt)|0,o=o+Math.imul(B,ht)|0;var It=(c+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,vt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,vt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(U,lt),i=(i=Math.imul(U,ht))+Math.imul(F,lt)|0,o=Math.imul(F,ht);var Ct=(c+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,vt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,vt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863;var Nt=(c+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,vt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,vt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=mt,u[1]=yt,u[2]=gt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=xt,u[7]=kt,u[8]=Et,u[9]=Mt,u[10]=At,u[11]=St,u[12]=Rt,u[13]=Pt,u[14]=Tt,u[15]=Ot,u[16]=It,u[17]=Ct,u[18]=Nt,0!==c&&(u[19]=c,r.length++),r};function v(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var f=o-c,l=(0|t.words[f])*(0|e.words[c]),h=67108863&l;s=67108863&(h=h+s|0),i+=(a=(a=a+(l/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):v(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a<o;a++)n[a]=e[t[a]],i[a]=r[t[a]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var l=u,h=c,d=0;d<a;d++){var p=r[f+d],v=n[f+d],m=r[f+d+a],y=n[f+d+a],g=l*m-h*y;y=l*y+h*m,m=g,r[f+d]=p+m,n[f+d]=v+y,r[f+d+a]=p-m,n[f+d+a]=v-y,d!==s&&(g=u*l-c*h,h=u*h+c*l,l=g)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),l=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,f,l,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*l[d];u[d]=s[d]*l[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),v(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<r;this.words[e]=u|a,a=s>>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,a=t.length+r;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+s;var u=(0|t.words[i])*e;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0==(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function g(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){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 x(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var a=0|t.words[i];t.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,g),i(_,g),i(x,g),x.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return y[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var v=d,m=0;0!==v.cmp(s);m++)v=v.redSqr();n(m<p);var y=this.pow(l,new o(1).iushln(p-m-1));h=h.redMul(y),l=y.redSqr(),d=d.redMul(l),p=m}return h},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,k),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},72886:function(t,e,r){var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(89214);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(a){}},62426:function(t,e,r){"use strict";var n=r(19095),i=r(32846),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50;var a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|v(t,e),n=s(r),i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(D(t,Uint8Array)){var e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(D(t,ArrayBuffer)||t&&D(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(D(t,SharedArrayBuffer)||t&&D(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);var i=function(t){if(u.isBuffer(t)){var e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||z(t.length)?s(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return f(t),s(t<0?0:0|p(t))}function h(t){for(var e=t.length<0?0:0|p(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function d(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function p(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function v(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||D(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(i)return n?-1:U(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return M(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),z(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=r;o<s;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function w(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(z(s))return a;t[r+a]=s}return a}function _(t,e,r,n){return q(U(e,t.length-r),t,r,n)}function x(t,e,r,n){return q(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function k(t,e,r,n){return q(F(e),t,r,n)}function E(t,e,r,n){return q(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function M(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,u,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=S));return r}(n)}e.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(r){return!1}}(),u.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(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},u.allocUnsafe=function(t){return l(t)},u.allocUnsafeSlow=function(t){return l(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(D(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),D(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(D(o,Uint8Array))i+o.length>n.length?u.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},u.byteLength=v,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(D(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(n,i),f=t.slice(e,r),l=0;l<s;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":case"latin1":case"binary":return x(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function P(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function T(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=H[t[o]];return i}function O(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function I(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function N(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,n,o){return e=+e,r>>>=0,o||N(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,o){return e=+e,r>>>=0,o||N(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return t>>>=0,e||I(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||I(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||I(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||I(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=u.isBuffer(t)?t:u.from(t,n),s=a.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this};var j=/[^+/0-9A-Za-z-_]/g;function U(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function D(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function z(t){return t!=t}var H=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},98668:function(t){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},1096:function(t,e,r){"use strict";var n=r(22788),i=r(28463),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},28463:function(t,e,r){"use strict";var n=r(89579),i=r(22788),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(h){c=null}t.exports=function(t){var e=s(n,a,arguments);if(u&&c){var r=u(e,"length");r.configurable&&c(e,"length",{value:1+f(0,t.length-(arguments.length-1))})}return e};var l=function(){return s(n,o,arguments)};c?c(t.exports,"apply",{value:l}):t.exports.apply=l},22788:function(t,e,r){"use strict";var n;r(8628);var i=SyntaxError,o=Function,a=TypeError,s=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(R){u=null}var c=function(){throw new a},f=u?function(){try{return c}catch(t){try{return u(arguments,"callee").get}catch(e){return c}}}():c,l=r(98300)(),h=Object.getPrototypeOf||function(t){return t.__proto__},d={},p="undefined"==typeof Uint8Array?n:h(Uint8Array),v={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":l?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?h(h([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?h((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?h((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?h(""[Symbol.iterator]()):n,"%Symbol%":l?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":f,"%TypedArray%":p,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},m=function t(e){var r;if("%AsyncFunction%"===e)r=s("async function () {}");else if("%GeneratorFunction%"===e)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=s("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(r=h(i.prototype))}return v[e]=r,r},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},g=r(89579),b=r(18519),w=g.call(Function.call,Array.prototype.concat),_=g.call(Function.apply,Array.prototype.splice),x=g.call(Function.call,String.prototype.replace),k=g.call(Function.call,String.prototype.slice),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,A=function(t){var e=k(t,0,1),r=k(t,-1);if("%"===e&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return x(t,E,(function(t,e,r,i){n[n.length]=r?x(i,M,"$1"):e||t})),n},S=function(t,e){var r,n=t;if(b(y,n)&&(n="%"+(r=y[n])[0]+"%"),b(v,n)){var o=v[n];if(o===d&&(o=m(n)),void 0===o&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');var r=A(t),n=r.length>0?r[0]:"",o=S("%"+n+"%",e),s=o.name,c=o.value,f=!1,l=o.alias;l&&(n=l[0],_(r,w([0,1],l)));for(var h=1,d=!0;h<r.length;h+=1){var p=r[h],m=k(p,0,1),y=k(p,-1);if(('"'===m||"'"===m||"`"===m||'"'===y||"'"===y||"`"===y)&&m!==y)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&d||(f=!0),b(v,s="%"+(n+="."+p)+"%"))c=v[s];else if(null!=c){if(!(p in c)){if(!e)throw new a("base intrinsic for "+t+" exists, but the property is not available.");return}if(u&&h+1>=r.length){var g=u(c,p);c=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else d=b(c,p),c=c[p];d&&!f&&(v[s]=c)}}return c}},74811:function(t){"use strict";var e=function(t,e){if("string"!=typeof t&&!Array.isArray(t))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);var r;return t=Array.isArray(t)?t.map((function(t){return t.trim()})).filter((function(t){return t.length})).join("-"):t.trim(),0===t.length?"":1===t.length?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=function(t){for(var e=!1,r=!1,n=!1,i=0;i<t.length;i++){var o=t[i];e&&/[a-zA-Z]/.test(o)&&o.toUpperCase()===o?(t=t.slice(0,i)+"-"+t.slice(i),e=!1,n=r,r=!0,i++):r&&n&&/[a-zA-Z]/.test(o)&&o.toLowerCase()===o?(t=t.slice(0,i-1)+"-"+t.slice(i-1),n=r,r=!1,e=!0):(e=o.toLowerCase()===o&&o.toUpperCase()!==o,n=r,r=o.toUpperCase()===o&&o.toLowerCase()!==o)}return t}(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(function(t,e){return e.toUpperCase()})).replace(/\d+(\w|$)/g,(function(t){return t.toUpperCase()})),r=t,e.pascalCase?r.charAt(0).toUpperCase()+r.slice(1):r)};t.exports=e,t.exports.default=e},23393:function(t,e,r){var n=r(26143).Buffer,i=r(12708).Transform,o=r(62289).s;function a(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(13247)(a,i),a.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(i){n=i}finally{r(n)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},a.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=a},28551:function(t,e){!function(){"use strict";function t(e,r,n,i){return this instanceof t?(this.domain=e||void 0,this.path=r||"/",this.secure=!!n,this.script=!!i,this):new t(e,r,n,i)}function r(t,e,n){return t instanceof r?t:this instanceof r?(this.name=null,this.value=null,this.expiration_date=1/0,this.path=String(n||"/"),this.explicit_path=!1,this.domain=e||null,this.explicit_domain=!1,this.secure=!1,this.noscript=!1,t&&this.parse(t,e,n),this):new r(t,e,n)}t.All=Object.freeze(Object.create(null)),e.CookieAccessInfo=t,e.Cookie=r,r.prototype.toString=function(){var t=[this.name+"="+this.value];return this.expiration_date!==1/0&&t.push("expires="+new Date(this.expiration_date).toGMTString()),this.domain&&t.push("domain="+this.domain),this.path&&t.push("path="+this.path),this.secure&&t.push("secure"),this.noscript&&t.push("httponly"),t.join("; ")},r.prototype.toValueString=function(){return this.name+"="+this.value};var n=/[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g;function i(){var t,e;return this instanceof i?(t=Object.create(null),this.setCookie=function(n,i,o){var a,s;if(a=(n=new r(n,i,o)).expiration_date<=Date.now(),void 0!==t[n.name]){for(e=t[n.name],s=0;s<e.length;s+=1)if(e[s].collidesWith(n))return a?(e.splice(s,1),0===e.length&&delete t[n.name],!1):(e[s]=n,n);return!a&&(e.push(n),n)}return!a&&(t[n.name]=[n],t[n.name])},this.getCookie=function(r,n){var i,o;if(e=t[r])for(o=0;o<e.length;o+=1)if((i=e[o]).expiration_date<=Date.now())0===e.length&&delete t[i.name];else if(i.matches(n))return i},this.getCookies=function(e){var r,n,i=[];for(r in t)(n=this.getCookie(r,e))&&i.push(n);return i.toString=function(){return i.join(":")},i.toValueString=function(){return i.map((function(t){return t.toValueString()})).join("; ")},i},this):new i}r.prototype.parse=function(t,e,n){if(this instanceof r){var i,o=t.split(";").filter((function(t){return!!t})),a=o[0].match(/([^=]+)=([\s\S]*)/);if(!a)return void console.warn("Invalid cookie header encountered. Header: '"+t+"'");var s=a[1],u=a[2];if("string"!=typeof s||0===s.length||"string"!=typeof u)return void console.warn("Unable to extract values from cookie header. Cookie: '"+t+"'");for(this.name=s,this.value=u,i=1;i<o.length;i+=1)switch(s=(a=o[i].match(/([^=]+)(?:=([\s\S]*))?/))[1].trim().toLowerCase(),u=a[2],s){case"httponly":this.noscript=!0;break;case"expires":this.expiration_date=u?Number(Date.parse(u)):1/0;break;case"path":this.path=u?u.trim():"",this.explicit_path=!0;break;case"domain":this.domain=u?u.trim():"",this.explicit_domain=!!this.domain;break;case"secure":this.secure=!0}return this.explicit_path||(this.path=n||"/"),this.explicit_domain||(this.domain=e),this}return(new r).parse(t,e,n)},r.prototype.matches=function(e){return e===t.All||!(this.noscript&&e.script||this.secure&&!e.secure||!this.collidesWith(e))},r.prototype.collidesWith=function(t){if(this.path&&!t.path||this.domain&&!t.domain)return!1;if(this.path&&0!==t.path.indexOf(this.path))return!1;if(this.explicit_path&&0!==t.path.indexOf(this.path))return!1;var e=t.domain&&t.domain.replace(/^[\.]/,""),r=this.domain&&this.domain.replace(/^[\.]/,"");if(r===e)return!0;if(r){if(!this.explicit_domain)return!1;var n=e.indexOf(r);return-1!==n&&n===e.length-r.length}return!0},e.CookieJar=i,i.prototype.setCookies=function(t,e,i){var o,a,s=[];for(t=(t=Array.isArray(t)?t:t.split(n)).map((function(t){return new r(t,e,i)})),o=0;o<t.length;o+=1)a=t[o],this.setCookie(a,e,i)&&s.push(a);return s}}()},98604:function(t,e,r){"use strict";var n=r(13247),i=r(2723),o=r(40220),a=r(55220),s=r(23393);function u(t){s.call(this,"digest"),this._hash=t}n(u,s),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(a(t))}},7091:function(t){"use strict";var e="%[a-f0-9]{2}",r=new RegExp(e,"gi"),n=new RegExp("("+e+")+","gi");function i(t,e){try{return decodeURIComponent(t.join(""))}catch(o){}if(1===t.length)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],i(r),i(n))}function o(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(r),n=1;n<e.length;n++)e=(t=i(e,n).join("")).match(r);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var r={"%FE%FF":"<22><>","%FF%FE":"<22><>"},i=n.exec(t);i;){try{r[i[0]]=decodeURIComponent(i[0])}catch(e){var a=o(i[0]);a!==i[0]&&(r[i[0]]=a)}i=n.exec(t)}r["%C2"]="<22>";for(var s=Object.keys(r),u=0;u<s.length;u++){var c=s[u];t=t.replace(new RegExp(c,"g"),r[c])}return t}(t)}}},21415:function(t){"use strict";var e={single_source_shortest_paths:function(t,r,n){var i={},o={};o[r]=0;var a,s,u,c,f,l,h,d=e.PriorityQueue.make();for(d.push(r,0);!d.empty();)for(u in s=(a=d.pop()).value,c=a.cost,f=t[s]||{})f.hasOwnProperty(u)&&(l=c+f[u],h=o[u],(void 0===o[u]||h>l)&&(o[u]=l,d.push(u,l),i[u]=s));if(void 0!==n&&void 0===o[n]){var p=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(p)}return i},extract_shortest_path_from_predecessor_list:function(t,e){for(var r=[],n=e;n;)r.push(n),t[n],n=t[n];return r.reverse(),r},find_path:function(t,r,n){var i=e.single_source_shortest_paths(t,r,n);return e.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(t){var r,n=e.PriorityQueue,i={};for(r in t=t||{},n)n.hasOwnProperty(r)&&(i[r]=n[r]);return i.queue=[],i.sorter=t.sorter||n.default_sorter,i},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var r={value:t,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},3039:function(t,e,r){"use strict";var n=e;n.version=r(18597).i8,n.utils=r(56549),n.rand=r(72886),n.curve=r(11275),n.curves=r(88673),n.ec=r(3096),n.eddsa=r(24751)},44884:function(t,e,r){"use strict";var n=r(85639),i=r(56549),o=i.getNAF,a=i.getJSF,s=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.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=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.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 c(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){s(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var a,u,c=[];for(a=0;a<n.length;a+=r.step){u=0;for(var f=a+r.step-1;f>=a;f--)u=(u<<1)+n[f];c.push(u)}for(var l=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a<c.length;a++)(u=c[a])===d?h=h.mixedAdd(r.points[a]):u===-d&&(h=h.mixedAdd(r.points[a].neg()));l=l.add(h)}return l.toP()},u.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=o(e,r,this._bitLength),u=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var f=0;c>=0&&0===a[c];c--)f++;if(c>=0&&f++,u=u.dblp(f),c<0)break;var l=a[c];s(0!==l),u="affine"===t.type?l>0?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):l>0?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){var s,u,c,f=this._wnafT1,l=this._wnafT2,h=this._wnafT3,d=0;for(s=0;s<n;s++){var p=(c=e[s])._getNAFPoints(t);f[s]=p.wnd,l[s]=p.points}for(s=n-1;s>=1;s-=2){var v=s-1,m=s;if(1===f[v]&&1===f[m]){var y=[e[v],null,null,e[m]];0===e[v].y.cmp(e[m].y)?(y[1]=e[v].add(e[m]),y[2]=e[v].toJ().mixedAdd(e[m].neg())):0===e[v].y.cmp(e[m].y.redNeg())?(y[1]=e[v].toJ().mixedAdd(e[m]),y[2]=e[v].add(e[m].neg())):(y[1]=e[v].toJ().mixedAdd(e[m]),y[2]=e[v].toJ().mixedAdd(e[m].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],b=a(r[v],r[m]);for(d=Math.max(b[0].length,d),h[v]=new Array(d),h[m]=new Array(d),u=0;u<d;u++){var w=0|b[0][u],_=0|b[1][u];h[v][u]=g[3*(w+1)+(_+1)],h[m][u]=0,l[v]=y}}else h[v]=o(r[v],f[v],this._bitLength),h[m]=o(r[m],f[m],this._bitLength),d=Math.max(h[v].length,d),d=Math.max(h[m].length,d)}var x=this.jpoint(null,null,null),k=this._wnafT4;for(s=d;s>=0;s--){for(var E=0;s>=0;){var M=!0;for(u=0;u<n;u++)k[u]=0|h[u][s],0!==k[u]&&(M=!1);if(!M)break;E++,s--}if(s>=0&&E++,x=x.dblp(E),s<0)break;for(u=0;u<n;u++){var A=k[u];0!==A&&(A>0?c=l[u][A-1>>1]:A<0&&(c=l[u][-A-1>>1].neg()),x="affine"===c.type?x.mixedAdd(c):x.add(c))}}for(s=0;s<n;s++)l[s]=null;return i?x:x.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?s(t[t.length-1]%2==0):7===t[0]&&s(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(t){return this.encode(t,!0)},c.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},c.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},c.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},c.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},c.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},18586:function(t,e,r){"use strict";var n=r(56549),i=r(85639),o=r(13247),a=r(44884),s=n.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,a.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function c(t,e,r,n,o){a.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,a),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(e&&!u||!e&&u)&&(s=s.redNeg()),this.point(t,s)},u.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},o(c,a.BasePoint),u.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},u.prototype.point=function(t,e,r,n){return new c(this,t,e,r,n)},c.fromJSON=function(t,e){return new c(t,e[0],e[1],e[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),a=o.redSub(r),s=n.redSub(e),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),l=a.redMul(o);return this.curve.point(u,c,l,f)},c.prototype._projDbl=function(){var t,e,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(s)).redAdd(u);this.zOne?(t=a.redSub(s).redSub(u).redMul(c.redSub(this.curve.two)),e=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),t=a.redSub(s).redISub(u).redMul(o),e=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(a.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(s.redISub(u)),r=n.redMul(o);return this.curve.point(t,e,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(e),c=o.redMul(a),f=s.redMul(u),l=o.redMul(u),h=a.redMul(s);return this.curve.point(c,f,h,l)},c.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),l=n.redMul(u).redMul(f);return this.curve.twisted?(e=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(e=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(l,e,r)},c.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},c.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},c.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},c.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},11275:function(t,e,r){"use strict";var n=e;n.base=r(44884),n.short=r(37770),n.mont=r(47086),n.edwards=r(18586)},47086:function(t,e,r){"use strict";var n=r(85639),i=r(13247),o=r(44884),a=r(56549);function s(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),t.exports=s,s.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),s.prototype.decodePoint=function(t,e){return this.point(a.toArray(t,e),1)},s.prototype.point=function(t,e){return new u(this,t,e)},s.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),a=i.redMul(n),s=e.z.redMul(o.redAdd(a).redSqr()),u=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},37770:function(t,e,r){"use strict";var n=r(56549),i=r(85639),o=r(13247),a=r(44884),s=n.assert;function u(t){a.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,r,n){a.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(t,e,r,n){a.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,o,a,s,u,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=t,d=this.n.clone(),p=new i(1),v=new i(0),m=new i(0),y=new i(1),g=0;0!==h.cmpn(0);){var b=d.div(h);c=d.sub(b.mul(h)),f=m.sub(b.mul(p));var w=y.sub(b.mul(v));if(!n&&c.cmp(l)<0)e=u.neg(),r=p,n=c.neg(),o=f;else if(n&&2==++g)break;u=c,d=h,h=c,m=p,p=f,y=v,v=w}a=c.neg(),s=f;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=e,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:t.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var a=this._endoSplit(e[o]),s=t[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*o]=s,n[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),f=0;f<2*o;f++)n[f]=null,i[f]=null;return c},o(c,a.BasePoint),u.prototype.point=function(t,e,r){return new c(this,t,e,r)},u.prototype.pointFromJSON=function(t,e){return c.fromJSON(this,t,e)},c.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),u.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(h,d,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(e=0;e<t;e++){var f=o.redSqr(),l=c.redSqr(),h=l.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(u)),p=o.redMul(l),v=d.redSqr().redISub(p.redAdd(p)),m=p.redISub(v),y=d.redMul(m);y=y.redIAdd(y).redISub(h);var g=c.redMul(s);e+1<t&&(u=u.redMul(h)),o=v,s=g,c=y}return this.curve.jpoint(o,c.redMul(i),s)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=u,e=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),h=l.redSqr(),d=this.x.redAdd(l).redSqr().redISub(f).redISub(h);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),v=p.redSqr(),m=h.redIAdd(h);m=(m=m.redIAdd(m)).redIAdd(m),t=v.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},f.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);t=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),h=this.x.redMul(l),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=h.redIAdd(h),v=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(v),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var m=l.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),e=d.redMul(p.redISub(t)).redISub(m)}return this.curve.jpoint(t,e,r)},f.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),c=(u=u.redIAdd(u)).redMul(a),f=s.redSqr().redISub(c.redAdd(c)),l=c.redISub(f),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=s.redMul(l).redISub(h),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,d,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),a=this.x.redAdd(e).redSqr().redISub(t).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),f=e.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(s).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(s)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(l,h,d)},f.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},f.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},f.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},88673:function(t,e,r){"use strict";var n,i=e,o=r(28721),a=r(11275),s=r(56549).assert;function u(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(90576)}catch(f){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},3096:function(t,e,r){"use strict";var n=r(85639),i=r(16488),o=r(56549),a=r(88673),s=r(72886),u=o.assert,c=r(76763),f=r(65425);function l(t){if(!(this instanceof l))return new l(t);"string"==typeof t&&(u(Object.prototype.hasOwnProperty.call(a,t),"Unknown curve "+t),t=a[t]),t instanceof a.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=l,l.prototype.keyPair=function(t){return new c(this,t)},l.prototype.keyFromPrivate=function(t,e){return c.fromPrivate(this,t,e)},l.prototype.keyFromPublic=function(t,e){return c.fromPublic(this,t,e)},l.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||s(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(e.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},l.prototype.sign=function(t,e,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var a=this.n.byteLength(),s=e.getPrivate().toArray("be",a),u=t.toArray("be",a),c=new i({hash:this.hash,entropy:s,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new n(1)),h=0;;h++){var d=o.k?o.k(h):new n(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var v=p.getX(),m=v.umod(this.n);if(0!==m.cmpn(0)){var y=d.invm(this.n).mul(m.mul(e.getPrivate()).iadd(t));if(0!==(y=y.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==v.cmp(m)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),g^=1),new f({r:m,s:y,recoveryParam:g})}}}}}},l.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new f(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(t).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(t,e,r,i){u((3&r)===r,"The recovery param is more than two bits"),e=new f(e,i);var o=this.n,a=new n(t),s=e.r,c=e.s,l=1&r,h=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");s=h?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var d=e.r.invm(o),p=o.sub(a).mul(d).umod(o),v=c.mul(d).umod(o);return this.g.mulAdd(p,s,v)},l.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new f(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},76763:function(t,e,r){"use strict";var n=r(85639),i=r(56549).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},65425:function(t,e,r){"use strict";var n=r(85639),i=r(56549),o=i.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=e.place;o<n;o++,a++)i<<=8,i|=t[a],i>>>=0;return!(i<=127)&&(e.place=a,i)}function c(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function f(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=a,a.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new s;if(48!==t[r.place++])return!1;var o=u(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var a=u(t,r);if(!1===a)return!1;var c=t.slice(r.place,a+r.place);if(r.place+=a,2!==t[r.place++])return!1;var f=u(t,r);if(!1===f)return!1;if(t.length!==f+r.place)return!1;var l=t.slice(r.place,f+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new n(c),this.s=new n(l),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=c(e),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];f(n,e.length),(n=n.concat(e)).push(2),f(n,r.length);var o=n.concat(r),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,t)}},24751:function(t,e,r){"use strict";var n=r(28721),i=r(88673),o=r(56549),a=o.assert,s=o.parseBytes,u=r(61690),c=r(81880);function f(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=f,f.prototype.sign=function(t,e){t=s(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(t,e,r){t=s(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},f.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},f.prototype.makeSignature=function(t){return t instanceof c?t:new c(this,t)},f.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},f.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},f.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(t){return o.intFromLE(t)},f.prototype.isPoint=function(t){return t instanceof this.pointClass}},61690:function(t,e,r){"use strict";var n=r(56549),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}s.fromPublic=function(t,e){return e instanceof s?e:new s(t,{pub:e})},s.fromSecret=function(t,e){return e instanceof s?e:new s(t,{secret:e})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},s.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},s.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),t)},s.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=s},81880:function(t,e,r){"use strict";var n=r(85639),i=r(56549),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function u(t,e){this.eddsa=t,"object"!=typeof e&&(e=s(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}a(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=u},90576:function(t){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},56549:function(t,e,r){"use strict";var n=e,i=r(85639),o=r(26440),a=r(7974);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,o=t.clone(),a=0;a<n.length;a++){var s,u=o.andln(i-1);o.isOdd()?(s=u>(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var a,s,u=t.andln(3)+i&3,c=e.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0==(1&u)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0==(1&c)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},770:function(t){"use strict";function e(t,e){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o=Object.keys(Object(i)),a=0,s=o.length;a<s;a++){var u=o[a],c=Object.getOwnPropertyDescriptor(i,u);void 0!==c&&c.enumerable&&(r[u]=i[u])}}return r}t.exports={assign:e,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:e})}}},46866:function(t,e,r){var n=r(87757),i=r(48926),o=r(34575),a=r(93913),s=r(81506),u=r(16525),c=r(2205),f=r(78585),l=r(29754);function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=l(t);if(e){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}r(4224),r(69046);var d=r(7068),p=function(t,e){return t+e},v=["sync","latest"],m=function(t){"use strict";c(f,t);var e,r=h(f);function f(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,f),(t=r.call(this))._blockResetDuration=e.blockResetDuration||2e4,t._blockResetTimeout,t._currentBlock=null,t._isRunning=!1,t._onNewListener=t._onNewListener.bind(s(t)),t._onRemoveListener=t._onRemoveListener.bind(s(t)),t._resetCurrentBlock=t._resetCurrentBlock.bind(s(t)),t._setupInternalEvents(),t}return a(f,[{key:"isRunning",value:function(){return this._isRunning}},{key:"getCurrentBlock",value:function(){return this._currentBlock}},{key:"getLatestBlock",value:(e=i(n.mark((function t(){var e,r=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._currentBlock){t.next=2;break}return t.abrupt("return",this._currentBlock);case 2:return t.next=4,new Promise((function(t){return r.once("latest",t)}));case 4:return e=t.sent,t.abrupt("return",e);case 6:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"removeAllListeners",value:function(t){t?u(l(f.prototype),"removeAllListeners",this).call(this,t):u(l(f.prototype),"removeAllListeners",this).call(this),this._setupInternalEvents(),this._onRemoveListener()}},{key:"_start",value:function(){}},{key:"_end",value:function(){}},{key:"_setupInternalEvents",value:function(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}},{key:"_onNewListener",value:function(t,e){v.includes(t)&&this._maybeStart()}},{key:"_onRemoveListener",value:function(t,e){this._getBlockTrackerEventCount()>0||this._maybeEnd()}},{key:"_maybeStart",value:function(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}},{key:"_maybeEnd",value:function(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}},{key:"_getBlockTrackerEventCount",value:function(){var t=this;return v.map((function(e){return t.listenerCount(e)})).reduce(p)}},{key:"_newPotentialLatest",value:function(t){var e=this._currentBlock;e&&y(t)<=y(e)||this._setCurrentBlock(t)}},{key:"_setCurrentBlock",value:function(t){var e=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:e,newBlock:t})}},{key:"_setupBlockResetTimeout",value:function(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}},{key:"_cancelBlockResetTimeout",value:function(){clearTimeout(this._blockResetTimeout)}},{key:"_resetCurrentBlock",value:function(){this._currentBlock=null}}]),f}(d);function y(t){return Number.parseInt(t,16)}t.exports=m},18087:function(t,e,r){var n=r(87757),i=r(48926),o=r(34575),a=r(93913),s=r(2205),u=r(78585),c=r(29754);function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=c(t);if(e){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}var l=r(69046),h=r(46866),d=function(t){"use strict";s(d,t);var e,r,u,c,h=f(d);function d(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,d),!e.provider)throw new Error("PollingBlockTracker - no provider specified.");var r=e.pollingInterval||2e4,n=e.retryTimeout||r/10,i=void 0===e.keepEventLoopActive||e.keepEventLoopActive,a=e.setSkipCacheFlag||!1;return(t=h.call(this,Object.assign({blockResetDuration:r},e)))._provider=e.provider,t._pollingInterval=r,t._retryTimeout=n,t._keepEventLoopActive=i,t._setSkipCacheFlag=a,t}return a(d,[{key:"checkForLatestBlock",value:(c=i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._updateLatestBlock();case 2:return t.next=4,this.getLatestBlock();case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"_start",value:function(){var t=this;this._performSync().catch((function(e){return t.emit("error",e)}))}},{key:"_performSync",value:(u=i(n.mark((function t(){var e;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._isRunning){t.next=16;break}return t.prev=1,t.next=4,this._updateLatestBlock();case 4:return t.next=6,p(this._pollingInterval,!this._keepEventLoopActive);case 6:t.next=14;break;case 8:t.prev=8,t.t0=t.catch(1),e=new Error("PollingBlockTracker - encountered an error while attempting to update latest block:\n".concat(t.t0.stack));try{this.emit("error",e)}catch(r){console.error(e)}return t.next=14,p(this._retryTimeout,!this._keepEventLoopActive);case 14:t.next=0;break;case 16:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(){return u.apply(this,arguments)})},{key:"_updateLatestBlock",value:(r=i(n.mark((function t(){var e;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._fetchLatestBlock();case 2:e=t.sent,this._newPotentialLatest(e);case 4:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"_fetchLatestBlock",value:(e=i(n.mark((function t(){var e,r,i=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]},this._setSkipCacheFlag&&(e.skipCache=!0),t.next=4,l((function(t){return i._provider.sendAsync(e,t)}))();case 4:if(!(r=t.sent).error){t.next=7;break}throw new Error("PollingBlockTracker - encountered error fetching block:\n".concat(r.error));case 7:return t.abrupt("return",r.result);case 8:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),d}(h);function p(t,e){return new Promise((function(r){var n=setTimeout(r,t);n.unref&&e&&n.unref()}))}t.exports=d},63762:function(t,e,r){var n=r(87757),i=r(48926),o=r(34575),a=r(93913),s=r(16525),u=r(2205),c=r(78585),f=r(29754);function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return c(this,r)}}var h=function(t){"use strict";u(c,t);var e,r=l(c);function c(){var t;return o(this,c),(t=r.call(this)).allResults=[],t}return a(c,[{key:"update",value:(e=i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("BaseFilterWithHistory - no update method specified");case 1:case"end":return t.stop()}}),t)}))),function(){return e.apply(this,arguments)})},{key:"addResults",value:function(t){this.allResults=this.allResults.concat(t),s(f(c.prototype),"addResults",this).call(this,t)}},{key:"addInitialResults",value:function(t){this.allResults=this.allResults.concat(t),s(f(c.prototype),"addInitialResults",this).call(this,t)}},{key:"getAllResults",value:function(){return this.allResults}}]),c}(r(17041));t.exports=h},17041:function(t,e,r){var n=r(87757),i=r(48926),o=r(34575),a=r(93913),s=r(2205),u=r(78585),c=r(29754);function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=c(t);if(e){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}var l=function(t){"use strict";s(c,t);var e,r,u=f(c);function c(){var t;return o(this,c),(t=u.call(this)).updates=[],t}return a(c,[{key:"initialize",value:(r=i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"update",value:(e=i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("BaseFilter - no update method specified");case 1:case"end":return t.stop()}}),t)}))),function(){return e.apply(this,arguments)})},{key:"addResults",value:function(t){var e=this;this.updates=this.updates.concat(t),t.forEach((function(t){return e.emit("update",t)}))}},{key:"addInitialResults",value:function(t){}},{key:"getChangesAndClear",value:function(){var t=this.updates;return this.updates=[],t}}]),c}(r(40685).default);t.exports=l},25103:function(t,e,r){var n=r(87757),i=r(48926),o=r(34575),a=r(93913),s=r(2205),u=r(78585),c=r(29754);function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=c(t);if(e){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}var l=r(17041),h=r(17359),d=r(21873).incrementHexInt,p=function(t){"use strict";s(u,t);var e,r=f(u);function u(t){var e,n=t.provider;t.params;return o(this,u),(e=r.call(this)).type="block",e.provider=n,e}return a(u,[{key:"update",value:(e=i(n.mark((function t(e){var r,i,o,a,s,u;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.oldBlock,i=e.newBlock,o=i,a=d(r),t.next=5,h({provider:this.provider,fromBlock:a,toBlock:o});case 5:s=t.sent,u=s.map((function(t){return t.hash})),this.addResults(u);case 8:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),u}(l);t.exports=p},17359:function(t,e,r){var n=r(87757),i=r(48926);function o(){return(o=i(n.mark((function t(e){var r,i,o,c,f,l,h;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.provider,i=e.fromBlock,o=e.toBlock,i||(i=o),c=a(i),f=a(o),l=Array(f-c+1).fill().map((function(t,e){return c+e})).map(s),t.next=8,Promise.all(l.map((function(t){return u(r,"eth_getBlockByNumber",[t,!1])})));case 8:return h=t.sent,t.abrupt("return",h);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function a(t){return null==t?t:Number.parseInt(t,16)}function s(t){return null==t?t:"0x"+t.toString(16)}function u(t,e,r){return new Promise((function(n,i){t.sendAsync({id:1,jsonrpc:"2.0",method:e,params:r},(function(t,e){if(t)return i(t);n(e.result)}))}))}t.exports=function(t){return o.apply(this,arguments)}},21873:function(t){function e(t){return t.sort((function(t,e){return"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:r(t)-r(e)}))}function r(t){return null==t?t:Number.parseInt(t,16)}function n(t){if(null==t)return t;var e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function i(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e(r);return i[0]},maxBlockRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e(r);return i[i.length-1]},sortBlockRefs:e,bnToHex:function(t){return"0x"+t.toString(16)},blockRefIsNumber:function(t){return t&&!["earliest","latest","pending"].includes(t)},hexToInt:r,incrementHexInt:function(t){return null==t?t:n(r(t)+1)},intToHex:n,unsafeRandomBytes:function(t){for(var e="0x",r=0;r<t;r++)e+=i(),e+=i();return e}}},10232:function(t,e,r){var n=r(87757),i=r(48926),o=r(8255).WU,a=r(28423).createAsyncMiddleware,s=r(2791),u=r(71913),c=r(25103),f=r(68740),l=r(21873),h=l.intToHex,d=l.hexToInt;function p(t){return v(i(n.mark((function e(){var r,i,o=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.apply(void 0,o);case 2:return r=e.sent,i=h(r.id),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)}))))}function v(t){return a(function(){var e=i(n.mark((function e(r,i){var o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.apply(null,r.params);case 2:o=e.sent,i.result=o;case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}())}function m(t,e){var r=[];for(var n in t)r.push(t[n]);return r}t.exports=function(t){var e=t.blockTracker,r=t.provider,a=0,l={},y=new o,g=function(t){var e=t.mutex;return function(t){return function(){var r=i(n.mark((function r(i,o,a,s){return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.acquire();case 2:(0,r.sent)(),t(i,o,a,s);case 5:case"end":return r.stop()}}),r)})));return function(t,e,n,i){return r.apply(this,arguments)}}()}}({mutex:y}),b=s({eth_newFilter:g(p(_)),eth_newBlockFilter:g(p(k)),eth_newPendingTransactionFilter:g(p(M)),eth_uninstallFilter:g(v(O)),eth_getFilterChanges:g(v(S)),eth_getFilterLogs:g(v(P))}),w=function(){var t=i(n.mark((function t(e){var r,o,a;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.oldBlock,o=e.newBlock,0!==l.length){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,y.acquire();case 5:return a=t.sent,t.prev=6,t.next=9,Promise.all(m(l).map(function(){var t=i(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.update({oldBlock:r,newBlock:o});case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),console.error(t.t0);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()));case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(6),console.error(t.t0);case 14:a();case 15:case"end":return t.stop()}}),t,null,[[6,11]])})));return function(e){return t.apply(this,arguments)}}();return b.newLogFilter=_,b.newBlockFilter=k,b.newPendingTransactionFilter=M,b.uninstallFilter=O,b.getFilterChanges=S,b.getFilterLogs=P,b.destroy=function(){!function(){j.apply(this,arguments)}()},b;function _(t){return x.apply(this,arguments)}function x(){return(x=i(n.mark((function t(e){var i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=new u({provider:r,params:e}),t.next=3,C(i);case 3:return t.sent,t.abrupt("return",i);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(){return E.apply(this,arguments)}function E(){return(E=i(n.mark((function t(){var e;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new c({provider:r}),t.next=3,C(e);case 3:return t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function M(){return A.apply(this,arguments)}function A(){return(A=i(n.mark((function t(){var e;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new f({provider:r}),t.next=3,C(e);case 3:return t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function S(t){return R.apply(this,arguments)}function R(){return R=i(n.mark((function t(e){var r,i,o;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=d(e),i=l[r]){t.next=4;break}throw new Error('No filter for index "'.concat(r,'"'));case 4:return o=i.getChangesAndClear(),t.abrupt("return",o);case 6:case"end":return t.stop()}}),t)}))),R.apply(this,arguments)}function P(t){return T.apply(this,arguments)}function T(){return T=i(n.mark((function t(e){var r,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=d(e),i=l[r]){t.next=4;break}throw new Error('No filter for index "'.concat(r,'"'));case 4:return"log"===i.type?results=i.getAllResults():results=[],t.abrupt("return",results);case 6:case"end":return t.stop()}}),t)}))),T.apply(this,arguments)}function O(t){return I.apply(this,arguments)}function I(){return I=i(n.mark((function t(e){var r,i,o;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=d(e),i=l[r],!(o=Boolean(i))){t.next=6;break}return t.next=6,L(r);case 6:return t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)}))),I.apply(this,arguments)}function C(t){return N.apply(this,arguments)}function N(){return(N=i(n.mark((function t(r){var i,o,s;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=m(l).length,t.next=3,e.getLatestBlock();case 3:return o=t.sent,t.next=6,r.initialize({currentBlock:o});case 6:return a++,l[a]=r,r.id=a,r.idHex=h(a),s=m(l).length,U({prevFilterCount:i,newFilterCount:s}),t.abrupt("return",a);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function L(t){return B.apply(this,arguments)}function B(){return B=i(n.mark((function t(e){var r,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=m(l).length,delete l[e],i=m(l).length,U({prevFilterCount:r,newFilterCount:i});case 4:case"end":return t.stop()}}),t)}))),B.apply(this,arguments)}function j(){return(j=i(n.mark((function t(){var e;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=m(l).length,l={},U({prevFilterCount:e,newFilterCount:0});case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function U(t){var r=t.prevFilterCount,n=t.newFilterCount;0===r&&n>0?e.on("sync",w):r>0&&0===n&&e.removeListener("sync",w)}}},71913:function(t,e,r){var n=r(87757),i=r(48926),o=r(34575),a=r(93913),s=r(2205),u=r(78585),c=r(29754);function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=c(t);if(e){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}var l=r(4224),h=r(11350),d=r(63762),p=r(21873),v=(p.bnToHex,p.hexToInt),m=p.incrementHexInt,y=p.minBlockRef,g=p.blockRefIsNumber,b=function(t){"use strict";s(d,t);var e,r,u,c=f(d);function d(t){var e,r=t.provider,n=t.params;return o(this,d),(e=c.call(this)).type="log",e.ethQuery=new l(r),e.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},n),e.params.address&&(Array.isArray(e.params.address)||(e.params.address=[e.params.address]),e.params.address=e.params.address.map((function(t){return t.toLowerCase()}))),e}return a(d,[{key:"initialize",value:(u=i(n.mark((function t(e){var r,i,o,a,s;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.currentBlock,i=this.params.fromBlock,["latest","pending"].includes(i)&&(i=r),"earliest"===i&&(i="0x0"),this.params.fromBlock=i,o=y(this.params.toBlock,r),a=Object.assign({},this.params,{toBlock:o}),t.next=9,this._fetchLogs(a);case 9:s=t.sent,this.addInitialResults(s);case 11:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"update",value:(r=i(n.mark((function t(e){var r,i,o,a,s,u,c,f=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.oldBlock,i=e.newBlock,o=i,a=r?m(r):i,s=Object.assign({},this.params,{fromBlock:a,toBlock:o}),t.next=6,this._fetchLogs(s);case 6:u=t.sent,c=u.filter((function(t){return f.matchLog(t)})),this.addResults(c);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"_fetchLogs",value:(e=i(n.mark((function t(e){var r,i=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h((function(t){return i.ethQuery.getLogs(e,t)}))();case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})},{key:"matchLog",value:function(t){if(v(this.params.fromBlock)>=v(t.blockNumber))return!1;if(g(this.params.toBlock)&&v(this.params.toBlock)<=v(t.blockNumber))return!1;var e=t.address&&t.address.toLowerCase();return!(this.params.address&&e&&!this.params.address.includes(e))&&this.params.topics.every((function(e,r){var n=t.topics[r];if(!n)return!1;n=n.toLowerCase();var i=Array.isArray(e)?e:[e];return!!i.includes(null)||(i=i.map((function(t){return t.toLowerCase()}))).includes(n)}))}}]),d}(d);t.exports=b},26707:function(t,e,r){"use strict";var n=r(34575),i=r(93913),o=r(2205),a=r(78585),s=r(29754),u=r(65957);function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=s(t);if(e){var i=s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a(this,r)}}Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;var f=r(59699),l=function(t){o(r,t);var e=c(r);function r(t,i,o){var a;if(n(this,r),!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!i||"string"!=typeof i)throw new Error('"message" must be a nonempty string.');return(a=e.call(this,i)).code=t,void 0!==o&&(a.data=o),a}return i(r,[{key:"serialize",value:function(){var t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}},{key:"toString",value:function(){return f.default(this.serialize(),d,2)}}]),r}(u(Error));e.EthereumRpcError=l;var h=function(t){o(r,t);var e=c(r);function r(t,i,o){if(n(this,r),!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');return e.call(this,t,i,o)}return i(r)}(l);function d(t,e){if("[Circular]"!==e)return e}e.EthereumProviderError=h},53458:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.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}},e.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."}}},72606:function(t,e,r){"use strict";var n=r(63038);Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;var i=r(26707),o=r(65559),a=r(53458);function s(t,e){var r=c(e),a=n(r,2),s=a[0],u=a[1];return new i.EthereumRpcError(t,s||o.getMessageFromCode(t),u)}function u(t,e){var r=c(e),a=n(r,2),s=a[0],u=a[1];return new i.EthereumProviderError(t,s||o.getMessageFromCode(t),u)}function c(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){var e=t.message,r=t.data;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}e.ethErrors={rpc:{parse:function(t){return s(a.errorCodes.rpc.parse,t)},invalidRequest:function(t){return s(a.errorCodes.rpc.invalidRequest,t)},invalidParams:function(t){return s(a.errorCodes.rpc.invalidParams,t)},methodNotFound:function(t){return s(a.errorCodes.rpc.methodNotFound,t)},internal:function(t){return s(a.errorCodes.rpc.internal,t)},server:function(t){if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");var e=t.code;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(e,t)},invalidInput:function(t){return s(a.errorCodes.rpc.invalidInput,t)},resourceNotFound:function(t){return s(a.errorCodes.rpc.resourceNotFound,t)},resourceUnavailable:function(t){return s(a.errorCodes.rpc.resourceUnavailable,t)},transactionRejected:function(t){return s(a.errorCodes.rpc.transactionRejected,t)},methodNotSupported:function(t){return s(a.errorCodes.rpc.methodNotSupported,t)},limitExceeded:function(t){return s(a.errorCodes.rpc.limitExceeded,t)}},provider:{userRejectedRequest:function(t){return u(a.errorCodes.provider.userRejectedRequest,t)},unauthorized:function(t){return u(a.errorCodes.provider.unauthorized,t)},unsupportedMethod:function(t){return u(a.errorCodes.provider.unsupportedMethod,t)},disconnected:function(t){return u(a.errorCodes.provider.disconnected,t)},chainDisconnected:function(t){return u(a.errorCodes.provider.chainDisconnected,t)},custom:function(t){if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");var e=t.code,r=t.message,n=t.data;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new i.EthereumProviderError(e,r,n)}}}},83427:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;var n=r(26707);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});var i=r(65559);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});var o=r(72606);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});var a=r(53458);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})},65559:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var n=r(53458),i=r(26707),o=n.errorCodes.rpc.internal,a="Unspecified error message. This is a bug, please report it.",s={code:o,message:u(o)};function u(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if(Number.isInteger(t)){var i=t.toString();if(h(n.errorValues,i))return n.errorValues[i].message;if(f(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function c(t){if(!Number.isInteger(t))return!1;var e=t.toString();return!!n.errorValues[e]||!!f(t)}function f(t){return t>=-32099&&t<=-32e3}function l(t){return t&&"object"==typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=u,e.isValidCode=c,e.serializeError=function(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.fallbackError,a=void 0===o?s:o,f=n.shouldIncludeStack,d=void 0!==f&&f;if(!a||!Number.isInteger(a.code)||"string"!=typeof a.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();var p={};if(t&&"object"==typeof t&&!Array.isArray(t)&&h(t,"code")&&c(t.code)){var v=t;p.code=v.code,v.message&&"string"==typeof v.message?(p.message=v.message,h(v,"data")&&(p.data=v.data)):(p.message=u(p.code),p.data={originalError:l(t)})}else{p.code=a.code;var m=null===(e=t)||void 0===e?void 0:e.message;p.message=m&&"string"==typeof m?m:a.message,p.data={originalError:l(t)}}var y=null===(r=t)||void 0===r?void 0:r.stack;return d&&t&&y&&"string"==typeof y&&(p.stack=y),p}},30489:function(t,e,r){"use strict";var n=r(87757),i=r(63038),o=r(48926),a=r(34575),s=r(93913),u=r(2205),c=r(78585),f=r(29754);function l(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return c(this,r)}}var p=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;var v=p(r(40685)),m=r(83427),y=function(t){u(v,t);var e,r,c,f,h,p=d(v);function v(){var t;return a(this,v),(t=p.call(this))._middleware=[],t}return s(v,[{key:"push",value:function(t){this._middleware.push(t)}},{key:"handle",value:function(t,e){if(e&&"function"!=typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}},{key:"asMiddleware",value:function(){var t=this;return function(){var e=o(n.mark((function e(r,a,s,u){var c,f,l,h,d;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v._runAllMiddleware(r,a,t._middleware);case 3:if(c=e.sent,f=i(c,3),l=f[0],h=f[1],d=f[2],!h){e.next=12;break}return e.next=11,v._runReturnHandlers(d);case 11:return e.abrupt("return",u(l));case 12:return e.abrupt("return",s(function(){var t=o(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,v._runReturnHandlers(d);case 3:t.next=8;break;case 5:return t.prev=5,t.t0=t.catch(0),t.abrupt("return",e(t.t0));case 8:return t.abrupt("return",e());case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()));case 15:return e.prev=15,e.t0=e.catch(0),e.abrupt("return",u(e.t0));case 18:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t,r,n,i){return e.apply(this,arguments)}}()}},{key:"_handleBatch",value:(h=o(n.mark((function t(e,r){var i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Promise.all(e.map(this._promiseHandle.bind(this)));case 3:if(i=t.sent,!r){t.next=6;break}return t.abrupt("return",r(null,i));case 6:return t.abrupt("return",i);case 9:if(t.prev=9,t.t0=t.catch(0),!r){t.next=13;break}return t.abrupt("return",r(t.t0));case 13:throw t.t0;case 14:case"end":return t.stop()}}),t,this,[[0,9]])}))),function(t,e){return h.apply(this,arguments)})},{key:"_promiseHandle",value:function(t){var e=this;return new Promise((function(r){e._handle(t,(function(t,e){r(e)}))}))}},{key:"_handle",value:(f=o(n.mark((function t(e,r){var i,o,a,s,u;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&!Array.isArray(e)&&"object"==typeof e){t.next=3;break}return i=new m.EthereumRpcError(m.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: ".concat(typeof e),{request:e}),t.abrupt("return",r(i,{id:void 0,jsonrpc:"2.0",error:i}));case 3:if("string"==typeof e.method){t.next=6;break}return o=new m.EthereumRpcError(m.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: ".concat(typeof e.method),{request:e}),t.abrupt("return",r(o,{id:e.id,jsonrpc:"2.0",error:o}));case 6:return a=Object.assign({},e),s={id:a.id,jsonrpc:a.jsonrpc},u=null,t.prev=9,t.next=12,this._processRequest(a,s);case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(9),u=t.t0;case 17:return u&&(delete s.result,s.error||(s.error=m.serializeError(u))),t.abrupt("return",r(u,s));case 19:case"end":return t.stop()}}),t,this,[[9,14]])}))),function(t,e){return f.apply(this,arguments)})},{key:"_processRequest",value:(c=o(n.mark((function t(e,r){var o,a,s,u,c;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,v._runAllMiddleware(e,r,this._middleware);case 2:return o=t.sent,a=i(o,3),s=a[0],u=a[1],c=a[2],v._checkForCompletion(e,r,u),t.next=10,v._runReturnHandlers(c);case 10:if(!s){t.next=12;break}throw s;case 12:case"end":return t.stop()}}),t,this)}))),function(t,e){return c.apply(this,arguments)})}],[{key:"_runAllMiddleware",value:(r=o(n.mark((function t(e,r,o){var a,s,u,c,f,h,d,p;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=[],s=null,u=!1,c=l(o),t.prev=4,c.s();case 6:if((f=c.n()).done){t.next=18;break}return h=f.value,t.next=10,v._runMiddleware(e,r,h,a);case 10:if(d=t.sent,p=i(d,2),s=p[0],!(u=p[1])){t.next=16;break}return t.abrupt("break",18);case 16:t.next=6;break;case 18:t.next=23;break;case 20:t.prev=20,t.t0=t.catch(4),c.e(t.t0);case 23:return t.prev=23,c.f(),t.finish(23);case 26:return t.abrupt("return",[s,u,a.reverse()]);case 27:case"end":return t.stop()}}),t,null,[[4,20,23,26]])}))),function(t,e,n){return r.apply(this,arguments)})},{key:"_runMiddleware",value:function(t,e,r,n){return new Promise((function(i){var o=function(t){var r=t||e.error;r&&(e.error=m.serializeError(r)),i([r,!0])};try{r(t,e,(function(r){e.error?o(e.error):(r&&("function"!=typeof r&&o(new m.EthereumRpcError(m.errorCodes.rpc.internal,'JsonRpcEngine: "next" return handlers must be functions. '+'Received "'.concat(typeof r,'" for request:\n').concat(g(t)),{request:t})),n.push(r)),i([null,!1]))}),o)}catch(a){o(a)}}))}},{key:"_runReturnHandlers",value:(e=o(n.mark((function t(e){var r,i,o;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=l(e),t.prev=1,o=n.mark((function t(){var e;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.value,t.next=3,new Promise((function(t,r){e((function(e){return e?r(e):t()}))}));case 3:case"end":return t.stop()}}),t)})),r.s();case 4:if((i=r.n()).done){t.next=8;break}return t.delegateYield(o(),"t0",6);case 6:t.next=4;break;case 8:t.next=13;break;case 10:t.prev=10,t.t1=t.catch(1),r.e(t.t1);case 13:return t.prev=13,r.f(),t.finish(13);case 16:case"end":return t.stop()}}),t,null,[[1,10,13,16]])}))),function(t){return e.apply(this,arguments)})},{key:"_checkForCompletion",value:function(t,e,r){if(!("result"in e)&&!("error"in e))throw new m.EthereumRpcError(m.errorCodes.rpc.internal,"JsonRpcEngine: Response has no error or result for request:\n".concat(g(t)),{request:t});if(!r)throw new m.EthereumRpcError(m.errorCodes.rpc.internal,"JsonRpcEngine: Nothing ended request:\n".concat(g(t)),{request:t})}}]),v}(v.default);function g(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=y},21886:function(t,e,r){"use strict";var n=r(87757),i=r(48926);Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return function(){var e=i(n.mark((function e(r,o,a,s){var u,c,f,l,h;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=new Promise((function(t){u=t})),f=null,l=!1,h=function(){var t=i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=!0,a((function(t){f=t,u()})),t.next=4,c;case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),e.prev=4,e.next=7,t(r,o,h);case 7:if(!l){e.next=13;break}return e.next=10,c;case 10:f(null),e.next=14;break;case 13:s(null);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),f?f(e.t0):s(e.t0);case 19:case"end":return e.stop()}}),e,null,[[4,16]])})));return function(t,r,n,i){return e.apply(this,arguments)}}()}},71753:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return function(e,r,n,i){var o=t[e.method];return void 0===o?n():"function"==typeof o?o(e,r,n,i):(r.result=o,i())}}},82858:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;var r=4294967295,n=Math.floor(Math.random()*r);e.getUniqueId=function(){return n=(n+1)%r}},18613:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;var n=r(82858);e.createIdRemapMiddleware=function(){return function(t,e,r,i){var o=t.id,a=n.getUniqueId();t.id=a,e.id=a,r((function(r){t.id=o,e.id=o,r()}))}}},28423:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(18613),e),i(r(21886),e),i(r(71753),e),i(r(82858),e),i(r(30489),e),i(r(61597),e)},61597:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;var n=r(30489);e.mergeMiddleware=function(t){var e=new n.JsonRpcEngine;return t.forEach((function(t){return e.push(t)})),e.asMiddleware()}},11350:function(t,e,r){"use strict";var n=r(59713);function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var o=function(t,e,r,n){return function(){for(var i=this,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=e.promiseModule;return new u((function(o,s){e.multiArgs?a.push((function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e.errorFirst?r[0]?s(r):(r.shift(),o(r)):o(r)})):e.errorFirst?a.push((function(t,e){t?s(t):o(e)})):a.push(o);var u=i===r?n:i;Reflect.apply(t,u,a)}))}},a=new WeakMap;t.exports=function(t,e){e=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);var r=typeof t;if(null===t||"object"!==r&&"function"!==r)throw new TypeError("Expected `input` to be a `Function` or `Object`, got `".concat(null===t?"null":r,"`"));var s=new WeakMap,u=new Proxy(t,{apply:function(t,r,n){var i=s.get(t);if(i)return Reflect.apply(i,r,n);var a=e.excludeMain?t:o(t,e,u,t);return s.set(t,a),Reflect.apply(a,r,n)},get:function(t,r){var n=t[r];if(!function(t,r){var n=a.get(t);if(n||(n={},a.set(t,n)),r in n)return n[r];var i=function(t){return"string"==typeof t||"symbol"==typeof r?r===t:t.test(r)},o=Reflect.getOwnPropertyDescriptor(t,r),s=void 0===o||o.writable||o.configurable,u=(e.include?e.include.some(i):!e.exclude.some(i))&&s;return n[r]=u,u}(t,r)||n===Function.prototype[r])return n;var i=s.get(n);if(i)return i;if("function"==typeof n){var c=o(n,e,u,t);return s.set(n,c),c}return n}});return u}},62952:function(t,e,r){var n=r(87757),i=r(48926),o=r(40685).default,a=r(2791),s=r(28423).createAsyncMiddleware,u=r(10232),c=r(21873),f=c.unsafeRandomBytes,l=c.incrementHexInt,h=r(17359);function d(t){return{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}t.exports=function(t){var e=t.blockTracker,r=t.provider,c={},p=u({blockTracker:e,provider:r}),v=!1,m=new o,y=a({eth_subscribe:s((function(t,e){return g.apply(this,arguments)})),eth_unsubscribe:s((function(t,e){return b.apply(this,arguments)}))});return y.destroy=function(){for(var t in m.removeAllListeners(),c)c[t].destroy(),delete c[t];v=!0},{events:m,middleware:y};function g(){return g=i(n.mark((function t(o,a){var s,u,m,y,g,b,_;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_=function(t){var e=t.subId,r=t.filter;r.on("update",(function(t){return w(e,t)}));var o,a={type:s,destroy:(o=i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.uninstallFilter(r.idHex);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})};return a},b=function(t){var o,a,u=t.subId,c={type:s,destroy:(a=i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.removeListener("sync",c.update);case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)}),update:(o=i(n.mark((function t(e){var i,o,a,s;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.oldBlock,o=e.newBlock,a=o,s=l(i),t.next=5,h({provider:r,fromBlock:s,toBlock:a});case 5:t.sent.map(d).forEach((function(t){w(u,t)}));case 8:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})};return e.on("sync",c.update),c},!v){t.next=4;break}throw new Error("SubscriptionManager - attempting to use after destroying");case 4:s=o.params[0],u=f(16),t.t0=s,t.next="newHeads"===t.t0?9:"logs"===t.t0?11:17;break;case 9:return m=b({subId:u}),t.abrupt("break",18);case 11:return y=o.params[1],t.next=14,p.newLogFilter(y);case 14:return g=t.sent,m=_({subId:u,filter:g}),t.abrupt("break",18);case 17:throw new Error('SubscriptionManager - unsupported subscription type "'.concat(s,'"'));case 18:return c[u]=m,a.result=u,t.abrupt("return");case 21:case"end":return t.stop()}}),t)}))),g.apply(this,arguments)}function b(){return(b=i(n.mark((function t(e,r){var i,o;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!v){t.next=2;break}throw new Error("SubscriptionManager - attempting to use after destroying");case 2:if(i=e.params[0],o=c[i]){t.next=7;break}return r.result=!1,t.abrupt("return");case 7:return delete c[i],t.next=10,o.destroy();case 10:r.result=!0;case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function w(t,e){m.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},68740:function(t,e,r){var n=r(87757),i=r(319),o=r(48926),a=r(34575),s=r(93913),u=r(2205),c=r(78585),f=r(29754);function l(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return c(this,r)}}var p=r(17041),v=r(17359),m=r(21873).incrementHexInt,y=function(t){"use strict";u(c,t);var e,r=d(c);function c(t){var e,n=t.provider;return a(this,c),(e=r.call(this)).type="tx",e.provider=n,e}return s(c,[{key:"update",value:(e=o(n.mark((function t(e){var r,o,a,s,u,c,f,h;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.oldBlock,o=r,a=m(r),t.next=5,v({provider:this.provider,fromBlock:a,toBlock:o});case 5:s=t.sent,u=[],c=l(s);try{for(c.s();!(f=c.n()).done;)h=f.value,u.push.apply(u,i(h.transactions))}catch(n){c.e(n)}finally{c.f()}this.addResults(u);case 10:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),c}(p);t.exports=y},94589:function(t,e,r){var n=r(34575),i=r(93913),o=r(87757),a=r(48926),s=r(76503),u=r(66406),c=[void 0,null,"<nil>"];t.exports=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.blockTracker;if(!e)throw new Error("createBlockCacheMiddleware - No BlockTracker specified");var r=new f,n={perma:r,block:r,fork:r};return u(function(){var t=a(o.mark((function t(i,a,u){var c,f,l,h,d,p;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!i.skipCache){t.next=2;break}return t.abrupt("return",u());case 2:if(c=s.cacheTypeForPayload(i),f=n[c]){t.next=6;break}return t.abrupt("return",u());case 6:if(f.canCacheRequest(i)){t.next=8;break}return t.abrupt("return",u());case 8:if((l=s.blockTagForPayload(i))||(l="latest"),"earliest"!==l){t.next=14;break}h="0x00",t.next=23;break;case 14:if("latest"!==l){t.next=22;break}return t.next=17,e.getLatestBlock();case 17:d=t.sent,r.clearBefore(d),h=d,t.next=23;break;case 22:h=l;case 23:return t.next=25,f.get(i,h);case 25:if(void 0!==(p=t.sent)){t.next=33;break}return t.next=29,u();case 29:return t.next=31,f.set(i,h,a.result);case 31:t.next=34;break;case 33:a.result=p;case 34:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}())};var f=function(){"use strict";function t(){n(this,t),this.cache={}}var e,r;return i(t,[{key:"getBlockCacheForPayload",value:function(t,e){var r=Number.parseInt(e,16),n=this.cache[r];if(!n){var i={};this.cache[r]=i,n=i}return n}},{key:"get",value:(r=a(o.mark((function t(e,r){var n,i,a;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.getBlockCacheForPayload(e,r)){t.next=3;break}return t.abrupt("return");case 3:return i=s.cacheIdentifierForPayload(e,!0),a=n[i],t.abrupt("return",a);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"set",value:(e=a(o.mark((function t(e,r,n){var i,a;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.canCacheResult(e,n)){t.next=3;break}return t.abrupt("return");case 3:i=this.getBlockCacheForPayload(e,r),a=s.cacheIdentifierForPayload(e,!0),i[a]=n;case 6:case"end":return t.stop()}}),t,this)}))),function(t,r,n){return e.apply(this,arguments)})},{key:"canCacheRequest",value:function(t){return!!s.canCache(t)&&"pending"!==s.blockTagForPayload(t)}},{key:"canCacheResult",value:function(t,e){if(!c.includes(e))return!!(!["eth_getTransactionByHash","eth_getTransactionReceipt"].includes(t.method)||e&&e.blockHash&&"0x0000000000000000000000000000000000000000000000000000000000000000"!==e.blockHash)}},{key:"clearBefore",value:function(t){var e=this,r=Number.parseInt(t,16);Object.keys(e.cache).map(Number).filter((function(t){return t<r})).forEach((function(t){return delete e.cache[t]}))}}]),t}()},76503:function(t,e,r){var n=r(66606);function i(t){return"never"!==s(t)}function o(t){var e=a(t);return e>=t.params.length?t.params:"eth_getBlockByNumber"===t.method?t.params.slice(1):t.params.slice(0,e)}function a(t){switch(t.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 s(t){switch(t.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"}}t.exports={cacheIdentifierForPayload:function(t,e){var r=e?o(t):t.params;return i(t)?t.method+":"+n(r):null},canCache:i,blockTagForPayload:function(t){var e=a(t);if(e>=t.params.length)return null;return t.params[e]},paramsWithoutBlockTag:o,blockTagParamIndex:a,cacheTypeForPayload:s}},2791:function(t,e,r){t.exports=r(1093)},4224:function(t,e,r){var n=r(76297),i=r(2591)();function o(t){this.currentProvider=t}function a(t){return function(){var e=this,r=[].slice.call(arguments),n=r.pop();e.sendAsync({method:t,params:r},n)}}function s(t,e){return function(){var r=this,n=[].slice.call(arguments),i=n.pop();n.length<t&&n.push("latest"),r.sendAsync({method:e,params:n},i)}}t.exports=o,o.prototype.getBalance=s(2,"eth_getBalance"),o.prototype.getCode=s(2,"eth_getCode"),o.prototype.getTransactionCount=s(2,"eth_getTransactionCount"),o.prototype.getStorageAt=s(3,"eth_getStorageAt"),o.prototype.call=s(2,"eth_call"),o.prototype.protocolVersion=a("eth_protocolVersion"),o.prototype.syncing=a("eth_syncing"),o.prototype.coinbase=a("eth_coinbase"),o.prototype.mining=a("eth_mining"),o.prototype.hashrate=a("eth_hashrate"),o.prototype.gasPrice=a("eth_gasPrice"),o.prototype.accounts=a("eth_accounts"),o.prototype.blockNumber=a("eth_blockNumber"),o.prototype.getBlockTransactionCountByHash=a("eth_getBlockTransactionCountByHash"),o.prototype.getBlockTransactionCountByNumber=a("eth_getBlockTransactionCountByNumber"),o.prototype.getUncleCountByBlockHash=a("eth_getUncleCountByBlockHash"),o.prototype.getUncleCountByBlockNumber=a("eth_getUncleCountByBlockNumber"),o.prototype.sign=a("eth_sign"),o.prototype.sendTransaction=a("eth_sendTransaction"),o.prototype.sendRawTransaction=a("eth_sendRawTransaction"),o.prototype.estimateGas=a("eth_estimateGas"),o.prototype.getBlockByHash=a("eth_getBlockByHash"),o.prototype.getBlockByNumber=a("eth_getBlockByNumber"),o.prototype.getTransactionByHash=a("eth_getTransactionByHash"),o.prototype.getTransactionByBlockHashAndIndex=a("eth_getTransactionByBlockHashAndIndex"),o.prototype.getTransactionByBlockNumberAndIndex=a("eth_getTransactionByBlockNumberAndIndex"),o.prototype.getTransactionReceipt=a("eth_getTransactionReceipt"),o.prototype.getUncleByBlockHashAndIndex=a("eth_getUncleByBlockHashAndIndex"),o.prototype.getUncleByBlockNumberAndIndex=a("eth_getUncleByBlockNumberAndIndex"),o.prototype.getCompilers=a("eth_getCompilers"),o.prototype.compileLLL=a("eth_compileLLL"),o.prototype.compileSolidity=a("eth_compileSolidity"),o.prototype.compileSerpent=a("eth_compileSerpent"),o.prototype.newFilter=a("eth_newFilter"),o.prototype.newBlockFilter=a("eth_newBlockFilter"),o.prototype.newPendingTransactionFilter=a("eth_newPendingTransactionFilter"),o.prototype.uninstallFilter=a("eth_uninstallFilter"),o.prototype.getFilterChanges=a("eth_getFilterChanges"),o.prototype.getFilterLogs=a("eth_getFilterLogs"),o.prototype.getLogs=a("eth_getLogs"),o.prototype.getWork=a("eth_getWork"),o.prototype.submitWork=a("eth_submitWork"),o.prototype.submitHashrate=a("eth_submitHashrate"),o.prototype.sendAsync=function(t,e){var r;this.currentProvider.sendAsync((r=t,n({id:i(),jsonrpc:"2.0",params:[]},r)),(function(t,r){if(!t&&r.error&&(t=new Error("EthQuery - RPC Error - "+r.error.message)),t)return e(t);e(null,r.result)}))}},49982:function(t,e,r){var n=r(25714),i=r(84946);function o(t){var e=new Error("Expect argument to be non-empty array");if("object"!=typeof t||!t.length)throw e;var r=t.map((function(t){return"bytes"===t.type?n.toBuffer(t.value):t.value})),o=t.map((function(t){return t.type})),a=t.map((function(t){if(!t.name)throw e;return t.type+" "+t.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(t.length).fill("string"),a),i.soliditySHA3(o,r)])}function a(t,e){var r=n.toBuffer(e),i=n.fromRpcSig(r);return n.ecrecover(t,i.v,i.r,i.s)}function s(t){var e=n.toBuffer(t.data);return a(n.hashPersonalMessage(e),t.sig)}function u(t,e){for(var r=""+t;r.length<e;)r="0"+r;return r}t.exports={concatSig:function(t,e,r){var i=n.fromSigned(e),o=n.fromSigned(r),a=n.bufferToInt(t),s=u(n.toUnsigned(i).toString("hex"),64),c=u(n.toUnsigned(o).toString("hex"),64),f=n.stripHexPrefix(n.intToHex(a));return n.addHexPrefix(s.concat(c,f)).toString("hex")},normalize:function(t){if(t){if("number"==typeof t){var e=n.toBuffer(t);t=n.bufferToHex(e)}if("string"!=typeof t){var r="eth-sig-util.normalize() requires hex string or integer input.";throw new Error(r+=" received "+typeof t+": "+t)}return n.addHexPrefix(t.toLowerCase())}},personalSign:function(t,e){var r=n.toBuffer(e.data),i=n.hashPersonalMessage(r),o=n.ecsign(i,t);return n.bufferToHex(this.concatSig(o.v,o.r,o.s))},recoverPersonalSignature:function(t){var e=s(t),r=n.publicToAddress(e);return n.bufferToHex(r)},extractPublicKey:function(t){return"0x"+s(t).toString("hex")},typedSignatureHash:function(t){var e=o(t);return n.bufferToHex(e)},signTypedData:function(t,e){var r=o(e.data),i=n.ecsign(r,t);return n.bufferToHex(this.concatSig(i.v,i.r,i.s))},recoverTypedSignature:function(t){var e=a(o(t.data),t.sig),r=n.publicToAddress(e);return n.bufferToHex(r)}}},59099:function(t,e,r){"use strict";var n=r(62426).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.createHashFunction=function(t){return function(e){var r=t();return r.update(e),n.from(r.digest())}}},29376:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(59099),i=r(12140);e.keccak224=n.createHashFunction((function(){return i("keccak224")})),e.keccak256=n.createHashFunction((function(){return i("keccak256")})),e.keccak384=n.createHashFunction((function(){return i("keccak384")})),e.keccak512=n.createHashFunction((function(){return i("keccak512")}))},57265:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15339);e.getRandomBytes=function(t){return new Promise((function(e,r){n(t,(function(t,n){t?r(t):e(n)}))}))},e.getRandomBytesSync=function(t){return n(t)}},3659:function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(s){o=[6,s],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(49500),a=r(57265);e.createPrivateKey=function(){return n(this,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,a.getRandomBytes(32)];case 1:return t=e.sent(),o.privateKeyVerify(t)?[2,t]:[3,0];case 2:return[2]}}))}))},e.createPrivateKeySync=function(){for(;;){var t=a.getRandomBytesSync(32);if(o.privateKeyVerify(t))return t}},function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(49500))},84946:function(t,e,r){t.exports=r(67998)},67998:function(t,e,r){var n=r(62426).Buffer,i=r(19510),o=r(85639),a=function(){};function s(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}function u(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function c(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function f(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function l(t){var e=typeof t;if("string"===e)return i.isHexPrefixed(t)?new o(i.stripHexPrefix(t),16):new o(t,10);if("number"===e)return new o(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function h(t){var e=/^(\w+)\((.*)\)$/.exec(t);if(3!==e.length)throw new Error("Invalid method signature");var r=/^(.+)\):\((.+)$/.exec(e[2]);if(null!==r&&3===r.length)return{method:e[1],args:r[1].split(","),retargs:r[2].split(",")};var n=e[2].split(",");return 1===n.length&&""===n[0]&&(n=[]),{method:e[1],args:n}}function d(t,e){var r,a,s,h;if("address"===t)return d("uint160",l(e));if("bool"===t)return d("uint8",e?1:0);if("string"===t)return d("bytes",n.from(e,"utf8"));if(y(t)){if(void 0===e.length)throw new Error("Not an array?");if("dynamic"!==(r=f(t))&&0!==r&&e.length>r)throw new Error("Elements exceed array size: "+r);for(h in s=[],t=t.slice(0,t.lastIndexOf("[")),"string"==typeof e&&(e=JSON.parse(e)),e)s.push(d(t,e[h]));if("dynamic"===r){var p=d("uint256",e.length);s.unshift(p)}return n.concat(s)}if("bytes"===t)return e=n.from(e),s=n.concat([d("uint256",e.length),e]),e.length%32!=0&&(s=n.concat([s,i.zeros(32-e.length%32)])),s;if(t.startsWith("bytes")){if((r=u(t))<1||r>32)throw new Error("Invalid bytes<N> width: "+r);return i.setLengthRight(e,32)}if(t.startsWith("uint")){if((r=u(t))%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if((a=l(e)).bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+a.bitLength());if(a<0)throw new Error("Supplied uint is negative");return a.toArrayLike(n,"be",32)}if(t.startsWith("int")){if((r=u(t))%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if((a=l(e)).bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+a.bitLength());return a.toTwos(256).toArrayLike(n,"be",32)}if(t.startsWith("ufixed")){if(r=c(t),(a=l(e))<0)throw new Error("Supplied ufixed is negative");return d("uint256",a.mul(new o(2).pow(new o(r[1]))))}if(t.startsWith("fixed"))return r=c(t),d("int256",l(e).mul(new o(2).pow(new o(r[1]))));throw new Error("Unsupported or invalid type: "+t)}function p(t,e,r){var i,a,s,u;if("string"==typeof t&&(t=v(t)),"address"===t.name)return p(t.rawType,e,r).toArrayLike(n,"be",20).toString("hex");if("bool"===t.name)return p(t.rawType,e,r).toString()===new o(1).toString();if("string"===t.name){var c=p(t.rawType,e,r);return n.from(c,"utf8").toString()}if(t.isArray){for(s=[],i=t.size,"dynamic"===t.size&&(r=p("uint256",e,r).toNumber(),i=p("uint256",e,r).toNumber(),r+=32),u=0;u<i;u++){var f=p(t.subArray,e,r);s.push(f),r+=t.subArray.memoryUsage}return s}if("bytes"===t.name)return r=p("uint256",e,r).toNumber(),i=p("uint256",e,r).toNumber(),e.slice(r+32,r+32+i);if(t.name.startsWith("bytes"))return e.slice(r,r+t.size);if(t.name.startsWith("uint")){if((a=new o(e.slice(r,r+32),16,"be")).bitLength()>t.size)throw new Error("Decoded int exceeds width: "+t.size+" vs "+a.bitLength());return a}if(t.name.startsWith("int")){if((a=new o(e.slice(r,r+32),16,"be").fromTwos(256)).bitLength()>t.size)throw new Error("Decoded uint exceeds width: "+t.size+" vs "+a.bitLength());return a}if(t.name.startsWith("ufixed")){if(i=new o(2).pow(new o(t.size[1])),!(a=p("uint256",e,r)).mod(i).isZero())throw new Error("Decimals not supported yet");return a.div(i)}if(t.name.startsWith("fixed")){if(i=new o(2).pow(new o(t.size[1])),!(a=p("int256",e,r)).mod(i).isZero())throw new Error("Decimals not supported yet");return a.div(i)}throw new Error("Unsupported or invalid type: "+t.name)}function v(t){var e,r,n;if(y(t)){e=f(t);var i=t.slice(0,t.lastIndexOf("["));return i=v(i),r={isArray:!0,name:t,size:e,memoryUsage:"dynamic"===e?32:i.memoryUsage*e,subArray:i}}switch(t){case"address":n="uint160";break;case"bool":n="uint8";break;case"string":n="bytes"}if(r={rawType:n,name:t,memoryUsage:32},t.startsWith("bytes")&&"bytes"!==t||t.startsWith("uint")||t.startsWith("int")?r.size=u(t):(t.startsWith("ufixed")||t.startsWith("fixed"))&&(r.size=c(t)),t.startsWith("bytes")&&"bytes"!==t&&(r.size<1||r.size>32))throw new Error("Invalid bytes<N> width: "+r.size);if((t.startsWith("uint")||t.startsWith("int"))&&(r.size%8||r.size<8||r.size>256))throw new Error("Invalid int/uint<N> width: "+r.size);return r}function m(t){return"string"===t||"bytes"===t||"dynamic"===f(t)}function y(t){return t.lastIndexOf("]")===t.length-1}function g(t,e){return t.startsWith("address")||t.startsWith("bytes")?"0x"+e.toString("hex"):e.toString()}a.eventID=function(t,e){var r=t+"("+e.map(s).join(",")+")";return i.keccak256(n.from(r))},a.methodID=function(t,e){return a.eventID(t,e).slice(0,4)},a.rawEncode=function(t,e){var r=[],i=[],o=0;t.forEach((function(t){if(y(t)){var e=f(t);o+="dynamic"!==e?32*e:32}else o+=32}));for(var a=0;a<t.length;a++){var u=s(t[a]),c=d(u,e[a]);m(u)?(r.push(d("uint256",o)),i.push(c),o+=c.length):r.push(c)}return n.concat(r.concat(i))},a.rawDecode=function(t,e){var r=[];e=n.from(e);for(var i=0,o=0;o<t.length;o++){var a=v(s(t[o])),u=p(a,e,i);i+=a.memoryUsage,r.push(u)}return r},a.simpleEncode=function(t){var e=Array.prototype.slice.call(arguments).slice(1),r=h(t);if(e.length!==r.args.length)throw new Error("Argument count mismatch");return n.concat([a.methodID(r.method,r.args),a.rawEncode(r.args,e)])},a.simpleDecode=function(t,e){var r=h(t);if(!r.retargs)throw new Error("No return values in method");return a.rawDecode(r.retargs,e)},a.stringify=function(t,e){var r=[];for(var n in t){var i=t[n],o=e[n];o=/^[^\[]+\[.*\]$/.test(i)?o.map((function(t){return g(i,t)})).join(", "):g(i,o),r.push(o)}return r},a.solidityHexValue=function(t,e,r){var o,s;if(y(t)){var c=t.replace(/\[.*?\]/,"");if(!y(c)){var h=f(t);if("dynamic"!==h&&0!==h&&e.length>h)throw new Error("Elements exceed array size: "+h)}var d=e.map((function(t){return a.solidityHexValue(c,t,256)}));return n.concat(d)}if("bytes"===t)return e;if("string"===t)return n.from(e,"utf8");if("bool"===t){r=r||8;var p=Array(r/4).join("0");return n.from(e?p+"1":p+"0","hex")}if("address"===t){var v=20;return r&&(v=r/8),i.setLengthLeft(e,v)}if(t.startsWith("bytes")){if((o=u(t))<1||o>32)throw new Error("Invalid bytes<N> width: "+o);return i.setLengthRight(e,o)}if(t.startsWith("uint")){if((o=u(t))%8||o<8||o>256)throw new Error("Invalid uint<N> width: "+o);if((s=l(e)).bitLength()>o)throw new Error("Supplied uint exceeds width: "+o+" vs "+s.bitLength());return r=r||o,s.toArrayLike(n,"be",r/8)}if(t.startsWith("int")){if((o=u(t))%8||o<8||o>256)throw new Error("Invalid int<N> width: "+o);if((s=l(e)).bitLength()>o)throw new Error("Supplied int exceeds width: "+o+" vs "+s.bitLength());return r=r||o,s.toTwos(o).toArrayLike(n,"be",r/8)}throw new Error("Unsupported or invalid type: "+t)},a.solidityPack=function(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var r=[],i=0;i<t.length;i++){var o=s(t[i]),u=e[i];r.push(a.solidityHexValue(o,u,null))}return n.concat(r)},a.soliditySHA3=function(t,e){return i.keccak256(a.solidityPack(t,e))},a.soliditySHA256=function(t,e){return i.sha256(a.solidityPack(t,e))},a.solidityRIPEMD160=function(t,e){return i.ripemd160(a.solidityPack(t,e),!0)},a.fromSerpent=function(t){for(var e,r=[],n=0;n<t.length;n++){var i=t[n];if("s"===i)r.push("bytes");else if("b"===i){for(var o="bytes",a=n+1;a<t.length&&((e=t[a])>="0"&&e<="9");)o+=t[a]-"0",a++;n=a-1,r.push(o)}else if("i"===i)r.push("int256");else{if("a"!==i)throw new Error("Unsupported or invalid type: "+i);r.push("int256[]")}}return r},a.toSerpent=function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];if("bytes"===n)e.push("s");else if(n.startsWith("bytes"))e.push("b"+u(n));else if("int256"===n)e.push("i");else{if("int256[]"!==n)throw new Error("Unsupported or invalid type: "+n);e.push("a")}}return e.join("")},t.exports=a},25159:function(t,e,r){"use strict";var n=r(62426).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.importPublic=e.privateToPublic=e.privateToAddress=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.isPrecompiled=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isZeroAddress=e.isValidAddress=e.zeroAddress=void 0;var i=r(43438),o=r(36651),a=r(18364),s=r(85639),u=r(48764),c=r(45552);e.zeroAddress=function(){var t=u.zeros(20);return u.bufferToHex(t)},e.isValidAddress=function(t){return/^0x[0-9a-fA-F]{40}$/.test(t)},e.isZeroAddress=function(t){return e.zeroAddress()===u.addHexPrefix(t)},e.toChecksumAddress=function(t,e){t=o.stripHexPrefix(t).toLowerCase();for(var r=void 0!==e?e.toString()+"0x":"",n=c.keccak(r+t).toString("hex"),i="0x",a=0;a<t.length;a++)parseInt(n[a],16)>=8?i+=t[a].toUpperCase():i+=t[a];return i},e.isValidChecksumAddress=function(t,r){return e.isValidAddress(t)&&e.toChecksumAddress(t,r)===t},e.generateAddress=function(t,e){t=u.toBuffer(t);var r=new s(e);return r.isZero()?c.rlphash([t,null]).slice(-20):c.rlphash([t,n.from(r.toArray())]).slice(-20)},e.generateAddress2=function(t,e,r){var o=u.toBuffer(t),a=u.toBuffer(e),s=u.toBuffer(r);return i(20===o.length),i(32===a.length),c.keccak256(n.concat([n.from("ff","hex"),o,a,c.keccak256(s)])).slice(-20)},e.isPrecompiled=function(t){var e=u.unpad(t);return 1===e.length&&e[0]>=1&&e[0]<=8},e.isValidPrivate=function(t){return a.privateKeyVerify(t)},e.isValidPublic=function(t,e){return void 0===e&&(e=!1),64===t.length?a.publicKeyVerify(n.concat([n.from([4]),t])):!!e&&a.publicKeyVerify(t)},e.pubToAddress=function(t,e){return void 0===e&&(e=!1),t=u.toBuffer(t),e&&64!==t.length&&(t=a.publicKeyConvert(t,!1).slice(1)),i(64===t.length),c.keccak(t).slice(-20)},e.publicToAddress=e.pubToAddress,e.privateToAddress=function(t){return e.publicToAddress(e.privateToPublic(t))},e.privateToPublic=function(t){return t=u.toBuffer(t),a.publicKeyCreate(t,!1).slice(1)},e.importPublic=function(t){return 64!==(t=u.toBuffer(t)).length&&(t=a.publicKeyConvert(t,!1).slice(1)),t}},48764:function(t,e,r){"use strict";var n=r(62426).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.baToJSON=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToHex=e.bufferToInt=e.toBuffer=e.stripZeros=e.unpad=e.setLengthRight=e.setLength=e.setLengthLeft=e.zeros=void 0;var i=r(36651),o=r(85639);e.zeros=function(t){return n.allocUnsafe(t).fill(0)},e.setLengthLeft=function(t,r,n){void 0===n&&(n=!1);var i=e.zeros(r);return t=e.toBuffer(t),n?t.length<r?(t.copy(i),i):t.slice(0,r):t.length<r?(t.copy(i,r-t.length),i):t.slice(-r)},e.setLength=e.setLengthLeft,e.setLengthRight=function(t,r){return e.setLength(t,r,!0)},e.unpad=function(t){for(var e=(t=i.stripHexPrefix(t))[0];t.length>0&&"0"===e.toString();)e=(t=t.slice(1))[0];return t},e.stripZeros=e.unpad,e.toBuffer=function(t){if(!n.isBuffer(t))if(Array.isArray(t))t=n.from(t);else if("string"==typeof t){if(!i.isHexString(t))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+t);t=n.from(i.padToEven(i.stripHexPrefix(t)),"hex")}else if("number"==typeof t)t=i.intToBuffer(t);else if(null==t)t=n.allocUnsafe(0);else if(o.isBN(t))t=t.toArrayLike(n);else{if(!t.toArray)throw new Error("invalid type");t=n.from(t.toArray())}return t},e.bufferToInt=function(t){return new o(e.toBuffer(t)).toNumber()},e.bufferToHex=function(t){return"0x"+(t=e.toBuffer(t)).toString("hex")},e.fromSigned=function(t){return new o(t).fromTwos(256)},e.toUnsigned=function(t){return n.from(t.toTwos(256).toArray())},e.addHexPrefix=function(t){return"string"!=typeof t||i.isHexPrefixed(t)?t:"0x"+t},e.baToJSON=function(t){if(n.isBuffer(t))return"0x"+t.toString("hex");if(t instanceof Array){for(var r=[],i=0;i<t.length;i++)r.push(e.baToJSON(t[i]));return r}}},17693:function(t,e,r){"use strict";var n=r(62426).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.MAX_INTEGER=void 0;var i=r(85639);e.MAX_INTEGER=new i("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new i("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=n.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=n.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=n.from(e.KECCAK256_RLP_S,"hex")},45552:function(t,e,r){"use strict";var n=r(62426).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.rlphash=e.ripemd160=e.sha256=e.keccak256=e.keccak=void 0;var i=r(29376),o=i.keccak224,a=i.keccak384,s=i.keccak256,u=i.keccak512,c=r(98604),f=r(36651),l=r(60970),h=r(48764);e.keccak=function(t,e){switch(void 0===e&&(e=256),t="string"!=typeof t||f.isHexString(t)?h.toBuffer(t):n.from(t,"utf8"),e||(e=256),e){case 224:return o(t);case 256:return s(t);case 384:return a(t);case 512:return u(t);default:throw new Error("Invald algorithm: keccak"+e)}},e.keccak256=function(t){return e.keccak(t)},e.sha256=function(t){return t=h.toBuffer(t),c("sha256").update(t).digest()},e.ripemd160=function(t,e){t=h.toBuffer(t);var r=c("rmd160").update(t).digest();return!0===e?h.setLength(r,32):r},e.rlphash=function(t){return e.keccak(l.encode(t))}},19510:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=e.rlp=e.BN=void 0;var o=r(18364);e.secp256k1=o;var a=r(36651),s=r(85639);e.BN=s;var u=r(60970);e.rlp=u,Object.assign(e,a),i(r(17693),e),i(r(25159),e),i(r(45552),e),i(r(51711),e),i(r(48764),e),i(r(28298),e)},28298:function(t,e,r){"use strict";var n=r(62426).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.defineProperties=void 0;var i=r(43438),o=r(36651),a=r(60970),s=r(48764);e.defineProperties=function(t,e,r){if(t.raw=[],t._fields=[],t.toJSON=function(e){if(void 0===e&&(e=!1),e){var r={};return t._fields.forEach((function(e){r[e]="0x"+t[e].toString("hex")})),r}return s.baToJSON(t.raw)},t.serialize=function(){return a.encode(t.raw)},e.forEach((function(e,r){function o(){return t.raw[r]}function a(o){"00"!==(o=s.toBuffer(o)).toString("hex")||e.allowZero||(o=n.allocUnsafe(0)),e.allowLess&&e.length?(o=s.stripZeros(o),i(e.length>=o.length,"The field "+e.name+" must not have more "+e.length+" bytes")):e.allowZero&&0===o.length||!e.length||i(e.length===o.length,"The field "+e.name+" must have byte length of "+e.length),t.raw[r]=o}t._fields.push(e.name),Object.defineProperty(t,e.name,{enumerable:!0,configurable:!0,get:o,set:a}),e.default&&(t[e.name]=e.default),e.alias&&Object.defineProperty(t,e.alias,{enumerable:!1,configurable:!0,set:a,get:o})})),r)if("string"==typeof r&&(r=n.from(o.stripHexPrefix(r),"hex")),n.isBuffer(r)&&(r=a.decode(r)),Array.isArray(r)){if(r.length>t._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(e,r){t[t._fields[r]]=s.toBuffer(e)}))}else{if("object"!=typeof r)throw new Error("invalid data");var u=Object.keys(r);e.forEach((function(e){-1!==u.indexOf(e.name)&&(t[e.name]=r[e.name]),-1!==u.indexOf(e.alias)&&(t[e.alias]=r[e.alias])}))}}},18364:function(t,e,r){"use strict";var n=r(62426).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.ecdhUnsafe=e.ecdh=e.recover=e.verify=e.sign=e.signatureImportLax=e.signatureImport=e.signatureExport=e.signatureNormalize=e.publicKeyCombine=e.publicKeyTweakMul=e.publicKeyTweakAdd=e.publicKeyVerify=e.publicKeyConvert=e.publicKeyCreate=e.privateKeyTweakMul=e.privateKeyTweakAdd=e.privateKeyModInverse=e.privateKeyNegate=e.privateKeyImport=e.privateKeyExport=e.privateKeyVerify=void 0;var i=r(3659),o=r(69532),a=r(52651);e.privateKeyVerify=function(t){return 32===t.length&&i.privateKeyVerify(Uint8Array.from(t))},e.privateKeyExport=function(t,e){if(32!==t.length)throw new RangeError("private key length is invalid");var r=o.privateKeyExport(t,e);return a.privateKeyExport(t,r,e)},e.privateKeyImport=function(t){if(null!==(t=a.privateKeyImport(t))&&32===t.length&&e.privateKeyVerify(t))return t;throw new Error("couldn't import from DER format")},e.privateKeyNegate=function(t){return n.from(i.privateKeyNegate(Uint8Array.from(t)))},e.privateKeyModInverse=function(t){if(32!==t.length)throw new Error("private key length is invalid");return n.from(o.privateKeyModInverse(Uint8Array.from(t)))},e.privateKeyTweakAdd=function(t,e){return n.from(i.privateKeyTweakAdd(Uint8Array.from(t),e))},e.privateKeyTweakMul=function(t,e){return n.from(i.privateKeyTweakMul(Uint8Array.from(t),Uint8Array.from(e)))},e.publicKeyCreate=function(t,e){return n.from(i.publicKeyCreate(Uint8Array.from(t),e))},e.publicKeyConvert=function(t,e){return n.from(i.publicKeyConvert(Uint8Array.from(t),e))},e.publicKeyVerify=function(t){return(33===t.length||65===t.length)&&i.publicKeyVerify(Uint8Array.from(t))},e.publicKeyTweakAdd=function(t,e,r){return n.from(i.publicKeyTweakAdd(Uint8Array.from(t),Uint8Array.from(e),r))},e.publicKeyTweakMul=function(t,e,r){return n.from(i.publicKeyTweakMul(Uint8Array.from(t),Uint8Array.from(e),r))},e.publicKeyCombine=function(t,e){var r=[];return t.forEach((function(t){r.push(Uint8Array.from(t))})),n.from(i.publicKeyCombine(r,e))},e.signatureNormalize=function(t){return n.from(i.signatureNormalize(Uint8Array.from(t)))},e.signatureExport=function(t){return n.from(i.signatureExport(Uint8Array.from(t)))},e.signatureImport=function(t){return n.from(i.signatureImport(Uint8Array.from(t)))},e.signatureImportLax=function(t){if(0===t.length)throw new RangeError("signature length is invalid");var e=a.signatureImportLax(t);if(null===e)throw new Error("couldn't parse DER signature");return o.signatureImport(e)},e.sign=function(t,e,r){if(null===r)throw new TypeError("options should be an Object");var o=void 0;if(r){if(o={},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");o.data=new Uint8Array(r.data)}if(null===r.noncefn)throw new TypeError("options.noncefn should be a Function");r.noncefn&&(o.noncefn=function(t,e,i,o,a){var s=null!=i?n.from(i):null,u=null!=o?n.from(o):null,c=n.from("");return r.noncefn&&(c=r.noncefn(n.from(t),n.from(e),s,u,a)),new Uint8Array(c)})}var a=i.ecdsaSign(Uint8Array.from(t),Uint8Array.from(e),o);return{signature:n.from(a.signature),recovery:a.recid}},e.verify=function(t,e,r){return i.ecdsaVerify(Uint8Array.from(e),Uint8Array.from(t),r)},e.recover=function(t,e,r,o){return n.from(i.ecdsaRecover(Uint8Array.from(e),r,Uint8Array.from(t),o))},e.ecdh=function(t,e){return n.from(i.ecdh(Uint8Array.from(t),Uint8Array.from(e),{}))},e.ecdhUnsafe=function(t,e,r){if(33!==t.length&&65!==t.length)throw new RangeError("public key length is invalid");if(32!==e.length)throw new RangeError("private key length is invalid");return n.from(o.ecdhUnsafe(Uint8Array.from(t),Uint8Array.from(e),r))}},52651:function(t,e,r){"use strict";var n=r(62426).Buffer;Object.defineProperty(e,"__esModule",{value:!0});var i=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]),o=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]);e.privateKeyExport=function(t,e,r){void 0===r&&(r=!0);var a=n.from(r?i:o);return t.copy(a,r?8:9),e.copy(a,r?181:214),a},e.privateKeyImport=function(t){var e=t.length,r=0;if(e<r+1||48!==t[r])return null;if(e<(r+=1)+1||!(128&t[r]))return null;var n=127&t[r];if(n<1||n>2)return null;if(e<(r+=1)+n)return null;var i=t[r+n-1]|(n>1?t[r+n-2]<<8:0);return e<(r+=n)+i||e<r+3||2!==t[r]||1!==t[r+1]||1!==t[r+2]||e<(r+=3)+2||4!==t[r]||t[r+1]>32||e<r+2+t[r+1]?null:t.slice(r+2,r+2+t[r+1])},e.signatureImportLax=function(t){var e=n.alloc(32,0),r=n.alloc(32,0),i=t.length,o=0;if(48!==t[o++])return null;var a=t[o++];if(128&a&&(o+=a-128)>i)return null;if(2!==t[o++])return null;var s=t[o++];if(128&s){if(o+(a=s-128)>i)return null;for(;a>0&&0===t[o];o+=1,a-=1);for(s=0;a>0;o+=1,a-=1)s=(s<<8)+t[o]}if(s>i-o)return null;var u=o;if(o+=s,2!==t[o++])return null;var c=t[o++];if(128&c){if(o+(a=c-128)>i)return null;for(;a>0&&0===t[o];o+=1,a-=1);for(c=0;a>0;o+=1,a-=1)c=(c<<8)+t[o]}if(c>i-o)return null;var f=o;for(o+=c;s>0&&0===t[u];s-=1,u+=1);if(s>32)return null;var l=t.slice(u,u+s);for(l.copy(e,32-l.length);c>0&&0===t[f];c-=1,f+=1);if(c>32)return null;var h=t.slice(f,f+c);return h.copy(r,32-h.length),{r:e,s:r}}},69532:function(t,e,r){"use strict";var n=r(62426).Buffer;Object.defineProperty(e,"__esModule",{value:!0});var i=r(85639),o=new(0,r(3039).ec)("secp256k1"),a=o.curve;e.privateKeyExport=function(t,e){void 0===e&&(e=!0);var r=new i(t);if(r.ucmp(a.n)>=0)throw new Error("couldn't export to DER format");var n=o.g.mul(r);return s(n.getX(),n.getY(),e)},e.privateKeyModInverse=function(t){var e=new i(t);if(e.ucmp(a.n)>=0||e.isZero())throw new Error("private key range is invalid");return e.invm(a.n).toArrayLike(n,"be",32)},e.signatureImport=function(t){var e=new i(t.r);e.ucmp(a.n)>=0&&(e=new i(0));var r=new i(t.s);return r.ucmp(a.n)>=0&&(r=new i(0)),n.concat([e.toArrayLike(n,"be",32),r.toArrayLike(n,"be",32)])},e.ecdhUnsafe=function(t,e,r){void 0===r&&(r=!0);var n=o.keyFromPublic(t),u=new i(e);if(u.ucmp(a.n)>=0||u.isZero())throw new Error("scalar was invalid (zero or overflow)");var c=n.pub.mul(u);return s(c.getX(),c.getY(),r)};var s=function(t,e,r){var i;return r?((i=n.alloc(33))[0]=e.isOdd()?3:2,t.toArrayLike(n,"be",32).copy(i,1)):((i=n.alloc(65))[0]=4,t.toArrayLike(n,"be",32).copy(i,1),e.toArrayLike(n,"be",32).copy(i,33)),i}},51711:function(t,e,r){"use strict";var n=r(62426).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.hashPersonalMessage=e.isValidSignature=e.fromRpcSig=e.toRpcSig=e.ecrecover=e.ecsign=void 0;var i=r(18364),o=r(85639),a=r(48764),s=r(45552);function u(t,e){return e?t-(2*e+35):t-27}function c(t){return 0===t||1===t}e.ecsign=function(t,e,r){var n=i.sign(t,e),o=n.recovery;return{r:n.signature.slice(0,32),s:n.signature.slice(32,64),v:r?o+(2*r+35):o+27}},e.ecrecover=function(t,e,r,o,s){var f=n.concat([a.setLength(r,32),a.setLength(o,32)],64),l=u(e,s);if(!c(l))throw new Error("Invalid signature v value");var h=i.recover(t,f,l);return i.publicKeyConvert(h,!1).slice(1)},e.toRpcSig=function(t,e,r,i){if(!c(u(t,i)))throw new Error("Invalid signature v value");return a.bufferToHex(n.concat([a.setLengthLeft(e,32),a.setLengthLeft(r,32),a.toBuffer(t)]))},e.fromRpcSig=function(t){var e=a.toBuffer(t);if(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)}},e.isValidSignature=function(t,e,r,n,i){void 0===n&&(n=!0);var a=new o("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new o("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==e.length||32!==r.length)return!1;if(!c(u(t,i)))return!1;var f=new o(e),l=new o(r);return!(f.isZero()||f.gt(s)||l.isZero()||l.gt(s))&&(!n||1!==l.cmp(a))},e.hashPersonalMessage=function(t){var e=n.from("Ethereum Signed Message:\n"+t.length.toString(),"utf-8");return s.keccak(n.concat([e,t]))}},78078:function(t,e,r){"use strict";var n=r(62426).Buffer;var i=r(25714),o=r(16523),a=i.BN,s=new a("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{};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,e),Object.defineProperty(this,"from",{enumerable:!0,configurable:!0,get:this.getSenderAddress.bind(this)});var o=i.bufferToInt(this.v),a=Math.floor((o-35)/2);a<0&&(a=0),this._chainId=a||e.chainId||0,this._homestead=!0}return t.prototype.toCreationAddress=function(){return""===this.to.toString("hex")},t.prototype.hash=function(t){void 0===t&&(t=!0);var e=void 0;if(t)e=this.raw;else if(this._chainId>0){var r=this.raw.slice();this.v=this._chainId,this.r=0,this.s=0,e=this.raw,this.raw=r}else e=this.raw.slice(0,6);return i.rlphash(e)},t.prototype.getChainId=function(){return this._chainId},t.prototype.getSenderAddress=function(){if(this._from)return this._from;var t=this.getSenderPublicKey();return this._from=i.publicToAddress(t),this._from},t.prototype.getSenderPublicKey=function(){if(!(this._senderPubKey&&this._senderPubKey.length||this.verifySignature()))throw new Error("Invalid Signature");return this._senderPubKey},t.prototype.verifySignature=function(){var t=this.hash(!1);if(this._homestead&&1===new a(this.s).cmp(s))return!1;try{var e=i.bufferToInt(this.v);this._chainId>0&&(e-=2*this._chainId+8),this._senderPubKey=i.ecrecover(t,e,this.r,this.s)}catch(r){return!1}return!!this._senderPubKey},t.prototype.sign=function(t){var e=this.hash(!1),r=i.ecsign(e,t);this._chainId>0&&(r.v+=2*this._chainId+8),Object.assign(this,r)},t.prototype.getDataFee=function(){for(var t=this.raw[5],e=new a(0),r=0;r<t.length;r++)0===t[r]?e.iaddn(o.txDataZeroGas.v):e.iaddn(o.txDataNonZeroGas.v);return e},t.prototype.getBaseFee=function(){var t=this.getDataFee().iaddn(o.txGas.v);return this._homestead&&this.toCreationAddress()&&t.iaddn(o.txCreation.v),t},t.prototype.getUpfrontCost=function(){return new a(this.gasLimit).imul(new a(this.gasPrice)).iadd(new a(this.value))},t.prototype.validate=function(t){var e=[];return this.verifySignature()||e.push("Invalid Signature"),this.getBaseFee().cmp(new a(this.gasLimit))>0&&e.push(["gas limit is too low. Need at least "+this.getBaseFee()]),void 0===t||!1===t?0===e.length:e.join(" ")},t}();t.exports=u},25714:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(29376),o=i.keccak224,a=i.keccak384,s=i.keccak256,u=i.keccak512,c=r(18432),f=r(43438),l=r(60970),h=r(85639),d=r(98604),p=r(26143).Buffer;Object.assign(e,r(36651)),e.MAX_INTEGER=new h("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new h("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.SHA3_NULL_S=e.KECCAK256_NULL_S,e.KECCAK256_NULL=p.from(e.KECCAK256_NULL_S,"hex"),e.SHA3_NULL=e.KECCAK256_NULL,e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.SHA3_RLP_ARRAY_S=e.KECCAK256_RLP_ARRAY_S,e.KECCAK256_RLP_ARRAY=p.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.SHA3_RLP_ARRAY=e.KECCAK256_RLP_ARRAY,e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.SHA3_RLP_S=e.KECCAK256_RLP_S,e.KECCAK256_RLP=p.from(e.KECCAK256_RLP_S,"hex"),e.SHA3_RLP=e.KECCAK256_RLP,e.BN=h,e.rlp=l,e.secp256k1=c,e.zeros=function(t){return p.allocUnsafe(t).fill(0)},e.zeroAddress=function(){var t=e.zeros(20);return e.bufferToHex(t)},e.setLengthLeft=e.setLength=function(t,r,n){var i=e.zeros(r);return t=e.toBuffer(t),n?t.length<r?(t.copy(i),i):t.slice(0,r):t.length<r?(t.copy(i,r-t.length),i):t.slice(-r)},e.setLengthRight=function(t,r){return e.setLength(t,r,!0)},e.unpad=e.stripZeros=function(t){for(var r=(t=e.stripHexPrefix(t))[0];t.length>0&&"0"===r.toString();)r=(t=t.slice(1))[0];return t},e.toBuffer=function(t){if(!p.isBuffer(t))if(Array.isArray(t))t=p.from(t);else if("string"==typeof t)t=e.isHexString(t)?p.from(e.padToEven(e.stripHexPrefix(t)),"hex"):p.from(t);else if("number"==typeof t)t=e.intToBuffer(t);else if(null==t)t=p.allocUnsafe(0);else if(h.isBN(t))t=t.toArrayLike(p);else{if(!t.toArray)throw new Error("invalid type");t=p.from(t.toArray())}return t},e.bufferToInt=function(t){return new h(e.toBuffer(t)).toNumber()},e.bufferToHex=function(t){return"0x"+(t=e.toBuffer(t)).toString("hex")},e.fromSigned=function(t){return new h(t).fromTwos(256)},e.toUnsigned=function(t){return p.from(t.toTwos(256).toArray())},e.keccak=function(t,r){switch(t=e.toBuffer(t),r||(r=256),r){case 224:return o(t);case 256:return s(t);case 384:return a(t);case 512:return u(t);default:throw new Error("Invald algorithm: keccak"+r)}},e.keccak256=function(t){return e.keccak(t)},e.sha3=e.keccak,e.sha256=function(t){return t=e.toBuffer(t),d("sha256").update(t).digest()},e.ripemd160=function(t,r){t=e.toBuffer(t);var n=d("rmd160").update(t).digest();return!0===r?e.setLength(n,32):n},e.rlphash=function(t){return e.keccak(l.encode(t))},e.isValidPrivate=function(t){return c.privateKeyVerify(t)},e.isValidPublic=function(t,e){return 64===t.length?c.publicKeyVerify(p.concat([p.from([4]),t])):!!e&&c.publicKeyVerify(t)},e.pubToAddress=e.publicToAddress=function(t,r){return t=e.toBuffer(t),r&&64!==t.length&&(t=c.publicKeyConvert(t,!1).slice(1)),f(64===t.length),e.keccak(t).slice(-20)};var v=e.privateToPublic=function(t){return t=e.toBuffer(t),c.publicKeyCreate(t,!1).slice(1)};e.importPublic=function(t){return 64!==(t=e.toBuffer(t)).length&&(t=c.publicKeyConvert(t,!1).slice(1)),t},e.ecsign=function(t,e){var r=c.sign(t,e),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},e.hashPersonalMessage=function(t){var r=e.toBuffer("Ethereum Signed Message:\n"+t.length.toString());return e.keccak(p.concat([r,t]))},e.ecrecover=function(t,r,n,i){var o=p.concat([e.setLength(n,32),e.setLength(i,32)],64),a=r-27;if(0!==a&&1!==a)throw new Error("Invalid signature v value");var s=c.recover(t,o,a);return c.publicKeyConvert(s,!1).slice(1)},e.toRpcSig=function(t,r,n){if(27!==t&&28!==t)throw new Error("Invalid recovery id");return e.bufferToHex(p.concat([e.setLengthLeft(r,32),e.setLengthLeft(n,32),e.toBuffer(t-27)]))},e.fromRpcSig=function(t){if(65!==(t=e.toBuffer(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)}},e.privateToAddress=function(t){return e.publicToAddress(v(t))},e.isValidAddress=function(t){return/^0x[0-9a-fA-F]{40}$/.test(t)},e.isZeroAddress=function(t){return e.zeroAddress()===e.addHexPrefix(t)},e.toChecksumAddress=function(t){t=e.stripHexPrefix(t).toLowerCase();for(var r=e.keccak(t).toString("hex"),n="0x",i=0;i<t.length;i++)parseInt(r[i],16)>=8?n+=t[i].toUpperCase():n+=t[i];return n},e.isValidChecksumAddress=function(t){return e.isValidAddress(t)&&e.toChecksumAddress(t)===t},e.generateAddress=function(t,r){return t=e.toBuffer(t),r=(r=new h(r)).isZero()?null:p.from(r.toArray()),e.rlphash([t,r]).slice(-20)},e.isPrecompiled=function(t){var r=e.unpad(t);return 1===r.length&&r[0]>=1&&r[0]<=8},e.addHexPrefix=function(t){return"string"!=typeof t||e.isHexPrefixed(t)?t:"0x"+t},e.isValidSignature=function(t,e,r,n){var i=new h("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new h("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===e.length&&32===r.length&&((27===t||28===t)&&(e=new h(e),r=new h(r),!(e.isZero()||e.gt(o)||r.isZero()||r.gt(o))&&(!1!==n||1!==new h(r).cmp(i))))},e.baToJSON=function(t){if(p.isBuffer(t))return"0x"+t.toString("hex");if(t instanceof Array){for(var r=[],n=0;n<t.length;n++)r.push(e.baToJSON(t[n]));return r}},e.defineProperties=function(t,r,i){if(t.raw=[],t._fields=[],t.toJSON=function(r){if(r){var n={};return t._fields.forEach((function(e){n[e]="0x"+t[e].toString("hex")})),n}return e.baToJSON(this.raw)},t.serialize=function(){return l.encode(t.raw)},r.forEach((function(r,n){function i(){return t.raw[n]}function o(i){"00"!==(i=e.toBuffer(i)).toString("hex")||r.allowZero||(i=p.allocUnsafe(0)),r.allowLess&&r.length?(i=e.stripZeros(i),f(r.length>=i.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===i.length||!r.length||f(r.length===i.length,"The field "+r.name+" must have byte length of "+r.length),t.raw[n]=i}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:i,set:o}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),i)if("string"==typeof i&&(i=p.from(e.stripHexPrefix(i),"hex")),p.isBuffer(i)&&(i=l.decode(i)),Array.isArray(i)){if(i.length>t._fields.length)throw new Error("wrong number of fields in data");i.forEach((function(r,n){t[t._fields[n]]=e.toBuffer(r)}))}else{if("object"!==(void 0===i?"undefined":n(i)))throw new Error("invalid data");var o=Object.keys(i);r.forEach((function(e){-1!==o.indexOf(e.name)&&(t[e.name]=i[e.name]),-1!==o.indexOf(e.alias)&&(t[e.alias]=i[e.alias])}))}}},18432:function(t,e,r){"use strict";var n=r(62426).Buffer,i=r(3659),o=r(74342),a=r(46222),s=function(t){return 32===t.length&&i.privateKeyVerify(Uint8Array.from(t))};t.exports={privateKeyVerify:s,privateKeyExport:function(t,e){if(32!==t.length)throw new RangeError("private key length is invalid");var r=o.privateKeyExport(t,e);return a.privateKeyExport(t,r,e)},privateKeyImport:function(t){if(null!==(t=a.privateKeyImport(t))&&32===t.length&&s(t))return t;throw new Error("couldn't import from DER format")},privateKeyNegate:function(t){return n.from(i.privateKeyNegate(Uint8Array.from(t)))},privateKeyModInverse:function(t){if(32!==t.length)throw new Error("private key length is invalid");return n.from(o.privateKeyModInverse(Uint8Array.from(t)))},privateKeyTweakAdd:function(t,e){return n.from(i.privateKeyTweakAdd(Uint8Array.from(t),e))},privateKeyTweakMul:function(t,e){return n.from(i.privateKeyTweakMul(Uint8Array.from(t),Uint8Array.from(e)))},publicKeyCreate:function(t,e){return n.from(i.publicKeyCreate(Uint8Array.from(t),e))},publicKeyConvert:function(t,e){return n.from(i.publicKeyConvert(Uint8Array.from(t),e))},publicKeyVerify:function(t){return(33===t.length||65===t.length)&&i.publicKeyVerify(Uint8Array.from(t))},publicKeyTweakAdd:function(t,e,r){return n.from(i.publicKeyTweakAdd(Uint8Array.from(t),Uint8Array.from(e),r))},publicKeyTweakMul:function(t,e,r){return n.from(i.publicKeyTweakMul(Uint8Array.from(t),Uint8Array.from(e),r))},publicKeyCombine:function(t,e){var r=[];return t.forEach((function(t){r.push(Uint8Array.from(t))})),n.from(i.publicKeyCombine(r,e))},signatureNormalize:function(t){return n.from(i.signatureNormalize(Uint8Array.from(t)))},signatureExport:function(t){return n.from(i.signatureExport(Uint8Array.from(t)))},signatureImport:function(t){return n.from(i.signatureImport(Uint8Array.from(t)))},signatureImportLax:function(t){if(0===t.length)throw new RangeError("signature length is invalid");var e=a.signatureImportLax(t);if(null===e)throw new Error("couldn't parse DER signature");return o.signatureImport(e)},sign:function(t,e,r){if(null===r)throw new TypeError("options should be an Object");var o=void 0;if(r){if(o={},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");o.data=new Uint8Array(r.data)}if(null===r.noncefn)throw new TypeError("options.noncefn should be a Function");r.noncefn&&(o.noncefn=function(t,e,i,o,a){var s=null!=i?n.from(i):null,u=null!=o?n.from(o):null,c=n.from("");return r.noncefn&&(c=r.noncefn(n.from(t),n.from(e),s,u,a)),Uint8Array.from(c)})}var a=i.ecdsaSign(Uint8Array.from(t),Uint8Array.from(e),o);return{signature:n.from(a.signature),recovery:a.recid}},verify:function(t,e,r){return i.ecdsaVerify(Uint8Array.from(e),Uint8Array.from(t),r)},recover:function(t,e,r,o){return n.from(i.ecdsaRecover(Uint8Array.from(e),r,Uint8Array.from(t),o))},ecdh:function(t,e){return n.from(i.ecdh(Uint8Array.from(t),Uint8Array.from(e),{}))},ecdhUnsafe:function(t,e,r){if(33!==t.length&&65!==t.length)throw new RangeError("public key length is invalid");if(32!==e.length)throw new RangeError("private key length is invalid");return n.from(o.ecdhUnsafe(Uint8Array.from(t),Uint8Array.from(e),r))}}},46222:function(t,e,r){"use strict";var n=r(62426).Buffer,i=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]),o=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]);e.privateKeyExport=function(t,e,r){var a=n.from(r?i:o);return t.copy(a,r?8:9),e.copy(a,r?181:214),a},e.privateKeyImport=function(t){var e=t.length,r=0;if(e<r+1||48!==t[r])return null;if(e<(r+=1)+1||!(128&t[r]))return null;var n=127&t[r];if(n<1||n>2)return null;if(e<(r+=1)+n)return null;var i=t[r+n-1]|(n>1?t[r+n-2]<<8:0);return e<(r+=n)+i||e<r+3||2!==t[r]||1!==t[r+1]||1!==t[r+2]||e<(r+=3)+2||4!==t[r]||t[r+1]>32||e<r+2+t[r+1]?null:t.slice(r+2,r+2+t[r+1])},e.signatureImportLax=function(t){var e=n.alloc(32,0),r=n.alloc(32,0),i=t.length,o=0;if(48!==t[o++])return null;var a=t[o++];if(128&a&&(o+=a-128)>i)return null;if(2!==t[o++])return null;var s=t[o++];if(128&s){if(o+(a=s-128)>i)return null;for(;a>0&&0===t[o];o+=1,a-=1);for(s=0;a>0;o+=1,a-=1)s=(s<<8)+t[o]}if(s>i-o)return null;var u=o;if(o+=s,2!==t[o++])return null;var c=t[o++];if(128&c){if(o+(a=c-128)>i)return null;for(;a>0&&0===t[o];o+=1,a-=1);for(c=0;a>0;o+=1,a-=1)c=(c<<8)+t[o]}if(c>i-o)return null;var f=o;for(o+=c;s>0&&0===t[u];s-=1,u+=1);if(s>32)return null;var l=t.slice(u,u+s);for(l.copy(e,32-l.length);c>0&&0===t[f];c-=1,f+=1);if(c>32)return null;var h=t.slice(f,f+c);return h.copy(r,32-h.length),{r:e,s:r}}},74342:function(t,e,r){"use strict";var n=r(62426).Buffer,i=r(85639),o=new(0,r(3039).ec)("secp256k1"),a=o.curve;e.privateKeyExport=function(t,e){var r=new i(t);if(r.ucmp(a.n)>=0)throw new Error("couldn't export to DER format");var n=o.g.mul(r);return s(n.getX(),n.getY(),e)},e.privateKeyModInverse=function(t){var e=new i(t);if(e.ucmp(a.n)>=0||e.isZero())throw new Error("private key range is invalid");return e.invm(a.n).toArrayLike(n,"be",32)},e.signatureImport=function(t){var e=new i(t.r);e.ucmp(a.n)>=0&&(e=new i(0));var r=new i(t.s);return r.ucmp(a.n)>=0&&(r=new i(0)),n.concat([e.toArrayLike(n,"be",32),r.toArrayLike(n,"be",32)])},e.ecdhUnsafe=function(t,e,r){var n=o.keyFromPublic(t),u=new i(e);if(u.ucmp(a.n)>=0||u.isZero())throw new Error("scalar was invalid (zero or overflow)");var c=n.pub.mul(u);return s(c.getX(),c.getY(),r)};var s=function(t,e,r){var i=void 0;return r?((i=n.alloc(33))[0]=e.isOdd()?3:2,t.toArrayLike(n,"be",32).copy(i,1)):((i=n.alloc(65))[0]=4,t.toArrayLike(n,"be",32).copy(i,1),e.toArrayLike(n,"be",32).copy(i,33)),i}},36651:function(t,e,r){"use strict";var n=r(62426).Buffer,i=r(9485),o=r(27663);function a(t){var e=t;if("string"!=typeof e)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof e+", while padToEven.");return e.length%2&&(e="0"+e),e}function s(t){return"0x"+t.toString(16)}t.exports={arrayContainsArray:function(t,e,r){if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof t+"'");if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof e+"'");return e[Boolean(r)?"some":"every"]((function(e){return t.indexOf(e)>=0}))},intToBuffer:function(t){var e=s(t);return new n(a(e.slice(2)),"hex")},getBinarySize:function(t){if("string"!=typeof t)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof t+"'.");return n.byteLength(t,"utf8")},isHexPrefixed:i,stripHexPrefix:o,padToEven:a,intToHex:s,fromAscii:function(t){for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r).toString(16);e+=n.length<2?"0"+n:n}return"0x"+e},fromUtf8:function(t){return"0x"+a(new n(t,"utf8").toString("hex")).replace(/^0+|0+$/g,"")},toAscii:function(t){var e="",r=0,n=t.length;for("0x"===t.substring(0,2)&&(r=2);r<n;r+=2){var i=parseInt(t.substr(r,2),16);e+=String.fromCharCode(i)}return e},toUtf8:function(t){return new n(a(o(t).replace(/^0+|0+$/g,"")),"hex").toString("utf8")},getKeys:function(t,e,r){if(!Array.isArray(t))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof t+"'");if("string"!=typeof e)throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof e+"'.");for(var n=[],i=0;i<t.length;i++){var o=t[i][e];if(r&&!o)o="";else if("string"!=typeof o)throw new Error("invalid abi");n.push(o)}return n},isHexString:function(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}}},65556:function(t){"use strict";var e=Object.prototype.hasOwnProperty,r="~";function n(){}function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||t,a),u=r?r+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var t,n,i=[];if(0===this._eventsCount)return i;for(n in t=this._events)e.call(t,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i<o;i++)a[i]=n[i].fn;return a},s.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},s.prototype.emit=function(t,e,n,i,o,a){var s=r?r+t:t;if(!this._events[s])return!1;var u,c,f=this._events[s],l=arguments.length;if(f.fn){switch(f.once&&this.removeListener(t,f.fn,void 0,!0),l){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,e),!0;case 3:return f.fn.call(f.context,e,n),!0;case 4:return f.fn.call(f.context,e,n,i),!0;case 5:return f.fn.call(f.context,e,n,i,o),!0;case 6:return f.fn.call(f.context,e,n,i,o,a),!0}for(c=1,u=new Array(l-1);c<l;c++)u[c-1]=arguments[c];f.fn.apply(f.context,u)}else{var h,d=f.length;for(c=0;c<d;c++)switch(f[c].once&&this.removeListener(t,f[c].fn,void 0,!0),l){case 1:f[c].fn.call(f[c].context);break;case 2:f[c].fn.call(f[c].context,e);break;case 3:f[c].fn.call(f[c].context,e,n);break;case 4:f[c].fn.call(f[c].context,e,n,i);break;default:if(!u)for(h=1,u=new Array(l-1);h<l;h++)u[h-1]=arguments[h];f[c].fn.apply(f[c].context,u)}}return!0},s.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},s.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},s.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||n&&s.context!==n||a(this,o);else{for(var u=0,c=[],f=s.length;u<f;u++)(s[u].fn!==e||i&&!s[u].once||n&&s[u].context!==n)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&a(this,e)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,t.exports=s},7555:function(t){"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}v(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&v(t,"error",e,r)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,r,n){var i,o,a,c;if(s(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=u(t))>0&&a.length>i&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=a.length,c=f,console&&console.warn&&console.warn(c)}return t}function f(){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(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function h(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function d(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function v(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");a=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var c=u.length,f=p(u,c);for(r=0;r<c;++r)n(f[r],this,e)}return!0},o.prototype.addListener=function(t,e){return c(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return c(this,t,e,!0)},o.prototype.once=function(t,e){return s(e),this.on(t,l(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return s(e),this.prependListener(t,l(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,a;if(s(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return h(this,t,!0)},o.prototype.rawListeners=function(t){return h(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},59699:function(t){t.exports=a,a.default=a,a.stable=f,a.stableStringify=f;var e="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(t,e,r,a){var s;void 0===a&&(a=o()),u(t,"",0,[],void 0,0,a);try{s=0===i.length?JSON.stringify(t,e,r):JSON.stringify(t,h(e),r)}catch(f){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function s(t,e,r,o){var a=Object.getOwnPropertyDescriptor(o,r);void 0!==a.get?a.configurable?(Object.defineProperty(o,r,{value:t}),n.push([o,r,e,a])):i.push([e,r,t]):(o[r]=t,n.push([o,r,e]))}function u(t,n,i,o,a,c,f){var l;if(c+=1,"object"==typeof t&&null!==t){for(l=0;l<o.length;l++)if(o[l]===t)return void s(r,t,n,a);if(void 0!==f.depthLimit&&c>f.depthLimit)return void s(e,t,n,a);if(void 0!==f.edgesLimit&&i+1>f.edgesLimit)return void s(e,t,n,a);if(o.push(t),Array.isArray(t))for(l=0;l<t.length;l++)u(t[l],l,l,o,t,c,f);else{var h=Object.keys(t);for(l=0;l<h.length;l++){var d=h[l];u(t[d],d,l,o,t,c,f)}}o.pop()}}function c(t,e){return t<e?-1:t>e?1:0}function f(t,e,r,a){void 0===a&&(a=o());var s,u=l(t,"",0,[],void 0,0,a)||t;try{s=0===i.length?JSON.stringify(u,e,r):JSON.stringify(u,h(e),r)}catch(f){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function l(t,i,o,a,u,f,h){var d;if(f+=1,"object"==typeof t&&null!==t){for(d=0;d<a.length;d++)if(a[d]===t)return void s(r,t,i,u);try{if("function"==typeof t.toJSON)return}catch(y){return}if(void 0!==h.depthLimit&&f>h.depthLimit)return void s(e,t,i,u);if(void 0!==h.edgesLimit&&o+1>h.edgesLimit)return void s(e,t,i,u);if(a.push(t),Array.isArray(t))for(d=0;d<t.length;d++)l(t[d],d,d,a,t,f,h);else{var p={},v=Object.keys(t).sort(c);for(d=0;d<v.length;d++){var m=v[d];l(t[m],m,d,a,t,f,h),p[m]=t[m]}if(void 0===u)return p;n.push([u,i,t]),u[i]=p}a.pop()}}function h(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n];if(o[1]===e&&o[0]===r){r=o[2],i.splice(n,1);break}}return t.call(this,e,r)}}},88108:function(t){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString;t.exports=function(t,n,i){if("[object Function]"!==r.call(n))throw new TypeError("iterator must be a function");var o=t.length;if(o===+o)for(var a=0;a<o;a++)n.call(i,t[a],a,t);else for(var s in t)e.call(t,s)&&n.call(i,t[s],s,t)}},67254:function(t){"use strict";var e="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,i="[object Function]";t.exports=function(t){var o=this;if("function"!=typeof o||n.call(o)!==i)throw new TypeError(e+o);for(var a,s=r.call(arguments,1),u=function(){if(this instanceof a){var e=o.apply(this,s.concat(r.call(arguments)));return Object(e)===e?e:this}return o.apply(t,s.concat(r.call(arguments)))},c=Math.max(0,o.length-s.length),f=[],l=0;l<c;l++)f.push("$"+l);if(a=Function("binder","return function ("+f.join(",")+"){ return binder.apply(this,arguments); }")(u),o.prototype){var h=function(){};h.prototype=o.prototype,a.prototype=new h,h.prototype=null}return a}},89579:function(t,e,r){"use strict";var n=r(67254);t.exports=Function.prototype.bind||n},98300:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(13498);t.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},13498:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},29961:function(t,e,r){"use strict";var n=r(13498);t.exports=function(){return n()&&!!Symbol.toStringTag}},18519:function(t,e,r){"use strict";var n=r(89579);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},66400:function(t,e,r){"use strict";var n=r(26143).Buffer,i=r(41644).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(13247)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(i){n=i}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var a=0,s=8*t.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},28721:function(t,e,r){var n=e;n.utils=r(69319),n.common=r(10971),n.sha=r(92095),n.ripemd=r(75199),n.hmac=r(83530),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},10971:function(t,e,r){"use strict";var n=r(69319),i=r(26440);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},83530:function(t,e,r){"use strict";var n=r(69319),i=r(26440);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},75199:function(t,e,r){"use strict";var n=r(69319),i=r(10971),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function h(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function d(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(f,c),e.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],f=this.h[4],g=r,b=n,w=i,_=c,x=f,k=0;k<80;k++){var E=a(o(u(r,l(k,n,i,c),t[p[k]+e],h(k)),m[k]),f);r=f,f=c,c=o(i,10),i=n,n=E,E=a(o(u(g,l(79-k,b,w,_),t[v[k]+e],d(k)),y[k]),x),g=x,x=_,_=o(w,10),w=b,b=E}E=s(this.h[1],i,_),this.h[1]=s(this.h[2],c,x),this.h[2]=s(this.h[3],f,g),this.h[3]=s(this.h[4],r,b),this.h[4]=s(this.h[0],n,w),this.h[0]=E},f.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],v=[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],m=[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],y=[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]},92095:function(t,e,r){"use strict";e.sha1=r(91335),e.sha224=r(8043),e.sha256=r(13693),e.sha384=r(27906),e.sha512=r(19894)},91335:function(t,e,r){"use strict";var n=r(69319),i=r(10971),o=r(18761),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=o.ft_1,f=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,f),t.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],h=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),v=u(a(i,5),c(p,o,f,h),d,r[n],l[p]);d=h,h=f,f=a(o,30),o=i,i=v}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],h),this.h[4]=s(this.h[4],d)},h.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},8043:function(t,e,r){"use strict";var n=r(69319),i=r(13693);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},13693:function(t,e,r){"use strict";var n=r(69319),i=r(10971),o=r(18761),a=r(26440),s=n.sum32,u=n.sum32_4,c=n.sum32_5,f=o.ch32,l=o.maj32,h=o.s0_256,d=o.s1_256,p=o.g0_256,v=o.g1_256,m=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(g,m),t.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(v(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],m=this.h[2],y=this.h[3],g=this.h[4],b=this.h[5],w=this.h[6],_=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var x=c(_,d(g),f(g,b,w),this.k[n],r[n]),k=s(h(i),l(i,o,m));_=w,w=b,b=g,g=s(y,x),y=m,m=o,o=i,i=s(x,k)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],m),this.h[3]=s(this.h[3],y),this.h[4]=s(this.h[4],g),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],_)},g.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},27906:function(t,e,r){"use strict";var n=r(69319),i=r(19894);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},19894:function(t,e,r){"use strict";var n=r(69319),i=r(10971),o=r(26440),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,f=n.sum64,l=n.sum64_hi,h=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,v=n.sum64_5_hi,m=n.sum64_5_lo,y=i.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,r,n,i,o){var a=e&n^~e&o;return a<0&&(a+=4294967296),a}function x(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function k(t,e,r,n,i,o){var a=e&n^e&o^n&o;return a<0&&(a+=4294967296),a}function E(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function M(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function A(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function S(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function R(t,e){var r=a(t,e,1)^a(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function P(t,e){var r=s(t,e,1)^s(t,e,8)^c(t,e,7);return r<0&&(r+=4294967296),r}function T(t,e){var r=a(t,e,19)^a(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}function O(t,e){var r=s(t,e,19)^s(e,t,29)^c(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(b,y),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=T(r[n-4],r[n-3]),o=O(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],u=R(r[n-30],r[n-29]),c=P(r[n-30],r[n-29]),f=r[n-32],l=r[n-31];r[n]=d(i,o,a,s,u,c,f,l),r[n+1]=p(i,o,a,s,u,c,f,l)}},b.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],d=this.h[6],p=this.h[7],y=this.h[8],g=this.h[9],b=this.h[10],R=this.h[11],P=this.h[12],T=this.h[13],O=this.h[14],I=this.h[15];o(this.k.length===r.length);for(var C=0;C<r.length;C+=2){var N=O,L=I,B=A(y,g),j=S(y,g),U=w(y,g,b,R,P),F=_(y,g,b,R,P,T),q=this.k[C],D=this.k[C+1],z=r[C],H=r[C+1],V=v(N,L,B,j,U,F,q,D,z,H),W=m(N,L,B,j,U,F,q,D,z,H);N=E(n,i),L=M(n,i),B=x(n,i,a,s,u),j=k(n,i,a,s,u,c);var K=l(N,L,B,j),G=h(N,L,B,j);O=P,I=T,P=b,T=R,b=y,R=g,y=l(d,p,V,W),g=h(p,p,V,W),d=u,p=c,u=a,c=s,a=n,s=i,n=l(V,W,K,G),i=h(V,W,K,G)}f(this.h,0,n,i),f(this.h,2,a,s),f(this.h,4,u,c),f(this.h,6,d,p),f(this.h,8,y,g),f(this.h,10,b,R),f(this.h,12,P,T),f(this.h,14,O,I)},b.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},18761:function(t,e,r){"use strict";var n=r(69319).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function a(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?a(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=a,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},69319:function(t,e,r){"use strict";var n=r(26440),i=r(13247);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var a=t.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):o(t,i)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=s(t[r].toString(16));return e},e.htonl=a,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=a(i)),r+=u(i.toString(16))}return r},e.zero2=s,e.zero8=u,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var a=new Array(o/4),s=0,u=e;s<a.length;s++,u+=4){var c;c="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],a[s]=c>>>0}return a},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,a=(o<n?1:0)+r+i;t[e]=a>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,a,s){var u=0,c=e;return u+=(c=c+n>>>0)<e?1:0,u+=(c=c+o>>>0)<o?1:0,t+r+i+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,a,s,u,c){var f=0,l=e;return f+=(l=l+n>>>0)<e?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+s>>>0)<s?1:0,t+r+i+a+u+(f+=(l=l+c>>>0)<c?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,a,s,u,c){return e+n+o+s+c>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},16488:function(t,e,r){"use strict";var n=r(28721),i=r(7974),o=r(26440);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=a,a.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},a.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,t);return this._update(r),this._reseed++,i.encode(a,e)}},93662:function(t,e,r){var n=r(13552),i=r(73629),o=t.exports;for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a]);function s(t){if("string"==typeof t&&(t=i.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}o.request=function(t,e){return t=s(t),n.request.call(this,t,e)},o.get=function(t,e){return t=s(t),n.get.call(this,t,e)}},32846:function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,d=t[e+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+t[e+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[r+d]=255&a,d+=p,a/=256,c-=8);t[r+d-p]|=128*v}},13247:function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},63281:function(t,e,r){"use strict";var n=r(29961)(),i=r(1096)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},a=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,t.exports=s?o:a},67102:function(t,e,r){"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(29961)(),u=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(a.test(o.call(t)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(t);if(!u)return!1;if(void 0===n){var e=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&u(e)}return u(t)===n}},9485:function(t){t.exports=function(t){if("string"!=typeof t)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}},33073:function(t){"use strict";t.exports=function(t){return t!=t}},8525:function(t,e,r){"use strict";var n=r(28463),i=r(88059),o=r(33073),a=r(58160),s=r(89881),u=n(a(),Number);i(u,{getPolyfill:a,implementation:o,shim:s}),t.exports=u},88059:function(t,e,r){"use strict";var n=r(63513),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,u=s&&function(){var t={};try{for(var e in s(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(r){return!1}}(),c=function(t,e,r,n){var i;(!(e in t)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(u?s(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},f=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=a.call(o,Object.getOwnPropertySymbols(e)));for(var s=0;s<o.length;s+=1)c(t,o[s],e[o[s]],r[o[s]])};f.supportsDescriptors=!!u,t.exports=f},58160:function(t,e,r){"use strict";var n=r(33073);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},89881:function(t,e,r){"use strict";var n=r(88059),i=r(58160);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},28395:function(t){t.exports=n,n.strict=i,n.loose=o;var e=Object.prototype.toString,r={"[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 n(t){return i(t)||o(t)}function i(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function o(t){return r[e.call(t)]}},13544:function(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},89065:function(t,e,r){var n;!function(){"use strict";var i="input is invalid type",o="object"==typeof window,a=o?window:{};a.JS_SHA3_NO_WINDOW&&(o=!1);var s=!o&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?a=r.g:s&&(a=self);var u=!a.JS_SHA3_NO_COMMON_JS&&t.exports,c=r.amdO,f=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),h=[4,1024,262144,67108864],d=[0,8,16,24],p=[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],v=[224,256,384,512],m=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],g={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!f||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var b=function(t,e,r){return function(n){return new N(t,e,t).update(n)[r]()}},w=function(t,e,r){return function(n,i){return new N(t,e,i).update(n)[r]()}},_=function(t,e,r){return function(e,n,i,o){return A["cshake"+t].update(e,n,i,o)[r]()}},x=function(t,e,r){return function(e,n,i,o){return A["kmac"+t].update(e,n,i,o)[r]()}},k=function(t,e,r,n){for(var i=0;i<y.length;++i){var o=y[i];t[o]=e(r,n,o)}return t},E=function(t,e){var r=b(t,e,"hex");return r.create=function(){return new N(t,e,t)},r.update=function(t){return r.create().update(t)},k(r,b,t,e)},M=[{name:"keccak",padding:[1,256,65536,16777216],bits:v,createMethod:E},{name:"sha3",padding:[6,1536,393216,100663296],bits:v,createMethod:E},{name:"shake",padding:[31,7936,2031616,520093696],bits:m,createMethod:function(t,e){var r=w(t,e,"hex");return r.create=function(r){return new N(t,e,r)},r.update=function(t,e){return r.create(e).update(t)},k(r,w,t,e)}},{name:"cshake",padding:h,bits:m,createMethod:function(t,e){var r=g[t],n=_(t,0,"hex");return n.create=function(n,i,o){return i||o?new N(t,e,n).bytepad([i,o],r):A["shake"+t].create(n)},n.update=function(t,e,r,i){return n.create(e,r,i).update(t)},k(n,_,t,e)}},{name:"kmac",padding:h,bits:m,createMethod:function(t,e){var r=g[t],n=x(t,0,"hex");return n.create=function(n,i,o){return new L(t,e,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(t,e,r,i){return n.create(t,r,i).update(e)},k(n,x,t,e)}}],A={},S=[],R=0;R<M.length;++R)for(var P=M[R],T=P.bits,O=0;O<T.length;++O){var I=P.name+"_"+T[O];if(S.push(I),A[I]=P.createMethod(T[O],P.padding),"sha3"!==P.name){var C=P.name+T[O];S.push(C),A[C]=A[I]}}function N(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>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 L(t,e,r){N.call(this,t,e,r)}N.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(i);if(null===t)throw new Error(i);if(f&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||f&&ArrayBuffer.isView(t)))throw new Error(i);e=!0}for(var n,o,a=this.blocks,s=this.byteCount,u=t.length,c=this.blockCount,l=0,h=this.s;l<u;){if(this.reset)for(this.reset=!1,a[0]=this.block,n=1;n<c+1;++n)a[n]=0;if(e)for(n=this.start;l<u&&n<s;++l)a[n>>2]|=t[l]<<d[3&n++];else for(n=this.start;l<u&&n<s;++l)(o=t.charCodeAt(l))<128?a[n>>2]|=o<<d[3&n++]:o<2048?(a[n>>2]|=(192|o>>6)<<d[3&n++],a[n>>2]|=(128|63&o)<<d[3&n++]):o<55296||o>=57344?(a[n>>2]|=(224|o>>12)<<d[3&n++],a[n>>2]|=(128|o>>6&63)<<d[3&n++],a[n>>2]|=(128|63&o)<<d[3&n++]):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++l)),a[n>>2]|=(240|o>>18)<<d[3&n++],a[n>>2]|=(128|o>>12&63)<<d[3&n++],a[n>>2]|=(128|o>>6&63)<<d[3&n++],a[n>>2]|=(128|63&o)<<d[3&n++]);if(this.lastByteIndex=n,n>=s){for(this.start=n-s,this.block=a[c],n=0;n<c;++n)h[n]^=a[n];B(h),this.reset=!0}else this.start=n}return this},N.prototype.encode=function(t,e){var r=255&t,n=1,i=[r];for(r=255&(t>>=8);r>0;)i.unshift(r),r=255&(t>>=8),++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},N.prototype.encodeString=function(t){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(i);if(null===t)throw new Error(i);if(f&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||f&&ArrayBuffer.isView(t)))throw new Error(i);e=!0}var n=0,o=t.length;if(e)n=o;else for(var a=0;a<t.length;++a){var s=t.charCodeAt(a);s<128?n+=1:s<2048?n+=2:s<55296||s>=57344?n+=3:(s=65536+((1023&s)<<10|1023&t.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(t),n},N.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n<t.length;++n)r+=this.encodeString(t[n]);var i=e-r%e,o=[];return o.length=i,this.update(o),this},N.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex,r=this.blockCount,n=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e<r+1;++e)t[e]=0;for(t[r-1]|=2147483648,e=0;e<r;++e)n[e]^=t[e];B(n)}},N.prototype.toString=N.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s="";a<n;){for(o=0;o<e&&a<n;++o,++a)t=r[o],s+=l[t>>4&15]+l[15&t]+l[t>>12&15]+l[t>>8&15]+l[t>>20&15]+l[t>>16&15]+l[t>>28&15]+l[t>>24&15];a%e==0&&(B(r),o=0)}return i&&(t=r[o],s+=l[t>>4&15]+l[15&t],i>1&&(s+=l[t>>12&15]+l[t>>8&15]),i>2&&(s+=l[t>>20&15]+l[t>>16&15])),s},N.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;t=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(t);a<n;){for(o=0;o<e&&a<n;++o,++a)u[a]=r[o];a%e==0&&B(r)}return i&&(u[o]=r[o],t=t.slice(0,s)),t},N.prototype.buffer=N.prototype.arrayBuffer,N.prototype.digest=N.prototype.array=function(){this.finalize();for(var t,e,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,a=0,s=0,u=[];s<i;){for(a=0;a<r&&s<i;++a,++s)t=s<<2,e=n[a],u[t]=255&e,u[t+1]=e>>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;s%r==0&&B(n)}return o&&(t=s<<2,e=n[a],u[t]=255&e,o>1&&(u[t+1]=e>>8&255),o>2&&(u[t+2]=e>>16&255)),u},L.prototype=new N,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var B=function(t){var e,r,n,i,o,a,s,u,c,f,l,h,d,v,m,y,g,b,w,_,x,k,E,M,A,S,R,P,T,O,I,C,N,L,B,j,U,F,q,D,z,H,V,W,K,G,Z,J,$,Y,X,Q,tt,et,rt,nt,it,ot,at,st,ut,ct,ft;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],a=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],f=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],e=(h=t[8]^t[18]^t[28]^t[38]^t[48])^(a<<1|s>>>31),r=(d=t[9]^t[19]^t[29]^t[39]^t[49])^(s<<1|a>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=a^(f<<1|l>>>31),r=s^(l<<1|f>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(h<<1|d>>>31),r=c^(d<<1|h>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=f^(i<<1|o>>>31),r=l^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,v=t[0],m=t[1],G=t[11]<<4|t[10]>>>28,Z=t[10]<<4|t[11]>>>28,P=t[20]<<3|t[21]>>>29,T=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,V=t[41]<<18|t[40]>>>14,L=t[2]<<1|t[3]>>>31,B=t[3]<<1|t[2]>>>31,y=t[13]<<12|t[12]>>>20,g=t[12]<<12|t[13]>>>20,J=t[22]<<10|t[23]>>>22,$=t[23]<<10|t[22]>>>22,O=t[33]<<13|t[32]>>>19,I=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,ft=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,j=t[14]<<6|t[15]>>>26,U=t[15]<<6|t[14]>>>26,b=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,Y=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,C=t[45]<<29|t[44]>>>3,N=t[44]<<29|t[45]>>>3,M=t[6]<<28|t[7]>>>4,A=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,F=t[26]<<25|t[27]>>>7,q=t[27]<<25|t[26]>>>7,_=t[36]<<21|t[37]>>>11,x=t[37]<<21|t[36]>>>11,Q=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,W=t[8]<<27|t[9]>>>5,K=t[9]<<27|t[8]>>>5,S=t[18]<<20|t[19]>>>12,R=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,at=t[28]<<7|t[29]>>>25,D=t[38]<<8|t[39]>>>24,z=t[39]<<8|t[38]>>>24,k=t[48]<<14|t[49]>>>18,E=t[49]<<14|t[48]>>>18,t[0]=v^~y&b,t[1]=m^~g&w,t[10]=M^~S&P,t[11]=A^~R&T,t[20]=L^~j&F,t[21]=B^~U&q,t[30]=W^~G&J,t[31]=K^~Z&$,t[40]=et^~nt&ot,t[41]=rt^~it&at,t[2]=y^~b&_,t[3]=g^~w&x,t[12]=S^~P&O,t[13]=R^~T&I,t[22]=j^~F&D,t[23]=U^~q&z,t[32]=G^~J&Y,t[33]=Z^~$&X,t[42]=nt^~ot&st,t[43]=it^~at&ut,t[4]=b^~_&k,t[5]=w^~x&E,t[14]=P^~O&C,t[15]=T^~I&N,t[24]=F^~D&H,t[25]=q^~z&V,t[34]=J^~Y&Q,t[35]=$^~X&tt,t[44]=ot^~st&ct,t[45]=at^~ut&ft,t[6]=_^~k&v,t[7]=x^~E&m,t[16]=O^~C&M,t[17]=I^~N&A,t[26]=D^~H&L,t[27]=z^~V&B,t[36]=Y^~Q&W,t[37]=X^~tt&K,t[46]=st^~ct&et,t[47]=ut^~ft&rt,t[8]=k^~v&y,t[9]=E^~m&g,t[18]=C^~M&S,t[19]=N^~A&R,t[28]=H^~L&j,t[29]=V^~B&U,t[38]=Q^~W&G,t[39]=tt^~K&Z,t[48]=ct^~et&nt,t[49]=ft^~rt&it,t[0]^=p[n],t[1]^=p[n+1]};if(u)t.exports=A;else{for(R=0;R<S.length;++R)a[S[R]]=A[S[R]];c&&(void 0===(n=function(){return A}.call(e,r,e,t))||(t.exports=n))}}()},66406:function(t,e,r){var n=r(87757),i=r(48926);t.exports=function(t){return function(e,r,o,a){var s,u,c,f=new Promise((function(t){s=t})),l=function(){var t=i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=!0,o((function(t){u=t,s()})),t.next=4,f;case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t(e,r,l).then(i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!c){t.next=6;break}return t.next=3,f;case 3:u(null),t.next=7;break;case 6:a(null);case 7:case"end":return t.stop()}}),t)})))).catch((function(t){u?u(t):a(t)}))}}},1093:function(t){t.exports=function(t){return function(e,r,n,i){var o=t[e.method];return void 0===o?n():"function"==typeof o?o(e,r,n,i):(r.result=o,i())}}},2591:function(t){t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==t.start?t.start:Math.floor(Math.random()*e);return function(){return r%=e,r++}}},66606:function(t,e,r){var n="undefined"!=typeof JSON?JSON:r(72517);t.exports=function(t,e){e||(e={}),"function"==typeof e&&(e={cmp:e});var r=e.space||"";"number"==typeof r&&(r=Array(r+1).join(" "));var a,s="boolean"==typeof e.cycles&&e.cycles,u=e.replacer||function(t,e){return e},c=e.cmp&&(a=e.cmp,function(t){return function(e,r){var n={key:e,value:t[e]},i={key:r,value:t[r]};return a(n,i)}}),f=[];return function t(e,a,l,h){var d=r?"\n"+new Array(h+1).join(r):"",p=r?": ":":";if(l&&l.toJSON&&"function"==typeof l.toJSON&&(l=l.toJSON()),void 0!==(l=u.call(e,a,l))){if("object"!=typeof l||null===l)return n.stringify(l);if(i(l)){for(var v=[],m=0;m<l.length;m++){var y=t(l,m,l[m],h+1)||n.stringify(null);v.push(d+r+y)}return"["+v.join(",")+d+"]"}if(-1!==f.indexOf(l)){if(s)return n.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}f.push(l);var g=o(l).sort(c&&c(l));for(v=[],m=0;m<g.length;m++){var b=t(l,a=g[m],l[a],h+1);if(b){var w=n.stringify(a)+p+b;v.push(d+r+w)}}return f.splice(f.indexOf(l),1),"{"+v.join(",")+d+"}"}}({"":t},"",t,0)};var i=Array.isArray||function(t){return"[object Array]"==={}.toString.call(t)},o=Object.keys||function(t){var e=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var n in t)e.call(t,n)&&r.push(n);return r}},72517:function(t,e,r){e.parse=r(69122),e.stringify=r(23546)},69122:function(t){var e,r,n,i,o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},a=function(t){throw{name:"SyntaxError",message:t,at:e,text:n}},s=function(t){return t&&t!==r&&a("Expected '"+t+"' instead of '"+r+"'"),r=n.charAt(e),e+=1,r},u=function(){var t,e="";for("-"===r&&(e="-",s("-"));r>="0"&&r<="9";)e+=r,s();if("."===r)for(e+=".";s()&&r>="0"&&r<="9";)e+=r;if("e"===r||"E"===r)for(e+=r,s(),"-"!==r&&"+"!==r||(e+=r,s());r>="0"&&r<="9";)e+=r,s();if(t=+e,isFinite(t))return t;a("Bad number")},c=function(){var t,e,n,i="";if('"'===r)for(;s();){if('"'===r)return s(),i;if("\\"===r)if(s(),"u"===r){for(n=0,e=0;e<4&&(t=parseInt(s(),16),isFinite(t));e+=1)n=16*n+t;i+=String.fromCharCode(n)}else{if("string"!=typeof o[r])break;i+=o[r]}else i+=r}a("Bad string")},f=function(){for(;r&&r<=" ";)s()},l=function(){var t=[];if("["===r){if(s("["),f(),"]"===r)return s("]"),t;for(;r;){if(t.push(i()),f(),"]"===r)return s("]"),t;s(","),f()}}a("Bad array")},h=function(){var t,e={};if("{"===r){if(s("{"),f(),"}"===r)return s("}"),e;for(;r;){if(t=c(),f(),s(":"),Object.hasOwnProperty.call(e,t)&&a('Duplicate key "'+t+'"'),e[t]=i(),f(),"}"===r)return s("}"),e;s(","),f()}}a("Bad object")};i=function(){switch(f(),r){case"{":return h();case"[":return l();case'"':return c();case"-":return u();default:return r>="0"&&r<="9"?u():function(){switch(r){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null}a("Unexpected '"+r+"'")}()}},t.exports=function(t,o){var s;return n=t,e=0,r=" ",s=i(),f(),r&&a("Syntax error"),"function"==typeof o?function t(e,r){var n,i,a=e[r];if(a&&"object"==typeof a)for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(void 0!==(i=t(a,n))?a[n]=i:delete a[n]);return o.call(e,r,a)}({"":s},""):s}},23546:function(t){var e,r,n,i=/[\\\"\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 a(t){return i.lastIndex=0,i.test(t)?'"'+t.replace(i,(function(t){var e=o[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function s(t,i){var o,u,c,f,l,h=e,d=i[t];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(t)),"function"==typeof n&&(d=n.call(i,t,d)),typeof d){case"string":return a(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(e+=r,l=[],"[object Array]"===Object.prototype.toString.apply(d)){for(f=d.length,o=0;o<f;o+=1)l[o]=s(o,d)||"null";return c=0===l.length?"[]":e?"[\n"+e+l.join(",\n"+e)+"\n"+h+"]":"["+l.join(",")+"]",e=h,c}if(n&&"object"==typeof n)for(f=n.length,o=0;o<f;o+=1)"string"==typeof(u=n[o])&&(c=s(u,d))&&l.push(a(u)+(e?": ":":")+c);else for(u in d)Object.prototype.hasOwnProperty.call(d,u)&&(c=s(u,d))&&l.push(a(u)+(e?": ":":")+c);return c=0===l.length?"{}":e?"{\n"+e+l.join(",\n"+e)+"\n"+h+"}":"{"+l.join(",")+"}",e=h,c}}t.exports=function(t,i,o){var a;if(e="",r="","number"==typeof o)for(a=0;a<o;a+=1)r+=" ";else"string"==typeof o&&(r=o);if(n=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return s("",{"":t})}},12140:function(t,e,r){t.exports=r(48322)(r(36175))},48322:function(t,e,r){var n=r(66230),i=r(29436);t.exports=function(t){var e=n(t),r=i(t);return function(t,n){switch("string"==typeof t?t.toLowerCase():t){case"keccak224":return new e(1152,448,null,224,n);case"keccak256":return new e(1088,512,null,256,n);case"keccak384":return new e(832,768,null,384,n);case"keccak512":return new e(576,1024,null,512,n);case"sha3-224":return new e(1152,448,6,224,n);case"sha3-256":return new e(1088,512,6,256,n);case"sha3-384":return new e(832,768,6,384,n);case"sha3-512":return new e(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+t)}}}},66230:function(t,e,r){var n=r(62426).Buffer,i=r(34575),o=r(93913),a=r(2205),s=r(78585),u=r(29754);function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=u(t);if(e){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}var f=r(41644).Transform;t.exports=function(t){return function(e){"use strict";a(s,e);var r=c(s);function s(e,n,o,a,u){var c;return i(this,s),(c=r.call(this,u))._rate=e,c._capacity=n,c._delimitedSuffix=o,c._hashBitLength=a,c._options=u,c._state=new t,c._state.initialize(e,n),c._finalized=!1,c}return o(s,[{key:"_transform",value:function(t,e,r){var n=null;try{this.update(t,e)}catch(i){n=i}r(n)}},{key:"_flush",value:function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)}},{key:"update",value:function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this}},{key:"digest",value:function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var e=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(e=e.toString(t)),this._resetState(),e}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var t=new s(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}]),s}(f)}},29436:function(t,e,r){var n=r(62426).Buffer,i=r(34575),o=r(93913),a=r(2205),s=r(78585),u=r(29754);function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=u(t);if(e){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}var f=r(41644).Transform;t.exports=function(t){return function(e){"use strict";a(s,e);var r=c(s);function s(e,n,o,a){var u;return i(this,s),(u=r.call(this,a))._rate=e,u._capacity=n,u._delimitedSuffix=o,u._options=a,u._state=new t,u._state.initialize(e,n),u._finalized=!1,u}return o(s,[{key:"_transform",value:function(t,e,r){var n=null;try{this.update(t,e)}catch(i){n=i}r(n)}},{key:"_flush",value:function(){}},{key:"_read",value:function(t){this.push(this.squeeze(t))}},{key:"update",value:function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this}},{key:"squeeze",value:function(t,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(t);return void 0!==e&&(r=r.toString(e)),r}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var t=new s(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}]),s}(f)}},89110:function(t,e){var r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];e.p1600=function(t){for(var e=0;e<24;++e){var n=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],s=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],l=t[8]^t[18]^t[28]^t[38]^t[48],h=t[9]^t[19]^t[29]^t[39]^t[49],d=l^(o<<1|a>>>31),p=h^(a<<1|o>>>31),v=t[0]^d,m=t[1]^p,y=t[10]^d,g=t[11]^p,b=t[20]^d,w=t[21]^p,_=t[30]^d,x=t[31]^p,k=t[40]^d,E=t[41]^p;d=n^(s<<1|u>>>31),p=i^(u<<1|s>>>31);var M=t[2]^d,A=t[3]^p,S=t[12]^d,R=t[13]^p,P=t[22]^d,T=t[23]^p,O=t[32]^d,I=t[33]^p,C=t[42]^d,N=t[43]^p;d=o^(c<<1|f>>>31),p=a^(f<<1|c>>>31);var L=t[4]^d,B=t[5]^p,j=t[14]^d,U=t[15]^p,F=t[24]^d,q=t[25]^p,D=t[34]^d,z=t[35]^p,H=t[44]^d,V=t[45]^p;d=s^(l<<1|h>>>31),p=u^(h<<1|l>>>31);var W=t[6]^d,K=t[7]^p,G=t[16]^d,Z=t[17]^p,J=t[26]^d,$=t[27]^p,Y=t[36]^d,X=t[37]^p,Q=t[46]^d,tt=t[47]^p;d=c^(n<<1|i>>>31),p=f^(i<<1|n>>>31);var et=t[8]^d,rt=t[9]^p,nt=t[18]^d,it=t[19]^p,ot=t[28]^d,at=t[29]^p,st=t[38]^d,ut=t[39]^p,ct=t[48]^d,ft=t[49]^p,lt=v,ht=m,dt=g<<4|y>>>28,pt=y<<4|g>>>28,vt=b<<3|w>>>29,mt=w<<3|b>>>29,yt=x<<9|_>>>23,gt=_<<9|x>>>23,bt=k<<18|E>>>14,wt=E<<18|k>>>14,_t=M<<1|A>>>31,xt=A<<1|M>>>31,kt=R<<12|S>>>20,Et=S<<12|R>>>20,Mt=P<<10|T>>>22,At=T<<10|P>>>22,St=I<<13|O>>>19,Rt=O<<13|I>>>19,Pt=C<<2|N>>>30,Tt=N<<2|C>>>30,Ot=B<<30|L>>>2,It=L<<30|B>>>2,Ct=j<<6|U>>>26,Nt=U<<6|j>>>26,Lt=q<<11|F>>>21,Bt=F<<11|q>>>21,jt=D<<15|z>>>17,Ut=z<<15|D>>>17,Ft=V<<29|H>>>3,qt=H<<29|V>>>3,Dt=W<<28|K>>>4,zt=K<<28|W>>>4,Ht=Z<<23|G>>>9,Vt=G<<23|Z>>>9,Wt=J<<25|$>>>7,Kt=$<<25|J>>>7,Gt=Y<<21|X>>>11,Zt=X<<21|Y>>>11,Jt=tt<<24|Q>>>8,$t=Q<<24|tt>>>8,Yt=et<<27|rt>>>5,Xt=rt<<27|et>>>5,Qt=nt<<20|it>>>12,te=it<<20|nt>>>12,ee=at<<7|ot>>>25,re=ot<<7|at>>>25,ne=st<<8|ut>>>24,ie=ut<<8|st>>>24,oe=ct<<14|ft>>>18,ae=ft<<14|ct>>>18;t[0]=lt^~kt&Lt,t[1]=ht^~Et&Bt,t[10]=Dt^~Qt&vt,t[11]=zt^~te&mt,t[20]=_t^~Ct&Wt,t[21]=xt^~Nt&Kt,t[30]=Yt^~dt&Mt,t[31]=Xt^~pt&At,t[40]=Ot^~Ht&ee,t[41]=It^~Vt&re,t[2]=kt^~Lt&Gt,t[3]=Et^~Bt&Zt,t[12]=Qt^~vt&St,t[13]=te^~mt&Rt,t[22]=Ct^~Wt&ne,t[23]=Nt^~Kt&ie,t[32]=dt^~Mt&jt,t[33]=pt^~At&Ut,t[42]=Ht^~ee&yt,t[43]=Vt^~re&gt,t[4]=Lt^~Gt&oe,t[5]=Bt^~Zt&ae,t[14]=vt^~St&Ft,t[15]=mt^~Rt&qt,t[24]=Wt^~ne&bt,t[25]=Kt^~ie&wt,t[34]=Mt^~jt&Jt,t[35]=At^~Ut&$t,t[44]=ee^~yt&Pt,t[45]=re^~gt&Tt,t[6]=Gt^~oe&lt,t[7]=Zt^~ae&ht,t[16]=St^~Ft&Dt,t[17]=Rt^~qt&zt,t[26]=ne^~bt&_t,t[27]=ie^~wt&xt,t[36]=jt^~Jt&Yt,t[37]=Ut^~$t&Xt,t[46]=yt^~Pt&Ot,t[47]=gt^~Tt&It,t[8]=oe^~lt&kt,t[9]=ae^~ht&Et,t[18]=Ft^~Dt&Qt,t[19]=qt^~zt&te,t[28]=bt^~_t&Ct,t[29]=wt^~xt&Nt,t[38]=Jt^~Yt&dt,t[39]=$t^~Xt&pt,t[48]=Pt^~Ot&Ht,t[49]=Tt^~It&Vt,t[0]^=r[2*e],t[1]^=r[2*e+1]}}},36175:function(t,e,r){var n=r(62426).Buffer,i=r(89110);function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(t,e){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(t){for(var e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0)},o.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!=(128&t)&&this.count===this.blockSize-1&&i.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,i.p1600(this.state),this.count=0,this.squeezing=!0},o.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);for(var e=n.alloc(t),r=0;r<t;++r)e[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return e},o.prototype.copy=function(t){for(var e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=o},2723:function(t,e,r){"use strict";var n=r(13247),i=r(66400),o=r(26143).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<<e|t>>>32-e}function c(t,e,r,n,i,o,a){return u(t+(e&r|~e&n)+i+o|0,a)+e|0}function f(t,e,r,n,i,o,a){return u(t+(e&n|r&~n)+i+o|0,a)+e|0}function l(t,e,r,n,i,o,a){return u(t+(e^r^n)+i+o|0,a)+e|0}function h(t,e,r,n,i,o,a){return u(t+(r^(e|~n))+i+o|0,a)+e|0}n(s,i),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,t[0],3614090360,7),o=c(o,r,n,i,t[1],3905402710,12),i=c(i,o,r,n,t[2],606105819,17),n=c(n,i,o,r,t[3],3250441966,22),r=c(r,n,i,o,t[4],4118548399,7),o=c(o,r,n,i,t[5],1200080426,12),i=c(i,o,r,n,t[6],2821735955,17),n=c(n,i,o,r,t[7],4249261313,22),r=c(r,n,i,o,t[8],1770035416,7),o=c(o,r,n,i,t[9],2336552879,12),i=c(i,o,r,n,t[10],4294925233,17),n=c(n,i,o,r,t[11],2304563134,22),r=c(r,n,i,o,t[12],1804603682,7),o=c(o,r,n,i,t[13],4254626195,12),i=c(i,o,r,n,t[14],2792965006,17),r=f(r,n=c(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=f(o,r,n,i,t[6],3225465664,9),i=f(i,o,r,n,t[11],643717713,14),n=f(n,i,o,r,t[0],3921069994,20),r=f(r,n,i,o,t[5],3593408605,5),o=f(o,r,n,i,t[10],38016083,9),i=f(i,o,r,n,t[15],3634488961,14),n=f(n,i,o,r,t[4],3889429448,20),r=f(r,n,i,o,t[9],568446438,5),o=f(o,r,n,i,t[14],3275163606,9),i=f(i,o,r,n,t[3],4107603335,14),n=f(n,i,o,r,t[8],1163531501,20),r=f(r,n,i,o,t[13],2850285829,5),o=f(o,r,n,i,t[2],4243563512,9),i=f(i,o,r,n,t[7],1735328473,14),r=l(r,n=f(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=l(o,r,n,i,t[8],2272392833,11),i=l(i,o,r,n,t[11],1839030562,16),n=l(n,i,o,r,t[14],4259657740,23),r=l(r,n,i,o,t[1],2763975236,4),o=l(o,r,n,i,t[4],1272893353,11),i=l(i,o,r,n,t[7],4139469664,16),n=l(n,i,o,r,t[10],3200236656,23),r=l(r,n,i,o,t[13],681279174,4),o=l(o,r,n,i,t[0],3936430074,11),i=l(i,o,r,n,t[3],3572445317,16),n=l(n,i,o,r,t[6],76029189,23),r=l(r,n,i,o,t[9],3654602809,4),o=l(o,r,n,i,t[12],3873151461,11),i=l(i,o,r,n,t[15],530742520,16),r=h(r,n=l(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=h(o,r,n,i,t[7],1126891415,10),i=h(i,o,r,n,t[14],2878612391,15),n=h(n,i,o,r,t[5],4237533241,21),r=h(r,n,i,o,t[12],1700485571,6),o=h(o,r,n,i,t[3],2399980690,10),i=h(i,o,r,n,t[10],4293915773,15),n=h(n,i,o,r,t[1],2240044497,21),r=h(r,n,i,o,t[8],1873313359,6),o=h(o,r,n,i,t[15],4264355552,10),i=h(i,o,r,n,t[6],2734768916,15),n=h(n,i,o,r,t[13],1309151649,21),r=h(r,n,i,o,t[4],4149444226,6),o=h(o,r,n,i,t[11],3174756917,10),i=h(i,o,r,n,t[2],718787259,15),n=h(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},26440:function(t){function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},7974:function(t,e){"use strict";var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}},64085:function(t){"use strict";var e=function(t){return t!=t};t.exports=function(t,r){return 0===t&&0===r?1/t==1/r:t===r||!(!e(t)||!e(r))}},2548:function(t,e,r){"use strict";var n=r(76583),i=r(28463),o=r(64085),a=r(62695),s=r(37723),u=i(a(),Object);n(u,{getPolyfill:a,implementation:o,shim:s}),t.exports=u},76583:function(t,e,r){"use strict";var n=r(63513),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,u=s&&function(){var t={};try{for(var e in s(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(r){return!1}}(),c=function(t,e,r,n){var i;(!(e in t)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(u?s(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},f=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=a.call(o,Object.getOwnPropertySymbols(e)));for(var s=0;s<o.length;s+=1)c(t,o[s],e[o[s]],r[o[s]])};f.supportsDescriptors=!!u,t.exports=f},62695:function(t,e,r){"use strict";var n=r(64085);t.exports=function(){return"function"==typeof Object.is?Object.is:n}},37723:function(t,e,r){"use strict";var n=r(62695),i=r(76583);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},88523:function(t,e,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(77158),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(t){var e=t.constructor;return e&&e.prototype===t},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!h["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{l(window[t])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=a(t),s=e&&"[object String]"===o.call(t),h=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(s&&t.length>0&&!i.call(t,0))for(var v=0;v<t.length;++v)h.push(String(v));if(n&&t.length>0)for(var m=0;m<t.length;++m)h.push(String(m));else for(var y in t)p&&"prototype"===y||!i.call(t,y)||h.push(String(y));if(u)for(var g=function(t){if("undefined"==typeof window||!d)return l(t);try{return l(t)}catch(e){return!1}}(t),b=0;b<f.length;++b)g&&"constructor"===f[b]||!i.call(t,f[b])||h.push(f[b]);return h}}t.exports=n},63513:function(t,e,r){"use strict";var n=Array.prototype.slice,i=r(77158),o=Object.keys,a=o?function(t){return o(t)}:r(88523),s=Object.keys;a.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?s(n.call(t)):s(t)})}else Object.keys=a;return Object.keys||a},t.exports=a},77158:function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},71273:function(t,e){e.endianness=function(){return"LE"},e.hostname=function(){return"undefined"!=typeof location?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/tmp"},e.EOL="\n",e.homedir=function(){return"/"}},69046:function(t){"use strict";var e=function(t,e){return function(){for(var r=this,n=e.promiseModule,i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return new n((function(n,o){e.errorFirst?i.push((function(t,r){if(e.multiArgs){for(var i=new Array(arguments.length-1),a=1;a<arguments.length;a++)i[a-1]=arguments[a];t?(i.unshift(t),o(i)):n(i)}else t?o(t):n(r)})):i.push((function(t){if(e.multiArgs){for(var r=new Array(arguments.length-1),i=0;i<arguments.length;i++)r[i]=arguments[i];n(r)}else n(t)})),t.apply(r,i)}))}};t.exports=function(t,r){r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);var n,i=function(t){var e=function(e){return"string"==typeof e?t===e:e.test(t)};return r.include?r.include.some(e):!r.exclude.some(e)};for(var o in n="function"==typeof t?function(){return r.excludeMain?t.apply(this,arguments):e(t,r).apply(this,arguments)}:Object.create(Object.getPrototypeOf(t)),t){var a=t[o];n[o]="function"==typeof a&&i(o)?e(a,r):a}return n}},15007:function(t,e,r){"use strict";r.r(e),r.d(e,{Children:function(){return gt},Component:function(){return b},Fragment:function(){return g},PureComponent:function(){return dt},Suspense:function(){return _t},SuspenseList:function(){return Et},cloneElement:function(){return qt},createContext:function(){return U},createElement:function(){return v},createFactory:function(){return Ut},createPortal:function(){return Rt},createRef:function(){return y},default:function(){return Vt},findDOMNode:function(){return zt},forwardRef:function(){return mt},hydrate:function(){return It},isValidElement:function(){return Ft},lazy:function(){return kt},memo:function(){return pt},render:function(){return Ot},unmountComponentAtNode:function(){return Dt},unstable_batchedUpdates:function(){return Ht},useCallback:function(){return rt},useContext:function(){return nt},useDebugValue:function(){return it},useEffect:function(){return Y},useErrorBoundary:function(){return ot},useImperativeHandle:function(){return tt},useLayoutEffect:function(){return X},useMemo:function(){return et},useReducer:function(){return $},useRef:function(){return Q},useState:function(){return J},version:function(){return jt}});var n,i,o,a,s,u,c,f={},l=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function d(t,e){for(var r in e)t[r]=e[r];return t}function p(t){var e=t.parentNode;e&&e.removeChild(t)}function v(t,e,r){var n,i=arguments,o={};for(n in e)"key"!==n&&"ref"!==n&&(o[n]=e[n]);if(arguments.length>3)for(r=[r],n=3;n<arguments.length;n++)r.push(i[n]);if(null!=r&&(o.children=r),"function"==typeof t&&null!=t.defaultProps)for(n in t.defaultProps)void 0===o[n]&&(o[n]=t.defaultProps[n]);return m(t,o,e&&e.key,e&&e.ref,null)}function m(t,e,r,i,o){var a={type:t,props:e,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o};return null==o&&(a.__v=a),n.vnode&&n.vnode(a),a}function y(){return{}}function g(t){return t.children}function b(t,e){this.props=t,this.context=e}function w(t,e){if(null==e)return t.__?w(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e)return r.__e;return"function"==typeof t.type?w(t):null}function _(t){var e,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return _(t)}}function x(t){(!t.__d&&(t.__d=!0)&&i.push(t)&&!o++||s!==n.debounceRendering)&&((s=n.debounceRendering)||a)(k)}function k(){for(var t;o=i.length;)t=i.sort((function(t,e){return t.__v.__b-e.__v.__b})),i=[],t.some((function(t){var e,r,n,i,o,a,s;t.__d&&(a=(o=(e=t).__v).__e,(s=e.__P)&&(r=[],(n=d({},o)).__v=n,i=P(s,o,n,e.__n,void 0!==s.ownerSVGElement,null,r,null==a?w(o):a),T(r,o),i!=a&&_(o)))}))}function E(t,e,r,n,i,o,a,s,u){var c,h,d,v,m,y,g,b=r&&r.__k||l,_=b.length;if(s==f&&(s=null!=o?o[0]:_?w(r,0):null),c=0,e.__k=M(e.__k,(function(r){if(null!=r){if(r.__=e,r.__b=e.__b+1,null===(d=b[c])||d&&r.key==d.key&&r.type===d.type)b[c]=void 0;else for(h=0;h<_;h++){if((d=b[h])&&r.key==d.key&&r.type===d.type){b[h]=void 0;break}d=null}if(v=P(t,r,d=d||f,n,i,o,a,s,u),(h=r.ref)&&d.ref!=h&&(g||(g=[]),d.ref&&g.push(d.ref,null,r),g.push(h,r.__c||v,r)),null!=v){var l;if(null==y&&(y=v),void 0!==r.__d)l=r.__d,r.__d=void 0;else if(o==d||v!=s||null==v.parentNode){t:if(null==s||s.parentNode!==t)t.appendChild(v),l=null;else{for(m=s,h=0;(m=m.nextSibling)&&h<_;h+=2)if(m==v)break t;t.insertBefore(v,s),l=s}"option"==e.type&&(t.value="")}s=void 0!==l?l:v.nextSibling,"function"==typeof e.type&&(e.__d=s)}else s&&d.__e==s&&s.parentNode!=t&&(s=w(d))}return c++,r})),e.__e=y,null!=o&&"function"!=typeof e.type)for(c=o.length;c--;)null!=o[c]&&p(o[c]);for(c=_;c--;)null!=b[c]&&C(b[c],b[c]);if(g)for(c=0;c<g.length;c++)I(g[c],g[++c],g[++c])}function M(t,e,r){if(null==r&&(r=[]),null==t||"boolean"==typeof t)e&&r.push(e(null));else if(Array.isArray(t))for(var n=0;n<t.length;n++)M(t[n],e,r);else r.push(e?e("string"==typeof t||"number"==typeof t?m(null,t,null,null,t):null!=t.__e||null!=t.__c?m(t.type,t.props,t.key,null,t.__v):t):t);return r}function A(t,e,r){"-"===e[0]?t.setProperty(e,r):t[e]="number"==typeof r&&!1===h.test(e)?r+"px":null==r?"":r}function S(t,e,r,n,i){var o,a,s,u,c;if(i?"className"===e&&(e="class"):"class"===e&&(e="className"),"style"===e)if(o=t.style,"string"==typeof r)o.cssText=r;else{if("string"==typeof n&&(o.cssText="",n=null),n)for(u in n)r&&u in r||A(o,u,"");if(r)for(c in r)n&&r[c]===n[c]||A(o,c,r[c])}else"o"===e[0]&&"n"===e[1]?(a=e!==(e=e.replace(/Capture$/,"")),s=e.toLowerCase(),e=(s in t?s:e).slice(2),r?(n||t.addEventListener(e,R,a),(t.l||(t.l={}))[e]=r):t.removeEventListener(e,R,a)):"list"!==e&&"tagName"!==e&&"form"!==e&&"type"!==e&&"size"!==e&&!i&&e in t?t[e]=null==r?"":r:"function"!=typeof r&&"dangerouslySetInnerHTML"!==e&&(e!==(e=e.replace(/^xlink:?/,""))?null==r||!1===r?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),r):null==r||!1===r&&!/^ar/.test(e)?t.removeAttribute(e):t.setAttribute(e,r))}function R(t){this.l[t.type](n.event?n.event(t):t)}function P(t,e,r,i,o,a,s,u,c){var f,l,h,p,v,m,y,w,_,x,k=e.type;if(void 0!==e.constructor)return null;(f=n.__b)&&f(e);try{t:if("function"==typeof k){if(w=e.props,_=(f=k.contextType)&&i[f.__c],x=f?_?_.props.value:f.__:i,r.__c?y=(l=e.__c=r.__c).__=l.__E:("prototype"in k&&k.prototype.render?e.__c=l=new k(w,x):(e.__c=l=new b(w,x),l.constructor=k,l.render=N),_&&_.sub(l),l.props=w,l.state||(l.state={}),l.context=x,l.__n=i,h=l.__d=!0,l.__h=[]),null==l.__s&&(l.__s=l.state),null!=k.getDerivedStateFromProps&&(l.__s==l.state&&(l.__s=d({},l.__s)),d(l.__s,k.getDerivedStateFromProps(w,l.__s))),p=l.props,v=l.state,h)null==k.getDerivedStateFromProps&&null!=l.componentWillMount&&l.componentWillMount(),null!=l.componentDidMount&&l.__h.push(l.componentDidMount);else{if(null==k.getDerivedStateFromProps&&w!==p&&null!=l.componentWillReceiveProps&&l.componentWillReceiveProps(w,x),!l.__e&&null!=l.shouldComponentUpdate&&!1===l.shouldComponentUpdate(w,l.__s,x)||e.__v===r.__v&&!l.__){for(l.props=w,l.state=l.__s,e.__v!==r.__v&&(l.__d=!1),l.__v=e,e.__e=r.__e,e.__k=r.__k,l.__h.length&&s.push(l),f=0;f<e.__k.length;f++)e.__k[f]&&(e.__k[f].__=e);break t}null!=l.componentWillUpdate&&l.componentWillUpdate(w,l.__s,x),null!=l.componentDidUpdate&&l.__h.push((function(){l.componentDidUpdate(p,v,m)}))}l.context=x,l.props=w,l.state=l.__s,(f=n.__r)&&f(e),l.__d=!1,l.__v=e,l.__P=t,f=l.render(l.props,l.state,l.context),e.__k=null!=f&&f.type==g&&null==f.key?f.props.children:Array.isArray(f)?f:[f],null!=l.getChildContext&&(i=d(d({},i),l.getChildContext())),h||null==l.getSnapshotBeforeUpdate||(m=l.getSnapshotBeforeUpdate(p,v)),E(t,e,r,i,o,a,s,u,c),l.base=e.__e,l.__h.length&&s.push(l),y&&(l.__E=l.__=null),l.__e=!1}else null==a&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=O(r.__e,e,r,i,o,a,s,c);(f=n.diffed)&&f(e)}catch(t){e.__v=null,n.__e(t,e,r)}return e.__e}function T(t,e){n.__c&&n.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){n.__e(t,e.__v)}}))}function O(t,e,r,n,i,o,a,s){var u,c,h,d,p,v=r.props,m=e.props;if(i="svg"===e.type||i,null!=o)for(u=0;u<o.length;u++)if(null!=(c=o[u])&&((null===e.type?3===c.nodeType:c.localName===e.type)||t==c)){t=c,o[u]=null;break}if(null==t){if(null===e.type)return document.createTextNode(m);t=i?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type,m.is&&{is:m.is}),o=null,s=!1}if(null===e.type)v!==m&&t.data!=m&&(t.data=m);else{if(null!=o&&(o=l.slice.call(t.childNodes)),h=(v=r.props||f).dangerouslySetInnerHTML,d=m.dangerouslySetInnerHTML,!s){if(v===f)for(v={},p=0;p<t.attributes.length;p++)v[t.attributes[p].name]=t.attributes[p].value;(d||h)&&(d&&h&&d.__html==h.__html||(t.innerHTML=d&&d.__html||""))}(function(t,e,r,n,i){var o;for(o in r)"children"===o||"key"===o||o in e||S(t,o,null,r[o],n);for(o in e)i&&"function"!=typeof e[o]||"children"===o||"key"===o||"value"===o||"checked"===o||r[o]===e[o]||S(t,o,e[o],r[o],n)})(t,m,v,i,s),d?e.__k=[]:(e.__k=e.props.children,E(t,e,r,n,"foreignObject"!==e.type&&i,o,a,f,s)),s||("value"in m&&void 0!==(u=m.value)&&u!==t.value&&S(t,"value",u,v.value,!1),"checked"in m&&void 0!==(u=m.checked)&&u!==t.checked&&S(t,"checked",u,v.checked,!1))}return t}function I(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){n.__e(t,r)}}function C(t,e,r){var i,o,a;if(n.unmount&&n.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||I(i,null,e)),r||"function"==typeof t.type||(r=null!=(o=t.__e)),t.__e=t.__d=void 0,null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){n.__e(t,e)}i.base=i.__P=null}if(i=t.__k)for(a=0;a<i.length;a++)i[a]&&C(i[a],e,r);null!=o&&p(o)}function N(t,e,r){return this.constructor(t,r)}function L(t,e,r){var i,o,a;n.__&&n.__(t,e),o=(i=r===u)?null:r&&r.__k||e.__k,t=v(g,null,[t]),a=[],P(e,(i?e:r||e).__k=t,o||f,f,void 0!==e.ownerSVGElement,r&&!i?[r]:o?null:l.slice.call(e.childNodes),a,r||f,i),T(a,t)}function B(t,e){L(t,e,u)}function j(t,e){var r,n;for(n in e=d(d({},t.props),e),arguments.length>2&&(e.children=l.slice.call(arguments,2)),r={},e)"key"!==n&&"ref"!==n&&(r[n]=e[n]);return m(t.type,r,e.key||t.key,e.ref||t.ref,null)}function U(t){var e={},r={__c:"__cC"+c++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i=this;return this.getChildContext||(n=[],this.getChildContext=function(){return e[r.__c]=i,e},this.shouldComponentUpdate=function(t){i.props.value!==t.value&&n.some((function(e){e.context=t.value,x(e)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return r.Consumer.contextType=r,r.Provider.__=r,r}n={__e:function(t,e){for(var r,n;e=e.__;)if((r=e.__c)&&!r.__)try{if(r.constructor&&null!=r.constructor.getDerivedStateFromError&&(n=!0,r.setState(r.constructor.getDerivedStateFromError(t))),null!=r.componentDidCatch&&(n=!0,r.componentDidCatch(t)),n)return x(r.__E=r)}catch(e){t=e}throw t}},b.prototype.setState=function(t,e){var r;r=this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof t&&(t=t(r,this.props)),t&&d(r,t),null!=t&&this.__v&&(e&&this.__h.push(e),x(this))},b.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),x(this))},b.prototype.render=g,i=[],o=0,a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=f,c=0;var F,q,D,z=0,H=[],V=n.__r,W=n.diffed,K=n.__c,G=n.unmount;function Z(t,e){n.__h&&n.__h(q,t,z||e),z=0;var r=q.__H||(q.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function J(t){return z=1,$(ft,t)}function $(t,e,r){var n=Z(F++,2);return n.__c||(n.__c=q,n.__=[r?r(e):ft(void 0,e),function(e){var r=t(n.__[0],e);n.__[0]!==r&&(n.__[0]=r,n.__c.setState({}))}]),n.__}function Y(t,e){var r=Z(F++,3);!n.__s&&ct(r.__H,e)&&(r.__=t,r.__H=e,q.__H.__h.push(r))}function X(t,e){var r=Z(F++,4);!n.__s&&ct(r.__H,e)&&(r.__=t,r.__H=e,q.__h.push(r))}function Q(t){return z=5,et((function(){return{current:t}}),[])}function tt(t,e,r){z=6,X((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))}function et(t,e){var r=Z(F++,7);return ct(r.__H,e)?(r.__H=e,r.__h=t,r.__=t()):r.__}function rt(t,e){return z=8,et((function(){return t}),e)}function nt(t){var e=q.context[t.__c],r=Z(F++,9);return r.__c=t,e?(null==r.__&&(r.__=!0,e.sub(q)),e.props.value):t.__}function it(t,e){n.useDebugValue&&n.useDebugValue(e?e(t):t)}function ot(t){var e=Z(F++,10),r=J();return e.__=t,q.componentDidCatch||(q.componentDidCatch=function(t){e.__&&e.__(t),r[1](t)}),[r[0],function(){r[1](void 0)}]}function at(){H.some((function(t){if(t.__P)try{t.__H.__h.forEach(st),t.__H.__h.forEach(ut),t.__H.__h=[]}catch(i){return t.__H.__h=[],n.__e(i,t.__v),!0}})),H=[]}function st(t){t.t&&t.t()}function ut(t){var e=t.__();"function"==typeof e&&(t.t=e)}function ct(t,e){return!t||e.some((function(e,r){return e!==t[r]}))}function ft(t,e){return"function"==typeof e?e(t):e}function lt(t,e){for(var r in e)t[r]=e[r];return t}function ht(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}n.__r=function(t){V&&V(t),F=0,(q=t.__c).__H&&(q.__H.__h.forEach(st),q.__H.__h.forEach(ut),q.__H.__h=[])},n.diffed=function(t){W&&W(t);var e=t.__c;if(e){var r=e.__H;r&&r.__h.length&&(1!==H.push(e)&&D===n.requestAnimationFrame||((D=n.requestAnimationFrame)||function(t){var e,r=function(){clearTimeout(n),cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);"undefined"!=typeof window&&(e=requestAnimationFrame(r))})(at))}},n.__c=function(t,e){e.some((function(t){try{t.__h.forEach(st),t.__h=t.__h.filter((function(t){return!t.__||ut(t)}))}catch(s){e.some((function(t){t.__h&&(t.__h=[])})),e=[],n.__e(s,t.__v)}})),K&&K(t,e)},n.unmount=function(t){G&&G(t);var e=t.__c;if(e){var r=e.__H;if(r)try{r.__.forEach((function(t){return t.t&&t.t()}))}catch(t){n.__e(t,e.__v)}}};var dt=function(t){var e,r;function n(e){var r;return(r=t.call(this,e)||this).isPureReactComponent=!0,r}return r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,n.prototype.shouldComponentUpdate=function(t,e){return ht(this.props,t)||ht(this.state,e)},n}(b);function pt(t,e){function r(t){var r=this.props.ref,n=r==t.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,t)||!n:ht(this.props,t)}function n(e){return this.shouldComponentUpdate=r,v(t,lt({},e))}return n.prototype.isReactComponent=!0,n.displayName="Memo("+(t.displayName||t.name)+")",n.t=!0,n}var vt=n.__b;function mt(t){function e(e){var r=lt({},e);return delete r.ref,t(r,e.ref)}return e.prototype.isReactComponent=e.t=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}n.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),vt&&vt(t)};var yt=function(t,e){return t?M(t).reduce((function(t,r,n){return t.concat(e(r,n))}),[]):null},gt={map:yt,forEach:yt,count:function(t){return t?M(t).length:0},only:function(t){if(1!==(t=M(t)).length)throw new Error("Children.only() expects only one child.");return t[0]},toArray:M},bt=n.__e;function wt(t){return t&&((t=lt({},t)).__c=null,t.__k=t.__k&&t.__k.map(wt)),t}function _t(){this.__u=0,this.o=null,this.__b=null}function xt(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function kt(t){var e,r,n;function i(i){if(e||(e=t()).then((function(t){r=t.default||t}),(function(t){n=t})),n)throw n;if(!r)throw e;return v(r,i)}return i.displayName="Lazy",i.t=!0,i}function Et(){this.i=null,this.l=null}n.__e=function(t,e,r){if(t.then)for(var n,i=e;i=i.__;)if((n=i.__c)&&n.__c)return n.__c(t,e.__c);bt(t,e,r)},(_t.prototype=new b).__c=function(t,e){var r=this;null==r.o&&(r.o=[]),r.o.push(e);var n=xt(r.__v),i=!1,o=function(){i||(i=!0,n?n(a):a())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){o(),e.__c&&e.__c()};var a=function(){var t;if(!--r.__u)for(r.__v.__k[0]=r.state.u,r.setState({u:r.__b=null});t=r.o.pop();)t.forceUpdate()};r.__u++||r.setState({u:r.__b=r.__v.__k[0]}),t.then(o,o)},_t.prototype.render=function(t,e){return this.__b&&(this.__v.__k[0]=wt(this.__b),this.__b=null),[v(b,null,e.u?null:t.children),e.u&&t.fallback]};var Mt=function(t,e,r){if(++r[1]===r[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(r=t.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.i=r=r[2]}};(Et.prototype=new b).u=function(t){var e=this,r=xt(e.__v),n=e.l.get(t);return n[0]++,function(i){var o=function(){e.props.revealOrder?(n.push(i),Mt(e,t,n)):i()};r?r(o):o()}},Et.prototype.render=function(t){this.i=null,this.l=new Map;var e=M(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.l.set(e[r],this.i=[1,0,this.i]);return t.children},Et.prototype.componentDidUpdate=Et.prototype.componentDidMount=function(){var t=this;t.l.forEach((function(e,r){Mt(t,r,e)}))};var At=function(){function t(){}var e=t.prototype;return e.getChildContext=function(){return this.props.context},e.render=function(t){return t.children},t}();function St(t){var e=this,r=t.container,n=v(At,{context:e.context},t.vnode);return e.s&&e.s!==r&&(e.v.parentNode&&e.s.removeChild(e.v),C(e.h),e.p=!1),t.vnode?e.p?(r.__k=e.__k,L(n,r),e.__k=r.__k):(e.v=document.createTextNode(""),B("",r),r.appendChild(e.v),e.p=!0,e.s=r,L(n,r,e.v),e.__k=e.v.__k):e.p&&(e.v.parentNode&&e.s.removeChild(e.v),C(e.h)),e.h=n,e.componentWillUnmount=function(){e.v.parentNode&&e.s.removeChild(e.v),C(e.h)},null}function Rt(t,e){return v(St,{vnode:t,container:e})}var Pt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;b.prototype.isReactComponent={};var Tt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function Ot(t,e,r){if(null==e.__k)for(;e.firstChild;)e.removeChild(e.firstChild);return L(t,e),"function"==typeof r&&r(),t?t.__c:null}function It(t,e,r){return B(t,e),"function"==typeof r&&r(),t?t.__c:null}var Ct=n.event;function Nt(t,e){t["UNSAFE_"+e]&&!t[e]&&Object.defineProperty(t,e,{configurable:!1,get:function(){return this["UNSAFE_"+e]},set:function(t){this["UNSAFE_"+e]=t}})}n.event=function(t){Ct&&(t=Ct(t)),t.persist=function(){};var e=!1,r=!1,n=t.stopPropagation;t.stopPropagation=function(){n.call(t),e=!0};var i=t.preventDefault;return t.preventDefault=function(){i.call(t),r=!0},t.isPropagationStopped=function(){return e},t.isDefaultPrevented=function(){return r},t.nativeEvent=t};var Lt={configurable:!0,get:function(){return this.class}},Bt=n.vnode;n.vnode=function(t){t.$$typeof=Tt;var e=t.type,r=t.props;if(e){if(r.class!=r.className&&(Lt.enumerable="className"in r,null!=r.className&&(r.class=r.className),Object.defineProperty(r,"className",Lt)),"function"!=typeof e){var n,i,o;for(o in r.defaultValue&&void 0!==r.value&&(r.value||0===r.value||(r.value=r.defaultValue),delete r.defaultValue),Array.isArray(r.value)&&r.multiple&&"select"===e&&(M(r.children).forEach((function(t){-1!=r.value.indexOf(t.props.value)&&(t.props.selected=!0)})),delete r.value),r)if(n=Pt.test(o))break;if(n)for(o in i=t.props={},r)i[Pt.test(o)?o.replace(/[A-Z0-9]/,"-$&").toLowerCase():o]=r[o]}!function(e){var r=t.type,n=t.props;if(n&&"string"==typeof r){var i={};for(var o in n)/^on(Ani|Tra|Tou)/.test(o)&&(n[o.toLowerCase()]=n[o],delete n[o]),i[o.toLowerCase()]=o;if(i.ondoubleclick&&(n.ondblclick=n[i.ondoubleclick],delete n[i.ondoubleclick]),i.onbeforeinput&&(n.onbeforeinput=n[i.onbeforeinput],delete n[i.onbeforeinput]),i.onchange&&("textarea"===r||"input"===r.toLowerCase()&&!/^fil|che|ra/i.test(n.type))){var a=i.oninput||"oninput";n[a]||(n[a]=n[i.onchange],delete n[i.onchange])}}}(),"function"==typeof e&&!e.m&&e.prototype&&(Nt(e.prototype,"componentWillMount"),Nt(e.prototype,"componentWillReceiveProps"),Nt(e.prototype,"componentWillUpdate"),e.m=!0)}Bt&&Bt(t)};var jt="16.8.0";function Ut(t){return v.bind(null,t)}function Ft(t){return!!t&&t.$$typeof===Tt}function qt(t){return Ft(t)?j.apply(null,arguments):t}function Dt(t){return!!t.__k&&(L(null,t),!0)}function zt(t){return t&&(t.base||1===t.nodeType&&t)||null}var Ht=function(t,e){return t(e)},Vt={useState:J,useReducer:$,useEffect:Y,useLayoutEffect:X,useRef:Q,useImperativeHandle:tt,useMemo:et,useCallback:rt,useContext:nt,useDebugValue:it,version:"16.8.0",Children:gt,render:Ot,hydrate:Ot,unmountComponentAtNode:Dt,createPortal:Rt,createElement:v,createContext:U,createFactory:Ut,cloneElement:qt,createRef:y,Fragment:g,isValidElement:Ft,findDOMNode:zt,Component:b,PureComponent:dt,memo:pt,forwardRef:mt,unstable_batchedUpdates:Ht,Suspense:_t,SuspenseList:Et,lazy:kt}},30631:function(t,e,r){var n=r(17336),i=r(93995),o=r(39179),a=r(7948);function s(t,e,r,o,a){var s=[].slice.call(arguments,1),u=s.length,c="function"==typeof s[u-1];if(!c&&!n())throw new Error("Callback required as last argument");if(!c){if(u<1)throw new Error("Too few arguments provided");return 1===u?(r=e,e=o=void 0):2!==u||e.getContext||(o=r,r=e,e=void 0),new Promise((function(n,a){try{var s=i.create(r,o);n(t(s,e,o))}catch(u){a(u)}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(a=r,r=e,e=o=void 0):3===u&&(e.getContext&&void 0===a?(a=o,o=void 0):(a=o,o=r,r=e,e=void 0));try{var f=i.create(r,o);a(null,t(f,e,o))}catch(l){a(l)}}e.create=i.create,e.toCanvas=s.bind(null,o.render),e.toDataURL=s.bind(null,o.renderToDataURL),e.toString=s.bind(null,(function(t,e,r){return a.render(t,r)}))},17336:function(t){t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},4028:function(t,e,r){var n=r(34696).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,r=n(t),i=145===r?26:2*Math.ceil((r-13)/(2*e-2)),o=[r-7],a=1;a<e-1;a++)o[a]=o[a-1]-i;return o.push(6),o.reverse()},e.getPositions=function(t){for(var r=[],n=e.getRowColCoords(t),i=n.length,o=0;o<i;o++)for(var a=0;a<i;a++)0===o&&0===a||0===o&&a===i-1||o===i-1&&0===a||r.push([n[o],n[a]]);return r}},89622:function(t,e,r){var n=r(15507),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(t){this.mode=n.ALPHANUMERIC,this.data=t}o.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var r=45*i.indexOf(this.data[e]);r+=i.indexOf(this.data[e+1]),t.put(r,11)}this.data.length%2&&t.put(i.indexOf(this.data[e]),6)},t.exports=o},6399:function(t){function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},56995:function(t,e,r){var n=r(49470);function i(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=n.alloc(t*t),this.reservedBit=n.alloc(t*t)}i.prototype.set=function(t,e,r,n){var i=t*this.size+e;this.data[i]=r,n&&(this.reservedBit[i]=!0)},i.prototype.get=function(t,e){return this.data[t*this.size+e]},i.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r},i.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=i},63185:function(t,e,r){var n=r(49470),i=r(15507);function o(t){this.mode=i.BYTE,this.data=n.from(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(var e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)},t.exports=o},34607:function(t,e,r){var n=r(91288),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case n.L:return i[4*(t-1)+0];case n.M:return i[4*(t-1)+1];case n.Q:return i[4*(t-1)+2];case n.H:return i[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case n.L:return o[4*(t-1)+0];case n.M:return o[4*(t-1)+1];case n.Q:return o[4*(t-1)+2];case n.H:return o[4*(t-1)+3];default:return}}},91288:function(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,r){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(n){return r}}},54252:function(t,e,r){var n=r(34696).getSymbolSize;e.getPositions=function(t){var e=n(t);return[[0,0],[e-7,0],[0,e-7]]}},28131:function(t,e,r){var n=r(34696),i=n.getBCHDigit(1335);e.getEncodedBits=function(t,e){for(var r=t.bit<<3|e,o=r<<10;n.getBCHDigit(o)-i>=0;)o^=1335<<n.getBCHDigit(o)-i;return 21522^(r<<10|o)}},5009:function(t,e,r){var n=r(49470),i=n.alloc(512),o=n.alloc(256);!function(){for(var t=1,e=0;e<255;e++)i[e]=t,o[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)i[e]=i[e-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return o[t]},e.exp=function(t){return i[t]},e.mul=function(t,e){return 0===t||0===e?0:i[o[t]+o[e]]}},67298:function(t,e,r){var n=r(15507),i=r(34696);function o(t){this.mode=n.KANJI,this.data=t}o.getBitsLength=function(t){return 13*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var r=i.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},t.exports=o},8201:function(t,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var r=3,n=3,i=40,o=10;function a(t,r,n){switch(t){case e.Patterns.PATTERN000:return(r+n)%2==0;case e.Patterns.PATTERN001:return r%2==0;case e.Patterns.PATTERN010:return n%3==0;case e.Patterns.PATTERN011:return(r+n)%3==0;case e.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2==0;case e.Patterns.PATTERN101:return r*n%2+r*n%3==0;case e.Patterns.PATTERN110:return(r*n%2+r*n%3)%2==0;case e.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){for(var e=t.size,n=0,i=0,o=0,a=null,s=null,u=0;u<e;u++){i=o=0,a=s=null;for(var c=0;c<e;c++){var f=t.get(u,c);f===a?i++:(i>=5&&(n+=r+(i-5)),a=f,i=1),(f=t.get(c,u))===s?o++:(o>=5&&(n+=r+(o-5)),s=f,o=1)}i>=5&&(n+=r+(i-5)),o>=5&&(n+=r+(o-5))}return n},e.getPenaltyN2=function(t){for(var e=t.size,r=0,i=0;i<e-1;i++)for(var o=0;o<e-1;o++){var a=t.get(i,o)+t.get(i,o+1)+t.get(i+1,o)+t.get(i+1,o+1);4!==a&&0!==a||r++}return r*n},e.getPenaltyN3=function(t){for(var e=t.size,r=0,n=0,o=0,a=0;a<e;a++){n=o=0;for(var s=0;s<e;s++)n=n<<1&2047|t.get(a,s),s>=10&&(1488===n||93===n)&&r++,o=o<<1&2047|t.get(s,a),s>=10&&(1488===o||93===o)&&r++}return r*i},e.getPenaltyN4=function(t){for(var e=0,r=t.data.length,n=0;n<r;n++)e+=t.data[n];return Math.abs(Math.ceil(100*e/r/5)-10)*o},e.applyMask=function(t,e){for(var r=e.size,n=0;n<r;n++)for(var i=0;i<r;i++)e.isReserved(i,n)||e.xor(i,n,a(t,i,n))},e.getBestMask=function(t,r){for(var n=Object.keys(e.Patterns).length,i=0,o=1/0,a=0;a<n;a++){r(a),e.applyMask(a,t);var s=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),s<o&&(o=s,i=a)}return i}},15507:function(t,e,r){var n=r(59036),i=r(36146);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return i.testNumeric(t)?e.NUMERIC:i.testAlphanumeric(t)?e.ALPHANUMERIC:i.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,r){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(n){return r}}},32842:function(t,e,r){var n=r(15507);function i(t){this.mode=n.NUMERIC,this.data=t.toString()}i.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e,r,n;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),n=parseInt(r,10),t.put(n,10);var i=this.data.length-e;i>0&&(r=this.data.substr(e),n=parseInt(r,10),t.put(n,3*i+1))},t.exports=i},25678:function(t,e,r){var n=r(49470),i=r(5009);e.mul=function(t,e){for(var r=n.alloc(t.length+e.length-1),o=0;o<t.length;o++)for(var a=0;a<e.length;a++)r[o+a]^=i.mul(t[o],e[a]);return r},e.mod=function(t,e){for(var r=n.from(t);r.length-e.length>=0;){for(var o=r[0],a=0;a<e.length;a++)r[a]^=i.mul(e[a],o);for(var s=0;s<r.length&&0===r[s];)s++;r=r.slice(s)}return r},e.generateECPolynomial=function(t){for(var r=n.from([1]),o=0;o<t;o++)r=e.mul(r,[1,i.exp(o)]);return r}},93995:function(t,e,r){var n=r(49470),i=r(34696),o=r(91288),a=r(6399),s=r(56995),u=r(4028),c=r(54252),f=r(8201),l=r(34607),h=r(96561),d=r(80954),p=r(28131),v=r(15507),m=r(24150),y=r(13544);function g(t,e,r){var n,i,o=t.size,a=p.getEncodedBits(e,r);for(n=0;n<15;n++)i=1==(a>>n&1),n<6?t.set(n,8,i,!0):n<8?t.set(n+1,8,i,!0):t.set(o-15+n,8,i,!0),n<8?t.set(8,o-n-1,i,!0):n<9?t.set(8,15-n-1+1,i,!0):t.set(8,15-n-1,i,!0);t.set(o-8,8,1,!0)}function b(t,e,r){var o=new a;r.forEach((function(e){o.put(e.mode.bit,4),o.put(e.getLength(),v.getCharCountIndicator(e.mode,t)),e.write(o)}));var s=8*(i.getSymbolTotalCodewords(t)-l.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);for(var u=(s-o.getLengthInBits())/8,c=0;c<u;c++)o.put(c%2?17:236,8);return function(t,e,r){for(var o=i.getSymbolTotalCodewords(e),a=l.getTotalCodewordsCount(e,r),s=o-a,u=l.getBlocksCount(e,r),c=u-o%u,f=Math.floor(o/u),d=Math.floor(s/u),p=d+1,v=f-d,m=new h(v),y=0,g=new Array(u),b=new Array(u),w=0,_=n.from(t.buffer),x=0;x<u;x++){var k=x<c?d:p;g[x]=_.slice(y,y+k),b[x]=m.encode(g[x]),y+=k,w=Math.max(w,k)}var E,M,A=n.alloc(o),S=0;for(E=0;E<w;E++)for(M=0;M<u;M++)E<g[M].length&&(A[S++]=g[M][E]);for(E=0;E<v;E++)for(M=0;M<u;M++)A[S++]=b[M][E];return A}(o,t,e)}function w(t,e,r,n){var o;if(y(t))o=m.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var a=e;if(!a){var l=m.rawSplit(t);a=d.getBestVersionForData(l,r)}o=m.fromString(t,a||40)}var h=d.getBestVersionForData(o,r);if(!h)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<h)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+h+".\n")}else e=h;var p=b(e,r,o),v=i.getSymbolSize(e),w=new s(v);return function(t,e){for(var r=t.size,n=c.getPositions(e),i=0;i<n.length;i++)for(var o=n[i][0],a=n[i][1],s=-1;s<=7;s++)if(!(o+s<=-1||r<=o+s))for(var u=-1;u<=7;u++)a+u<=-1||r<=a+u||(s>=0&&s<=6&&(0===u||6===u)||u>=0&&u<=6&&(0===s||6===s)||s>=2&&s<=4&&u>=2&&u<=4?t.set(o+s,a+u,!0,!0):t.set(o+s,a+u,!1,!0))}(w,e),function(t){for(var e=t.size,r=8;r<e-8;r++){var n=r%2==0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}(w),function(t,e){for(var r=u.getPositions(e),n=0;n<r.length;n++)for(var i=r[n][0],o=r[n][1],a=-2;a<=2;a++)for(var s=-2;s<=2;s++)-2===a||2===a||-2===s||2===s||0===a&&0===s?t.set(i+a,o+s,!0,!0):t.set(i+a,o+s,!1,!0)}(w,e),g(w,r,0),e>=7&&function(t,e){for(var r,n,i,o=t.size,a=d.getEncodedBits(e),s=0;s<18;s++)r=Math.floor(s/3),n=s%3+o-8-3,i=1==(a>>s&1),t.set(r,n,i,!0),t.set(n,r,i,!0)}(w,e),function(t,e){for(var r=t.size,n=-1,i=r-1,o=7,a=0,s=r-1;s>0;s-=2)for(6===s&&s--;;){for(var u=0;u<2;u++)if(!t.isReserved(i,s-u)){var c=!1;a<e.length&&(c=1==(e[a]>>>o&1)),t.set(i,s-u,c),-1==--o&&(a++,o=7)}if((i+=n)<0||r<=i){i-=n,n=-n;break}}}(w,p),isNaN(n)&&(n=f.getBestMask(w,g.bind(null,w,r))),f.applyMask(n,w),g(w,r,n),{modules:w,version:e,errorCorrectionLevel:r,maskPattern:n,segments:o}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var r,n,a=o.M;return void 0!==e&&(a=o.from(e.errorCorrectionLevel,o.M),r=d.from(e.version),n=f.from(e.maskPattern),e.toSJISFunc&&i.setToSJISFunction(e.toSJISFunc)),w(t,r,a,n)}},96561:function(t,e,r){var n=r(49470),i=r(25678),o=r(62426).Buffer;function a(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}a.prototype.initialize=function(t){this.degree=t,this.genPoly=i.generateECPolynomial(this.degree)},a.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=n.alloc(this.degree),r=o.concat([t,e],t.length+this.degree),a=i.mod(r,this.genPoly),s=this.degree-a.length;if(s>0){var u=n.alloc(this.degree);return a.copy(u,s),u}return a},t.exports=a},36146:function(t,e){var r="[0-9]+",n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";e.KANJI=new RegExp(n,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(i,"g"),e.NUMERIC=new RegExp(r,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var o=new RegExp("^"+n+"$"),a=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return o.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return s.test(t)}},24150:function(t,e,r){var n=r(15507),i=r(32842),o=r(89622),a=r(63185),s=r(67298),u=r(36146),c=r(34696),f=r(21415);function l(t){return unescape(encodeURIComponent(t)).length}function h(t,e,r){for(var n,i=[];null!==(n=t.exec(r));)i.push({data:n[0],index:n.index,mode:e,length:n[0].length});return i}function d(t){var e,r,i=h(u.NUMERIC,n.NUMERIC,t),o=h(u.ALPHANUMERIC,n.ALPHANUMERIC,t);return c.isKanjiModeEnabled()?(e=h(u.BYTE,n.BYTE,t),r=h(u.KANJI,n.KANJI,t)):(e=h(u.BYTE_KANJI,n.BYTE,t),r=[]),i.concat(o,e,r).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function p(t,e){switch(e){case n.NUMERIC:return i.getBitsLength(t);case n.ALPHANUMERIC:return o.getBitsLength(t);case n.KANJI:return s.getBitsLength(t);case n.BYTE:return a.getBitsLength(t)}}function v(t,e){var r,u=n.getBestModeForData(t);if((r=n.from(e,u))!==n.BYTE&&r.bit<u.bit)throw new Error('"'+t+'" cannot be encoded with mode '+n.toString(r)+".\n Suggested mode is: "+n.toString(u));switch(r!==n.KANJI||c.isKanjiModeEnabled()||(r=n.BYTE),r){case n.NUMERIC:return new i(t);case n.ALPHANUMERIC:return new o(t);case n.KANJI:return new s(t);case n.BYTE:return new a(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(v(e,null)):e.data&&t.push(v(e.data,e.mode)),t}),[])},e.fromString=function(t,r){for(var i=function(t){for(var e=[],r=0;r<t.length;r++){var i=t[r];switch(i.mode){case n.NUMERIC:e.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:e.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:e.push([i,{data:i.data,mode:n.BYTE,length:l(i.data)}]);break;case n.BYTE:e.push([{data:i.data,mode:n.BYTE,length:l(i.data)}])}}return e}(d(t,c.isKanjiModeEnabled())),o=function(t,e){for(var r={},i={start:{}},o=["start"],a=0;a<t.length;a++){for(var s=t[a],u=[],c=0;c<s.length;c++){var f=s[c],l=""+a+c;u.push(l),r[l]={node:f,lastCount:0},i[l]={};for(var h=0;h<o.length;h++){var d=o[h];r[d]&&r[d].node.mode===f.mode?(i[d][l]=p(r[d].lastCount+f.length,f.mode)-p(r[d].lastCount,f.mode),r[d].lastCount+=f.length):(r[d]&&(r[d].lastCount=f.length),i[d][l]=p(f.length,f.mode)+4+n.getCharCountIndicator(f.mode,e))}}o=u}for(h=0;h<o.length;h++)i[o[h]].end=0;return{map:i,table:r}}(i,r),a=f.find_path(o.map,"start","end"),s=[],u=1;u<a.length-1;u++)s.push(o.table[a[u]].node);return e.fromArray(function(t){return t.reduce((function(t,e){var r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(s))},e.rawSplit=function(t){return e.fromArray(d(t,c.isKanjiModeEnabled()))}},34696:function(t,e){var r,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return n[t]},e.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');r=t},e.isKanjiModeEnabled=function(){return void 0!==r},e.toSJIS=function(t){return r(t)}},59036:function(t,e){e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},80954:function(t,e,r){var n=r(34696),i=r(34607),o=r(91288),a=r(15507),s=r(59036),u=r(13544),c=n.getBCHDigit(7973);function f(t,e){return a.getCharCountIndicator(t,e)+4}function l(t,e){var r=0;return t.forEach((function(t){var n=f(t.mode,e);r+=n+t.getBitsLength()})),r}e.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,r){if(!s.isValid(t))throw new Error("Invalid QR Code version");void 0===r&&(r=a.BYTE);var o=8*(n.getSymbolTotalCodewords(t)-i.getTotalCodewordsCount(t,e));if(r===a.MIXED)return o;var u=o-f(r,t);switch(r){case a.NUMERIC:return Math.floor(u/10*3);case a.ALPHANUMERIC:return Math.floor(u/11*2);case a.KANJI:return Math.floor(u/13);case a.BYTE:default:return Math.floor(u/8)}},e.getBestVersionForData=function(t,r){var n,i=o.from(r,o.M);if(u(t)){if(t.length>1)return function(t,r){for(var n=1;n<=40;n++)if(l(t,n)<=e.getCapacity(n,r,a.MIXED))return n}(t,i);if(0===t.length)return 1;n=t[0]}else n=t;return function(t,r,n){for(var i=1;i<=40;i++)if(r<=e.getCapacity(i,n,t))return i}(n.mode,n.getLength(),i)},e.getEncodedBits=function(t){if(!s.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;n.getBCHDigit(e)-c>=0;)e^=7973<<n.getBCHDigit(e)-c;return t<<12|e}},39179:function(t,e,r){var n=r(59777);e.render=function(t,e,r){var i=r,o=e;void 0!==i||e&&e.getContext||(i=e,e=void 0),e||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);var a=n.getImageWidth(t.modules.size,i),s=o.getContext("2d"),u=s.createImageData(a,a);return n.qrToImageData(u.data,t,i),function(t,e,r){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=r,e.width=r,e.style.height=r+"px",e.style.width=r+"px"}(s,o,a),s.putImageData(u,0,0),o},e.renderToDataURL=function(t,r,n){var i=n;void 0!==i||r&&r.getContext||(i=r,r=void 0),i||(i={});var o=e.render(t,r,i),a=i.type||"image/png",s=i.rendererOpts||{};return o.toDataURL(a,s.quality)}},7948:function(t,e,r){var n=r(59777);function i(t,e){var r=t.a/255,n=e+'="'+t.hex+'"';return r<1?n+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function o(t,e,r){var n=t+e;return void 0!==r&&(n+=" "+r),n}e.render=function(t,e,r){var a=n.getOptions(e),s=t.modules.size,u=t.modules.data,c=s+2*a.margin,f=a.color.light.a?"<path "+i(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",l="<path "+i(a.color.dark,"stroke")+' d="'+function(t,e,r){for(var n="",i=0,a=!1,s=0,u=0;u<t.length;u++){var c=Math.floor(u%e),f=Math.floor(u/e);c||a||(a=!0),t[u]?(s++,u>0&&c>0&&t[u-1]||(n+=a?o("M",c+r,.5+f+r):o("m",i,0),i=0,a=!1),c+1<e&&t[u+1]||(n+=o("h",s),s=0)):i++}return n}(u,s,a.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+f+l+"</svg>\n";return"function"==typeof r&&r(null,d),d}},59777:function(t,e){function r(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");var r=parseInt(e.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:n,scale:n?4:i,margin:e,color:{dark:r(t.color.dark||"#000000ff"),light:r(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,r){var n=e.getScale(t,r);return Math.floor((t+2*r.margin)*n)},e.qrToImageData=function(t,r,n){for(var i=r.modules.size,o=r.modules.data,a=e.getScale(i,n),s=Math.floor((i+2*n.margin)*a),u=n.margin*a,c=[n.color.light,n.color.dark],f=0;f<s;f++)for(var l=0;l<s;l++){var h=4*(f*s+l),d=n.color.light;if(f>=u&&l>=u&&f<s-u&&l<s-u)d=c[o[Math.floor((f-u)/a)*i+Math.floor((l-u)/a)]?1:0];t[h++]=d.r,t[h++]=d.g,t[h++]=d.b,t[h]=d.a}}},49470:function(t,e,r){"use strict";var n=r(13544);o.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(e){return!1}}();var i=o.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function o(t,e,r){return o.TYPED_ARRAY_SUPPORT||this instanceof o?"number"==typeof t?u(this,t):function(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer)return function(t,e,r,n){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");var i;i=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);o.TYPED_ARRAY_SUPPORT?i.__proto__=o.prototype:i=c(t,i);return i}(t,e,r,n);if("string"==typeof e)return function(t,e){var r=0|l(e),n=s(t,r),i=n.write(e);i!==r&&(n=n.slice(0,i));return n}(t,e);return function(t,e){if(o.isBuffer(e)){var r=0|a(e.length),n=s(t,r);return 0===n.length||e.copy(n,0,0,r),n}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?s(t,0):c(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return c(t,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}(this,t,e,r):new o(t,e,r)}function a(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function s(t,e){var r;return o.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e)).__proto__=o.prototype:(null===(r=t)&&(r=new o(e)),r.length=e),r}function u(t,e){var r=s(t,e<0?0:0|a(e));if(!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)r[n]=0;return r}function c(t,e){for(var r=e.length<0?0:0|a(e.length),n=s(t,r),i=0;i<r;i+=1)n[i]=255&e[i];return n}function f(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function l(t){return o.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:f(t).length)}o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),o.prototype.write=function(t,e,r){void 0===e||void 0===r&&"string"==typeof e?(r=this.length,e=0):isFinite(e)&&(e|=0,isFinite(r)?r|=0:r=void 0);var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,r,n){return function(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}(f(e,t.length-r),t,r,n)}(this,t,e,r)},o.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),o.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=o.prototype;else{var i=e-t;r=new o(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+t]}return r},o.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,a=n-r;if(this===t&&r<e&&e<n)for(i=a-1;i>=0;--i)t[i+e]=this[i+r];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),e);return a},o.prototype.fill=function(t,e,r){if("string"==typeof t){if("string"==typeof e?(e=0,r=this.length):"string"==typeof r&&(r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=o.isBuffer(t)?t:new o(t),s=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%s]}return this},o.concat=function(t,e){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s(null,0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=u(null,e),a=0;for(r=0;r<t.length;++r){var c=t[r];if(!o.isBuffer(c))throw new TypeError('"list" argument must be an Array of Buffers');c.copy(i,a),a+=c.length}return i},o.byteLength=l,o.prototype._isBuffer=!0,o.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.exports.alloc=function(t){var e=new o(t);return e.fill(0),e},t.exports.from=function(t){return new o(t)}},52131:function(t){"use strict";function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof t||0===t.length)return o;var a=/\+/g;t=t.split(r);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=t.length;s>0&&u>s&&(u=s);for(var c=0;c<u;++c){var f,l,h,d,p=t[c].replace(a,"%20"),v=p.indexOf(n);v>=0?(f=p.substr(0,v),l=p.substr(v+1)):(f=p,l=""),h=decodeURIComponent(f),d=decodeURIComponent(l),e(o,h)?Array.isArray(o[h])?o[h].push(d):o[h]=[o[h],d]:o[h]=d}return o}},83054:function(t){"use strict";var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,r,n,i){return r=r||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(i){var o=encodeURIComponent(e(i))+n;return Array.isArray(t[i])?t[i].map((function(t){return o+encodeURIComponent(e(t))})).join(r):o+encodeURIComponent(e(t[i]))})).join(r):i?encodeURIComponent(e(i))+n+encodeURIComponent(e(t)):""}},22620:function(t,e,r){"use strict";e.decode=e.parse=r(52131),e.encode=e.stringify=r(83054)},15339:function(t,e,r){"use strict";var n=65536,i=4294967295;var o=r(26143).Buffer,a=r.g.crypto||r.g.msCrypto;a&&a.getRandomValues?t.exports=function(t,e){if(t>i)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(t);if(t>0)if(t>n)for(var s=0;s<t;s+=n)a.getRandomValues(r.slice(s,s+n));else a.getRandomValues(r);if("function"==typeof e)return process.nextTick((function(){e(null,r)}));return r}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},51046:function(t,e,r){"use strict";r.d(e,{w_:function(){return c}});var n=r(67294),i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o=n.createContext&&n.createContext(i),a=function(){return a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)},s=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r};function u(t){return t&&t.map((function(t,e){return n.createElement(t.tag,a({key:e},t.attr),u(t.child))}))}function c(t){return function(e){return n.createElement(f,a({attr:a({},t.attr)},e),u(t.child))}}function f(t){var e=function(e){var r,i=t.attr,o=t.size,u=t.title,c=s(t,["attr","size","title"]),f=o||e.size||"1em";return e.className&&(r=e.className),t.className&&(r=(r?r+" ":"")+t.className),n.createElement("svg",a({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,i,c,{className:r,style:a(a({color:t.color||e.color},e.style),t.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),u&&n.createElement("title",null,u),t.children)};return void 0!==o?n.createElement(o.Consumer,null,(function(t){return e(t)})):e(i)}},24839:function(t,e,r){"use strict";var n,i=r(67294),o=(n=i)&&"object"==typeof n&&"default"in n?n.default:n;function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=function(t,e,r){if("function"!=typeof t)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof e)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==r&&"function"!=typeof r)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(n){if("function"!=typeof n)throw new Error("Expected WrappedComponent to be a React component.");var u,c=[];function f(){u=t(c.map((function(t){return t.props}))),l.canUseDOM?e(u):r&&(u=r(u))}var l=function(t){var e,r;function i(){return t.apply(this,arguments)||this}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,i.peek=function(){return u},i.rewind=function(){if(i.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var t=u;return u=void 0,c=[],t};var a=i.prototype;return a.UNSAFE_componentWillMount=function(){c.push(this),f()},a.componentDidUpdate=function(){f()},a.componentWillUnmount=function(){var t=c.indexOf(this);c.splice(t,1),f()},a.render=function(){return o.createElement(n,this.props)},i}(i.PureComponent);return a(l,"displayName","SideEffect("+function(t){return t.displayName||t.name||"Component"}(n)+")"),a(l,"canUseDOM",s),l}}},58267:function(t){"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,a,s;if("string"==typeof e&&(o="not ",e.substr(!a||a<0?0:+a,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(u," ").concat(i," ").concat(n(e,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},44263:function(t,e,r){"use strict";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(41537),o=r(48880);r(13247)(c,i);for(var a=n(o.prototype),s=0;s<a.length;s++){var u=a[s];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||process.nextTick(l,this)}function l(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},90957:function(t,e,r){"use strict";t.exports=i;var n=r(48336);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(13247)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},41537:function(t,e,r){"use strict";var n;t.exports=E,E.ReadableState=k;r(7555).EventEmitter;var i=function(t,e){return t.listeners(e).length},o=r(38177),a=r(62426).Buffer,s=r.g.Uint8Array||function(){};var u,c=r(94616);u=c&&c.debuglog?c.debuglog("stream"):function(){};var f,l,h,d=r(2346),p=r(84971),v=r(99189).getHighWaterMark,m=r(58267).q,y=m.ERR_INVALID_ARG_TYPE,g=m.ERR_STREAM_PUSH_AFTER_EOF,b=m.ERR_METHOD_NOT_IMPLEMENTED,w=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(13247)(E,o);var _=p.errorOrDestroy,x=["error","close","destroy","pause","resume"];function k(t,e,i){n=n||r(44263),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=v(this,t,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=r(37262).s),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function E(t){if(n=n||r(44263),!(this instanceof E))return new E(t);var e=this instanceof n;this._readableState=new k(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function M(t,e,r,n,i){u("readableAddChunk",e);var o,c=t._readableState;if(null===e)c.reading=!1,function(t,e){if(u("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?P(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,T(t)))}(t,c);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof s||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(c,e)),o)_(t,o);else if(c.objectMode||e&&e.length>0)if("string"==typeof e||c.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)c.endEmitted?_(t,new w):A(t,c,e,!0);else if(c.ended)_(t,new g);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(e=c.decoder.write(e),c.objectMode||0!==e.length?A(t,c,e,!1):O(t,c)):A(t,c,e,!1)}else n||(c.reading=!1,O(t,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function A(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&P(t)),O(t,e)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),E.prototype.destroy=p.destroy,E.prototype._undestroy=p.undestroy,E.prototype._destroy=function(t,e){e(t)},E.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),M(this,t,e,!1,r)},E.prototype.unshift=function(t){return M(this,t,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(t){f||(f=r(37262).s);var e=new f(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var S=1073741824;function R(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=S?t=S:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function P(t){var e=t._readableState;u("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(u("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(T,t))}function T(t){var e=t._readableState;u("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function O(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(u("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function C(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function N(t){u("readable nexttick read 0"),t.read(0)}function L(t,e){u("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(u("flow",e.flowing);e.flowing&&null!==t.read(););}function j(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function U(t){var e=t._readableState;u("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(F,e,t))}function F(t,e){if(u("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function q(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}E.prototype.read=function(t){u("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return u("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?U(this):P(this),null;if(0===(t=R(t,e))&&e.ended)return 0===e.length&&U(this),null;var n,i=e.needReadable;return u("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&u("length less than watermark",i=!0),e.ended||e.reading?u("reading or ended",i=!1):i&&(u("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R(r,e))),null===(n=t>0?j(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&U(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(t){_(this,new b("_read()"))},E.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,e);var o=(!e||!1!==e.end)&&t!==process.stdout&&t!==process.stderr?s:v;function a(e,i){u("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",c),t.removeListener("error",h),t.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",v),r.removeListener("data",l),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function s(){u("onend"),t.end()}n.endEmitted?process.nextTick(o):r.once("end",o),t.on("unpipe",a);var c=function(t){return function(){var e=t._readableState;u("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",c);var f=!1;function l(e){u("ondata");var i=t.write(e);u("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==q(n.pipes,t))&&!f&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(e){u("onerror",e),v(),t.removeListener("error",h),0===i(t,"error")&&_(t,e)}function d(){t.removeListener("finish",p),v()}function p(){u("onfinish"),t.removeListener("close",d),v()}function v(){u("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",h),t.once("close",d),t.once("finish",p),t.emit("pipe",r),n.flowing||(u("pipe resume"),r.resume()),t},E.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=q(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},E.prototype.on=function(t,e){var r=o.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?P(this):n.reading||process.nextTick(N,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(t,e){var r=o.prototype.removeListener.call(this,t,e);return"readable"===t&&process.nextTick(C,this),r},E.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||process.nextTick(C,this),e},E.prototype.resume=function(){var t=this._readableState;return t.flowing||(u("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(L,t,e))}(this,t)),t.paused=!1,this},E.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},E.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<x.length;o++)t.on(x[o],this.emit.bind(this,x[o]));return this._read=function(e){u("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=r(49629)),l(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),E._fromList=j,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(t,e){return void 0===h&&(h=r(73383)),h(E,t,e)})},48336:function(t,e,r){"use strict";t.exports=f;var n=r(58267).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(44263);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(t){if(!(this instanceof f))return new f(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",l)}function l(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(e,r){h(t,e,r)}))}function h(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new s;if(t._transformState.transforming)throw new a;return t.push(null)}r(13247)(f,u),f.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},f.prototype._transform=function(t,e,r){r(new i("_transform()"))},f.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},f.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},48880:function(t,e,r){"use strict";function n(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var i;t.exports=E,E.WritableState=k;var o={deprecate:r(56632)},a=r(38177),s=r(62426).Buffer,u=r.g.Uint8Array||function(){};var c,f=r(84971),l=r(99189).getHighWaterMark,h=r(58267).q,d=h.ERR_INVALID_ARG_TYPE,p=h.ERR_METHOD_NOT_IMPLEMENTED,v=h.ERR_MULTIPLE_CALLBACK,m=h.ERR_STREAM_CANNOT_PIPE,y=h.ERR_STREAM_DESTROYED,g=h.ERR_STREAM_NULL_VALUES,b=h.ERR_STREAM_WRITE_AFTER_END,w=h.ERR_UNKNOWN_ENCODING,_=f.errorOrDestroy;function x(){}function k(t,e,o){i=i||r(44263),t=t||{},"boolean"!=typeof o&&(o=e instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=l(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new v;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(T,t,e),t._writableState.errorEmitted=!0,_(t,n)):(i(n),t._writableState.errorEmitted=!0,_(t,n),T(t,e))}(t,r,n,e,i);else{var o=R(r)||t.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||S(t,r),n?process.nextTick(A,t,r,o,i):A(t,r,o,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function E(t){var e=this instanceof(i=i||r(44263));if(!e&&!c.call(E,this))return new E(t);this._writableState=new k(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function M(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function A(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),T(t,e)}function S(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,o=new Array(i),a=e.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,M(t,e,!0,e.length,o,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new n(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(M(t,e,!1,e.objectMode?1:c.length,c,f,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function R(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function P(t,e){t._final((function(r){e.pendingcb--,r&&_(t,r),e.prefinished=!0,t.emit("prefinish"),T(t,e)}))}function T(t,e){var r=R(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,process.nextTick(P,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(13247)(E,a),k.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(k.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===E&&(t&&t._writableState instanceof k)}})):c=function(t){return t instanceof this},E.prototype.pipe=function(){_(this,new m)},E.prototype.write=function(t,e,r){var n,i=this._writableState,o=!1,a=!i.objectMode&&(n=t,s.isBuffer(n)||n instanceof u);return a&&!s.isBuffer(t)&&(t=function(t){return s.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=x),i.ending?function(t,e){var r=new b;_(t,r),process.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i;return null===r?i=new g:"string"==typeof r||e.objectMode||(i=new d("chunk",["string","Buffer"],r)),!i||(_(t,i),process.nextTick(n,i),!1)}(this,i,t,r))&&(i.pendingcb++,o=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=s.from(e,r));return e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var u=e.objectMode?1:n.length;e.length+=u;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else M(t,e,!1,u,n,i,o);return c}(this,i,a,t,e,r)),o},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||S(this,t))},E.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(t,e,r){r(new p("_write()"))},E.prototype._writev=null,E.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,T(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(t,e){e(t)}},49629:function(t,e,r){"use strict";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(54271),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),l=Symbol("handlePromise"),h=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[a];if(null!==e){var r=t[h].read();null!==r&&(t[f]=null,t[a]=null,t[s]=null,e(d(r,!1)))}}function v(t){process.nextTick(p,t)}var m=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(e,r){process.nextTick((function(){t[u]?r(t[u]):e(d(void 0,!0))}))}));var r,n=this[f];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[l](r,n)}),n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(d(i,!1));r=new Promise(this[l])}return this[f]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[h].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),m);t.exports=function(t){var e,r=Object.create(y,(i(e={},h,{value:t,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,l,{value:function(t,e){var n=r[h].read();n?(r[f]=null,r[a]=null,r[s]=null,t(d(n,!1))):(r[a]=t,r[s]=e)},writable:!0}),e));return r[f]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[s];return null!==e&&(r[f]=null,r[a]=null,r[s]=null,e(t)),void(r[u]=t)}var n=r[a];null!==n&&(r[f]=null,r[a]=null,r[s]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",v.bind(null,r)),r}},2346:function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=r(62426).Buffer,s=r(52361).inspect,u=s&&s.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e,r,n,i=a.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,r=i,n=s,a.prototype.copy.call(e,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return s(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}],r&&o(e.prototype,r),c&&o(e,c),t}()},84971:function(t){"use strict";function e(t,e){n(t,e),r(t)}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function n(t,e){t.emit("error",e)}t.exports={destroy:function(t,i){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(i?i(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,t)):process.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!i&&t?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(e,o,t)):process.nextTick(e,o,t):i?(process.nextTick(r,o),i(t)):process.nextTick(r,o)})),this)},undestroy:function(){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)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},54271:function(t,e,r){"use strict";var n=r(58267).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var a=r.readable||!1!==r.readable&&e.readable,s=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||f()},c=e._writableState&&e._writableState.finished,f=function(){s=!1,c=!0,a||o.call(e)},l=e._readableState&&e._readableState.endEmitted,h=function(){a=!1,l=!0,s||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return a&&!l?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):s&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},v=function(){e.req.on("finish",f)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?s&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",f),e.on("abort",p),e.req?v():e.on("request",v)),e.on("end",h),e.on("finish",f),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",f),e.removeListener("abort",p),e.removeListener("request",v),e.req&&e.req.removeListener("finish",f),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",f),e.removeListener("end",h),e.removeListener("error",d),e.removeListener("close",p)}}},73383:function(t){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},86713:function(t,e,r){"use strict";var n;var i=r(58267).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===n&&(n=r(54271)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);s=!0,o()}));var u=!1;return function(e){if(!s&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function c(t){t()}function f(t,e){return t.pipe(e)}function l(t){return t.length?"function"!=typeof t[t.length-1]?s:t.pop():s}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=l(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var a=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&a.forEach(c),o||(a.forEach(c),i(n))}))}));return e.reduce(f)}},99189:function(t,e,r){"use strict";var n=r(58267).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},38177:function(t,e,r){t.exports=r(7555).EventEmitter},37262:function(t,e,r){"use strict";var n=r(26143).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"<22>";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"<22>";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"<22>"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"<22>":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=a(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},41644:function(t,e,r){(e=t.exports=r(41537)).Stream=e,e.Readable=e,e.Writable=r(48880),e.Duplex=r(44263),e.Transform=r(48336),e.PassThrough=r(90957),e.finished=r(54271),e.pipeline=r(86713)},40220:function(t,e,r){"use strict";var n=r(62426).Buffer,i=r(13247),o=r(66400),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[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],c=[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],f=[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],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function v(t,e,r,n,i,o,a,s){return p(t+(e^r^n)+o+a|0,s)+i|0}function m(t,e,r,n,i,o,a,s){return p(t+(e&r|~e&n)+o+a|0,s)+i|0}function y(t,e,r,n,i,o,a,s){return p(t+((e|~r)^n)+o+a|0,s)+i|0}function g(t,e,r,n,i,o,a,s){return p(t+(e&n|r&~n)+o+a|0,s)+i|0}function b(t,e,r,n,i,o,a,s){return p(t+(e^(r|~n))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,x=0|this._c,k=0|this._d,E=0|this._e,M=0;M<80;M+=1){var A,S;M<16?(A=v(r,n,i,o,d,t[s[M]],l[0],c[M]),S=b(w,_,x,k,E,t[u[M]],h[0],f[M])):M<32?(A=m(r,n,i,o,d,t[s[M]],l[1],c[M]),S=g(w,_,x,k,E,t[u[M]],h[1],f[M])):M<48?(A=y(r,n,i,o,d,t[s[M]],l[2],c[M]),S=y(w,_,x,k,E,t[u[M]],h[2],f[M])):M<64?(A=g(r,n,i,o,d,t[s[M]],l[3],c[M]),S=m(w,_,x,k,E,t[u[M]],h[3],f[M])):(A=b(r,n,i,o,d,t[s[M]],l[4],c[M]),S=v(w,_,x,k,E,t[u[M]],h[4],f[M])),r=d,d=o,o=p(i,10),i=n,n=A,w=E,E=k,k=p(x,10),x=_,_=S}var R=this._b+i+k|0;this._b=this._c+o+E|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+x|0,this._a=R},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},60970:function(t,e,r){"use strict";var n=r(62426).Buffer,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getLength=e.decode=e.encode=void 0;var o=i(r(92553));function a(t,e){if("0"===t[0]&&"0"===t[1])throw new Error("invalid RLP: extra zeros");return parseInt(t,e)}function s(t,e){if(t<56)return n.from([t+e]);var r=f(t),i=f(e+55+r.length/2);return n.from(i+r,"hex")}function u(t){var e,r,i,o,s,c=[],f=t[0];if(f<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(f<=183){if(e=f-127,i=128===f?n.from([]):t.slice(1,e),2===e&&i[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:i,remainder:t.slice(e)}}if(f<=191){if(r=f-182,t.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if((e=a(t.slice(1,r).toString("hex"),16))<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if((i=t.slice(r,e+r)).length<e)throw new Error("invalid RLP: not enough bytes for string");return{data:i,remainder:t.slice(e+r)}}if(f<=247){for(e=f-191,o=t.slice(1,e);o.length;)s=u(o),c.push(s.data),o=s.remainder;return{data:c,remainder:t.slice(e)}}var l=(r=f-246)+(e=a(t.slice(1,r).toString("hex"),16));if(l>t.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(o=t.slice(r,l)).length)throw new Error("invalid rlp, List has a invalid length");for(;o.length;)s=u(o),c.push(s.data),o=s.remainder;return{data:c,remainder:t.slice(l)}}function c(t){return"0x"===t.slice(0,2)}function f(t){if(t<0)throw new Error("Invalid integer as argument, must be unsigned!");var e=t.toString(16);return e.length%2?"0"+e:e}function l(t){if(!n.isBuffer(t)){if("string"==typeof t)return c(t)?n.from((r="string"!=typeof(i=t)?i:c(i)?i.slice(2):i).length%2?"0"+r:r,"hex"):n.from(t);if("number"==typeof t||"bigint"==typeof t)return t?(e=f(t),n.from(e,"hex")):n.from([]);if(null==t)return n.from([]);if(t instanceof Uint8Array)return n.from(t);if(o.default.isBN(t))return n.from(t.toArray());throw new Error("invalid type")}var e,r,i;return t}e.encode=function t(e){if(Array.isArray(e)){for(var r=[],i=0;i<e.length;i++)r.push(t(e[i]));var o=n.concat(r);return n.concat([s(o.length,192),o])}var a=l(e);return 1===a.length&&a[0]<128?a:n.concat([s(a.length,128),a])},e.decode=function(t,e){if(void 0===e&&(e=!1),!t||0===t.length)return n.from([]);var r=u(l(t));if(e)return r;if(0!==r.remainder.length)throw new Error("invalid remainder");return r.data},e.getLength=function(t){if(!t||0===t.length)return n.from([]);var e=l(t),r=e[0];if(r<=127)return e.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;var i=r-246;return i+a(e.slice(1,i).toString("hex"),16)}},92553:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6567).Buffer}catch(R){}function s(t,e){var r=t.charCodeAt(e);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 "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u<s;u++){var c=t.charCodeAt(u)-48;o*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a<i,"Invalid character"),o+=a}return o}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=n)u=c(t,f,f+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=c(t,f,t.length,e),f=0;f<a;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){f(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(R){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>24-i&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],f=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var v=l.modrn(f).toString(t);r=(l=l.idivn(f)).isZero()?v+r:h[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function v(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;t[r++]=255&a,r<t.length&&(t[r++]=a>>8&255),r<t.length&&(t[r++]=a>>16&255),6===o?(r<t.length&&(t[r++]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;t[r--]=255&a,r>=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a<n.length;a++)o=(e=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var m=function(t,e,r){var n,i,o,a=t.words,s=e.words,u=r.words,c=0,f=0|a[0],l=8191&f,h=f>>>13,d=0|a[1],p=8191&d,v=d>>>13,m=0|a[2],y=8191&m,g=m>>>13,b=0|a[3],w=8191&b,_=b>>>13,x=0|a[4],k=8191&x,E=x>>>13,M=0|a[5],A=8191&M,S=M>>>13,R=0|a[6],P=8191&R,T=R>>>13,O=0|a[7],I=8191&O,C=O>>>13,N=0|a[8],L=8191&N,B=N>>>13,j=0|a[9],U=8191&j,F=j>>>13,q=0|s[0],D=8191&q,z=q>>>13,H=0|s[1],V=8191&H,W=H>>>13,K=0|s[2],G=8191&K,Z=K>>>13,J=0|s[3],$=8191&J,Y=J>>>13,X=0|s[4],Q=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,vt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(l,D))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,D)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,z))+Math.imul(v,D)|0,o=Math.imul(v,z);var yt=(c+(n=n+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,D),i=(i=Math.imul(y,z))+Math.imul(g,D)|0,o=Math.imul(g,z),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,W)|0;var gt=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(w,D),i=(i=Math.imul(w,z))+Math.imul(_,D)|0,o=Math.imul(_,z),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Z)|0;var bt=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(k,D),i=(i=Math.imul(k,z))+Math.imul(E,D)|0,o=Math.imul(E,z),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,Y)|0;var wt=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,z))+Math.imul(S,D)|0,o=Math.imul(S,z),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0;var _t=(c+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(P,D),i=(i=Math.imul(P,z))+Math.imul(T,D)|0,o=Math.imul(T,z),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0;var xt=(c+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(I,D),i=(i=Math.imul(I,z))+Math.imul(C,D)|0,o=Math.imul(C,z),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0;var kt=(c+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,D),i=(i=Math.imul(L,z))+Math.imul(B,D)|0,o=Math.imul(B,z),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ct)|0;var Et=(c+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(U,D),i=(i=Math.imul(U,z))+Math.imul(F,D)|0,o=Math.imul(F,z),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ht)|0;var Mt=(c+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,vt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,vt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,ht)|0;var At=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,vt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,vt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,Z))+Math.imul(F,G)|0,o=Math.imul(F,Z),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,vt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,vt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ht)|0;var Rt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,vt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,vt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ct)|0,n=n+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ht)|0;var Pt=(c+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,vt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,vt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ht)|0;var Tt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,vt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,vt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ht)|0;var Ot=(c+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,vt)|0)+Math.imul(T,pt)|0))<<13)|0;c=((o=o+Math.imul(T,vt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(B,lt)|0,o=o+Math.imul(B,ht)|0;var It=(c+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,vt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,vt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(U,lt),i=(i=Math.imul(U,ht))+Math.imul(F,lt)|0,o=Math.imul(F,ht);var Ct=(c+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,vt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,vt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863;var Nt=(c+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,vt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,vt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=mt,u[1]=yt,u[2]=gt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=xt,u[7]=kt,u[8]=Et,u[9]=Mt,u[10]=At,u[11]=St,u[12]=Rt,u[13]=Pt,u[14]=Tt,u[15]=Ot,u[16]=It,u[17]=Ct,u[18]=Nt,0!==c&&(u[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var f=o-c,l=(0|t.words[f])*(0|e.words[c]),h=67108863&l;s=67108863&(h=h+s|0),i+=(a=(a=a+(l/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(t,e,r){return y(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(m=v),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?v(this,t,e):r<1024?y(this,t,e):g(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},b.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a<o;a++)n[a]=e[t[a]],i[a]=r[t[a]]},b.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var l=u,h=c,d=0;d<a;d++){var p=r[f+d],v=n[f+d],m=r[f+d+a],y=n[f+d+a],g=l*m-h*y;y=l*y+h*m,m=g,r[f+d]=p+m,n[f+d]=v+y,r[f+d+a]=p-m,n[f+d+a]=v-y,d!==s&&(g=u*l-c*h,h=u*h+c*l,l=g)}},b.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},b.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},b.prototype.convert13b=function(t,e,r,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},b.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),l=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,f,l,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*l[d];u[d]=s[d]*l[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),g(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<r;this.words[e]=u|a,a=s>>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,a=t.length+r;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+s;var u=(0|t.words[i])*e;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0==(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new A(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){A.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(x,_),x.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var a=0|t.words[i];t.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},x.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(k,_),i(E,_),i(M,_),M.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new x;else if("p224"===t)e=new k;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return w[t]=e,e},A.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var v=d,m=0;0!==v.cmp(s);m++)v=v.redSqr();n(m<p);var y=this.pow(l,new o(1).iushln(p-m-1));h=h.redMul(y),l=y.redSqr(),d=d.redMul(l),p=m}return h},A.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},A.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,A),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},26143:function(t,e,r){var n=r(62426),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},7068:function(t,e,r){var n=r(15895),i=r(7555),o="object"==typeof Reflect?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};function s(){i.call(this)}function u(t,e,r){try{a(t,e,r)}catch(n){setTimeout((function(){throw n}))}}function c(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}t.exports=s,n.inherits(s,i),s.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[t];if(void 0===s)return!1;if("function"==typeof s)u(s,this,e);else{var f=s.length,l=c(s,f);for(r=0;r<f;++r)u(l[r],this,e)}return!0}},49500:function(t,e,r){t.exports=r(43142)(r(61784))},61784:function(t,e,r){var n=new(0,r(3039).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(t){var e=t[0];switch(e){case 2:case 3:return 33!==t.length?null:function(t,e){var r=new o(e);if(r.cmp(i.p)>=0)return null;var a=(r=r.toRed(i.red)).redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===t!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(e,t.subarray(1,33));case 4:case 6:case 7:return 65!==t.length?null:function(t,e,r){var a=new o(e),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===t||7===t)&&s.isOdd()!==(7===t))return null;var u=a.redSqr().redIMul(a);return s.redSqr().redISub(u.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(e,t.subarray(1,33),t.subarray(33,65));default:return null}}function s(t,e){for(var r=e.encode(null,33===t.length),n=0;n<t.length;++n)t[n]=r[n]}t.exports={contextRandomize:function(){return 0},privateKeyVerify:function(t){var e=new o(t);return e.cmp(i.n)<0&&!e.isZero()?0:1},privateKeyNegate:function(t){var e=new o(t),r=i.n.sub(e).umod(i.n).toArrayLike(Uint8Array,"be",32);return t.set(r),0},privateKeyTweakAdd:function(t,e){var r=new o(e);if(r.cmp(i.n)>=0)return 1;if(r.iadd(new o(t)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},privateKeyTweakMul:function(t,e){var r=new o(e);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(t)),r.cmp(i.n)>=0&&(r=r.umod(i.n));var n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},publicKeyVerify:function(t){return null===a(t)?1:0},publicKeyCreate:function(t,e){var r=new o(e);return r.cmp(i.n)>=0||r.isZero()?1:(s(t,n.keyFromPrivate(e).getPublic()),0)},publicKeyConvert:function(t,e){var r=a(e);return null===r?1:(s(t,r.getPublic()),0)},publicKeyNegate:function(t,e){var r=a(e);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(t,n),0},publicKeyCombine:function(t,e){for(var r=new Array(e.length),n=0;n<e.length;++n)if(r[n]=a(e[n]),null===r[n])return 1;for(var i=r[0].getPublic(),o=1;o<r.length;++o)i=i.add(r[o].pub);return i.isInfinity()?2:(s(t,i),0)},publicKeyTweakAdd:function(t,e,r){var n=a(e);if(null===n)return 1;if((r=new o(r)).cmp(i.n)>=0)return 2;var u=n.getPublic().add(i.g.mul(r));return u.isInfinity()?2:(s(t,u),0)},publicKeyTweakMul:function(t,e,r){var n=a(e);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(t,n.getPublic().mul(r)),0)},signatureNormalize:function(t){var e=new o(t.subarray(0,32)),r=new o(t.subarray(32,64));return e.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&t.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(t,e){var r=e.subarray(0,32),n=e.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;var a=t.output,s=a.subarray(4,37);s[0]=0,s.set(r,1);for(var u=33,c=0;u>1&&0===s[c]&&!(128&s[c+1]);--u,++c);if(128&(s=s.subarray(c))[0])return 1;if(u>1&&0===s[0]&&!(128&s[1]))return 1;var f=a.subarray(39,72);f[0]=0,f.set(n,1);for(var l=33,h=0;l>1&&0===f[h]&&!(128&f[h+1]);--l,++h);return 128&(f=f.subarray(h))[0]||l>1&&0===f[0]&&!(128&f[1])?1:(t.outputlen=6+u+l,a[0]=48,a[1]=t.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+u]=2,a[5+u]=f.length,a.set(f,6+u),0)},signatureImport:function(t,e){if(e.length<8)return 1;if(e.length>72)return 1;if(48!==e[0])return 1;if(e[1]!==e.length-2)return 1;if(2!==e[2])return 1;var r=e[3];if(0===r)return 1;if(5+r>=e.length)return 1;if(2!==e[4+r])return 1;var n=e[5+r];if(0===n)return 1;if(6+r+n!==e.length)return 1;if(128&e[4])return 1;if(r>1&&0===e[4]&&!(128&e[5]))return 1;if(128&e[r+6])return 1;if(n>1&&0===e[r+6]&&!(128&e[r+7]))return 1;var a=e.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;var s=e.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var u=new o(a);u.cmp(i.n)>=0&&(u=new o(0));var c=new o(e.subarray(6+r));return c.cmp(i.n)>=0&&(c=new o(0)),t.set(u.toArrayLike(Uint8Array,"be",32),0),t.set(c.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(t,e,r,a,s){if(s){var u=s;s=function(t){var n=u(e,r,null,a,t);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new o(n)}}var c,f=new o(r);if(f.cmp(i.n)>=0||f.isZero())return 1;try{c=n.sign(e,r,{canonical:!0,k:s,pers:a})}catch(l){return 1}return t.signature.set(c.r.toArrayLike(Uint8Array,"be",32),0),t.signature.set(c.s.toArrayLike(Uint8Array,"be",32),32),t.recid=c.recoveryParam,0},ecdsaVerify:function(t,e,r){var s={r:t.subarray(0,32),s:t.subarray(32,64)},u=new o(s.r),c=new o(s.s);if(u.cmp(i.n)>=0||c.cmp(i.n)>=0)return 1;if(1===c.cmp(n.nh)||u.isZero()||c.isZero())return 3;var f=a(r);if(null===f)return 2;var l=f.getPublic();return n.verify(e,s,l)?0:3},ecdsaRecover:function(t,e,r,a){var u,c={r:e.slice(0,32),s:e.slice(32,64)},f=new o(c.r),l=new o(c.s);if(f.cmp(i.n)>=0||l.cmp(i.n)>=0)return 1;if(f.isZero()||l.isZero())return 2;try{u=n.recoverPubKey(a,c,r)}catch(h){return 2}return s(t,u),0},ecdh:function(t,e,r,s,u,c,f){var l=a(e);if(null===l)return 1;var h=new o(r);if(h.cmp(i.n)>=0||h.isZero())return 2;var d=l.getPublic().mul(h);if(void 0===u)for(var p=d.encode(null,!0),v=n.hash().update(p).digest(),m=0;m<32;++m)t[m]=v[m];else{c||(c=new Uint8Array(32));for(var y=d.getX().toArray("be",32),g=0;g<32;++g)c[g]=y[g];f||(f=new Uint8Array(32));for(var b=d.getY().toArray("be",32),w=0;w<32;++w)f[w]=b[w];var _=u(c,f,s);if(!(_ instanceof Uint8Array&&_.length===t.length))return 2;t.set(_)}return 0}}},43142:function(t){function e(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var n="Impossible case. Please create issue.",i="The tweak was out of range or the resulted private key is invalid",o="The tweak was out of range or equal to zero",a="Unknow error on context randomization",s="Private Key is invalid",u="Public Key could not be parsed",c="Public Key serialization error",f="The sum of the public keys is not valid",l="Signature could not be parsed",h="The nonce generation function failed, or the private key was invalid",d="Public key could not be recover",p="Scalar was invalid (zero or overflow)";function v(t,e){if(!t)throw new Error(e)}function m(t,e,r){if(v(e instanceof Uint8Array,"Expected ".concat(t," to be an Uint8Array")),void 0!==r)if(Array.isArray(r)){var n=r.join(", "),i="Expected ".concat(t," to be an Uint8Array with length [").concat(n,"]");v(r.includes(e.length),i)}else{var o="Expected ".concat(t," to be an Uint8Array with length ").concat(r);v(e.length===r,o)}}function y(t){v("Boolean"===b(t),"Expected compressed to be a Boolean")}function g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(t){return new Uint8Array(t)},e=arguments.length>1?arguments[1]:void 0;return"function"==typeof t&&(t=t(e)),m("output",t,e),t}function b(t){return Object.prototype.toString.call(t).slice(8,-1)}t.exports=function(t){return{contextRandomize:function(e){if(v(null===e||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==e&&m("seed",e,32),1===t.contextRandomize(e))throw new Error(a)},privateKeyVerify:function(e){return m("private key",e,32),0===t.privateKeyVerify(e)},privateKeyNegate:function(e){switch(m("private key",e,32),t.privateKeyNegate(e)){case 0:return e;case 1:throw new Error(n)}},privateKeyTweakAdd:function(e,r){switch(m("private key",e,32),m("tweak",r,32),t.privateKeyTweakAdd(e,r)){case 0:return e;case 1:throw new Error(i)}},privateKeyTweakMul:function(e,r){switch(m("private key",e,32),m("tweak",r,32),t.privateKeyTweakMul(e,r)){case 0:return e;case 1:throw new Error(o)}},publicKeyVerify:function(e){return m("public key",e,[33,65]),0===t.publicKeyVerify(e)},publicKeyCreate:function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(m("private key",e,32),y(r),n=g(n,r?33:65),t.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(c)}},publicKeyConvert:function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(m("public key",e,[33,65]),y(r),n=g(n,r?33:65),t.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(u);case 2:throw new Error(c)}},publicKeyNegate:function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;switch(m("public key",e,[33,65]),y(r),i=g(i,r?33:65),t.publicKeyNegate(i,e)){case 0:return i;case 1:throw new Error(u);case 2:throw new Error(n);case 3:throw new Error(c)}},publicKeyCombine:function(r){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;v(Array.isArray(r),"Expected public keys to be an Array"),v(r.length>0,"Expected public keys array will have more than zero items");var o,a=e(r);try{for(a.s();!(o=a.n()).done;){var s=o.value;m("public key",s,[33,65])}}catch(l){a.e(l)}finally{a.f()}switch(y(n),i=g(i,n?33:65),t.publicKeyCombine(i,r)){case 0:return i;case 1:throw new Error(u);case 2:throw new Error(f);case 3:throw new Error(c)}},publicKeyTweakAdd:function(e,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3?arguments[3]:void 0;switch(m("public key",e,[33,65]),m("tweak",r,32),y(n),o=g(o,n?33:65),t.publicKeyTweakAdd(o,e,r)){case 0:return o;case 1:throw new Error(u);case 2:throw new Error(i)}},publicKeyTweakMul:function(e,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(m("public key",e,[33,65]),m("tweak",r,32),y(n),i=g(i,n?33:65),t.publicKeyTweakMul(i,e,r)){case 0:return i;case 1:throw new Error(u);case 2:throw new Error(o)}},signatureNormalize:function(e){switch(m("signature",e,64),t.signatureNormalize(e)){case 0:return e;case 1:throw new Error(l)}},signatureExport:function(e,r){m("signature",e,64);var i={output:r=g(r,72),outputlen:72};switch(t.signatureExport(i,e)){case 0:return r.slice(0,i.outputlen);case 1:throw new Error(l);case 2:throw new Error(n)}},signatureImport:function(e,r){switch(m("signature",e),r=g(r,64),t.signatureImport(r,e)){case 0:return r;case 1:throw new Error(l);case 2:throw new Error(n)}},ecdsaSign:function(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;m("message",e,32),m("private key",r,32),v("Object"===b(i),"Expected options to be an Object"),void 0!==i.data&&m("options.data",i.data),void 0!==i.noncefn&&v("Function"===b(i.noncefn),"Expected options.noncefn to be a Function");var a={signature:o=g(o,64),recid:null};switch(t.ecdsaSign(a,e,r,i.data,i.noncefn)){case 0:return a;case 1:throw new Error(h);case 2:throw new Error(n)}},ecdsaVerify:function(e,r,n){switch(m("signature",e,64),m("message",r,32),m("public key",n,[33,65]),t.ecdsaVerify(e,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(l);case 2:throw new Error(u)}},ecdsaRecover:function(e,r,i){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;switch(m("signature",e,64),v("Number"===b(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),m("message",i,32),y(o),a=g(a,o?33:65),t.ecdsaRecover(a,e,r,i)){case 0:return a;case 1:throw new Error(l);case 2:throw new Error(d);case 3:throw new Error(n)}},ecdh:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(m("public key",e,[33,65]),m("private key",r,32),v("Object"===b(n),"Expected options to be an Object"),void 0!==n.data&&m("options.data",n.data),void 0!==n.hashfn?(v("Function"===b(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&m("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&m("options.ybuf",n.ybuf,32),m("output",i)):i=g(i,32),t.ecdh(i,e,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(u);case 2:throw new Error(p)}}}}},80010:function(t){!function(e){"use strict";var r=function(t){setTimeout(t,0)};"undefined"!=typeof process&&process&&"function"==typeof process.nextTick&&(r=process.nextTick),t.exports=function(t){var e={capacity:t||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===e.firstHere){e.current++,e.firstHere=!0;var t=1}else t=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(e.leave)},e.current+r.n-t>e.capacity)return 1===t&&(e.current--,e.firstHere=!1),e.queue.push(r);e.current+=r.n-t,r.task(e.leave),1===t&&(e.firstHere=!1)},leave:function(t){if(t=t||1,e.current-=t,e.queue.length){var n=e.queue[0];n.n+e.current>e.capacity||(e.queue.shift(),e.current+=n.n,r(n.task))}else if(e.current<0)throw new Error("leave called too many times.")},available:function(t){return t=t||1,e.current+t<=e.capacity}};return e}}()},71418:function(t,e,r){var n=r(26143).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,a=this._len,s=0;s<o;){for(var u=a%i,c=Math.min(o-s,i-u),f=0;f<c;f++)r[u+f]=t[s+f];s+=c,(a+=c)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},55220:function(t,e,r){var n=t.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};n.sha=r(87684),n.sha1=r(11066),n.sha224=r(83679),n.sha256=r(56167),n.sha384=r(50835),n.sha512=r(23825)},87684:function(t,e,r){var n=r(13247),i=r(71418),o=r(26143).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function f(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var h=0;h<80;++h){var d=~~(h/20),p=0|((e=n)<<5|e>>>27)+f(d,i,o,s)+u+r[h]+a[d];u=s,s=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},11066:function(t,e,r){var n=r(13247),i=r(71418),o=r(26143).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<80;++h)r[h]=(e=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),v=c(n)+l(p,i,o,s)+u+r[d]+a[p]|0;u=s,s=o,o=f(i),i=n,n=v}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},83679:function(t,e,r){var n=r(13247),i=r(56167),o=r(71418),a=r(26143).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.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},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},56167:function(t,e,r){var n=r(13247),i=r(71418),o=r(26143).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function h(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(u,i),u.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},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,v=0|this._g,m=0|this._h,y=0;y<16;++y)r[y]=t.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((e=r[y-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[y-7]+d(r[y-15])+r[y-16];for(var g=0;g<64;++g){var b=m+h(u)+c(u,p,v)+a[g]+r[g]|0,w=l(n)+f(n,i,o)|0;m=v,v=p,p=u,u=s+b|0,s=o,o=i,i=n,n=b+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=v+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},50835:function(t,e,r){var n=r(13247),i=r(23825),o=r(71418),a=r(26143).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.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},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},23825:function(t,e,r){var n=r(13247),i=r(71418),o=r(26143).Buffer,a=[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],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function h(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function v(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function y(t,e){return t>>>0<e>>>0?1:0}n(u,i),u.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},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,g=0|this._gh,b=0|this._hh,w=0|this._al,_=0|this._bl,x=0|this._cl,k=0|this._dl,E=0|this._el,M=0|this._fl,A=0|this._gl,S=0|this._hl,R=0;R<32;R+=2)e[R]=t.readInt32BE(4*R),e[R+1]=t.readInt32BE(4*R+4);for(;R<160;R+=2){var P=e[R-30],T=e[R-30+1],O=d(P,T),I=p(T,P),C=v(P=e[R-4],T=e[R-4+1]),N=m(T,P),L=e[R-14],B=e[R-14+1],j=e[R-32],U=e[R-32+1],F=I+B|0,q=O+L+y(F,I)|0;q=(q=q+C+y(F=F+N|0,N)|0)+j+y(F=F+U|0,U)|0,e[R]=q,e[R+1]=F}for(var D=0;D<160;D+=2){q=e[D],F=e[D+1];var z=f(r,n,i),H=f(w,_,x),V=l(r,w),W=l(w,r),K=h(s,E),G=h(E,s),Z=a[D],J=a[D+1],$=c(s,u,g),Y=c(E,M,A),X=S+G|0,Q=b+K+y(X,S)|0;Q=(Q=(Q=Q+$+y(X=X+Y|0,Y)|0)+Z+y(X=X+J|0,J)|0)+q+y(X=X+F|0,F)|0;var tt=W+H|0,et=V+z+y(tt,W)|0;b=g,S=A,g=u,A=M,u=s,M=E,s=o+Q+y(E=k+X|0,k)|0,o=i,k=x,i=n,x=_,n=r,_=w,r=Q+et+y(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+x|0,this._dl=this._dl+k|0,this._el=this._el+E|0,this._fl=this._fl+M|0,this._gl=this._gl+A|0,this._hl=this._hl+S|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+n+y(this._bl,_)|0,this._ch=this._ch+i+y(this._cl,x)|0,this._dh=this._dh+o+y(this._dl,k)|0,this._eh=this._eh+s+y(this._el,E)|0,this._fh=this._fh+u+y(this._fl,M)|0,this._gh=this._gh+g+y(this._gl,A)|0,this._hh=this._hh+b+y(this._hl,S)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},34734:function(t){"use strict";t.exports=function(t,e){if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];var r=t.indexOf(e);return-1===r?[t]:[t.slice(0,r),t.slice(r+e.length)]}},12708:function(t,e,r){t.exports=i;var n=r(7555).EventEmitter;function i(){n.call(this)}r(13247)(i,n),i.Readable=r(41537),i.Writable=r(48880),i.Duplex=r(44263),i.Transform=r(48336),i.PassThrough=r(90957),i.finished=r(54271),i.pipeline=r(86713),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,t.end())}function u(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(f(),0===n.listenerCount(this,"error"))throw t}function f(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),t.removeListener("close",f)}return r.on("error",c),t.on("error",c),r.on("end",f),r.on("close",f),t.on("close",f),t.emit("pipe",r),t}},13552:function(t,e,r){var n=r(90422),i=r(74630),o=r(76297),a=r(98668),s=r(73629),u=e;u.request=function(t,e){t="string"==typeof t?s.parse(t):o(t);var i=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||i,u=t.hostname||t.host,c=t.port,f=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?a+"//"+u:"")+(c?":"+c:"")+f,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var l=new n(t);return e&&l.on("response",e),l},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},55123:function(t,e,r){var n;function i(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(t){n=null}}else n=null;return n}function o(t){var e=i();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(r){}return!1}function a(t){return"function"==typeof t}e.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),e.writableStream=a(r.g.WritableStream),e.abortController=a(r.g.AbortController),e.arraybuffer=e.fetch||o("arraybuffer"),e.msstream=!e.fetch&&o("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!i()&&a(i().overrideMimeType),n=null},90422:function(t,e,r){var n=r(62426).Buffer,i=r(55123),o=r(13247),a=r(74630),s=r(41644),u=a.IncomingMessage,c=a.readyStates;var f=t.exports=function(t){var e,r=this;s.Writable.call(r),r._opts=t,r._body=[],r._headers={},t.auth&&r.setHeader("Authorization","Basic "+n.from(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){r.setHeader(e,t.headers[e])}));var o=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!i.abortController)o=!1,e=!0;else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!i.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}r._mode=function(t,e){return i.fetch&&e?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&t?"arraybuffer":"text"}(e,o),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};o(f,s.Writable),f.prototype.setHeader=function(t,e){var r=t.toLowerCase();-1===l.indexOf(r)&&(this._headers[r]={name:t,value:e})},f.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},f.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},f.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts;"timeout"in e&&0!==e.timeout&&t.setTimeout(e.timeout);var n=t._headers,o=null;"GET"!==e.method&&"HEAD"!==e.method&&(o=new Blob(t._body,{type:(n["content-type"]||{}).value||""}));var a=[];if(Object.keys(n).forEach((function(t){var e=n[t].name,r=n[t].value;Array.isArray(r)?r.forEach((function(t){a.push([e,t])})):a.push([e,r])})),"fetch"===t._mode){var s=null;if(i.abortController){var u=new AbortController;s=u.signal,t._fetchAbortController=u,"requestTimeout"in e&&0!==e.requestTimeout&&(t._fetchTimer=r.g.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),e.requestTimeout))}r.g.fetch(t._opts.url,{method:t._opts.method,headers:a,body:o||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:s}).then((function(e){t._fetchResponse=e,t._resetTimers(!1),t._connect()}),(function(e){t._resetTimers(!0),t._destroyed||t.emit("error",e)}))}else{var f=t._xhr=new r.g.XMLHttpRequest;try{f.open(t._opts.method,t._opts.url,!0)}catch(l){return void process.nextTick((function(){t.emit("error",l)}))}"responseType"in f&&(f.responseType=t._mode),"withCredentials"in f&&(f.withCredentials=!!e.withCredentials),"text"===t._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(f.timeout=e.requestTimeout,f.ontimeout=function(){t.emit("requestTimeout")}),a.forEach((function(t){f.setRequestHeader(t[0],t[1])})),t._response=null,f.onreadystatechange=function(){switch(f.readyState){case c.LOADING:case c.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(f.onprogress=function(){t._onXHRProgress()}),f.onerror=function(){t._destroyed||(t._resetTimers(!0),t.emit("error",new Error("XHR error")))};try{f.send(o)}catch(l){return void process.nextTick((function(){t.emit("error",l)}))}}}},f.prototype._onXHRProgress=function(){var t=this;t._resetTimers(!1),function(t){try{var e=t.status;return null!==e&&0!==e}catch(r){return!1}}(t._xhr)&&!t._destroyed&&(t._response||t._connect(),t._response._onXHRProgress(t._resetTimers.bind(t)))},f.prototype._connect=function(){var t=this;t._destroyed||(t._response=new u(t._xhr,t._fetchResponse,t._mode,t._resetTimers.bind(t)),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},f.prototype._write=function(t,e,r){this._body.push(t),r()},f.prototype._resetTimers=function(t){var e=this;r.g.clearTimeout(e._socketTimer),e._socketTimer=null,t?(r.g.clearTimeout(e._fetchTimer),e._fetchTimer=null):e._socketTimeout&&(e._socketTimer=r.g.setTimeout((function(){e.emit("timeout")}),e._socketTimeout))},f.prototype.abort=f.prototype.destroy=function(t){var e=this;e._destroyed=!0,e._resetTimers(!0),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort(),t&&e.emit("error",t)},f.prototype.end=function(t,e,r){"function"==typeof t&&(r=t,t=void 0),s.Writable.prototype.end.call(this,t,e,r)},f.prototype.setTimeout=function(t,e){var r=this;e&&r.once("timeout",e),r._socketTimeout=t,r._resetTimers(!1)},f.prototype.flushHeaders=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var l=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},74630:function(t,e,r){var n=r(62426).Buffer,i=r(55123),o=r(13247),a=r(41644),s=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=e.IncomingMessage=function(t,e,r,o){var s=this;if(a.Readable.call(s),s._mode=r,s.headers={},s.rawHeaders=[],s.trailers={},s.rawTrailers=[],s.on("end",(function(){process.nextTick((function(){s.emit("close")}))})),"fetch"===r){if(s._fetchResponse=e,s.url=e.url,s.statusCode=e.status,s.statusMessage=e.statusText,e.headers.forEach((function(t,e){s.headers[e.toLowerCase()]=t,s.rawHeaders.push(e,t)})),i.writableStream){var u=new WritableStream({write:function(t){return o(!1),new Promise((function(e,r){s._destroyed?r():s.push(n.from(t))?e():s._resumeFetch=e}))},close:function(){o(!0),s._destroyed||s.push(null)},abort:function(t){o(!0),s._destroyed||s.emit("error",t)}});try{return void e.body.pipeTo(u).catch((function(t){o(!0),s._destroyed||s.emit("error",t)}))}catch(h){}}var c=e.body.getReader();!function t(){c.read().then((function(e){s._destroyed||(o(e.done),e.done?s.push(null):(s.push(n.from(e.value)),t()))})).catch((function(t){o(!0),s._destroyed||s.emit("error",t)}))}()}else{if(s._xhr=t,s._pos=0,s.url=t.responseURL,s.statusCode=t.status,s.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var r=e[1].toLowerCase();"set-cookie"===r?(void 0===s.headers[r]&&(s.headers[r]=[]),s.headers[r].push(e[2])):void 0!==s.headers[r]?s.headers[r]+=", "+e[2]:s.headers[r]=e[2],s.rawHeaders.push(e[1],e[2])}})),s._charset="x-user-defined",!i.overrideMimeType){var f=s.rawHeaders["mime-type"];if(f){var l=f.match(/;\s*charset=([^;])(;|$)/);l&&(s._charset=l[1].toLowerCase())}s._charset||(s._charset="utf-8")}}};o(u,a.Readable),u.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},u.prototype._onXHRProgress=function(t){var e=this,i=e._xhr,o=null;switch(e._mode){case"text":if((o=i.responseText).length>e._pos){var a=o.substr(e._pos);if("x-user-defined"===e._charset){for(var u=n.alloc(a.length),c=0;c<a.length;c++)u[c]=255&a.charCodeAt(c);e.push(u)}else e.push(a,e._charset);e._pos=o.length}break;case"arraybuffer":if(i.readyState!==s.DONE||!i.response)break;o=i.response,e.push(n.from(new Uint8Array(o)));break;case"moz-chunked-arraybuffer":if(o=i.response,i.readyState!==s.LOADING||!o)break;e.push(n.from(new Uint8Array(o)));break;case"ms-stream":if(o=i.response,i.readyState!==s.LOADING)break;var f=new r.g.MSStreamReader;f.onprogress=function(){f.result.byteLength>e._pos&&(e.push(n.from(new Uint8Array(f.result.slice(e._pos)))),e._pos=f.result.byteLength)},f.onload=function(){t(!0),e.push(null)},f.readAsArrayBuffer(o)}e._xhr.readyState===s.DONE&&"ms-stream"!==e._mode&&(t(!0),e.push(null))}},68936:function(t){"use strict";t.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,(function(t){return"%".concat(t.charCodeAt(0).toString(16).toUpperCase())}))}},62289:function(t,e,r){var n=r(62426).Buffer,i=n.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};var o=e.s=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!i(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=u;break;default:return void(this.write=a)}this.charBuffer=new n(6),this.charReceived=0,this.charLength=0};function a(t){return t.toString(this.encoding)}function s(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function u(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}o.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(t=t.slice(r,t.length),!((i=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var n=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,n),n-=this.charReceived);var i;n=(e+=t.toString(this.encoding,0,n)).length-1;if((i=e.charCodeAt(n))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,n)}return e},o.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},o.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},27663:function(t,e,r){var n=r(9485);t.exports=function(t){return"string"!=typeof t?t:n(t)?t.slice(2):t}},79900:function(t,e,r){"use strict";r.r(e),r.d(e,{__assign:function(){return o},__asyncDelegator:function(){return _},__asyncGenerator:function(){return w},__asyncValues:function(){return x},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return S},__classPrivateFieldSet:function(){return R},__createBinding:function(){return h},__decorate:function(){return s},__exportStar:function(){return d},__extends:function(){return i},__generator:function(){return l},__importDefault:function(){return A},__importStar:function(){return M},__makeTemplateObject:function(){return k},__metadata:function(){return c},__param:function(){return u},__read:function(){return v},__rest:function(){return a},__spread:function(){return m},__spreadArray:function(){return g},__spreadArrays:function(){return y},__values:function(){return p}});var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var o=function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function a(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}function s(t,e,r,n){var i,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a}function u(t,e){return function(r,n){e(r,n,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function f(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function l(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(s){o=[6,s],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var h=Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]};function d(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||h(e,t,r)}function p(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(v(arguments[e]));return t}function y(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function g(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function b(t){return this instanceof b?(this.v=t,this):new b(t)}function w(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(t){i[t]&&(n[t]=function(e){return new Promise((function(r,n){o.push([t,e,r,n])>1||s(t,e)}))})}function s(t,e){try{(r=i[t](e)).value instanceof b?Promise.resolve(r.value.v).then(u,c):f(o[0][2],r)}catch(n){f(o[0][3],n)}var r}function u(t){s("next",t)}function c(t){s("throw",t)}function f(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function _(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:b(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function x(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=p(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,i,(e=t[r](e)).done,e.value)}))}}}function k(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var E=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function M(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&h(e,t,r);return E(e,t),e}function A(t){return t&&t.__esModule?t:{default:t}}function S(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function R(t,e,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(t,r):i?i.value=r:e.set(t,r),r}},50800:function(t,e,r){var n=r(62426).Buffer,i=r(28395).strict;t.exports=function(t){if(i(t)){var e=n.from(t.buffer);return t.byteLength!==t.buffer.byteLength&&(e=e.slice(t.byteOffset,t.byteOffset+t.byteLength)),e}return n.from(t)}},41410:function(t,e,r){var n;t=r.nmd(t),function(i){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var a,s=2147483647,u=36,c=/^xn--/,f=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function v(t){throw RangeError(h[t])}function m(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function y(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+m((t=t.replace(l,".")).split("."),e).join(".")}function g(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function b(t){return m(t,(function(t){var e="";return t>65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=p(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,r){var n=0;for(t=r?d(t/700):t>>1,t+=d(t/e);t>455;n+=u)t=d(t/35);return d(n+36*t/(t+38))}function x(t){var e,r,n,i,o,a,c,f,l,h,p,m=[],y=t.length,g=0,w=128,x=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&v("not-basic"),m.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<y;){for(o=g,a=1,c=u;i>=y&&v("invalid-input"),((f=(p=t.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:u)>=u||f>d((s-g)/a))&&v("overflow"),g+=f*a,!(f<(l=c<=x?1:c>=x+26?26:c-x));c+=u)a>d(s/(h=u-l))&&v("overflow"),a*=h;x=_(g-o,e=m.length+1,0==o),d(g/e)>s-w&&v("overflow"),w+=d(g/e),g%=e,m.splice(g++,0,w)}return b(m)}function k(t){var e,r,n,i,o,a,c,f,l,h,m,y,b,x,k,E=[];for(y=(t=g(t)).length,e=128,r=0,o=72,a=0;a<y;++a)(m=t[a])<128&&E.push(p(m));for(n=i=E.length,i&&E.push("-");n<y;){for(c=s,a=0;a<y;++a)(m=t[a])>=e&&m<c&&(c=m);for(c-e>d((s-r)/(b=n+1))&&v("overflow"),r+=(c-e)*b,e=c,a=0;a<y;++a)if((m=t[a])<e&&++r>s&&v("overflow"),m==e){for(f=r,l=u;!(f<(h=l<=o?1:l>=o+26?26:l-o));l+=u)k=f-h,x=u-h,E.push(p(w(h+k%x,0))),f=d(k/x);E.push(p(w(f,0))),o=_(r,b,n==i),r=0,++n}++r,++e}return E.join("")}a={version:"1.3.2",ucs2:{decode:g,encode:b},decode:x,encode:k,toASCII:function(t){return y(t,(function(t){return f.test(t)?"xn--"+k(t):t}))},toUnicode:function(t){return y(t,(function(t){return c.test(t)?x(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n)}()},73629:function(t,e,r){"use strict";var n=r(41410),i=r(11894);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=b(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(c),l=["%","/","?",";","#"].concat(f),h=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=r(22620);function b(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o<t.indexOf("#")?"?":"#",c=t.split(s);c[0]=c[0].replace(/\\/g,"/");var b=t=c.join(s);if(b=b.trim(),!r&&1===t.split("#").length){var w=u.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=e?g.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var _=a.exec(b);if(_){var x=(_=_[0]).toLowerCase();this.protocol=x,b=b.substr(_.length)}if(r||_||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===b.substr(0,2);!k||_&&m[_]||(b=b.substr(2),this.slashes=!0)}if(!m[_]&&(k||_&&!y[_])){for(var E,M,A=-1,S=0;S<h.length;S++){-1!==(R=b.indexOf(h[S]))&&(-1===A||R<A)&&(A=R)}-1!==(M=-1===A?b.lastIndexOf("@"):b.lastIndexOf("@",A))&&(E=b.slice(0,M),b=b.slice(M+1),this.auth=decodeURIComponent(E)),A=-1;for(S=0;S<l.length;S++){var R;-1!==(R=b.indexOf(l[S]))&&(-1===A||R<A)&&(A=R)}-1===A&&(A=b.length),this.host=b.slice(0,A),b=b.slice(A),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var T=this.hostname.split(/\./),O=(S=0,T.length);S<O;S++){var I=T[S];if(I&&!I.match(d)){for(var C="",N=0,L=I.length;N<L;N++)I.charCodeAt(N)>127?C+="x":C+=I[N];if(!C.match(d)){var B=T.slice(0,S),j=T.slice(S+1),U=I.match(p);U&&(B.push(U[1]),j.unshift(U[2])),j.length&&(b="/"+j.join(".")+b),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+F,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!v[x])for(S=0,O=f.length;S<O;S++){var D=f[S];if(-1!==b.indexOf(D)){var z=encodeURIComponent(D);z===D&&(z=escape(D)),b=b.split(D).join(z)}}var H=b.indexOf("#");-1!==H&&(this.hash=b.substr(H),b=b.slice(0,H));var V=b.indexOf("?");if(-1!==V?(this.search=b.substr(V),this.query=b.substr(V+1),e&&(this.query=g.parse(this.query)),b=b.slice(0,V)):e&&(this.search="",this.query={}),b&&(this.pathname=b),y[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var W=this.search||"";this.path=F+W}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,a="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=g.stringify(this.query));var s=this.search||a&&"?"+a||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||y[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),e+o+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace("#","%23"))+n},o.prototype.resolve=function(t){return this.resolveObject(b(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,n=Object.keys(this),a=0;a<n.length;a++){var s=n[a];r[s]=this[s]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),c=0;c<u.length;c++){var f=u[c];"protocol"!==f&&(r[f]=t[f])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!y[t.protocol]){for(var l=Object.keys(t),h=0;h<l.length;h++){var d=l[h];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||m[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var v=r.pathname||"",g=r.search||"";r.path=v+g}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),w=t.host||t.pathname&&"/"===t.pathname.charAt(0),_=w||b||r.host&&t.pathname,x=_,k=r.pathname&&r.pathname.split("/")||[],E=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===k[0]?k[0]=r.host:k.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),_=_&&(""===p[0]||""===k[0])),w)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,k=p;else if(p.length)k||(k=[]),k.pop(),k=k.concat(p),r.search=t.search,r.query=t.query;else if(!i.isNullOrUndefined(t.search)){if(E)r.hostname=r.host=k.shift(),(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift());return r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!k.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var M=k.slice(-1)[0],A=(r.host||t.host||k.length>1)&&("."===M||".."===M)||""===M,S=0,R=k.length;R>=0;R--)"."===(M=k[R])?k.splice(R,1):".."===M?(k.splice(R,1),S++):S&&(k.splice(R,1),S--);if(!_&&!x)for(;S--;S)k.unshift("..");!_||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),A&&"/"!==k.join("/").substr(-1)&&k.push("");var P,T=""===k[0]||k[0]&&"/"===k[0].charAt(0);E&&(r.hostname=r.host=T?"":k.length?k.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift()));return(_=_||r.host&&k.length)&&!T&&k.unshift(""),k.length?r.pathname=k.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},11894:function(t){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},56632:function(t,e,r){function n(t){try{if(!r.g.localStorage)return!1}catch(n){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},55503:function(t,e,r){"use strict";var n=r(85425)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(i){n=null}t.exports=n},85425:function(t,e,r){"use strict";var n;r(8628);var i=SyntaxError,o=Function,a=TypeError,s=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(R){u=null}var c=function(){throw new a},f=u?function(){try{return c}catch(t){try{return u(arguments,"callee").get}catch(e){return c}}}():c,l=r(98300)(),h=Object.getPrototypeOf||function(t){return t.__proto__},d={},p="undefined"==typeof Uint8Array?n:h(Uint8Array),v={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":l?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?h(h([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?h((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?h((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?h(""[Symbol.iterator]()):n,"%Symbol%":l?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":f,"%TypedArray%":p,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},m=function t(e){var r;if("%AsyncFunction%"===e)r=s("async function () {}");else if("%GeneratorFunction%"===e)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=s("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(r=h(i.prototype))}return v[e]=r,r},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},g=r(89579),b=r(18519),w=g.call(Function.call,Array.prototype.concat),_=g.call(Function.apply,Array.prototype.splice),x=g.call(Function.call,String.prototype.replace),k=g.call(Function.call,String.prototype.slice),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,A=function(t){var e=k(t,0,1),r=k(t,-1);if("%"===e&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return x(t,E,(function(t,e,r,i){n[n.length]=r?x(i,M,"$1"):e||t})),n},S=function(t,e){var r,n=t;if(b(y,n)&&(n="%"+(r=y[n])[0]+"%"),b(v,n)){var o=v[n];if(o===d&&(o=m(n)),void 0===o&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');var r=A(t),n=r.length>0?r[0]:"",o=S("%"+n+"%",e),s=o.name,c=o.value,f=!1,l=o.alias;l&&(n=l[0],_(r,w([0,1],l)));for(var h=1,d=!0;h<r.length;h+=1){var p=r[h],m=k(p,0,1),y=k(p,-1);if(('"'===m||"'"===m||"`"===m||'"'===y||"'"===y||"`"===y)&&m!==y)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&d||(f=!0),b(v,s="%"+(n+="."+p)+"%"))c=v[s];else if(null!=c){if(!(p in c)){if(!e)throw new a("base intrinsic for "+t+" exists, but the property is not available.");return}if(u&&h+1>=r.length){var g=u(c,p);c=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else d=b(c,p),c=c[p];d&&!f&&(v[s]=c)}}return c}},95627:function(t,e,r){"use strict";r(65743);var n=r(88108),i=r(97302),o=r(1096),a=o("Object.prototype.toString"),s=r(29961)(),u="undefined"==typeof globalThis?r.g:globalThis,c=i(),f=o("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},l=o("String.prototype.slice"),h={},d=r(55503),p=Object.getPrototypeOf;s&&d&&p&&n(c,(function(t){var e=new u[t];if(Symbol.toStringTag in e){var r=p(e),n=d(r,Symbol.toStringTag);if(!n){var i=p(r);n=d(i,Symbol.toStringTag)}h[t]=n.get}}));t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!s||!(Symbol.toStringTag in t)){var e=l(a(t),8,-1);return f(c,e)>-1}return!!d&&function(t){var e=!1;return n(h,(function(r,n){if(!e)try{e=r.call(t)===n}catch(i){}})),e}(t)}},61262:function(t,e,r){"use strict";r(65743);var n=r(88108),i=r(97302),o=r(1096),a=o("Object.prototype.toString"),s=r(29961)(),u="undefined"==typeof globalThis?r.g:globalThis,c=i(),f=o("String.prototype.slice"),l={},h=r(55503),d=Object.getPrototypeOf;s&&h&&d&&n(c,(function(t){if("function"==typeof u[t]){var e=new u[t];if(Symbol.toStringTag in e){var r=d(e),n=h(r,Symbol.toStringTag);if(!n){var i=d(r);n=h(i,Symbol.toStringTag)}l[t]=n.get}}}));var p=r(95627);t.exports=function(t){return!!p(t)&&(s&&Symbol.toStringTag in t?function(t){var e=!1;return n(l,(function(r,n){if(!e)try{var i=r.call(t);i===n&&(e=i)}catch(o){}})),e}(t):f(a(t),8,-1))}},81046:function(t){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},82143:function(t,e,r){"use strict";var n=r(63281),i=r(67102),o=r(61262),a=r(95627);function s(t){return t.call.bind(t)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,f=s(Object.prototype.toString),l=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),d=s(Boolean.prototype.valueOf);if(u)var p=s(BigInt.prototype.valueOf);if(c)var v=s(Symbol.prototype.valueOf);function m(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(r){return!1}}function y(t){return"[object Map]"===f(t)}function g(t){return"[object Set]"===f(t)}function b(t){return"[object WeakMap]"===f(t)}function w(t){return"[object WeakSet]"===f(t)}function _(t){return"[object ArrayBuffer]"===f(t)}function x(t){return"undefined"!=typeof ArrayBuffer&&(_.working?_(t):t instanceof ArrayBuffer)}function k(t){return"[object DataView]"===f(t)}function E(t){return"undefined"!=typeof DataView&&(k.working?k(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=a,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):a(t)||E(t)},e.isUint8Array=function(t){return"Uint8Array"===o(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===o(t)},e.isUint16Array=function(t){return"Uint16Array"===o(t)},e.isUint32Array=function(t){return"Uint32Array"===o(t)},e.isInt8Array=function(t){return"Int8Array"===o(t)},e.isInt16Array=function(t){return"Int16Array"===o(t)},e.isInt32Array=function(t){return"Int32Array"===o(t)},e.isFloat32Array=function(t){return"Float32Array"===o(t)},e.isFloat64Array=function(t){return"Float64Array"===o(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===o(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===o(t)},y.working="undefined"!=typeof Map&&y(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(y.working?y(t):t instanceof Map)},g.working="undefined"!=typeof Set&&g(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(g.working?g(t):t instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(b.working?b(t):t instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),e.isWeakSet=function(t){return w(t)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),e.isArrayBuffer=x,k.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&k(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=E;var M="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function A(t){return"[object SharedArrayBuffer]"===f(t)}function S(t){return void 0!==M&&(void 0===A.working&&(A.working=A(new M)),A.working?A(t):t instanceof M)}function R(t){return m(t,l)}function P(t){return m(t,h)}function T(t){return m(t,d)}function O(t){return u&&m(t,p)}function I(t){return c&&m(t,v)}e.isSharedArrayBuffer=S,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===f(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===f(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===f(t)},e.isGeneratorObject=function(t){return"[object Generator]"===f(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===f(t)},e.isNumberObject=R,e.isStringObject=P,e.isBooleanObject=T,e.isBigIntObject=O,e.isSymbolObject=I,e.isBoxedPrimitive=function(t){return R(t)||P(t)||T(t)||O(t)||I(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(x(t)||S(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},15895:function(t,e,r){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!g(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(u(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return t}})),s=n[r];r<o;s=n[++r])m(s)||!_(s)?a+=" "+s:a+=" "+u(s);return a},e.deprecate=function(t,r){if("undefined"!=typeof process&&!0===process.noDeprecation)return t;if("undefined"==typeof process)return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var o={},a=/^$/;if({}.NODE_DEBUG){var s={}.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+s+"$","i")}function u(t,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),v(r)?n.showHidden=r:r&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),l(n,t,n.depth)}function c(t,e){var r=u.styles[e];return r?"["+u.colors[r][0]+"m"+t+"["+u.colors[r][1]+"m":t}function f(t,e){return t}function l(t,r,n){if(t.customInspect&&r&&E(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return g(i)||(i=l(t,i,n)),i}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(g(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(y(e))return t.stylize(""+e,"number");if(v(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),k(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(r);if(0===a.length){if(E(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(w(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return h(r)}var c,f="",_=!1,M=["{","}"];(p(r)&&(_=!0,M=["[","]"]),E(r))&&(f=" [Function"+(r.name?": "+r.name:"")+"]");return w(r)&&(f=" "+RegExp.prototype.toString.call(r)),x(r)&&(f=" "+Date.prototype.toUTCString.call(r)),k(r)&&(f=" "+h(r)),0!==a.length||_&&0!=r.length?n<0?w(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=_?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)P(e,String(a))?o.push(d(t,e,r,n,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(t,e,r,n,i,!0))})),o}(t,r,n,s,a):a.map((function(e){return d(t,r,n,s,e,_)})),t.seen.pop(),function(t,e,r){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,f,M)):M[0]+f+M[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),P(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function p(t){return Array.isArray(t)}function v(t){return"boolean"==typeof t}function m(t){return null===t}function y(t){return"number"==typeof t}function g(t){return"string"==typeof t}function b(t){return void 0===t}function w(t){return _(t)&&"[object RegExp]"===M(t)}function _(t){return"object"==typeof t&&null!==t}function x(t){return _(t)&&"[object Date]"===M(t)}function k(t){return _(t)&&("[object Error]"===M(t)||t instanceof Error)}function E(t){return"function"==typeof t}function M(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!o[t])if(a.test(t)){var r=process.pid;o[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else o[t]=function(){};return o[t]},e.inspect=u,u.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]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(82143),e.isArray=p,e.isBoolean=v,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=g,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=w,e.types.isRegExp=w,e.isObject=_,e.isDate=x,e.types.isDate=x,e.isError=k,e.types.isNativeError=k,e.isFunction=E,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(81046);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",R(),e.format.apply(e,arguments))},e.inherits=r(13247),e._extend=function(t,e){if(!e||!_(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(T&&t[T]){var e;if("function"!=typeof(e=t[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,T,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(a){r(a)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),T&&Object.defineProperty(e,T,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=T,e.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var n=e.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var i=this,o=function(){return n.apply(i,arguments)};t.apply(this,e).then((function(t){process.nextTick(o.bind(null,null,t))}),(function(t){process.nextTick(O.bind(null,t,o))}))}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,n(t)),e}},72193:function(t,e,r){var n=r(7555).EventEmitter,i=r(15895).inherits,o=r(25714),a=r(18087),s=r(76800),u=r(25205),c=r(50987),f=(r(49957),r(28299));function l(t){var e=this;n.call(e),e.setMaxListeners(30),t=t||{};var r={sendAsync:e._handleAsync.bind(e)},i=t.blockTrackerProvider||r;e._blockTracker=t.blockTracker||new a({provider:i,pollingInterval:t.pollingInterval||4e3,setSkipCacheFlag:!0}),e._ready=new c,e.currentBlock=null,e._providers=[]}function h(t){return{number:o.toBuffer(t.number),hash:o.toBuffer(t.hash),parentHash:o.toBuffer(t.parentHash),nonce:o.toBuffer(t.nonce),mixHash:o.toBuffer(t.mixHash),sha3Uncles:o.toBuffer(t.sha3Uncles),logsBloom:o.toBuffer(t.logsBloom),transactionsRoot:o.toBuffer(t.transactionsRoot),stateRoot:o.toBuffer(t.stateRoot),receiptsRoot:o.toBuffer(t.receiptRoot||t.receiptsRoot),miner:o.toBuffer(t.miner),difficulty:o.toBuffer(t.difficulty),totalDifficulty:o.toBuffer(t.totalDifficulty),size:o.toBuffer(t.size),extraData:o.toBuffer(t.extraData),gasLimit:o.toBuffer(t.gasLimit),gasUsed:o.toBuffer(t.gasUsed),timestamp:o.toBuffer(t.timestamp),transactions:t.transactions}}t.exports=l,i(l,n),l.prototype.start=function(){var t=this,e=this;e._ready.go(),e._blockTracker.on("latest",(function(r){e._getBlockByNumberWithRetry(r,(function(r,n){if(r)t.emit("error",r);else{if(!n)return console.log(n),void t.emit("error",new Error("Could not find block"));var i=h(n);e._setCurrentBlock(i),e.emit("rawBlock",n),e.emit("latest",n)}}))})),e._blockTracker.on("sync",e.emit.bind(e,"sync")),e._blockTracker.on("error",e.emit.bind(e,"error")),e._running=!0,e.emit("start")},l.prototype.stop=function(){var t=this;t._blockTracker.removeAllListeners(),t._running=!1,t.emit("stop")},l.prototype.isRunning=function(){return this._running},l.prototype.addProvider=function(t,e){"number"==typeof e?this._providers.splice(e,0,t):this._providers.push(t),t.setEngine(this)},l.prototype.removeProvider=function(t){var e=this._providers.indexOf(t);if(e<0)throw new Error("Provider not found.");this._providers.splice(e,1)},l.prototype.send=function(t){throw new Error("Web3ProviderEngine does not support synchronous requests.")},l.prototype.sendAsync=function(t,e){var r=this;r._ready.await((function(){Array.isArray(t)?s(t,r._handleAsync.bind(r),e):r._handleAsync(t,e)}))},l.prototype._getBlockByNumberWithRetry=function(t,e){var r=this,n=5;return void i();function i(){r._getBlockByNumber(t,o)}function o(t,r){return t?e(t):r?void e(null,r):n>0?(n--,void setTimeout((function(){i()}),1e3)):void e(null,null)}},l.prototype._getBlockByNumber=function(t,e){var r=f({method:"eth_getBlockByNumber",params:[t,!1],skipCache:!0});this._handleAsync(r,(function(t,r){return t?e(t):e(null,r.result)}))},l.prototype._handleAsync=function(t,e){var r=this,n=-1,i=null,o=null,a=[];function s(r,n){o=r,i=n,u(a,(function(t,e){t?t(o,i,e):e()}),(function(){var r={id:t.id,jsonrpc:t.jsonrpc,result:i};null!=o?(r.error={message:o.stack||o.message||o,code:-32e3},e(o,r)):e(null,r)}))}!function e(i){if(n+=1,a.unshift(i),n>=r._providers.length)s(new Error('Request for method "'+t.method+'" not handled by any subprovider. Please check your subprovider configuration to ensure this method is handled.'));else try{r._providers[n].handleRequest(t,e,s)}catch(o){s(o)}}()},l.prototype._setCurrentBlock=function(t){this.currentBlock=t,this.emit("block",t)}},9233:function(t,e,r){var n=r(93913),i=r(34575),o=r(2205),a=r(78585),s=r(29754);function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=s(t);if(e){var i=s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a(this,r)}}var c=r(61067),f=r(94589),l=function(t){"use strict";o(r,t);var e=u(r);function r(t){return i(this,r),e.call(this,(function(e){var r=e.blockTracker;return f(Object.assign({blockTracker:r},t))}))}return n(r)}(c);t.exports=l},72529:function(t,e,r){var n=r(93913),i=r(34575),o=r(2205),a=r(78585),s=r(29754);function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=s(t);if(e){var i=s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a(this,r)}}var c=r(61067),f=r(10232),l=function(t){"use strict";o(r,t);var e=u(r);function r(){return i(this,r),e.call(this,(function(t){var e=t.blockTracker,r=t.provider;t.engine;return f({blockTracker:e,provider:r})}))}return n(r)}(c);t.exports=l},54944:function(t,e,r){var n=r(15895).inherits,i=r(97741);function o(t){t=t||{},this.staticResponses=t}t.exports=o,n(o,i),o.prototype.handleRequest=function(t,e,r){var n=this.staticResponses[t.method];"function"==typeof n?n(t,e,r):void 0!==n?setTimeout((function(){return r(null,n)})):e()}},45106:function(t,e,r){var n=r(33376),i=r(26070),o=r(15895).inherits,a=r(25714),s=r(49982),u=r(76297),c=r(80010),f=r(97741),l=r(48344),h=/^[0-9A-Fa-f]+$/g;function d(t){var e=this;e.nonceLock=c(1),t.getAccounts&&(e.getAccounts=t.getAccounts),t.processTransaction&&(e.processTransaction=t.processTransaction),t.processMessage&&(e.processMessage=t.processMessage),t.processPersonalMessage&&(e.processPersonalMessage=t.processPersonalMessage),t.processTypedMessage&&(e.processTypedMessage=t.processTypedMessage),e.approveTransaction=t.approveTransaction||e.autoApprove,e.approveMessage=t.approveMessage||e.autoApprove,e.approvePersonalMessage=t.approvePersonalMessage||e.autoApprove,e.approveDecryptMessage=t.approveDecryptMessage||e.autoApprove,e.approveEncryptionPublicKey=t.approveEncryptionPublicKey||e.autoApprove,e.approveTypedMessage=t.approveTypedMessage||e.autoApprove,t.signTransaction&&(e.signTransaction=t.signTransaction||g("signTransaction")),t.signMessage&&(e.signMessage=t.signMessage||g("signMessage")),t.signPersonalMessage&&(e.signPersonalMessage=t.signPersonalMessage||g("signPersonalMessage")),t.decryptMessage&&(e.decryptMessage=t.decryptMessage||g("decryptMessage")),t.encryptionPublicKey&&(e.encryptionPublicKey=t.encryptionPublicKey||g("encryptionPublicKey")),t.signTypedMessage&&(e.signTypedMessage=t.signTypedMessage||g("signTypedMessage")),t.recoverPersonalSignature&&(e.recoverPersonalSignature=t.recoverPersonalSignature),t.publishTransaction&&(e.publishTransaction=t.publishTransaction),e.estimateGas=t.estimateGas||e.estimateGas,e.getGasPrice=t.getGasPrice||e.getGasPrice}function p(t){return t.toLowerCase()}function v(t){var e=a.addHexPrefix(t);return a.isValidAddress(e)}function m(t){var e=a.addHexPrefix(t);return!a.isValidAddress(e)&&y(t)}function y(t){return"string"==typeof t&&("0x"===t.slice(0,2)&&t.slice(2).match(h))}function g(t){return function(e,r){r(new Error('ProviderEngine - HookedWalletSubprovider - Must provide "'+t+'" fn in constructor options'))}}t.exports=d,o(d,f),d.prototype.handleRequest=function(t,e,r){var i,o,a,s,c,f,l,h,d=this;switch(d._parityRequests={},d._parityRequestCount=0,t.method){case"eth_coinbase":return void d.getAccounts((function(t,e){if(t)return r(t);var n=e[0]||null;r(null,n)}));case"eth_accounts":return void d.getAccounts((function(t,e){if(t)return r(t);r(null,e)}));case"eth_sendTransaction":return i=t.params[0],void n([function(t){return d.validateTransaction(i,t)},function(t){return d.processTransaction(i,t)}],r);case"eth_signTransaction":return i=t.params[0],void n([function(t){return d.validateTransaction(i,t)},function(t){return d.processSignTransaction(i,t)}],r);case"eth_sign":return c=t.params[0],s=t.params[1],a=t.params[2]||{},o=u(a,{from:c,data:s}),void n([function(t){return d.validateMessage(o,t)},function(t){return d.processMessage(o,t)}],r);case"personal_sign":return function(){var e=t.params[0];if(m(t.params[1])&&v(e)){"[message, address]. This was previously handled incorrectly, ","and has been corrected automatically. ","Please switch this param order for smooth behavior in the future.",console.warn("The eth_personalSign method requires params ordered [message, address]. This was previously handled incorrectly, and has been corrected automatically. Please switch this param order for smooth behavior in the future."),c=t.params[0],s=t.params[1]}else s=t.params[0],c=t.params[1];a=t.params[2]||{},o=u(a,{from:c,data:s}),n([function(t){return d.validatePersonalMessage(o,t)},function(t){return d.processPersonalMessage(o,t)}],r)}();case"eth_decryptMessage":return function(){var e=t.params[0];if(m(t.params[1])&&v(e)){"[message, address]. This was previously handled incorrectly, ","and has been corrected automatically. ","Please switch this param order for smooth behavior in the future.",console.warn("The eth_decryptMessage method requires params ordered [message, address]. This was previously handled incorrectly, and has been corrected automatically. Please switch this param order for smooth behavior in the future."),c=t.params[0],s=t.params[1]}else s=t.params[0],c=t.params[1];a=t.params[2]||{},o=u(a,{from:c,data:s}),n([function(t){return d.validateDecryptMessage(o,t)},function(t){return d.processDecryptMessage(o,t)}],r)}();case"encryption_public_key":return function(){var e=t.params[0];n([function(t){return d.validateEncryptionPublicKey(e,t)},function(t){return d.processEncryptionPublicKey(e,t)}],r)}();case"personal_ecRecover":return function(){s=t.params[0];var e=t.params[1];a=t.params[2]||{},o=u(a,{sig:e,data:s}),d.recoverPersonalSignature(o,r)}();case"eth_signTypedData":case"eth_signTypedData_v3":case"eth_signTypedData_v4":return l=t.params[0],h=t.params[1],v(l)?(c=l,s=h):(s=l,c=h),a=t.params[2]||{},o=u(a,{from:c,data:s}),void n([function(t){return d.validateTypedMessage(o,t)},function(t){return d.processTypedMessage(o,t)}],r);case"parity_postTransaction":return i=t.params[0],void d.parityPostTransaction(i,r);case"parity_postSign":return c=t.params[0],s=t.params[1],void d.parityPostSign(c,s,r);case"parity_checkRequest":return f=t.params[0],void d.parityCheckRequest(f,r);case"parity_defaultAccount":return void d.getAccounts((function(t,e){if(t)return r(t);var n=e[0]||null;r(null,n)}));default:return void e()}},d.prototype.getAccounts=function(t){t(null,[])},d.prototype.processTransaction=function(t,e){var r=this;n([function(e){return r.approveTransaction(t,e)},function(t,e){return r.checkApproval("transaction",t,e)},function(e){return r.finalizeAndSubmitTx(t,e)}],e)},d.prototype.processSignTransaction=function(t,e){var r=this;n([function(e){return r.approveTransaction(t,e)},function(t,e){return r.checkApproval("transaction",t,e)},function(e){return r.finalizeTx(t,e)}],e)},d.prototype.processMessage=function(t,e){var r=this;n([function(e){return r.approveMessage(t,e)},function(t,e){return r.checkApproval("message",t,e)},function(e){return r.signMessage(t,e)}],e)},d.prototype.processPersonalMessage=function(t,e){var r=this;n([function(e){return r.approvePersonalMessage(t,e)},function(t,e){return r.checkApproval("message",t,e)},function(e){return r.signPersonalMessage(t,e)}],e)},d.prototype.processDecryptMessage=function(t,e){var r=this;n([function(e){return r.approveDecryptMessage(t,e)},function(t,e){return r.checkApproval("decryptMessage",t,e)},function(e){return r.decryptMessage(t,e)}],e)},d.prototype.processEncryptionPublicKey=function(t,e){var r=this;n([function(e){return r.approveEncryptionPublicKey(t,e)},function(t,e){return r.checkApproval("encryptionPublicKey",t,e)},function(e){return r.encryptionPublicKey(t,e)}],e)},d.prototype.processTypedMessage=function(t,e){var r=this;n([function(e){return r.approveTypedMessage(t,e)},function(t,e){return r.checkApproval("message",t,e)},function(e){return r.signTypedMessage(t,e)}],e)},d.prototype.autoApprove=function(t,e){e(null,!0)},d.prototype.checkApproval=function(t,e,r){r(e?null:new Error("User denied "+t+" signature."))},d.prototype.parityPostTransaction=function(t,e){var r=this,n=r._parityRequestCount,i="0x".concat(n.toString(16));r._parityRequestCount++,r.emitPayload({method:"eth_sendTransaction",params:[t]},(function(t,e){if(t)r._parityRequests[i]={error:t};else{var n=e.result;r._parityRequests[i]=n}})),e(null,i)},d.prototype.parityPostSign=function(t,e,r){var n=this,i=n._parityRequestCount,o="0x".concat(i.toString(16));n._parityRequestCount++,n.emitPayload({method:"eth_sign",params:[t,e]},(function(t,e){if(t)n._parityRequests[o]={error:t};else{var r=e.result;n._parityRequests[o]=r}})),r(null,o)},d.prototype.parityCheckRequest=function(t,e){var r=this._parityRequests[t]||null;return r?r.error?e(r.error):void e(null,r):e(null,null)},d.prototype.recoverPersonalSignature=function(t,e){var r;try{r=s.recoverPersonalSignature(t)}catch(n){return e(n)}e(null,r)},d.prototype.validateTransaction=function(t,e){if(void 0===t.from)return e(new Error("Undefined address - from address required to sign transaction."));this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error('Unknown address - unable to sign transaction for this address: "'.concat(t.from,'"')))}))},d.prototype.validateMessage=function(t,e){if(void 0===t.from)return e(new Error("Undefined address - from address required to sign message."));this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error('Unknown address - unable to sign message for this address: "'.concat(t.from,'"')))}))},d.prototype.validatePersonalMessage=function(t,e){return void 0===t.from?e(new Error("Undefined address - from address required to sign personal message.")):void 0===t.data?e(new Error("Undefined message - message required to sign personal message.")):y(t.data)?void this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error('Unknown address - unable to sign message for this address: "'.concat(t.from,'"')))})):e(new Error("HookedWalletSubprovider - validateMessage - message was not encoded as hex."))},d.prototype.validateDecryptMessage=function(t,e){return void 0===t.from?e(new Error("Undefined address - from address required to decrypt message.")):void 0===t.data?e(new Error("Undefined message - message required to decrypt message.")):y(t.data)?void this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error('Unknown address - unable to decrypt message for this address: "'.concat(t.from,'"')))})):e(new Error("HookedWalletSubprovider - validateDecryptMessage - message was not encoded as hex."))},d.prototype.validateEncryptionPublicKey=function(t,e){this.validateSender(t,(function(r,n){return r?e(r):n?void e():e(new Error('Unknown address - unable to obtain encryption public key for this address: "'.concat(t,'"')))}))},d.prototype.validateTypedMessage=function(t,e){return void 0===t.from?e(new Error("Undefined address - from address required to sign typed data.")):void 0===t.data?e(new Error("Undefined data - message required to sign typed data.")):void this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error('Unknown address - unable to sign message for this address: "'.concat(t.from,'"')))}))},d.prototype.validateSender=function(t,e){if(!t)return e(null,!1);this.getAccounts((function(r,n){if(r)return e(r);var i=-1!==n.map(p).indexOf(t.toLowerCase());e(null,i)}))},d.prototype.finalizeAndSubmitTx=function(t,e){var r=this;r.nonceLock.take((function(){n([r.fillInTxExtras.bind(r,t),r.signTransaction.bind(r),r.publishTransaction.bind(r)],(function(t,n){if(r.nonceLock.leave(),t)return e(t);e(null,n)}))}))},d.prototype.finalizeTx=function(t,e){var r=this;r.nonceLock.take((function(){n([r.fillInTxExtras.bind(r,t),r.signTransaction.bind(r)],(function(n,i){if(r.nonceLock.leave(),n)return e(n);e(null,{raw:i,tx:t})}))}))},d.prototype.publishTransaction=function(t,e){this.emitPayload({method:"eth_sendRawTransaction",params:[t]},(function(t,r){if(t)return e(t);e(null,r.result)}))},d.prototype.estimateGas=function(t,e){l(this.engine,t,e)},d.prototype.getGasPrice=function(t){this.emitPayload({method:"eth_gasPrice",params:[]},(function(e,r){if(e)return t(e);t(null,r.result)}))},d.prototype.fillInTxExtras=function(t,e){var r=this,n=t.from,o={};void 0===t.gasPrice&&(o.gasPrice=r.getGasPrice.bind(r)),void 0===t.nonce&&(o.nonce=r.emitPayload.bind(r,{method:"eth_getTransactionCount",params:[n,"pending"]})),void 0===t.gas&&(o.gas=r.estimateGas.bind(r,function(t){return{from:t.from,to:t.to,value:t.value,data:t.data,gas:t.gas,gasPrice:t.gasPrice,nonce:t.nonce}}(t))),i(o,(function(r,n){if(r)return e(r);var i={};n.gasPrice&&(i.gasPrice=n.gasPrice),n.nonce&&(i.nonce=n.nonce.result),n.gas&&(i.gas=n.gas),e(null,u(t,i))}))}},61067:function(t,e,r){var n=r(34575),i=r(93913),o=r(2205),a=r(78585),s=r(29754);function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=s(t);if(e){var i=s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a(this,r)}}var c=function(t){"use strict";o(r,t);var e=u(r);function r(t){var i;if(n(this,r),i=e.call(this),!t)throw new Error("JsonRpcEngineMiddlewareSubprovider - no constructorFn specified");return i._constructorFn=t,i}return i(r,[{key:"setEngine",value:function(t){if(this.middleware)throw new Error("JsonRpcEngineMiddlewareSubprovider - subprovider added to engine twice");var e=t._blockTracker,r=this._constructorFn({engine:t,provider:t,blockTracker:e});if(!r)throw new Error("JsonRpcEngineMiddlewareSubprovider - _constructorFn did not return middleware");if("function"!=typeof r)throw new Error("JsonRpcEngineMiddlewareSubprovider - specified middleware is not a function");this.middleware=r}},{key:"handleRequest",value:function(t,e,r){var n={id:t.id};this.middleware(t,n,(function(t){e((function(e,r,i){e?(delete n.result,n.error={message:e.message||e}):n.result=r,t?t(i):i()}))}),(function(t){if(t)return r(t);r(null,n.result)}))}}]),r}(r(97741));t.exports=c},33539:function(t,e,r){var n=r(62426).Buffer,i=r(15895).inherits,o=r(78078),a=r(25714),s=r(97741),u=r(49957).blockTagForPayload;function c(t){this.nonceCache={}}t.exports=c,i(c,s),c.prototype.handleRequest=function(t,e,r){var i=this;switch(t.method){case"eth_getTransactionCount":var s=u(t),c=t.params[0].toLowerCase(),f=i.nonceCache[c];return void("pending"===s?f?r(null,f):e((function(t,e,r){if(t)return r();void 0===i.nonceCache[c]&&(i.nonceCache[c]=e),r()})):e());case"eth_sendRawTransaction":return void e((function(e,r,s){if(e)return s();var u=t.params[0],c=(a.stripHexPrefix(u),n.from(a.stripHexPrefix(u),"hex"),new o(n.from(a.stripHexPrefix(u),"hex"))),f="0x"+c.getSenderAddress().toString("hex").toLowerCase(),l=a.bufferToInt(c.nonce),h=(++l).toString(16);h.length%2&&(h="0"+h),h="0x"+h,i.nonceCache[f]=h,s()}));case"evm_revert":return i.nonceCache={},void e();default:return void e()}}},97741:function(t,e,r){var n=r(28299);function i(){}t.exports=i,i.prototype.setEngine=function(t){var e=this;e.engine||(e.engine=t,t.on("block",(function(t){e.currentBlock=t})),t.on("start",(function(){e.start()})),t.on("stop",(function(){e.stop()})))},i.prototype.handleRequest=function(t,e,r){throw new Error("Subproviders should override `handleRequest`.")},i.prototype.emitPayload=function(t,e){this.engine.sendAsync(n(t),e)},i.prototype.stop=function(){},i.prototype.start=function(){}},79437:function(t,e,r){var n=r(93913),i=r(34575),o=r(2205),a=r(78585),s=r(29754);function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=s(t);if(e){var i=s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a(this,r)}}var c=r(61067),f=r(62952),l=function(t){"use strict";o(r,t);var e=u(r);function r(){return i(this,r),e.call(this,(function(t){var e=t.blockTracker,r=t.provider,n=t.engine,i=f({blockTracker:e,provider:r}),o=i.events,a=i.middleware;return o.on("notification",(function(t){return n.emit("data",null,t)})),a}))}return n(r)}(c);t.exports=l},28299:function(t,e,r){var n=r(54859),i=r(76297);t.exports=function(t){return i({id:n(),jsonrpc:"2.0",params:[]},t)}},48344:function(t,e,r){var n=r(28299);t.exports=function(t,e,r){t.sendAsync(n({method:"eth_estimateGas",params:[e]}),(function(t,e){if(t)return"no contract code at given address"===t.message?r(null,"0xcf08"):r(t);r(null,e.result)}))}},54859:function(t){t.exports=function(){return Math.floor(Number.MAX_SAFE_INTEGER*Math.random())}},49957:function(t,e,r){var n=r(66606);function i(t){return"never"!==s(t)}function o(t){var e=a(t);return e>=t.params.length?t.params:"eth_getBlockByNumber"===t.method?t.params.slice(1):t.params.slice(0,e)}function a(t){switch(t.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":return 1;case"eth_getBlockByNumber":return 0;default:return}}function s(t){switch(t.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":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":return"fork";case"eth_gasPrice":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"eth_blockNumber":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":return"never"}}t.exports={cacheIdentifierForPayload:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!i(t))return null;var r=e.includeBlockRef,a=r?t.params:o(t);return t.method+":"+n(a)},canCache:i,blockTagForPayload:function(t){var e=a(t);if(e>=t.params.length)return null;return t.params[e]},paramsWithoutBlockTag:o,blockTagParamIndex:a,cacheTypeForPayload:s}},50987:function(t,e,r){var n=r(7555).EventEmitter,i=r(15895).inherits;function o(){n.call(this),this.isLocked=!0}t.exports=o,i(o,n),o.prototype.go=function(){this.isLocked=!1,this.emit("unlock")},o.prototype.stop=function(){this.isLocked=!0,this.emit("lock")},o.prototype.await=function(t){this.isLocked?this.once("unlock",t):setTimeout(t)}},42462:function(t,e){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(Error);e.SecurityError=i;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(Error);e.InvalidStateError=o;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(Error);e.NetworkError=a;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(Error);e.SyntaxError=s},90770:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(3030));var n=r(1967);e.XMLHttpRequestEventTarget=n.XMLHttpRequestEventTarget},35667:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){this.type=t,this.bubbles=!1,this.cancelable=!1,this.loaded=0,this.lengthComputable=!1,this.total=0};e.ProgressEvent=r},1967:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.listeners={}}return t.prototype.addEventListener=function(t,e){t=t.toLowerCase(),this.listeners[t]=this.listeners[t]||[],this.listeners[t].push(e.handleEvent||e)},t.prototype.removeEventListener=function(t,e){if(t=t.toLowerCase(),this.listeners[t]){var r=this.listeners[t].indexOf(e.handleEvent||e);r<0||this.listeners[t].splice(r,1)}},t.prototype.dispatchEvent=function(t){var e=t.type.toLowerCase();if(t.target=this,this.listeners[e])for(var r=0,n=this.listeners[e];r<n.length;r++){n[r].call(this,t)}var i=this["on"+e];return i&&i.call(this,t),!0},t}();e.XMLHttpRequestEventTarget=r},83092:function(t,e,r){"use strict";var n,i=r(62426).Buffer,o=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){var e=t.call(this)||this;return e._contentType=null,e._body=null,e._reset(),e}return o(e,t),e.prototype._reset=function(){this._contentType=null,this._body=null},e.prototype._setData=function(t){if(null!=t)if("string"==typeof t)0!==t.length&&(this._contentType="text/plain;charset=UTF-8"),this._body=new i(t,"utf-8");else if(i.isBuffer(t))this._body=t;else if(t instanceof ArrayBuffer){for(var e=new i(t.byteLength),r=new Uint8Array(t),n=0;n<t.byteLength;n++)e[n]=r[n];this._body=e}else{if(!(t.buffer&&t.buffer instanceof ArrayBuffer))throw new Error("Unsupported send() data "+t);e=new i(t.byteLength);var o=t.byteOffset;for(r=new Uint8Array(t.buffer),n=0;n<t.byteLength;n++)e[n]=r[n+o];this._body=e}},e.prototype._finalizeHeaders=function(t,e){this._contentType&&!e["content-type"]&&(t["Content-Type"]=this._contentType),this._body&&(t["Content-Length"]=this._body.length.toString())},e.prototype._startUpload=function(t){this._body&&t.write(this._body),t.end()},e}(r(1967).XMLHttpRequestEventTarget);e.XMLHttpRequestUpload=a},3030:function(t,e,r){"use strict";var n,i=r(62426).Buffer,o=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),a=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};Object.defineProperty(e,"__esModule",{value:!0});var s=r(13552),u=r(93662),c=r(71273),f=r(73629),l=r(35667),h=r(42462),d=r(1967),p=r(83092),v=r(28551),m=function(t){function e(r){void 0===r&&(r={});var n=t.call(this)||this;return n.UNSENT=e.UNSENT,n.OPENED=e.OPENED,n.HEADERS_RECEIVED=e.HEADERS_RECEIVED,n.LOADING=e.LOADING,n.DONE=e.DONE,n.onreadystatechange=null,n.readyState=e.UNSENT,n.response=null,n.responseText="",n.responseType="",n.status=0,n.statusText="",n.timeout=0,n.upload=new p.XMLHttpRequestUpload,n.responseUrl="",n.withCredentials=!1,n._method=null,n._url=null,n._sync=!1,n._headers={},n._loweredHeaders={},n._mimeOverride=null,n._request=null,n._response=null,n._responseParts=null,n._responseHeaders=null,n._aborting=null,n._error=null,n._loadedBytes=0,n._totalBytes=0,n._lengthComputable=!1,n._restrictedMethods={CONNECT:!0,TRACE:!0,TRACK:!0},n._restrictedHeaders={"accept-charset":!0,"accept-encoding":!0,"access-control-request-headers":!0,"access-control-request-method":!0,connection:!0,"content-length":!0,cookie:!0,cookie2:!0,date:!0,dnt:!0,expect:!0,host:!0,"keep-alive":!0,origin:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,via:!0},n._privateHeaders={"set-cookie":!0,"set-cookie2":!0},n._userAgent="Mozilla/5.0 ("+c.type()+" "+c.arch()+") node.js/"+process.versions.node+" v8/"+process.versions.v8,n._anonymous=r.anon||!1,n}return o(e,t),e.prototype.open=function(t,r,n,i,o){if(void 0===n&&(n=!0),t=t.toUpperCase(),this._restrictedMethods[t])throw new e.SecurityError("HTTP method "+t+" is not allowed in XHR");var a=this._parseUrl(r,i,o);this.readyState===e.HEADERS_RECEIVED||(this.readyState,e.LOADING),this._method=t,this._url=a,this._sync=!n,this._headers={},this._loweredHeaders={},this._mimeOverride=null,this._setReadyState(e.OPENED),this._request=null,this._response=null,this.status=0,this.statusText="",this._responseParts=[],this._responseHeaders=null,this._loadedBytes=0,this._totalBytes=0,this._lengthComputable=!1},e.prototype.setRequestHeader=function(t,r){if(this.readyState!==e.OPENED)throw new e.InvalidStateError("XHR readyState must be OPENED");var n=t.toLowerCase();this._restrictedHeaders[n]||/^sec-/.test(n)||/^proxy-/.test(n)?console.warn('Refused to set unsafe header "'+t+'"'):(r=r.toString(),null!=this._loweredHeaders[n]?(t=this._loweredHeaders[n],this._headers[t]=this._headers[t]+", "+r):(this._loweredHeaders[n]=t,this._headers[t]=r))},e.prototype.send=function(t){if(this.readyState!==e.OPENED)throw new e.InvalidStateError("XHR readyState must be OPENED");if(this._request)throw new e.InvalidStateError("send() already called");switch(this._url.protocol){case"file:":return this._sendFile(t);case"http:":case"https:":return this._sendHttp(t);default:throw new e.NetworkError("Unsupported protocol "+this._url.protocol)}},e.prototype.abort=function(){null!=this._request&&(this._request.abort(),this._setError(),this._dispatchProgress("abort"),this._dispatchProgress("loadend"))},e.prototype.getResponseHeader=function(t){if(null==this._responseHeaders||null==t)return null;var e=t.toLowerCase();return this._responseHeaders.hasOwnProperty(e)?this._responseHeaders[t.toLowerCase()]:null},e.prototype.getAllResponseHeaders=function(){var t=this;return null==this._responseHeaders?"":Object.keys(this._responseHeaders).map((function(e){return e+": "+t._responseHeaders[e]})).join("\r\n")},e.prototype.overrideMimeType=function(t){if(this.readyState===e.LOADING||this.readyState===e.DONE)throw new e.InvalidStateError("overrideMimeType() not allowed in LOADING or DONE");this._mimeOverride=t.toLowerCase()},e.prototype.nodejsSet=function(t){if(this.nodejsHttpAgent=t.httpAgent||this.nodejsHttpAgent,this.nodejsHttpsAgent=t.httpsAgent||this.nodejsHttpsAgent,t.hasOwnProperty("baseUrl")){if(null!=t.baseUrl)if(!f.parse(t.baseUrl,!1,!0).protocol)throw new e.SyntaxError("baseUrl must be an absolute URL");this.nodejsBaseUrl=t.baseUrl}},e.nodejsSet=function(t){e.prototype.nodejsSet(t)},e.prototype._setReadyState=function(t){this.readyState=t,this.dispatchEvent(new l.ProgressEvent("readystatechange"))},e.prototype._sendFile=function(t){throw new Error("Protocol file: not implemented")},e.prototype._sendHttp=function(t){if(this._sync)throw new Error("Synchronous XHR processing not implemented");!t||"GET"!==this._method&&"HEAD"!==this._method?t=t||"":(console.warn("Discarding entity body for "+this._method+" requests"),t=null),this.upload._setData(t),this._finalizeHeaders(),this._sendHxxpRequest()},e.prototype._sendHxxpRequest=function(){var t=this;if(this.withCredentials){var r=e.cookieJar.getCookies(v.CookieAccessInfo(this._url.hostname,this._url.pathname,"https:"===this._url.protocol)).toValueString();this._headers.cookie=this._headers.cookie2=r}var n="http:"===this._url.protocol?[s,this.nodejsHttpAgent]:[u,this.nodejsHttpsAgent],i=n[0],o=n[1],a=i.request.bind(i)({hostname:this._url.hostname,port:+this._url.port,path:this._url.path,auth:this._url.auth,method:this._method,headers:this._headers,agent:o});this._request=a,this.timeout&&a.setTimeout(this.timeout,(function(){return t._onHttpTimeout(a)})),a.on("response",(function(e){return t._onHttpResponse(a,e)})),a.on("error",(function(e){return t._onHttpRequestError(a,e)})),this.upload._startUpload(a),this._request===a&&this._dispatchProgress("loadstart")},e.prototype._finalizeHeaders=function(){this._headers=a({},this._headers,{Connection:"keep-alive",Host:this._url.host,"User-Agent":this._userAgent},this._anonymous?{Referer:"about:blank"}:{}),this.upload._finalizeHeaders(this._headers,this._loweredHeaders)},e.prototype._onHttpResponse=function(t,r){var n=this;if(this._request===t){if(this.withCredentials&&(r.headers["set-cookie"]||r.headers["set-cookie2"])&&e.cookieJar.setCookies(r.headers["set-cookie"]||r.headers["set-cookie2"]),[301,302,303,307,308].indexOf(r.statusCode)>=0)return this._url=this._parseUrl(r.headers.location),this._method="GET",this._loweredHeaders["content-type"]&&(delete this._headers[this._loweredHeaders["content-type"]],delete this._loweredHeaders["content-type"]),null!=this._headers["Content-Type"]&&delete this._headers["Content-Type"],delete this._headers["Content-Length"],this.upload._reset(),this._finalizeHeaders(),void this._sendHxxpRequest();this._response=r,this._response.on("data",(function(t){return n._onHttpResponseData(r,t)})),this._response.on("end",(function(){return n._onHttpResponseEnd(r)})),this._response.on("close",(function(){return n._onHttpResponseClose(r)})),this.responseUrl=this._url.href.split("#")[0],this.status=r.statusCode,this.statusText=s.STATUS_CODES[this.status],this._parseResponseHeaders(r);var i=this._responseHeaders["content-length"]||"";this._totalBytes=+i,this._lengthComputable=!!i,this._setReadyState(e.HEADERS_RECEIVED)}},e.prototype._onHttpResponseData=function(t,r){this._response===t&&(this._responseParts.push(new i(r)),this._loadedBytes+=r.length,this.readyState!==e.LOADING&&this._setReadyState(e.LOADING),this._dispatchProgress("progress"))},e.prototype._onHttpResponseEnd=function(t){this._response===t&&(this._parseResponse(),this._request=null,this._response=null,this._setReadyState(e.DONE),this._dispatchProgress("load"),this._dispatchProgress("loadend"))},e.prototype._onHttpResponseClose=function(t){if(this._response===t){var r=this._request;this._setError(),r.abort(),this._setReadyState(e.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend")}},e.prototype._onHttpTimeout=function(t){this._request===t&&(this._setError(),t.abort(),this._setReadyState(e.DONE),this._dispatchProgress("timeout"),this._dispatchProgress("loadend"))},e.prototype._onHttpRequestError=function(t,r){this._request===t&&(this._setError(),t.abort(),this._setReadyState(e.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend"))},e.prototype._dispatchProgress=function(t){var r=new e.ProgressEvent(t);r.lengthComputable=this._lengthComputable,r.loaded=this._loadedBytes,r.total=this._totalBytes,this.dispatchEvent(r)},e.prototype._setError=function(){this._request=null,this._response=null,this._responseHeaders=null,this._responseParts=null},e.prototype._parseUrl=function(t,e,r){var n=null==this.nodejsBaseUrl?t:f.resolve(this.nodejsBaseUrl,t),i=f.parse(n,!1,!0);i.hash=null;var o=(i.auth||"").split(":"),a=o[0],s=o[1];return(a||s||e||r)&&(i.auth=(e||a||"")+":"+(r||s||"")),i},e.prototype._parseResponseHeaders=function(t){for(var e in this._responseHeaders={},t.headers){var r=e.toLowerCase();this._privateHeaders[r]||(this._responseHeaders[r]=t.headers[e])}null!=this._mimeOverride&&(this._responseHeaders["content-type"]=this._mimeOverride)},e.prototype._parseResponse=function(){var t=i.concat(this._responseParts);switch(this._responseParts=null,this.responseType){case"json":this.responseText=null;try{this.response=JSON.parse(t.toString("utf-8"))}catch(o){this.response=null}return;case"buffer":return this.responseText=null,void(this.response=t);case"arraybuffer":this.responseText=null;for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n<t.length;n++)r[n]=t[n];return void(this.response=e);default:try{this.responseText=t.toString(this._parseResponseEncoding())}catch(a){this.responseText=t.toString("binary")}this.response=this.responseText}},e.prototype._parseResponseEncoding=function(){return/;\s*charset=(.*)$/.exec(this._responseHeaders["content-type"]||"")[1]||"utf-8"},e.ProgressEvent=l.ProgressEvent,e.InvalidStateError=h.InvalidStateError,e.NetworkError=h.NetworkError,e.SecurityError=h.SecurityError,e.SyntaxError=h.SyntaxError,e.XMLHttpRequestUpload=p.XMLHttpRequestUpload,e.UNSENT=0,e.OPENED=1,e.HEADERS_RECEIVED=2,e.LOADING=3,e.DONE=4,e.cookieJar=v.CookieJar(),e}(d.XMLHttpRequestEventTarget);e.XMLHttpRequest=m,m.prototype.nodejsHttpAgent=s.globalAgent,m.prototype.nodejsHttpsAgent=u.globalAgent,m.prototype.nodejsBaseUrl=null},76297:function(t){t.exports=function(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t};var e=Object.prototype.hasOwnProperty},96077:function(t,e,r){var n=r(60614),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw o("Can't set "+i(t)+" as a prototype")}},49920:function(t,e,r){var n=r(47293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},11060:function(t,e,r){var n=r(1702),i=Error,o=n("".replace),a=String(i("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,u=s.test(a);t.exports=function(t,e){if(u&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=o(t,s,"");return t}},5392:function(t,e,r){var n=r(68880),i=r(11060),o=r(22914),a=Error.captureStackTrace;t.exports=function(t,e,r,s){o&&(a?a(t,e):n(t,"stack",i(r,s)))}},22914:function(t,e,r){var n=r(47293),i=r(79114);t.exports=!n((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},71246:function(t,e,r){var n=r(70648),i=r(58173),o=r(68554),a=r(97497),s=r(5112)("iterator");t.exports=function(t){if(!o(t))return i(t,s)||i(t,"@@iterator")||a[n(t)]}},18554:function(t,e,r){var n=r(46916),i=r(19662),o=r(19670),a=r(66330),s=r(71246),u=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(i(r))return o(n(r,t));throw u(a(t)+" is not iterable")}},58340:function(t,e,r){var n=r(70111),i=r(68880);t.exports=function(t,e){n(e)&&"cause"in e&&i(t,"cause",e.cause)}},97659:function(t,e,r){var n=r(5112),i=r(97497),o=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},20408:function(t,e,r){var n=r(49974),i=r(46916),o=r(19670),a=r(66330),s=r(97659),u=r(26244),c=r(47976),f=r(18554),l=r(71246),h=r(99212),d=TypeError,p=function(t,e){this.stopped=t,this.result=e},v=p.prototype;t.exports=function(t,e,r){var m,y,g,b,w,_,x,k=r&&r.that,E=!(!r||!r.AS_ENTRIES),M=!(!r||!r.IS_RECORD),A=!(!r||!r.IS_ITERATOR),S=!(!r||!r.INTERRUPTED),R=n(e,k),P=function(t){return m&&h(m,"normal",t),new p(!0,t)},T=function(t){return E?(o(t),S?R(t[0],t[1],P):R(t[0],t[1])):S?R(t,P):R(t)};if(M)m=t.iterator;else if(A)m=t;else{if(!(y=l(t)))throw d(a(t)+" is not iterable");if(s(y)){for(g=0,b=u(t);b>g;g++)if((w=T(t[g]))&&c(v,w))return w;return new p(!1)}m=f(t,y)}for(_=M?t.next:m.next;!(x=i(_,m)).done;){try{w=T(x.value)}catch(O){h(m,"throw",O)}if("object"==typeof w&&w&&c(v,w))return w}return new p(!1)}},99212:function(t,e,r){var n=r(46916),i=r(19670),o=r(58173);t.exports=function(t,e,r){var a,s;i(t);try{if(!(a=o(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(u){s=!0,a=u}if("throw"===e)throw r;if(s)throw a;return i(a),r}},97497:function(t){t.exports={}},56277:function(t,e,r){var n=r(41340);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},79518:function(t,e,r){var n=r(92597),i=r(60614),o=r(47908),a=r(6200),s=r(49920),u=a("IE_PROTO"),c=Object,f=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=o(t);if(n(e,u))return e[u];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof c?f:null}},27674:function(t,e,r){var n=r(1702),i=r(19670),o=r(96077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(a){}return function(r,n){return i(r),o(n),e?t(r,n):r.__proto__=n,r}}():void 0)},10365:function(t,e,r){"use strict";var n=r(53111).end,i=r(76091);t.exports=i("trimEnd")?function(){return n(this)}:"".trimEnd},76091:function(t,e,r){var n=r(76530).PROPER,i=r(47293),o=r(81361);t.exports=function(t){return i((function(){return!!o[t]()||"…"!=="…"[t]()||n&&o[t].name!==t}))}},33217:function(t,e,r){"use strict";var n=r(53111).start,i=r(76091);t.exports=i("trimStart")?function(){return n(this)}:"".trimStart},53111:function(t,e,r){var n=r(1702),i=r(84488),o=r(41340),a=r(81361),s=n("".replace),u="["+a+"]",c=RegExp("^"+u+u+"*"),f=RegExp(u+u+"*$"),l=function(t){return function(e){var r=o(i(e));return 1&t&&(r=s(r,c,"")),2&t&&(r=s(r,f,"")),r}};t.exports={start:l(1),end:l(2),trim:l(3)}},41340:function(t,e,r){var n=r(70648),i=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},81361:function(t){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},56967:function(t,e,r){"use strict";var n=r(82109),i=r(47976),o=r(79518),a=r(27674),s=r(99920),u=r(70030),c=r(68880),f=r(79114),l=r(58340),h=r(5392),d=r(20408),p=r(56277),v=r(5112)("toStringTag"),m=Error,y=[].push,g=function(t,e){var r,n=i(b,this);a?r=a(m(),n?o(this):b):(r=n?this:u(b),c(r,v,"Error")),void 0!==e&&c(r,"message",p(e)),h(r,g,r.stack,1),arguments.length>2&&l(r,arguments[2]);var s=[];return d(t,y,{that:s}),c(r,"errors",s),r};a?a(g,m):s(g,m,{name:!0});var b=g.prototype=u(m.prototype,{constructor:f(1,g),message:f(1,""),name:f(1,"AggregateError")});n({global:!0,constructor:!0,arity:2},{AggregateError:g})},9170:function(t,e,r){r(56967)},48702:function(t,e,r){r(83462);var n=r(82109),i=r(10365);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==i},{trimEnd:i})},99967:function(t,e,r){var n=r(82109),i=r(33217);n({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==i},{trimLeft:i})},83462:function(t,e,r){var n=r(82109),i=r(10365);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==i},{trimRight:i})},55674:function(t,e,r){r(99967);var n=r(82109),i=r(33217);n({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==i},{trimStart:i})},8628:function(t,e,r){r(9170)},93723:function(t,e,r){"use strict";r.d(e,{G:function(){return T},L:function(){return p},M:function(){return _},P:function(){return w},_:function(){return s},a:function(){return a},b:function(){return c},g:function(){return f},h:function(){return u}});var n=r(67294),i=(r(74811),r(45697)),o=r.n(i);function a(){return a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a.apply(this,arguments)}function s(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)e.indexOf(r=o[n])>=0||(i[r]=t[r]);return i}var u=function(){return"undefined"!=typeof HTMLImageElement&&"loading"in HTMLImageElement.prototype};function c(t,e,r,n,i){return void 0===i&&(i={}),a({},r,{loading:n,shouldLoad:t,"data-main-image":"",style:a({},i,{opacity:e?1:0})})}function f(t,e,r,n,i,o,s,u){var c={};o&&(c.backgroundColor=o,"fixed"===r?(c.width=n,c.height=i,c.backgroundColor=o,c.position="relative"):("constrained"===r||"fullWidth"===r)&&(c.position="absolute",c.top=0,c.left=0,c.bottom=0,c.right=0)),s&&(c.objectFit=s),u&&(c.objectPosition=u);var f=a({},t,{"aria-hidden":!0,"data-placeholder-image":"",style:a({opacity:e?0:1,transition:"opacity 500ms linear"},c)});return f}var l,h=["children"],d=function(t){var e=t.layout,r=t.width,i=t.height;return"fullWidth"===e?n.createElement("div",{"aria-hidden":!0,style:{paddingTop:i/r*100+"%"}}):"constrained"===e?n.createElement("div",{style:{maxWidth:r,display:"block"}},n.createElement("img",{alt:"",role:"presentation","aria-hidden":"true",src:"data:image/svg+xml;charset=utf-8,%3Csvg height='"+i+"' width='"+r+"' xmlns='http://www.w3.org/2000/svg' version='1.1'%3E%3C/svg%3E",style:{maxWidth:"100%",display:"block",position:"static"}})):null},p=function(t){var e=t.children,r=s(t,h);return n.createElement(n.Fragment,null,n.createElement(d,a({},r)),e,null)},v=["src","srcSet","loading","alt","shouldLoad"],m=["fallback","sources","shouldLoad"],y=function(t){var e=t.src,r=t.srcSet,i=t.loading,o=t.alt,u=void 0===o?"":o,c=t.shouldLoad,f=s(t,v);return n.createElement("img",a({},f,{decoding:"async",loading:i,src:c?e:void 0,"data-src":c?void 0:e,srcSet:c?r:void 0,"data-srcset":c?void 0:r,alt:u}))},g=function(t){var e=t.fallback,r=t.sources,i=void 0===r?[]:r,o=t.shouldLoad,u=void 0===o||o,c=s(t,m),f=c.sizes||(null==e?void 0:e.sizes),l=n.createElement(y,a({},c,e,{sizes:f,shouldLoad:u}));return i.length?n.createElement("picture",null,i.map((function(t){var e=t.media,r=t.srcSet,i=t.type;return n.createElement("source",{key:e+"-"+i+"-"+r,type:i,media:e,srcSet:u?r:void 0,"data-srcset":u?void 0:r,sizes:f})})),l):l};y.propTypes={src:i.string.isRequired,alt:i.string.isRequired,sizes:i.string,srcSet:i.string,shouldLoad:i.bool},g.displayName="Picture",g.propTypes={alt:i.string.isRequired,shouldLoad:i.bool,fallback:i.exact({src:i.string.isRequired,srcSet:i.string,sizes:i.string}),sources:i.arrayOf(i.oneOfType([i.exact({media:i.string.isRequired,type:i.string,sizes:i.string,srcSet:i.string.isRequired}),i.exact({media:i.string,type:i.string.isRequired,sizes:i.string,srcSet:i.string.isRequired})]))};var b=["fallback"],w=function(t){var e=t.fallback,r=s(t,b);return e?n.createElement(g,a({},r,{fallback:{src:e},"aria-hidden":!0,alt:""})):n.createElement("div",a({},r))};w.displayName="Placeholder",w.propTypes={fallback:i.string,sources:null==(l=g.propTypes)?void 0:l.sources,alt:function(t,e,r){return t[e]?new Error("Invalid prop `"+e+"` supplied to `"+r+"`. Validation failed."):null}};var _=function(t){return n.createElement(n.Fragment,null,n.createElement(g,a({},t)),n.createElement("noscript",null,n.createElement(g,a({},t,{shouldLoad:!0}))))};_.displayName="MainImage",_.propTypes=g.propTypes;var x,k,E=function(t,e,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),a=3;a<n;a++)i[a-3]=arguments[a];return t.alt||""===t.alt?o().string.apply(o(),[t,e,r].concat(i)):new Error('The "alt" prop is required in '+r+'. If the image is purely presentational then pass an empty string: e.g. alt="". Learn more: https://a11y-style-guide.com/style-guide/section-media.html')},M={image:o().object.isRequired,alt:E},A=["as","image","style","backgroundColor","className","class","onStartLoad","onLoad","onError"],S=["style","className"],R=new Set,P=function(t){var e=t.as,i=void 0===e?"div":e,o=t.image,c=t.style,f=t.backgroundColor,l=t.className,h=t.class,d=t.onStartLoad,p=t.onLoad,v=t.onError,m=s(t,A),y=o.width,g=o.height,b=o.layout,w=function(t,e,r){var n={},i="gatsby-image-wrapper";return"fixed"===r?(n.width=t,n.height=e):"constrained"===r&&(i="gatsby-image-wrapper gatsby-image-wrapper-constrained"),{className:i,"data-gatsby-image-wrapper":"",style:n}}(y,g,b),_=w.style,E=w.className,M=s(w,S),P=(0,n.useRef)(),T=(0,n.useMemo)((function(){return JSON.stringify(o.images)}),[o.images]);h&&(l=h);var O=function(t,e,r){var n="";return"fullWidth"===t&&(n='<div aria-hidden="true" style="padding-top: '+r/e*100+'%;"></div>'),"constrained"===t&&(n='<div style="max-width: '+e+'px; display: block;"><img alt="" role="presentation" aria-hidden="true" src="data:image/svg+xml;charset=utf-8,%3Csvg height=\''+r+"' width='"+e+"' xmlns='http://www.w3.org/2000/svg' version='1.1'%3E%3C/svg%3E\" style=\"max-width: 100%; display: block; position: static;\"></div>"),n}(b,y,g);return(0,n.useEffect)((function(){x||(x=Promise.all([r.e(774),r.e(223)]).then(r.bind(r,8223)).then((function(t){var e=t.renderImageToString,r=t.swapPlaceholderImage;return k=e,{renderImageToString:e,swapPlaceholderImage:r}})));var t,e,n=P.current.querySelector("[data-gatsby-image-ssr]");return n&&u()?(n.complete?(null==d||d({wasCached:!0}),null==p||p({wasCached:!0}),setTimeout((function(){n.removeAttribute("data-gatsby-image-ssr")}),0)):(null==d||d({wasCached:!0}),n.addEventListener("load",(function t(){n.removeEventListener("load",t),null==p||p({wasCached:!0}),setTimeout((function(){n.removeAttribute("data-gatsby-image-ssr")}),0)}))),void R.add(T)):k&&R.has(T)?void 0:(x.then((function(r){var n=r.renderImageToString,i=r.swapPlaceholderImage;P.current&&(P.current.innerHTML=n(a({isLoading:!0,isLoaded:R.has(T),image:o},m)),R.has(T)||(t=requestAnimationFrame((function(){P.current&&(e=i(P.current,T,R,c,d,p,v))}))))})),function(){t&&cancelAnimationFrame(t),e&&e()})}),[o]),(0,n.useLayoutEffect)((function(){R.has(T)&&k&&(P.current.innerHTML=k(a({isLoading:R.has(T),isLoaded:R.has(T),image:o},m)),null==d||d({wasCached:!0}),null==p||p({wasCached:!0}))}),[o]),(0,n.createElement)(i,a({},M,{style:a({},_,c,{backgroundColor:f}),className:E+(l?" "+l:""),ref:P,dangerouslySetInnerHTML:{__html:O},suppressHydrationWarning:!0}))},T=(0,n.memo)((function(t){return t.image?(0,n.createElement)(P,t):null}));T.propTypes=M,T.displayName="GatsbyImage";var O,I=["src","__imageData","__error","width","height","aspectRatio","tracedSVGOptions","placeholder","formats","quality","transformOptions","jpgOptions","pngOptions","webpOptions","avifOptions","blurredOptions","breakpoints","outputPixelDensities"],C=function(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return"fullWidth"!==t.layout||"width"!==e&&"height"!==e||!t[e]?o().number.apply(o(),[t,e].concat(n)):new Error('"'+e+'" '+t[e]+" may not be passed when layout is fullWidth.")},N=new Set(["fixed","fullWidth","constrained"]),L={src:o().string.isRequired,alt:E,width:C,height:C,sizes:o().string,layout:function(t){if(void 0!==t.layout&&!N.has(t.layout))return new Error("Invalid value "+t.layout+'" provided for prop "layout". Defaulting to "constrained". Valid values are "fixed", "fullWidth" or "constrained".')}},B=(O=T,function(t){var e=t.src,r=t.__imageData,i=t.__error,o=s(t,I);return i&&console.warn(i),r?n.createElement(O,a({image:r},o)):(console.warn("Image not loaded",e),null)});B.displayName="StaticImage",B.propTypes=L},78936:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return Ky}});var n={};r.r(n),r.d(n,{decrypt:function(){return ke},encrypt:function(){return _e},generateKey:function(){return ye},verifyHmac:function(){return be}});var i=r(76541),o=r(71082),a=r(67294),s=r(87462);var u=r(58426),c=r(83050),f=r(98015),l={border:"0px",clip:"rect(0px, 0px, 0px, 0px)",height:"1px",width:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},h=(0,c.m$)("span",{baseStyle:l});f.Ts&&(h.displayName="VisuallyHidden");var d=(0,c.m$)("input",{baseStyle:l});f.Ts&&(d.displayName="VisuallyHiddenInput");function p(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}function v(){return v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},v.apply(this,arguments)}var m=["className","children"],y=(0,c.Gp)((function(t,e){var r=(0,c.yK)();return a.createElement(c.m$.dt,v({ref:e},t,{className:(0,f.cx)("chakra-stat__label",t.className),__css:r.label}))}));f.Ts&&(y.displayName="StatLabel");var g=(0,c.Gp)((function(t,e){var r=(0,c.yK)();return a.createElement(c.m$.dd,v({ref:e},t,{className:(0,f.cx)("chakra-stat__help-text",t.className),__css:r.helpText}))}));f.Ts&&(g.displayName="StatHelpText");var b=(0,c.Gp)((function(t,e){var r=(0,c.yK)();return a.createElement(c.m$.dd,v({ref:e},t,{className:(0,f.cx)("chakra-stat__number",t.className),__css:v({},r.number,{fontFeatureSettings:"pnum",fontVariantNumeric:"proportional-nums"})}))}));f.Ts&&(b.displayName="StatNumber");var w=function(t){return a.createElement(u.JO,v({color:"red.400"},t),a.createElement("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"}))};f.Ts&&(w.displayName="StatDownArrow");var _=function(t){return a.createElement(u.JO,v({color:"green.400"},t),a.createElement("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"}))};f.Ts&&(_.displayName="StatUpArrow");f.Ts;var x=(0,c.Gp)((function(t,e){var r=(0,c.jC)("Stat",t),n=v({position:"relative",flex:"1 1 0%"},r.container),i=(0,c.Lr)(t),o=i.className,s=i.children,u=p(i,m);return a.createElement(c.Fo,{value:r},a.createElement(c.m$.div,v({ref:e},u,{className:(0,f.cx)("chakra-stat",o),__css:n}),a.createElement("dl",null,s)))}));f.Ts&&(x.displayName="Stat");var k=(0,c.Gp)((function(t,e){return a.createElement(c.m$.div,v({},t,{ref:e,role:"group",className:(0,f.cx)("chakra-stat__group",t.className),__css:{display:"flex",flexWrap:"wrap",justifyContent:"space-around",alignItems:"flex-start"}}))}));f.Ts&&(k.displayName="StatGroup");var E=r(88408),M=r(43971),A=r.n(M),S=r(89818),R=r(23431);function P(){return P=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},P.apply(this,arguments)}var T=["label","thickness","speed","emptyColor","className"],O=(0,R.F4)({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),I=(0,c.Gp)((function(t,e){var r=(0,c.mq)("Spinner",t),n=(0,c.Lr)(t),i=n.label,o=void 0===i?"Loading...":i,s=n.thickness,u=void 0===s?"2px":s,l=n.speed,d=void 0===l?"0.45s":l,p=n.emptyColor,v=void 0===p?"transparent":p,m=n.className,y=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(n,T),g=(0,f.cx)("chakra-spinner",m),b=P({display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:u,borderBottomColor:v,borderLeftColor:v,animation:O+" "+d+" linear infinite"},r);return a.createElement(c.m$.div,P({ref:e,__css:b,className:g},y),o&&a.createElement(h,null,o))}));function C(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}function N(){return N=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},N.apply(this,arguments)}f.Ts&&(I.displayName="Spinner");var L=["size","colorScheme","variant","className","spacing","isAttached","isDisabled"],B=(0,S.kr)({strict:!1,name:"ButtonGroupContext"}),j=B[0],U=B[1],F=(0,c.Gp)((function(t,e){var r=t.size,n=t.colorScheme,i=t.variant,o=t.className,s=t.spacing,u=void 0===s?"0.5rem":s,l=t.isAttached,h=t.isDisabled,d=C(t,L),p=(0,f.cx)("chakra-button__group",o),v=a.useMemo((function(){return{size:r,colorScheme:n,variant:i,isDisabled:h}}),[r,n,i,h]),m={display:"inline-flex"};return m=N({},m,l?{"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:{"& > *:not(style) ~ *:not(style)":{marginStart:u}}),a.createElement(j,{value:v},a.createElement(c.m$.div,N({ref:e,role:"group",__css:m,className:p},d)))}));f.Ts&&(F.displayName="ButtonGroup");var q=["label","placement","spacing","children","className","__css"],D=function(t){var e=t.label,r=t.placement,n=t.spacing,i=void 0===n?"0.5rem":n,o=t.children,s=void 0===o?a.createElement(I,{color:"currentColor",width:"1em",height:"1em"}):o,u=t.className,l=t.__css,h=C(t,q),d=(0,f.cx)("chakra-button__spinner",u),p="start"===r?"marginEnd":"marginStart",v=a.useMemo((function(){var t;return N(((t={display:"flex",alignItems:"center",position:e?"relative":"absolute"})[p]=e?i:0,t.fontSize="1em",t.lineHeight="normal",t),l)}),[l,e,p,i]);return a.createElement(c.m$.div,N({className:d},h,{__css:v}),s)};f.Ts&&(D.displayName="ButtonSpinner");var z=["children","className"],H=function(t){var e=t.children,r=t.className,n=C(t,z),i=a.isValidElement(e)?a.cloneElement(e,{"aria-hidden":!0,focusable:!1}):e,o=(0,f.cx)("chakra-button__icon",r);return a.createElement(c.m$.span,N({display:"inline-flex",alignSelf:"center",flexShrink:0},n,{className:o}),i)};f.Ts&&(H.displayName="ButtonIcon");var V=["isDisabled","isLoading","isActive","isFullWidth","children","leftIcon","rightIcon","loadingText","iconSpacing","type","spinner","spinnerPlacement","className","as"],W=(0,c.Gp)((function(t,e){var r,n,i,o,s=U(),u=(0,c.mq)("Button",N({},s,t)),l=(0,c.Lr)(t),h=l.isDisabled,d=void 0===h?null==s?void 0:s.isDisabled:h,p=l.isLoading,v=l.isActive,m=l.isFullWidth,y=l.children,g=l.leftIcon,b=l.rightIcon,w=l.loadingText,_=l.iconSpacing,x=void 0===_?"0.5rem":_,k=l.type,M=l.spinner,S=l.spinnerPlacement,R=void 0===S?"start":S,P=l.className,T=l.as,O=C(l,V),I=a.useMemo((function(){var t,e=A()({},null!=(t=null==u?void 0:u._focus)?t:{},{zIndex:1});return N({display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",width:m?"100%":"auto"},u,!!s&&{_focus:e})}),[u,s,m]),L=(r=T,n=a.useState(!r),i=n[0],o=n[1],{ref:a.useCallback((function(t){t&&o("BUTTON"===t.tagName)}),[]),type:i?"button":void 0}),B=L.ref,j=L.type,F={rightIcon:b,leftIcon:g,iconSpacing:x,children:y};return a.createElement(c.m$.button,N({disabled:d||p,ref:(0,E.qq)(e,B),as:T,type:null!=k?k:j,"data-active":(0,f.PB)(v),"data-loading":(0,f.PB)(p),__css:I,className:(0,f.cx)("chakra-button",P)},O),p&&"start"===R&&a.createElement(D,{className:"chakra-button__spinner--start",label:w,placement:"start",spacing:x},M),p?w||a.createElement(c.m$.span,{opacity:0},a.createElement(K,F)):a.createElement(K,F),p&&"end"===R&&a.createElement(D,{className:"chakra-button__spinner--end",label:w,placement:"end",spacing:x},M))}));function K(t){var e=t.leftIcon,r=t.rightIcon,n=t.children,i=t.iconSpacing;return a.createElement(a.Fragment,null,e&&a.createElement(H,{marginEnd:i},e),n,r&&a.createElement(H,{marginStart:i},r))}f.Ts&&(W.displayName="Button");var G=["icon","children","isRound","aria-label"],Z=(0,c.Gp)((function(t,e){var r=t.icon,n=t.children,i=t.isRound,o=t["aria-label"],s=C(t,G),u=r||n,c=a.isValidElement(u)?a.cloneElement(u,{"aria-hidden":!0,focusable:!1}):null;return a.createElement(W,N({padding:"0",borderRadius:i?"full":void 0,ref:e,"aria-label":o},s),c)}));f.Ts&&(Z.displayName="IconButton");var J=r(15861);function $(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function X(t,e,r){return e&&Y(t.prototype,e),r&&Y(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var Q=r(89611);function tt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&(0,Q.Z)(t,e)}function et(t){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function rt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nt(t,e){if(e&&("object"===et(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return rt(t)}function it(t){return it=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},it(t)}var ot=r(87757),at=r.n(ot),st=r(42982),ut=r(53166),ct=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],ft=["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"],lt={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"},ht=r(89784),dt=r.n(ht),pt=r(59797);function vt(t){return pt.arrayToBuffer(new Uint8Array(t))}function mt(t){return pt.bufferToArray(t).buffer}function yt(t,e){var r=pt.removeHexPrefix(pt.sanitizeHex(new(dt())(t).toString(16)));return e?r:pt.addHexPrefix(r)}var gt,bt=r(89065),wt=r.n(bt);function _t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}_t(gt={},"PARSE_ERROR",{code:-32700,message:"Parse error"}),_t(gt,"INVALID_REQUEST",{code:-32600,message:"Invalid Request"}),_t(gt,"METHOD_NOT_FOUND",{code:-32601,message:"Method not found"}),_t(gt,"INVALID_PARAMS",{code:-32602,message:"Invalid params"}),_t(gt,"INTERNAL_ERROR",{code:-32603,message:"Internal error"}),_t(gt,"SERVER_ERROR",{code:-32e3,message:"Server error"});var xt=r(70213);function kt(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}function Et(t){return pt.sanitizeHex(t)}var Mt=kt;function At(){var t=function(t,e){for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e}();return t}function St(t,e){var r,n=function(t,e){var r,n=lt[t];return n&&(r="https://".concat(n,".infura.io/v3/").concat(e)),r}(t,e.infuraId);return e.custom&&e.custom[t]?r=e.custom[t]:n&&(r=n),r}function Rt(t,e){return pt.isHexString(t,e)}function Pt(t){return void 0!==t.result}function Tt(t){return void 0!==t.error}function Ot(t){return void 0!==t.event}function It(t){return!!t.method.startsWith("wc_")||!ft.includes(t.method)}function Ct(t){t=(0,pt.removeHexPrefix)(t.toLowerCase());for(var e,r=(0,pt.removeHexPrefix)((0,bt.keccak_256)((e=t,pt.utf8ToBuffer(e)))),n="",i=0;i<t.length;i++)parseInt(r[i],16)>7?n+=t[i].toUpperCase():n+=t[i];return(0,pt.addHexPrefix)(n)}function Nt(t){var e,r,n;return(n=t)&&n.length&&!Rt(t[0])&&(t[0]=(e=t[0],pt.utf8ToHex(e,!r))),t}function Lt(t){if(void 0!==t.type&&"0"!==t.type)return t;if(void 0===t.from||(!(e=t.from)||"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!==Ct(e)))throw new Error("Transaction object must include a valid 'from' value.");var e;function r(t){var e=t;return("number"==typeof t||"string"==typeof t&&!function(t){return""===t||"string"==typeof t&&""===t.trim()}(t))&&(Rt(t)?"string"==typeof t&&(e=Et(t)):e=yt(t)),"string"==typeof e&&(e=function(t){return pt.removeHexLeadingZeros(pt.addHexPrefix(t))}(e)),e}var n={from:Et(t.from),to:void 0===t.to?"":Et(t.to),gasPrice:void 0===t.gasPrice?"":r(t.gasPrice),gas:void 0===t.gas?void 0===t.gasLimit?"":r(t.gasLimit):r(t.gas),value:void 0===t.value?"":r(t.value),nonce:void 0===t.nonce?"":r(t.nonce),data:void 0===t.data?"":Et(t.data)||"0x"},i=["gasPrice","gas","value","nonce"];return Object.keys(n).forEach((function(t){!n[t].trim().length&&i.includes(t)&&delete n[t]})),n}var Bt=r(23351);function jt(t,e){var r=Ut(t);return t=function(t){return Bt.stringify(t)}(r=Object.assign(Object.assign({},r),e))}function Ut(t){return Bt.parse(t)}var Ft=function(){function t(){var e=this;$(this,t),this._eventEmitters=[],"undefined"!=typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",(function(){return e.trigger("online")})),window.addEventListener("offline",(function(){return e.trigger("offline")})))}return X(t,[{key:"on",value:function(t,e){this._eventEmitters.push({event:t,callback:e})}},{key:"trigger",value:function(t){var e=[];t&&(e=this._eventEmitters.filter((function(e){return e.event===t}))),e.forEach((function(t){t.callback()}))}}]),t}(),qt=void 0!==r.g.WebSocket?r.g.WebSocket:r(32861),Dt=function(){function t(e){var r=this;if($(this,t),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 Ft,!e.url||"string"!=typeof e.url)throw new Error("Missing or invalid WebSocket url");this._url=e.url,this._netMonitor.on("online",(function(){return r._socketCreate()}))}var e;return X(t,[{key:"readyState",get:function(){return this._socket?this._socket.readyState:-1},set:function(t){}},{key:"connecting",get:function(){return 0===this.readyState},set:function(t){}},{key:"connected",get:function(){return 1===this.readyState},set:function(t){}},{key:"closing",get:function(){return 2===this.readyState},set:function(t){}},{key:"closed",get:function(){return 3===this.readyState},set:function(t){}},{key:"open",value:function(){this._socketCreate()}},{key:"close",value:function(){this._socketClose()}},{key:"send",value:function(t,e,r){if(!e||"string"!=typeof e)throw new Error("Missing or invalid topic field");this._socketSend({topic:e,type:"pub",payload:t,silent:!!r})}},{key:"subscribe",value:function(t){this._socketSend({topic:t,type:"sub",payload:"",silent:!0})}},{key:"on",value:function(t,e){this._events.push({event:t,callback:e})}},{key:"_socketCreate",value:function(){var t=this;if(!this._nextSocket){var e=function(t,e,r){var n,i,o=(t.startsWith("https")?t.replace("https","wss"):t.startsWith("http")?t.replace("http","ws"):t).split("?"),a=(0,ut.isBrowser)()?{protocol:e,version:r,env:"browser",host:(null===(n=(0,ut.getLocation)())||void 0===n?void 0:n.host)||""}:{protocol:e,version:r,env:(null===(i=(0,ut.detectEnv)())||void 0===i?void 0:i.name)||""},s=jt(function(t){var e=-1!==t.indexOf("?")?t.indexOf("?"):void 0;return void 0!==e?t.substr(e):""}(o[1]||""),a);return o[0]+"?"+s}(this._url,this._protocol,this._version);if(this._nextSocket=new qt(e),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=function(e){return t._socketReceive(e)},this._nextSocket.onopen=function(){return t._socketOpen()},this._nextSocket.onerror=function(e){return t._socketError(e)},this._nextSocket.onclose=function(){setTimeout((function(){t._nextSocket=null,t._socketCreate()}),1e3)}}}},{key:"_socketOpen",value:function(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}},{key:"_socketClose",value:function(){this._socket&&(this._socket.onclose=function(){},this._socket.close())}},{key:"_socketSend",value:function(t){var e=JSON.stringify(t);this._socket&&1===this._socket.readyState?this._socket.send(e):(this._setToQueue(t),this._socketCreate())}},{key:"_socketReceive",value:(e=(0,J.Z)(at().mark((function t(e){var r,n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,r=JSON.parse(e.data),t.next=7;break;case 4:return t.prev=4,t.t0=t.catch(0),t.abrupt("return");case 7:this._socketSend({topic:r.topic,type:"ack",payload:"",silent:!0}),this._socket&&1===this._socket.readyState&&(n=this._events.filter((function(t){return"message"===t.event})),n&&n.length&&n.forEach((function(t){return t.callback(r)})));case 9:case"end":return t.stop()}}),t,this,[[0,4]])}))),function(t){return e.apply(this,arguments)})},{key:"_socketError",value:function(t){var e=this._events.filter((function(t){return"error"===t.event}));e&&e.length&&e.forEach((function(e){return e.callback(t)}))}},{key:"_queueSubscriptions",value:function(){var t=this;this._subscriptions.forEach((function(e){return t._queue.push({topic:e,type:"sub",payload:"",silent:!0})})),this._subscriptions=this.opts.subscriptions||[]}},{key:"_setToQueue",value:function(t){this._queue.push(t)}},{key:"_pushQueue",value:function(){var t=this;this._queue.forEach((function(e){return t._socketSend(e)})),this._queue=[]}}]),t}();var zt=Dt,Ht="Session currently connected",Vt="Session currently disconnected",Wt="JSON RPC response format is invalid",Kt="User close QRCode Modal",Gt=function(){function t(){$(this,t),this._eventEmitters=[]}return X(t,[{key:"subscribe",value:function(t){this._eventEmitters.push(t)}},{key:"unsubscribe",value:function(t){this._eventEmitters=this._eventEmitters.filter((function(e){return e.event!==t}))}},{key:"trigger",value:function(t){var e,r=[];(e=void 0!==t.method?t.method:Pt(t)||Tt(t)?"response:".concat(t.id):Ot(t)?t.event:"")&&(r=this._eventEmitters.filter((function(t){return t.event===e}))),r&&r.length||function(t){return ct.includes(t)||t.startsWith("wc_")}(e)||Ot(e)||(r=this._eventEmitters.filter((function(t){return"call_request"===t.event}))),r.forEach((function(e){if(Tt(t)){var r=new Error(t.error.message);e.callback(r,null)}else e.callback(null,t)}))}}]),t}(),Zt=Gt,Jt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"walletconnect";$(this,t),this.storageId=e}return X(t,[{key:"getSession",value:function(){var t=null,e=(0,ut.getLocal)(this.storageId);return e&&void 0!==e.bridge&&(t=e),t}},{key:"setSession",value:function(t){return(0,ut.setLocal)(this.storageId,t),t}},{key:"removeSession",value:function(){(0,ut.removeLocal)(this.storageId)}}]),t}(),$t=Jt,Yt="abcdefghijklmnopqrstuvwxyz0123456789".split("").map((function(t){return"https://".concat(t,".bridge.walletconnect.org")}));function Xt(){return Yt[Math.floor(Math.random()*Yt.length)]}var Qt=function(){function t(e){if($(this,t),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 Zt,this._clientMeta=(0,ut.getClientMeta)()||e.connectorOpts.clientMeta||null,this._cryptoLib=e.cryptoLib,this._sessionStorage=e.sessionStorage||new $t(e.connectorOpts.storageId),this._qrcodeModal=e.connectorOpts.qrcodeModal,this._qrcodeModalOptions=e.connectorOpts.qrcodeModalOptions,this._signingMethods=[].concat((0,st.Z)(ft),(0,st.Z)(e.connectorOpts.signingMethods||[])),!e.connectorOpts.bridge&&!e.connectorOpts.uri&&!e.connectorOpts.session)throw new Error("Missing one of the required parameters: bridge / uri / session");var r;e.connectorOpts.bridge&&(this.bridge=function(t){return"walletconnect.org"===function(t){return function(t){var e=t.indexOf("//")>-1?t.split("/")[2]:t.split("/")[0];return(e=e.split(":")[0]).split("?")[0]}(t).split(".").slice(-2).join(".")}(t)}(r=e.connectorOpts.bridge)?Xt():r),e.connectorOpts.uri&&(this.uri=e.connectorOpts.uri);var n=e.connectorOpts.session||this._getStorageSession();n&&(this.session=n),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=e.transport||new zt({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)}var e,r,n,i,o,a,s,u,c,f,l,h,d,p,v,m,y,g;return X(t,[{key:"bridge",get:function(){return this._bridge},set:function(t){t&&(this._bridge=t)}},{key:"key",get:function(){var t,e;return this._key?(t=this._key,e=!0,pt.arrayToHex(new Uint8Array(t),!e)):""},set:function(t){if(t){var e=function(t){return pt.hexToArray(t).buffer}(t);this._key=e}}},{key:"clientId",get:function(){var t=this._clientId;return t||(t=this._clientId=At()),this._clientId},set:function(t){t&&(this._clientId=t)}},{key:"peerId",get:function(){return this._peerId},set:function(t){t&&(this._peerId=t)}},{key:"clientMeta",get:function(){var t=this._clientMeta;return t||(t=this._clientMeta=(0,ut.getClientMeta)()),t},set:function(t){}},{key:"peerMeta",get:function(){return this._peerMeta},set:function(t){this._peerMeta=t}},{key:"handshakeTopic",get:function(){return this._handshakeTopic},set:function(t){t&&(this._handshakeTopic=t)}},{key:"handshakeId",get:function(){return this._handshakeId},set:function(t){t&&(this._handshakeId=t)}},{key:"uri",get:function(){return this._formatUri()},set:function(t){if(t){var e=this._parseUri(t),r=e.handshakeTopic,n=e.bridge,i=e.key;this.handshakeTopic=r,this.bridge=n,this.key=i}}},{key:"chainId",get:function(){return this._chainId},set:function(t){this._chainId=t}},{key:"networkId",get:function(){return this._networkId},set:function(t){this._networkId=t}},{key:"accounts",get:function(){return this._accounts},set:function(t){this._accounts=t}},{key:"rpcUrl",get:function(){return this._rpcUrl},set:function(t){this._rpcUrl=t}},{key:"connected",get:function(){return this._connected},set:function(t){}},{key:"pending",get:function(){return!!this._handshakeTopic},set:function(t){}},{key:"session",get:function(){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:function(t){t&&(this._connected=t.connected,this.accounts=t.accounts,this.chainId=t.chainId,this.bridge=t.bridge,this.key=t.key,this.clientId=t.clientId,this.clientMeta=t.clientMeta,this.peerId=t.peerId,this.peerMeta=t.peerMeta,this.handshakeId=t.handshakeId,this.handshakeTopic=t.handshakeTopic)}},{key:"on",value:function(t,e){var r={event:t,callback:e};this._eventManager.subscribe(r)}},{key:"off",value:function(t){this._eventManager.unsubscribe(t)}},{key:"createInstantRequest",value:(g=(0,J.Z)(at().mark((function t(e){var r,n,i,o=this;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._generateKey();case 2:return this._key=t.sent,r=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(e)}]}),this.handshakeId=r.id,this.handshakeTopic=At(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",(function(){throw new Error(Kt)})),n=function(){o.killSession()},t.prev=9,t.next=12,this._sendCallRequest(r);case 12:return(i=t.sent)&&n(),t.abrupt("return",i);case 17:throw t.prev=17,t.t0=t.catch(9),n(),t.t0;case 21:case"end":return t.stop()}}),t,this,[[9,17]])}))),function(t){return g.apply(this,arguments)})},{key:"connect",value:(y=(0,J.Z)(at().mark((function t(e){var r=this;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._qrcodeModal){t.next=2;break}throw new Error("QRCode Modal not provided");case 2:if(!this.connected){t.next=4;break}return t.abrupt("return",{chainId:this.chainId,accounts:this.accounts});case 4:return t.next=6,this.createSession(e);case 6:return t.abrupt("return",new Promise(function(){var t=(0,J.Z)(at().mark((function t(e,n){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.on("modal_closed",(function(){return n(new Error(Kt))})),r.on("connect",(function(t,r){if(t)return n(t);e(r.params[0])}));case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"createSession",value:(m=(0,J.Z)(at().mark((function t(e){var r;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._connected){t.next=2;break}throw new Error(Ht);case 2:if(!this.pending){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,this._generateKey();case 6:this._key=t.sent,r=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e&&e.chainId?e.chainId:null}]}),this.handshakeId=r.id,this.handshakeTopic=At(),this._sendSessionRequest(r,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]});case 12:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"approveSession",value:function(t){if(this._connected)throw new Error(Ht);this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";var e={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:e};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}]})}},{key:"rejectSession",value:function(t){if(this._connected)throw new Error(Ht);var e=t&&t.message?t.message:"Session Rejected",r=this._formatResponse({id:this.handshakeId,error:{message:e}});this._sendResponse(r),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession()}},{key:"updateSession",value:function(t){if(!this._connected)throw new Error(Vt);this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";var e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},r=this._formatRequest({method:"wc_sessionUpdate",params:[e]});this._sendSessionRequest(r,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}},{key:"killSession",value:(v=(0,J.Z)(at().mark((function t(e){var r,n,i;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e?e.message:"Session Disconnected",n={approved:!1,chainId:null,networkId:null,accounts:null},i=this._formatRequest({method:"wc_sessionUpdate",params:[n]}),t.next=5,this._sendRequest(i);case 5:this._handleSessionDisconnect(r);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"sendTransaction",value:(p=(0,J.Z)(at().mark((function t(e){var r,n,i;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error(Vt);case 2:return r=Lt(e),n=this._formatRequest({method:"eth_sendTransaction",params:[r]}),t.next=6,this._sendCallRequest(n);case 6:return i=t.sent,t.abrupt("return",i);case 8:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"signTransaction",value:(d=(0,J.Z)(at().mark((function t(e){var r,n,i;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error(Vt);case 2:return r=Lt(e),n=this._formatRequest({method:"eth_signTransaction",params:[r]}),t.next=6,this._sendCallRequest(n);case 6:return i=t.sent,t.abrupt("return",i);case 8:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"signMessage",value:(h=(0,J.Z)(at().mark((function t(e){var r,n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error(Vt);case 2:return r=this._formatRequest({method:"eth_sign",params:e}),t.next=5,this._sendCallRequest(r);case 5:return n=t.sent,t.abrupt("return",n);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"signPersonalMessage",value:(l=(0,J.Z)(at().mark((function t(e){var r,n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error(Vt);case 2:return e=Nt(e),r=this._formatRequest({method:"personal_sign",params:e}),t.next=6,this._sendCallRequest(r);case 6:return n=t.sent,t.abrupt("return",n);case 8:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"signTypedData",value:(f=(0,J.Z)(at().mark((function t(e){var r,n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error(Vt);case 2:return r=this._formatRequest({method:"eth_signTypedData",params:e}),t.next=5,this._sendCallRequest(r);case 5:return n=t.sent,t.abrupt("return",n);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)})},{key:"updateChain",value:(c=(0,J.Z)(at().mark((function t(e){var r,n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error("Session currently disconnected");case 2:return r=this._formatRequest({method:"wallet_updateChain",params:[e]}),t.next=5,this._sendCallRequest(r);case 5:return n=t.sent,t.abrupt("return",n);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"unsafeSend",value:function(t,e){var r=this;return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),new Promise((function(e,n){r._subscribeToResponse(t.id,(function(t,r){if(t)n(t);else{if(!r)throw new Error("Missing JSON RPC response");e(r)}}))}))}},{key:"sendCustomRequest",value:(u=(0,J.Z)(at().mark((function t(e,r){var n,i;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error(Vt);case 2:t.t0=e.method,t.next="eth_accounts"===t.t0?5:"eth_chainId"===t.t0?6:"eth_sendTransaction"===t.t0||"eth_signTransaction"===t.t0?7:"personal_sign"===t.t0?9:11;break;case 5:return t.abrupt("return",this.accounts);case 6:return t.abrupt("return",yt(this.chainId));case 7:return e.params&&(e.params[0]=Lt(e.params[0])),t.abrupt("break",12);case 9:return e.params&&(e.params=Nt(e.params)),t.abrupt("break",12);case 11:return t.abrupt("break",12);case 12:return n=this._formatRequest(e),t.next=15,this._sendCallRequest(n,r);case 15:return i=t.sent,t.abrupt("return",i);case 17:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})},{key:"approveRequest",value:function(t){if(!Pt(t))throw new Error('JSON-RPC success response must include "result" field');var e=this._formatResponse(t);this._sendResponse(e)}},{key:"rejectRequest",value:function(t){if(!Tt(t))throw new Error('JSON-RPC error response must include "error" field');var e=this._formatResponse(t);this._sendResponse(e)}},{key:"transportClose",value:function(){this._transport.close()}},{key:"_sendRequest",value:(s=(0,J.Z)(at().mark((function t(e,r){var n,i,o,a,s;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this._formatRequest(e),t.next=3,this._encrypt(n);case 3:i=t.sent,o=void 0!==(null==r?void 0:r.topic)?r.topic:this.peerId,a=JSON.stringify(i),s=void 0!==(null==r?void 0:r.forcePushNotification)?!r.forcePushNotification:It(n),this._transport.send(a,o,s);case 8:case"end":return t.stop()}}),t,this)}))),function(t,e){return s.apply(this,arguments)})},{key:"_sendResponse",value:(a=(0,J.Z)(at().mark((function t(e){var r,n,i;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._encrypt(e);case 2:r=t.sent,n=this.peerId,i=JSON.stringify(r),this._transport.send(i,n,!0);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"_sendSessionRequest",value:(o=(0,J.Z)(at().mark((function t(e,r,n){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this._sendRequest(e,n),this._subscribeToSessionResponse(e.id,r);case 2:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return o.apply(this,arguments)})},{key:"_sendCallRequest",value:function(t,e){return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),this._subscribeToCallResponse(t.id)}},{key:"_formatRequest",value:function(t){if(void 0===t.method)throw new Error('JSON RPC request must have valid "method" value');return{id:void 0===t.id?Mt():t.id,jsonrpc:"2.0",method:t.method,params:void 0===t.params?[]:t.params}}},{key:"_formatResponse",value:function(t){if(void 0===t.id)throw new Error('JSON RPC request must have valid "id" value');var e={id:t.id,jsonrpc:"2.0"};if(Tt(t)){var r=function(t){var e=t.message||"Failed or Rejected Request",r=-32e3;if(t&&!t.code)switch(e){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}return{code:r,message:e}}(t.error);return Object.assign(Object.assign(Object.assign({},e),t),{error:r})}if(Pt(t))return Object.assign(Object.assign({},e),t);throw new Error(Wt)}},{key:"_handleSessionDisconnect",value:function(t){var e=t||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),(0,ut.removeLocal)(ut.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:e}]}),this._removeStorageSession(),this.transportClose()}},{key:"_handleSessionResponse",value:function(t,e){e&&e.approved?(this._connected?(e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),e.peerId&&!this.peerId&&(this.peerId=e.peerId),e.peerMeta&&!this.peerMeta&&(this.peerMeta=e.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(t)}},{key:"_handleIncomingMessages",value:(i=(0,J.Z)(at().mark((function t(e){var r,n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if([this.clientId,this.handshakeTopic].includes(e.topic)){t.next=3;break}return t.abrupt("return");case 3:t.prev=3,r=JSON.parse(e.payload),t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(3),t.abrupt("return");case 10:return t.next=12,this._decrypt(r);case 12:(n=t.sent)&&this._eventManager.trigger(n);case 14:case"end":return t.stop()}}),t,this,[[3,7]])}))),function(t){return i.apply(this,arguments)})},{key:"_subscribeToSessionRequest",value:function(){this._transport.subscribe(this.handshakeTopic)}},{key:"_subscribeToResponse",value:function(t,e){this.on("response:".concat(t),e)}},{key:"_subscribeToSessionResponse",value:function(t,e){var r=this;this._subscribeToResponse(t,(function(t,n){t?r._handleSessionResponse(t.message):n.result?r._handleSessionResponse(e,n.result):n.error&&n.error.message?r._handleSessionResponse(n.error.message):r._handleSessionResponse(e)}))}},{key:"_subscribeToCallResponse",value:function(t){var e=this;return new Promise((function(r,n){e._subscribeToResponse(t,(function(t,e){t?n(t):e.result?r(e.result):e.error&&e.error.message?n(new Error(e.error.message)):n(new Error(Wt))}))}))}},{key:"_subscribeToInternalEvents",value:function(){var t=this;this.on("display_uri",(function(){t._qrcodeModal&&t._qrcodeModal.open(t.uri,(function(){t._eventManager.trigger({event:"modal_closed",params:[]})}),t._qrcodeModalOptions)})),this.on("connect",(function(){t._qrcodeModal&&t._qrcodeModal.close()})),this.on("call_request_sent",(function(e,r){var n=r.params[0].request;if((0,ut.isMobile)()&&t._signingMethods.includes(n.method)){var i=(0,ut.getLocal)(ut.mobileLinkChoiceKey);i&&(window.location.href=i.href)}})),this.on("wc_sessionRequest",(function(e,r){e&&t._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:e.toString()}]}),t.handshakeId=r.id,t.peerId=r.params[0].peerId,t.peerMeta=r.params[0].peerMeta;var n=Object.assign(Object.assign({},r),{method:"session_request"});t._eventManager.trigger(n)})),this.on("wc_sessionUpdate",(function(e,r){e&&t._handleSessionResponse(e.message),t._handleSessionResponse("Session disconnected",r.params[0])}))}},{key:"_initTransport",value:function(){var t=this;this._transport.on("message",(function(e){return t._handleIncomingMessages(e)})),this._transport.on("open",(function(){return t._eventManager.trigger({event:"transport_open",params:[]})})),this._transport.on("close",(function(){return t._eventManager.trigger({event:"transport_close",params:[]})})),this._transport.on("error",(function(){return t._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})})),this._transport.open()}},{key:"_formatUri",value:function(){var t=this.protocol,e=this.handshakeTopic,r=this.version,n=encodeURIComponent(this.bridge),i=this.key;return"".concat(t,":").concat(e,"@").concat(r,"?bridge=").concat(n,"&key=").concat(i)}},{key:"_parseUri",value:function(t){var e,r,n,i,o,a,s,u,c=(r=(e=t).indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,i=e.substring(0,r),s=e.substring(r+1,n),u=s.split("@"),o={handshakeTopic:u[0],version:parseInt(u[1],10)},a=function(t){var e=Ut(t);return{key:e.key||"",bridge:e.bridge||""}}(void 0!==n?e.substr(n):""),Object.assign(Object.assign({protocol:i},o),a));if(c.protocol===this.protocol){if(!c.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");var f=c.handshakeTopic;if(!c.bridge)throw Error("Invalid or missing bridge url parameter value");var l=decodeURIComponent(c.bridge);if(!c.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:f,bridge:l,key:c.key}}throw new Error("URI format is invalid")}},{key:"_generateKey",value:(n=(0,J.Z)(at().mark((function t(){var e;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._cryptoLib){t.next=5;break}return t.next=3,this._cryptoLib.generateKey();case 3:return e=t.sent,t.abrupt("return",e);case 5:return t.abrupt("return",null);case 6:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"_encrypt",value:(r=(0,J.Z)(at().mark((function t(e){var r,n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this._key,!this._cryptoLib||!r){t.next=6;break}return t.next=4,this._cryptoLib.encrypt(e,r);case 4:return n=t.sent,t.abrupt("return",n);case 6:return t.abrupt("return",null);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"_decrypt",value:(e=(0,J.Z)(at().mark((function t(e){var r,n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this._key,!this._cryptoLib||!r){t.next=6;break}return t.next=4,this._cryptoLib.decrypt(e,r);case 4:return n=t.sent,t.abrupt("return",n);case 6:return t.abrupt("return",null);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"_getStorageSession",value:function(){var t=null;return this._sessionStorage&&(t=this._sessionStorage.getSession()),t}},{key:"_setStorageSession",value:function(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}},{key:"_removeStorageSession",value:function(){this._sessionStorage&&this._sessionStorage.removeSession()}},{key:"_manageStorageSession",value:function(){this._connected?this._setStorageSession():this._removeStorageSession()}},{key:"_registerPushServer",value:function(t){if(!t.url||"string"!=typeof t.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!t.type||"string"!=typeof t.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!t.token||"string"!=typeof t.token)throw Error("Invalid or missing pushServerOpts.token parameter value");var e={bridge:this.bridge,topic:this.clientId,type:t.type,token:t.token,peerName:"",language:t.language||""};this.on("connect",function(){var r=(0,J.Z)(at().mark((function r(n,i){var o,a;return at().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!n){r.next=2;break}throw n;case 2:return t.peerMeta&&(o=i.params[0].peerMeta.name,e.peerName=o),r.prev=3,r.next=6,fetch("".concat(t.url,"/new"),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)});case 6:return a=r.sent,r.next=9,a.json();case 9:if(r.sent.success){r.next=12;break}throw Error("Failed to register in Push Server");case 12:r.next=17;break;case 14:throw r.prev=14,r.t0=r.catch(3),Error("Failed to register in Push Server");case 17:case"end":return r.stop()}}),r,null,[[3,14]])})));return function(t,e){return r.apply(this,arguments)}}())}}]),t}(),te=Qt;function ee(t){return xt.getBrowerCrypto().getRandomValues(new Uint8Array(t))}var re="AES-CBC",ne="SHA-".concat(256),ie="HMAC";"aes-".concat(256,"-cbc"),"sha".concat(256);function oe(t){return t===re?{length:256,name:re}:{hash:{name:ne},name:ie}}function ae(t){return t===re?["encrypt","decrypt"]:["sign","verify"]}function se(t){return ue.apply(this,arguments)}function ue(){return ue=(0,J.Z)(at().mark((function t(e){var r,n=arguments;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:re,t.abrupt("return",xt.getSubtleCrypto().importKey("raw",e,oe(r),!0,ae(r)));case 2:case"end":return t.stop()}}),t)}))),ue.apply(this,arguments)}function ce(){return ce=(0,J.Z)(at().mark((function t(e,r,n){var i,o,a;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=xt.getSubtleCrypto(),t.next=3,se(r,re);case 3:return o=t.sent,t.next=6,i.encrypt({iv:e,name:re},o,n);case 6:return a=t.sent,t.abrupt("return",new Uint8Array(a));case 8:case"end":return t.stop()}}),t)}))),ce.apply(this,arguments)}function fe(){return fe=(0,J.Z)(at().mark((function t(e,r,n){var i,o,a;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=xt.getSubtleCrypto(),t.next=3,se(r,re);case 3:return o=t.sent,t.next=6,i.decrypt({iv:e,name:re},o,n);case 6:return a=t.sent,t.abrupt("return",new Uint8Array(a));case 8:case"end":return t.stop()}}),t)}))),fe.apply(this,arguments)}function le(t,e){return he.apply(this,arguments)}function he(){return he=(0,J.Z)(at().mark((function t(e,r){var n,i,o;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=xt.getSubtleCrypto(),t.next=3,se(e,ie);case 3:return i=t.sent,t.next=6,n.sign({length:256,name:ie},i,r);case 6:return o=t.sent,t.abrupt("return",new Uint8Array(o));case 8:case"end":return t.stop()}}),t)}))),he.apply(this,arguments)}function de(t,e,r){return function(t,e,r){return ce.apply(this,arguments)}(t,e,r)}function pe(t,e,r){return function(t,e,r){return fe.apply(this,arguments)}(t,e,r)}function ve(t,e){return me.apply(this,arguments)}function me(){return me=(0,J.Z)(at().mark((function t(e,r){var n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,le(e,r);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}}),t)}))),me.apply(this,arguments)}function ye(t){return ge.apply(this,arguments)}function ge(){return(ge=(0,J.Z)(at().mark((function t(e){var r,n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=ee((e||256)/8),n=mt(pt.arrayToBuffer(r)),t.abrupt("return",n);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function be(t,e){return we.apply(this,arguments)}function we(){return we=(0,J.Z)(at().mark((function t(e,r){var n,i,o,a,s,u,c;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=pt.hexToArray(e.data),i=pt.hexToArray(e.iv),o=pt.hexToArray(e.hmac),a=pt.arrayToHex(o,!1),s=pt.concatArrays(n,i),t.next=7,ve(r,s);case 7:if(u=t.sent,c=pt.arrayToHex(u,!1),pt.removeHexPrefix(a)!==pt.removeHexPrefix(c)){t.next=11;break}return t.abrupt("return",!0);case 11:return t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t)}))),we.apply(this,arguments)}function _e(t,e,r){return xe.apply(this,arguments)}function xe(){return xe=(0,J.Z)(at().mark((function t(e,r,n){var i,o,a,s,u,c,f,l,h,d,p;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=pt.bufferToArray(vt(r)),t.t0=n,t.t0){t.next=6;break}return t.next=5,ye(128);case 5:t.t0=t.sent;case 6:return o=t.t0,a=pt.bufferToArray(vt(o)),s=pt.arrayToHex(a,!1),u=JSON.stringify(e),c=pt.utf8ToArray(u),t.next=13,de(a,i,c);case 13:return f=t.sent,l=pt.arrayToHex(f,!1),h=pt.concatArrays(f,a),t.next=18,ve(i,h);case 18:return d=t.sent,p=pt.arrayToHex(d,!1),t.abrupt("return",{data:l,hmac:p,iv:s});case 21:case"end":return t.stop()}}),t)}))),xe.apply(this,arguments)}function ke(t,e){return Ee.apply(this,arguments)}function Ee(){return Ee=(0,J.Z)(at().mark((function t(e,r){var n,i,o,a,s,u;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=pt.bufferToArray(vt(r))){t.next=3;break}throw new Error("Missing key: required for decryption");case 3:return t.next=5,be(e,n);case 5:if(t.sent){t.next=8;break}return t.abrupt("return",null);case 8:return i=pt.hexToArray(e.data),o=pt.hexToArray(e.iv),t.next=12,pe(o,n,i);case 12:a=t.sent,s=pt.arrayToUtf8(a),t.prev=14,u=JSON.parse(s),t.next=21;break;case 18:return t.prev=18,t.t0=t.catch(14),t.abrupt("return",null);case 21:return t.abrupt("return",u);case 22:case"end":return t.stop()}}),t,null,[[14,18]])}))),Ee.apply(this,arguments)}function Me(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=it(t);if(e){var i=it(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nt(this,r)}}var Ae=function(t){tt(r,t);var e=Me(r);function r(t,i){return $(this,r),e.call(this,{cryptoLib:n,connectorOpts:t,pushServerOpts:i})}return X(r)}(te),Se=r(14578),Re=r.n(Se),Pe=r(65556),Te=r.n(Pe),Oe=r(90770);function Ie(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=it(t);if(e){var i=it(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nt(this,r)}}var Ce=(0,ut.getFromWindow)("XMLHttpRequest")||Oe.XMLHttpRequest,Ne=function(t){tt(r,t);var e=Ie(r);function r(t){var n;return $(this,r),(n=e.call(this)).url=t,n}return X(r,[{key:"formatError",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return{error:{message:e,code:r},id:t.id,jsonrpc:t.jsonrpc}}},{key:"send",value:function(t,e){var r=this;return new Promise((function(n){if("eth_subscribe"===t.method){var i=r.formatError(t,"Subscriptions are not supported by this HTTP endpoint");return r.emit("error",i),n(i)}var o=new Ce,a=!1,s=function(i,s){if(!a)if(o.abort(),a=!0,e)e(i,s);else{var u=t.id,c=t.jsonrpc,f=i?{id:u,jsonrpc:c,error:{message:i.message,code:i.code}}:{id:u,jsonrpc:c,result:s};r.emit("payload",f),n(f)}};o.open("POST",r.url,!0),o.setRequestHeader("Content-Type","application/json"),o.timeout=6e4,o.onerror=s,o.ontimeout=s,o.onreadystatechange=function(){if(4===o.readyState)try{var t=JSON.parse(o.responseText);s(t.error,t.result)}catch(e){s(e)}},o.send(JSON.stringify(t))}))}}]),r}(Te()),Le=Ne;function Be(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=it(t);if(e){var i=it(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nt(this,r)}}var je=r(72193),Ue=r(9233),Fe=r(54944),qe=r(72529),De=r(45106),ze=r(33539),He=r(79437),Ve=function(t){tt(f,t);var e,r,n,i,o,a,s,u,c=Be(f);function f(t){var e;if($(this,f),(e=c.call(this,{pollingInterval:t.pollingInterval||8e3})).bridge="https://bridge.walletconnect.org",e.qrcode=!0,e.qrcodeModal=Re(),e.qrcodeModalOptions=void 0,e.rpc=null,e.infuraId="",e.http=null,e.isConnecting=!1,e.connected=!1,e.connectCallbacks=[],e.accounts=[],e.chainId=1,e.rpcUrl="",e.enable=(0,J.Z)(at().mark((function t(){var r;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getWalletConnector();case 2:if(!(r=t.sent)){t.next=9;break}return e.start(),e.subscribeWalletConnector(),t.abrupt("return",r.accounts);case 9:throw new Error("Failed to connect to WalleConnect");case 10:case"end":return t.stop()}}),t)}))),e.request=function(){var t=(0,J.Z)(at().mark((function t(r){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.send(r));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.send=function(){var t=(0,J.Z)(at().mark((function t(r,n){var i,o;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("string"!=typeof r){t.next=5;break}return o=n,"personal_sign"===(i=r)&&(o=Nt(o)),t.abrupt("return",e.sendAsyncPromise(i,o));case 5:if("personal_sign"===(r=Object.assign({id:Mt(),jsonrpc:"2.0"},r)).method&&(r.params=Nt(r.params)),!n){t.next=10;break}return e.sendAsync(r,n),t.abrupt("return");case 10:return t.abrupt("return",e.sendAsyncPromise(r.method,r.params));case 11:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),e.onConnect=function(t){e.connectCallbacks.push(t)},e.triggerConnect=function(t){e.connectCallbacks&&e.connectCallbacks.length&&e.connectCallbacks.forEach((function(e){return e(t)}))},e.bridge=t.connector?t.connector.bridge:t.bridge||"https://bridge.walletconnect.org",e.qrcode=void 0===t.qrcode||!1!==t.qrcode,e.qrcodeModal=t.qrcodeModal||e.qrcodeModal,e.qrcodeModalOptions=t.qrcodeModalOptions,e.wc=t.connector||new Ae({bridge:e.bridge,qrcodeModal:e.qrcode?e.qrcodeModal:void 0,qrcodeModalOptions:e.qrcodeModalOptions,storageId:null==t?void 0:t.storageId,signingMethods:null==t?void 0:t.signingMethods,clientMeta:null==t?void 0:t.clientMeta}),e.rpc=t.rpc||null,!(e.rpc||t.infuraId&&"string"==typeof t.infuraId&&t.infuraId.trim()))throw new Error("Missing one of the required parameters: rpc or infuraId");return e.infuraId=t.infuraId||"",e.chainId=(null==t?void 0:t.chainId)||e.chainId,e.initialize(),e}return X(f,[{key:"isWalletConnect",get:function(){return!0}},{key:"connector",get:function(){return this.wc}},{key:"walletMeta",get:function(){return this.wc.peerMeta}},{key:"disconnect",value:(u=(0,J.Z)(at().mark((function t(){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.close();case 1:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"close",value:(s=(0,J.Z)(at().mark((function t(){var e;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getWalletConnector({disableSessionCreation:!0});case 2:return e=t.sent,t.next=5,e.killSession();case 5:return t.next=7,this.onDisconnect();case 7:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"handleRequest",value:(a=(0,J.Z)(at().mark((function t(e){var r,n,i;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=null,t.next=4,this.getWalletConnector();case 4:i=t.sent,t.t0=e.method,t.next="wc_killSession"===t.t0?8:"eth_accounts"===t.t0?12:"eth_coinbase"===t.t0?14:"eth_chainId"===t.t0?16:"net_version"===t.t0?18:"eth_uninstallFilter"===t.t0?20:23;break;case 8:return t.next=10,this.close();case 10:return n=null,t.abrupt("break",26);case 12:return n=i.accounts,t.abrupt("break",26);case 14:return n=i.accounts[0],t.abrupt("break",26);case 16:case 18:return n=i.chainId,t.abrupt("break",26);case 20:return this.sendAsync(e,(function(t){return t})),n=!0,t.abrupt("break",26);case 23:return t.next=25,this.handleOtherRequests(e);case 25:r=t.sent;case 26:if(!r){t.next=28;break}return t.abrupt("return",r);case 28:return t.abrupt("return",this.formatResponse(e,n));case 31:throw t.prev=31,t.t1=t.catch(0),this.emit("error",t.t1),t.t1;case 35:case"end":return t.stop()}}),t,this,[[0,31]])}))),function(t){return a.apply(this,arguments)})},{key:"handleOtherRequests",value:(o=(0,J.Z)(at().mark((function t(e){var r,n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(ft.includes(e.method)||!e.method.startsWith("eth_")){t.next=2;break}return t.abrupt("return",this.handleReadRequests(e));case 2:return t.next=4,this.getWalletConnector();case 4:return r=t.sent,t.next=7,r.sendCustomRequest(e);case 7:return n=t.sent,t.abrupt("return",this.formatResponse(e,n));case 9:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"handleReadRequests",value:(i=(0,J.Z)(at().mark((function t(e){var r;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.http){t.next=4;break}throw r=new Error("HTTP Connection not available"),this.emit("error",r),r;case 4:return t.abrupt("return",this.http.send(e));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"formatResponse",value:function(t,e){return{id:t.id,jsonrpc:t.jsonrpc,result:e}}},{key:"getWalletConnector",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.disableSessionCreation,n=void 0!==r&&r;return new Promise((function(e,r){var i=t.wc;t.isConnecting?t.onConnect((function(t){return e(t)})):i.connected||n?(t.connected||(t.connected=!0,t.updateState(i.session)),e(i)):(t.isConnecting=!0,i.on("modal_closed",(function(){r(new Error("User closed modal"))})),i.createSession({chainId:t.chainId}).then((function(){i.on("connect",(function(n,o){if(n)return t.isConnecting=!1,r(n);t.isConnecting=!1,t.connected=!0,o&&t.updateState(o.params[0]),t.emit("connect"),t.triggerConnect(i),e(i)}))})).catch((function(e){t.isConnecting=!1,r(e)})))}))}},{key:"subscribeWalletConnector",value:(n=(0,J.Z)(at().mark((function t(){var e,r=this;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getWalletConnector();case 2:(e=t.sent).on("disconnect",(function(t){t?r.emit("error",t):r.onDisconnect()})),e.on("session_update",(function(t,e){t?r.emit("error",t):r.updateState(e.params[0])}));case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"onDisconnect",value:(r=(0,J.Z)(at().mark((function t(){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:this.emit("close",1e3,"Connection closed"),this.emit("disconnect",1e3,"Connection disconnected"),this.connected=!1;case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"updateState",value:(e=(0,J.Z)(at().mark((function t(e){var r,n,i,o;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.accounts,n=e.chainId,i=e.networkId,o=e.rpcUrl,(!this.accounts||r&&this.accounts!==r)&&(this.accounts=r,this.emit("accountsChanged",r)),(!this.chainId||n&&this.chainId!==n)&&(this.chainId=n,this.emit("chainChanged",n)),(!this.networkId||i&&this.networkId!==i)&&(this.networkId=i,this.emit("networkChanged",i)),this.updateRpcUrl(this.chainId,o||"");case 5:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"updateRpcUrl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r={infuraId:this.infuraId,custom:this.rpc||void 0};(e=e||St(t,r))?(this.rpcUrl=e,this.updateHttpConnection()):this.emit("error",new Error("No RPC Url available for chainId: ".concat(t)))}},{key:"updateHttpConnection",value:function(){var t=this;this.rpcUrl&&(this.http=new Le(this.rpcUrl),this.http.on("payload",(function(e){return t.emit("payload",e)})),this.http.on("error",(function(e){return t.emit("error",e)})))}},{key:"sendAsyncPromise",value:function(t,e){var r=this;return new Promise((function(n,i){r.sendAsync({id:Mt(),jsonrpc:"2.0",method:t,params:e||[]},(function(t,e){t?i(t):n(e.result)}))}))}},{key:"initialize",value:function(){var t,e=this;this.updateRpcUrl(this.chainId),this.addProvider(new Fe({eth_hashrate:"0x00",eth_mining:!1,eth_syncing:!0,net_listening:!0,web3_clientVersion:"WalletConnect/v1.x.x/javascript"})),this.addProvider(new Ue),this.addProvider(new He),this.addProvider(new qe),this.addProvider(new ze),this.addProvider(new De(this.configWallet())),this.addProvider({handleRequest:(t=(0,J.Z)(at().mark((function t(r,n,i){var o,a,s;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.handleRequest(r);case 3:o=t.sent,a=o.error,s=o.result,i(a,s),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),i(t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])}))),function(e,r,n){return t.apply(this,arguments)}),setEngine:function(t){return t}})}},{key:"configWallet",value:function(){var t,e,r,n,i,o,a=this;return{getAccounts:(o=(0,J.Z)(at().mark((function t(e){var r,n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.getWalletConnector();case 3:r=t.sent,(n=r.accounts)&&n.length?e(null,n):e(new Error("Failed to get accounts")),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),e(t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])}))),function(t){return o.apply(this,arguments)}),processMessage:(i=(0,J.Z)(at().mark((function t(e,r){var n,i;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.getWalletConnector();case 3:return n=t.sent,t.next=6,n.signMessage([e.from,e.data]);case 6:i=t.sent,r(null,i),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),r(t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])}))),function(t,e){return i.apply(this,arguments)}),processPersonalMessage:(n=(0,J.Z)(at().mark((function t(e,r){var n,i;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.getWalletConnector();case 3:return n=t.sent,t.next=6,n.signPersonalMessage([e.data,e.from]);case 6:i=t.sent,r(null,i),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),r(t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])}))),function(t,e){return n.apply(this,arguments)}),processSignTransaction:(r=(0,J.Z)(at().mark((function t(e,r){var n,i;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.getWalletConnector();case 3:return n=t.sent,t.next=6,n.signTransaction(e);case 6:i=t.sent,r(null,i),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),r(t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])}))),function(t,e){return r.apply(this,arguments)}),processTransaction:(e=(0,J.Z)(at().mark((function t(e,r){var n,i;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.getWalletConnector();case 3:return n=t.sent,t.next=6,n.sendTransaction(e);case 6:i=t.sent,r(null,i),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),r(t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])}))),function(t,r){return e.apply(this,arguments)}),processTypedMessage:(t=(0,J.Z)(at().mark((function t(e,r){var n,i;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.getWalletConnector();case 3:return n=t.sent,t.next=6,n.signTypedData([e.from,e.data]);case 6:i=t.sent,r(null,i),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),r(t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])}))),function(e,r){return t.apply(this,arguments)})}}}]),f}(je),We=Ve,Ke=!1,Ge=!1,Ze={debug:1,default:2,info:2,warning:3,error:4,off:5},Je=Ze.default,$e=null;var Ye,Xe,Qe=function(){try{var t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(e){try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(r){t.push(e)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(Ye||(Ye={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(Xe||(Xe={}));var tr="0123456789abcdef",er=function(){function t(e){$(this,t),Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}return X(t,[{key:"_log",value:function(t,e){var r=t.toLowerCase();null==Ze[r]&&this.throwArgumentError("invalid log level name","logLevel",t),Je>Ze[r]||console.log.apply(console,e)}},{key:"debug",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];this._log(t.levels.DEBUG,r)}},{key:"info",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];this._log(t.levels.INFO,r)}},{key:"warn",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];this._log(t.levels.WARNING,r)}},{key:"makeError",value:function(e,r,n){if(Ge)return this.makeError("censored error",r,{});r||(r=t.errors.UNKNOWN_ERROR),n||(n={});var i=[];Object.keys(n).forEach((function(t){var e=n[t];try{if(e instanceof Uint8Array){for(var r="",o=0;o<e.length;o++)r+=tr[e[o]>>4],r+=tr[15&e[o]];i.push(t+"=Uint8Array(0x"+r+")")}else i.push(t+"="+JSON.stringify(e))}catch(a){i.push(t+"="+JSON.stringify(n[t].toString()))}})),i.push("code=".concat(r)),i.push("version=".concat(this.version));var o=e;i.length&&(e+=" ("+i.join(", ")+")");var a=new Error(e);return a.reason=o,a.code=r,Object.keys(n).forEach((function(t){a[t]=n[t]})),a}},{key:"throwError",value:function(t,e,r){throw this.makeError(t,e,r)}},{key:"throwArgumentError",value:function(e,r,n){return this.throwError(e,t.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(t,e,r,n){t||this.throwError(e,r,n)}},{key:"assertArgument",value:function(t,e,r,n){t||this.throwArgumentError(e,r,n)}},{key:"checkNormalize",value:function(e){null==e&&(e="platform missing String.prototype.normalize"),Qe&&this.throwError("platform missing String.prototype.normalize",t.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Qe})}},{key:"checkSafeUint53",value:function(e,r){"number"==typeof e&&(null==r&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}},{key:"checkArgumentCount",value:function(e,r,n){n=n?": "+n:"",e<r&&this.throwError("missing argument"+n,t.errors.MISSING_ARGUMENT,{count:e,expectedCount:r}),e>r&&this.throwError("too many arguments"+n,t.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}},{key:"checkNew",value:function(e,r){e!==Object&&null!=e||this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",t.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return $e||($e=new t("logger/5.5.0")),$e}},{key:"setCensorship",value:function(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Ke){if(!e)return;this.globalLogger().throwError("error censorship permanent",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Ge=!!e,Ke=!!r}},{key:"setLogLevel",value:function(e){var r=Ze[e.toLowerCase()];null!=r?Je=r:t.globalLogger().warn("invalid log level - "+e)}},{key:"from",value:function(e){return new t(e)}}]),t}();er.errors=Xe,er.levels=Ye;var rr=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},nr=new er("properties/5.5.0");function ir(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function or(t,e){for(var r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||"object"!=typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function ar(t){return rr(this,void 0,void 0,at().mark((function e(){var r,n;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object.keys(t).map((function(e){var r=t[e];return Promise.resolve(r).then((function(t){return{key:e,value:t}}))})),e.next=3,Promise.all(r);case 3:return n=e.sent,e.abrupt("return",n.reduce((function(t,e){return t[e.key]=e.value,t}),{}));case 5:case"end":return e.stop()}}),e)})))}function sr(t){var e={};for(var r in t)e[r]=t[r];return e}var ur={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function cr(t){if(null==t||ur[typeof t])return!0;if(Array.isArray(t)||"object"==typeof t){if(!Object.isFrozen(t))return!1;for(var e=Object.keys(t),r=0;r<e.length;r++){var n=null;try{n=t[e[r]]}catch(i){continue}if(!cr(n))return!1}return!0}return nr.throwArgumentError("Cannot deepCopy ".concat(typeof t),"object",t)}function fr(t){if(cr(t))return t;if(Array.isArray(t))return Object.freeze(t.map((function(t){return lr(t)})));if("object"==typeof t){var e={};for(var r in t){var n=t[r];void 0!==n&&ir(e,r,lr(n))}return e}return nr.throwArgumentError("Cannot deepCopy ".concat(typeof t),"object",t)}function lr(t){return fr(t)}var hr=X((function t(e){for(var r in $(this,t),e)this[r]=lr(e[r])})),dr="providers/5.5.3";function pr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=it(t)););return t}function vr(){return vr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=pr(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},vr.apply(this,arguments)}var mr=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},yr=new er("abstract-signer/5.5.0"),gr=["accessList","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],br=[er.errors.INSUFFICIENT_FUNDS,er.errors.NONCE_EXPIRED,er.errors.REPLACEMENT_UNDERPRICED],wr=function(){function t(){$(this,t),yr.checkAbstract(this instanceof t?this.constructor:void 0,t),ir(this,"_isSigner",!0)}return X(t,[{key:"getBalance",value:function(t){return mr(this,void 0,void 0,at().mark((function e(){return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getBalance"),e.next=3,this.provider.getBalance(this.getAddress(),t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"getTransactionCount",value:function(t){return mr(this,void 0,void 0,at().mark((function e(){return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getTransactionCount"),e.next=3,this.provider.getTransactionCount(this.getAddress(),t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"estimateGas",value:function(t){return mr(this,void 0,void 0,at().mark((function e(){var r;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("estimateGas"),e.next=3,ar(this.checkTransaction(t));case 3:return r=e.sent,e.next=6,this.provider.estimateGas(r);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"call",value:function(t,e){return mr(this,void 0,void 0,at().mark((function r(){var n;return at().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this._checkProvider("call"),r.next=3,ar(this.checkTransaction(t));case 3:return n=r.sent,r.next=6,this.provider.call(n,e);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"sendTransaction",value:function(t){return mr(this,void 0,void 0,at().mark((function e(){var r,n;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("sendTransaction"),e.next=3,this.populateTransaction(t);case 3:return r=e.sent,e.next=6,this.signTransaction(r);case 6:return n=e.sent,e.next=9,this.provider.sendTransaction(n);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"getChainId",value:function(){return mr(this,void 0,void 0,at().mark((function t(){var e;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getChainId"),t.next=3,this.provider.getNetwork();case 3:return e=t.sent,t.abrupt("return",e.chainId);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"getGasPrice",value:function(){return mr(this,void 0,void 0,at().mark((function t(){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getGasPrice"),t.next=3,this.provider.getGasPrice();case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getFeeData",value:function(){return mr(this,void 0,void 0,at().mark((function t(){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getFeeData"),t.next=3,this.provider.getFeeData();case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"resolveName",value:function(t){return mr(this,void 0,void 0,at().mark((function e(){return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("resolveName"),e.next=3,this.provider.resolveName(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"checkTransaction",value:function(t){for(var e in t)-1===gr.indexOf(e)&&yr.throwArgumentError("invalid transaction key: "+e,"transaction",t);var r=sr(t);return null==r.from?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then((function(e){return e[0].toLowerCase()!==e[1].toLowerCase()&&yr.throwArgumentError("from address mismatch","transaction",t),e[0]})),r}},{key:"populateTransaction",value:function(t){return mr(this,void 0,void 0,at().mark((function e(){var r,n,i,o,a=this;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ar(this.checkTransaction(t));case 2:if(null!=(r=e.sent).to&&(r.to=Promise.resolve(r.to).then((function(t){return mr(a,void 0,void 0,at().mark((function e(){var r;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",null);case 2:return e.next=4,this.resolveName(t);case 4:return null==(r=e.sent)&&yr.throwArgumentError("provided ENS name resolves to null","tx.to",t),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})))})),r.to.catch((function(t){}))),n=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas,null==r.gasPrice||2!==r.type&&!n?0!==r.type&&1!==r.type||!n||yr.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",t):yr.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",t),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas){e.next=10;break}r.type=2,e.next=18;break;case 10:if(0!==r.type&&1!==r.type){e.next=14;break}null==r.gasPrice&&(r.gasPrice=this.getGasPrice()),e.next=18;break;case 14:return e.next=16,this.getFeeData();case 16:i=e.sent,null==r.type?null!=i.maxFeePerGas&&null!=i.maxPriorityFeePerGas?(r.type=2,null!=r.gasPrice?(o=r.gasPrice,delete r.gasPrice,r.maxFeePerGas=o,r.maxPriorityFeePerGas=o):(null==r.maxFeePerGas&&(r.maxFeePerGas=i.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))):null!=i.gasPrice?(n&&yr.throwError("network does not support EIP-1559",er.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=i.gasPrice),r.type=0):yr.throwError("failed to get consistent fee data",er.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"}):2===r.type&&(null==r.maxFeePerGas&&(r.maxFeePerGas=i.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas));case 18:return null==r.nonce&&(r.nonce=this.getTransactionCount("pending")),null==r.gasLimit&&(r.gasLimit=this.estimateGas(r).catch((function(t){if(br.indexOf(t.code)>=0)throw t;return yr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",er.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,tx:r})}))),null==r.chainId?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then((function(e){return 0!==e[1]&&e[0]!==e[1]&&yr.throwArgumentError("chainId address mismatch","transaction",t),e[0]})),e.next=23,ar(r);case 23:return e.abrupt("return",e.sent);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"_checkProvider",value:function(t){this.provider||yr.throwError("missing provider",er.errors.UNSUPPORTED_OPERATION,{operation:t||"_checkProvider"})}}],[{key:"isSigner",value:function(t){return!(!t||!t._isSigner)}}]),t}(),_r=r(85639),xr=r.n(_r),kr=new er("bytes/5.5.0");function Er(t){return!!t.toHexString}function Mr(t){return t.slice||(t.slice=function(){var e=Array.prototype.slice.call(arguments);return Mr(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Ar(t){return Ir(t)&&!(t.length%2)||Rr(t)}function Sr(t){return"number"==typeof t&&t==t&&t%1==0}function Rr(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t)return!1;if(!Sr(t.length)||t.length<0)return!1;for(var e=0;e<t.length;e++){var r=t[e];if(!Sr(r)||r<0||r>=256)return!1}return!0}function Pr(t,e){if(e||(e={}),"number"==typeof t){kr.checkSafeUint53(t,"invalid arrayify value");for(var r=[];t;)r.unshift(255&t),t=parseInt(String(t/256));return 0===r.length&&r.push(0),Mr(new Uint8Array(r))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),Er(t)&&(t=t.toHexString()),Ir(t)){var n=t.substring(2);n.length%2&&("left"===e.hexPad?n="0x0"+n.substring(2):"right"===e.hexPad?n+="0":kr.throwArgumentError("hex data is odd-length","value",t));for(var i=[],o=0;o<n.length;o+=2)i.push(parseInt(n.substring(o,o+2),16));return Mr(new Uint8Array(i))}return Rr(t)?Mr(new Uint8Array(t)):kr.throwArgumentError("invalid arrayify value","value",t)}function Tr(t){var e=t.map((function(t){return Pr(t)})),r=e.reduce((function(t,e){return t+e.length}),0),n=new Uint8Array(r);return e.reduce((function(t,e){return n.set(e,t),t+e.length}),0),Mr(n)}function Or(t){var e=Pr(t);if(0===e.length)return e;for(var r=0;r<e.length&&0===e[r];)r++;return r&&(e=e.slice(r)),e}function Ir(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}var Cr="0123456789abcdef";function Nr(t,e){if(e||(e={}),"number"==typeof t){kr.checkSafeUint53(t,"invalid hexlify value");for(var r="";t;)r=Cr[15&t]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof t)return(t=t.toString(16)).length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),Er(t))return t.toHexString();if(Ir(t))return t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":kr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Rr(t)){for(var n="0x",i=0;i<t.length;i++){var o=t[i];n+=Cr[(240&o)>>4]+Cr[15&o]}return n}return kr.throwArgumentError("invalid hexlify value","value",t)}function Lr(t){if("string"!=typeof t)t=Nr(t);else if(!Ir(t)||t.length%2)return null;return(t.length-2)/2}function Br(t,e,r){return"string"!=typeof t?t=Nr(t):(!Ir(t)||t.length%2)&&kr.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function jr(t){var e="0x";return t.forEach((function(t){e+=Nr(t).substring(2)})),e}function Ur(t){var e=function(t){"string"!=typeof t&&(t=Nr(t));Ir(t)||kr.throwArgumentError("invalid hex string","value",t);t=t.substring(2);var e=0;for(;e<t.length&&"0"===t[e];)e++;return"0x"+t.substring(e)}(Nr(t,{hexPad:"left"}));return"0x"===e?"0x0":e}function Fr(t,e){for("string"!=typeof t?t=Nr(t):Ir(t)||kr.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&kr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function qr(t){var e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(Ar(t)){var r=Pr(t);65!==r.length&&kr.throwArgumentError("invalid signature string; must be 65 bytes","signature",t),e.r=Nr(r.slice(0,32)),e.s=Nr(r.slice(32,64)),e.v=r[64],e.v<27&&(0===e.v||1===e.v?e.v+=27:kr.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=Nr(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){var n=function(t,e){(t=Pr(t)).length>e&&kr.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(e);return r.set(t,e-t.length),Mr(r)}(Pr(e._vs),32);e._vs=Nr(n);var i=n[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=i:e.recoveryParam!==i&&kr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),n[0]&=127;var o=Nr(n);null==e.s?e.s=o:e.s!==o&&kr.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?kr.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{var a=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==a&&kr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&Ir(e.r)?e.r=Fr(e.r,32):kr.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&Ir(e.s)?e.s=Fr(e.s,32):kr.throwArgumentError("signature missing or invalid s","signature",t);var s=Pr(e.s);s[0]>=128&&kr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(s[0]|=128);var u=Nr(s);e._vs&&(Ir(e._vs)||kr.throwArgumentError("signature invalid _vs","signature",t),e._vs=Fr(e._vs,32)),null==e._vs?e._vs=u:e._vs!==u&&kr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e}var Dr=xr().BN,zr=new er("bignumber/5.5.0"),Hr={},Vr=9007199254740991;var Wr=!1,Kr=function(){function t(e,r){$(this,t),zr.checkNew(this instanceof t?this.constructor:void 0,t),e!==Hr&&zr.throwError("cannot call constructor directly; use BigNumber.from",er.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return X(t,[{key:"fromTwos",value:function(t){return Zr(Jr(this).fromTwos(t))}},{key:"toTwos",value:function(t){return Zr(Jr(this).toTwos(t))}},{key:"abs",value:function(){return"-"===this._hex[0]?t.from(this._hex.substring(1)):this}},{key:"add",value:function(t){return Zr(Jr(this).add(Jr(t)))}},{key:"sub",value:function(t){return Zr(Jr(this).sub(Jr(t)))}},{key:"div",value:function(e){return t.from(e).isZero()&&$r("division by zero","div"),Zr(Jr(this).div(Jr(e)))}},{key:"mul",value:function(t){return Zr(Jr(this).mul(Jr(t)))}},{key:"mod",value:function(t){var e=Jr(t);return e.isNeg()&&$r("cannot modulo negative values","mod"),Zr(Jr(this).umod(e))}},{key:"pow",value:function(t){var e=Jr(t);return e.isNeg()&&$r("cannot raise to negative values","pow"),Zr(Jr(this).pow(e))}},{key:"and",value:function(t){var e=Jr(t);return(this.isNegative()||e.isNeg())&&$r("cannot 'and' negative values","and"),Zr(Jr(this).and(e))}},{key:"or",value:function(t){var e=Jr(t);return(this.isNegative()||e.isNeg())&&$r("cannot 'or' negative values","or"),Zr(Jr(this).or(e))}},{key:"xor",value:function(t){var e=Jr(t);return(this.isNegative()||e.isNeg())&&$r("cannot 'xor' negative values","xor"),Zr(Jr(this).xor(e))}},{key:"mask",value:function(t){return(this.isNegative()||t<0)&&$r("cannot mask negative values","mask"),Zr(Jr(this).maskn(t))}},{key:"shl",value:function(t){return(this.isNegative()||t<0)&&$r("cannot shift negative values","shl"),Zr(Jr(this).shln(t))}},{key:"shr",value:function(t){return(this.isNegative()||t<0)&&$r("cannot shift negative values","shr"),Zr(Jr(this).shrn(t))}},{key:"eq",value:function(t){return Jr(this).eq(Jr(t))}},{key:"lt",value:function(t){return Jr(this).lt(Jr(t))}},{key:"lte",value:function(t){return Jr(this).lte(Jr(t))}},{key:"gt",value:function(t){return Jr(this).gt(Jr(t))}},{key:"gte",value:function(t){return Jr(this).gte(Jr(t))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return Jr(this).isZero()}},{key:"toNumber",value:function(){try{return Jr(this).toNumber()}catch(t){$r("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(t){}return zr.throwError("this platform does not support BigInt",er.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?Wr||(Wr=!0,zr.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?zr.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",er.errors.UNEXPECTED_ARGUMENT,{}):zr.throwError("BigNumber.toString does not accept parameters",er.errors.UNEXPECTED_ARGUMENT,{})),Jr(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(t){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(e){if(e instanceof t)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new t(Hr,Gr(e)):e.match(/^-?[0-9]+$/)?new t(Hr,Gr(new Dr(e))):zr.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&$r("underflow","BigNumber.from",e),(e>=Vr||e<=-Vr)&&$r("overflow","BigNumber.from",e),t.from(String(e));var r=e;if("bigint"==typeof r)return t.from(r.toString());if(Rr(r))return t.from(Nr(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"==typeof n)return t.from(n)}else{var i=r._hex;if(null==i&&"BigNumber"===r.type&&(i=r.hex),"string"==typeof i&&(Ir(i)||"-"===i[0]&&Ir(i.substring(1))))return t.from(i)}return zr.throwArgumentError("invalid BigNumber value","value",e)}},{key:"isBigNumber",value:function(t){return!(!t||!t._isBigNumber)}}]),t}();function Gr(t){if("string"!=typeof t)return Gr(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&zr.throwArgumentError("invalid hex","value",t),"0x00"===(t=Gr(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function Zr(t){return Kr.from(Gr(t))}function Jr(t){var e=Kr.from(t).toHexString();return"-"===e[0]?new Dr("-"+e.substring(3),16):new Dr(e.substring(2),16)}function $r(t,e,r){var n={fault:t,operation:e};return null!=r&&(n.value=r),zr.throwError(t,er.errors.NUMERIC_FAULT,n)}function Yr(t){return"0x"+wt().keccak_256(Pr(t))}var Xr=new er("rlp/5.5.0");function Qr(t){for(var e=[];t;)e.unshift(255&t),t>>=8;return e}function tn(t,e,r){for(var n=0,i=0;i<r;i++)n=256*n+t[e+i];return n}function en(t){if(Array.isArray(t)){var e=[];if(t.forEach((function(t){e=e.concat(en(t))})),e.length<=55)return e.unshift(192+e.length),e;var r=Qr(e.length);return r.unshift(247+r.length),r.concat(e)}Ar(t)||Xr.throwArgumentError("RLP object must be BytesLike","object",t);var n=Array.prototype.slice.call(Pr(t));if(1===n.length&&n[0]<=127)return n;if(n.length<=55)return n.unshift(128+n.length),n;var i=Qr(n.length);return i.unshift(183+i.length),i.concat(n)}function rn(t){return Nr(en(t))}function nn(t,e,r,n){for(var i=[];r<e+1+n;){var o=on(t,r);i.push(o.result),(r+=o.consumed)>e+1+n&&Xr.throwError("child data too short",er.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function on(t,e){if(0===t.length&&Xr.throwError("data too short",er.errors.BUFFER_OVERRUN,{}),t[e]>=248){var r=t[e]-247;e+1+r>t.length&&Xr.throwError("data short segment too short",er.errors.BUFFER_OVERRUN,{});var n=tn(t,e+1,r);return e+1+r+n>t.length&&Xr.throwError("data long segment too short",er.errors.BUFFER_OVERRUN,{}),nn(t,e,e+1+r,r+n)}if(t[e]>=192){var i=t[e]-192;return e+1+i>t.length&&Xr.throwError("data array too short",er.errors.BUFFER_OVERRUN,{}),nn(t,e,e+1,i)}if(t[e]>=184){var o=t[e]-183;e+1+o>t.length&&Xr.throwError("data array too short",er.errors.BUFFER_OVERRUN,{});var a=tn(t,e+1,o);return e+1+o+a>t.length&&Xr.throwError("data array too short",er.errors.BUFFER_OVERRUN,{}),{consumed:1+o+a,result:Nr(t.slice(e+1+o,e+1+o+a))}}if(t[e]>=128){var s=t[e]-128;return e+1+s>t.length&&Xr.throwError("data too short",er.errors.BUFFER_OVERRUN,{}),{consumed:1+s,result:Nr(t.slice(e+1,e+1+s))}}return{consumed:1,result:Nr(t[e])}}function an(t){var e=Pr(t),r=on(e,0);return r.consumed!==e.length&&Xr.throwArgumentError("invalid rlp data","data",t),r.result}var sn=new er("address/5.5.0");function un(t){Ir(t,20)||sn.throwArgumentError("invalid address","address",t);for(var e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=e[n].charCodeAt(0);for(var i=Pr(Yr(r)),o=0;o<40;o+=2)i[o>>1]>>4>=8&&(e[o]=e[o].toUpperCase()),(15&i[o>>1])>=8&&(e[o+1]=e[o+1].toUpperCase());return"0x"+e.join("")}for(var cn={},fn=0;fn<10;fn++)cn[String(fn)]=String(fn);for(var ln=0;ln<26;ln++)cn[String.fromCharCode(65+ln)]=String(10+ln);var hn,dn=Math.floor((hn=9007199254740991,Math.log10?Math.log10(hn):Math.log(hn)/Math.LN10));function pn(t){for(var e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map((function(t){return cn[t]})).join("");e.length>=dn;){var r=e.substring(0,dn);e=parseInt(r,10)%97+e.substring(r.length)}for(var n=String(98-parseInt(e,10)%97);n.length<2;)n="0"+n;return n}function vn(t){var e,r=null;if("string"!=typeof t&&sn.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),r=un(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&r!==t&&sn.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==pn(t)&&sn.throwArgumentError("bad icap checksum","address",t),e=t.substring(4),r=new Dr(e,36).toString(16);r.length<40;)r="0"+r;r=un("0x"+r)}else sn.throwArgumentError("invalid address","address",t);return r}var mn,yn,gn="hash/5.5.0",bn=new er("strings/5.5.0");function wn(t,e,r,n,i){if(t===yn.BAD_PREFIX||t===yn.UNEXPECTED_CONTINUE){for(var o=0,a=e+1;a<r.length&&r[a]>>6==2;a++)o++;return o}return t===yn.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(mn||(mn={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(yn||(yn={}));var _n=Object.freeze({error:function(t,e,r,n,i){return bn.throwArgumentError("invalid codepoint at offset ".concat(e,"; ").concat(t),"bytes",r)},ignore:wn,replace:function(t,e,r,n,i){return t===yn.OVERLONG?(n.push(i),0):(n.push(65533),wn(t,e,r))}});function xn(t,e){null==e&&(e=_n.error),t=Pr(t);for(var r=[],n=0;n<t.length;){var i=t[n++];if(i>>7!=0){var o=null,a=null;if(192==(224&i))o=1,a=127;else if(224==(240&i))o=2,a=2047;else{if(240!=(248&i)){n+=e(128==(192&i)?yn.UNEXPECTED_CONTINUE:yn.BAD_PREFIX,n-1,t,r);continue}o=3,a=65535}if(n-1+o>=t.length)n+=e(yn.OVERRUN,n-1,t,r);else{for(var s=i&(1<<8-o-1)-1,u=0;u<o;u++){var c=t[n];if(128!=(192&c)){n+=e(yn.MISSING_CONTINUE,n,t,r),s=null;break}s=s<<6|63&c,n++}null!==s&&(s>1114111?n+=e(yn.OUT_OF_RANGE,n-1-o,t,r,s):s>=55296&&s<=57343?n+=e(yn.UTF16_SURROGATE,n-1-o,t,r,s):s<=a?n+=e(yn.OVERLONG,n-1-o,t,r,s):r.push(s))}}else r.push(i)}return r}function kn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mn.current;e!=mn.current&&(bn.checkNormalize(),t=t.normalize(e));for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);if(i<128)r.push(i);else if(i<2048)r.push(i>>6|192),r.push(63&i|128);else if(55296==(64512&i)){n++;var o=t.charCodeAt(n);if(n>=t.length||56320!=(64512&o))throw new Error("invalid utf-8 string");var a=65536+((1023&i)<<10)+(1023&o);r.push(a>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(63&a|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(63&i|128)}return Pr(r)}function En(t){return t.map((function(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t)))})).join("")}function Mn(t,e){return En(xn(t,e))}function An(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mn.current;return xn(kn(t,e))}function Sn(t){return Yr(kn(t))}var Rn=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Pn=new er(gn),Tn=new Uint8Array(32);Tn.fill(0);var On=Kr.from(-1),In=Kr.from(0),Cn=Kr.from(1),Nn=Kr.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Ln=Fr(Cn.toHexString(),32),Bn=Fr(In.toHexString(),32),jn={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Un=["name","version","chainId","verifyingContract","salt"];function Fn(t){return function(e){return"string"!=typeof e&&Pn.throwArgumentError("invalid domain value for ".concat(JSON.stringify(t)),"domain.".concat(t),e),e}}var qn={name:Fn("name"),version:Fn("version"),chainId:function(t){try{return Kr.from(t).toString()}catch(e){}return Pn.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return vn(t).toLowerCase()}catch(e){}return Pn.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{var e=Pr(t);if(32!==e.length)throw new Error("bad length");return Nr(e)}catch(r){}return Pn.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Dn(t){var e=t.match(/^(u?)int(\d*)$/);if(e){var r=""===e[1],n=parseInt(e[2]||"256");(n%8!=0||n>256||e[2]&&e[2]!==String(n))&&Pn.throwArgumentError("invalid numeric width","type",t);var i=Nn.mask(r?n-1:n),o=r?i.add(Cn).mul(On):In;return function(e){var r=Kr.from(e);return(r.lt(o)||r.gt(i))&&Pn.throwArgumentError("value out-of-bounds for ".concat(t),"value",e),Fr(r.toTwos(256).toHexString(),32)}}var a=t.match(/^bytes(\d+)$/);if(a){var s=parseInt(a[1]);return(0===s||s>32||a[1]!==String(s))&&Pn.throwArgumentError("invalid bytes width","type",t),function(e){return Pr(e).length!==s&&Pn.throwArgumentError("invalid length for ".concat(t),"value",e),function(t){var e=Pr(t),r=e.length%32;return r?jr([e,Tn.slice(r)]):Nr(e)}(e)}}switch(t){case"address":return function(t){return Fr(vn(t),32)};case"bool":return function(t){return t?Ln:Bn};case"bytes":return function(t){return Yr(t)};case"string":return function(t){return Sn(t)}}return null}function zn(t,e){return"".concat(t,"(").concat(e.map((function(t){var e=t.name;return t.type+" "+e})).join(","),")")}var Hn=function(){function t(e){$(this,t),ir(this,"types",Object.freeze(lr(e))),ir(this,"_encoderCache",{}),ir(this,"_types",{});var r={},n={},i={};Object.keys(e).forEach((function(t){r[t]={},n[t]=[],i[t]={}}));var o=function(t){var i={};e[t].forEach((function(o){i[o.name]&&Pn.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(t)),"types",e),i[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===t&&Pn.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",e),Dn(a)||(n[a]||Pn.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",e),n[a].push(t),r[t][a]=!0)}))};for(var a in e)o(a);var s=Object.keys(n).filter((function(t){return 0===n[t].length}));for(var u in 0===s.length?Pn.throwArgumentError("missing primary type","types",e):s.length>1&&Pn.throwArgumentError("ambiguous primary types or unused types: ".concat(s.map((function(t){return JSON.stringify(t)})).join(", ")),"types",e),ir(this,"primaryType",s[0]),function t(o,a){a[o]&&Pn.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",e),a[o]=!0,Object.keys(r[o]).forEach((function(e){n[e]&&(t(e,a),Object.keys(a).forEach((function(t){i[t][e]=!0})))})),delete a[o]}(this.primaryType,{}),i){var c=Object.keys(i[u]);c.sort(),this._types[u]=zn(u,e[u])+c.map((function(t){return zn(t,e[t])})).join("")}}return X(t,[{key:"getEncoder",value:function(t){var e=this._encoderCache[t];return e||(e=this._encoderCache[t]=this._getEncoder(t)),e}},{key:"_getEncoder",value:function(t){var e=this,r=Dn(t);if(r)return r;var n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var i=n[1],o=this.getEncoder(i),a=parseInt(n[3]);return function(t){a>=0&&t.length!==a&&Pn.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);var r=t.map(o);return e._types[i]&&(r=r.map(Yr)),Yr(jr(r))}}var s=this.types[t];if(s){var u=Sn(this._types[t]);return function(t){var r=s.map((function(r){var n=r.name,i=r.type,o=e.getEncoder(i)(t[n]);return e._types[i]?Yr(o):o}));return r.unshift(u),jr(r)}}return Pn.throwArgumentError("unknown type: ".concat(t),"type",t)}},{key:"encodeType",value:function(t){var e=this._types[t];return e||Pn.throwArgumentError("unknown type: ".concat(JSON.stringify(t)),"name",t),e}},{key:"encodeData",value:function(t,e){return this.getEncoder(t)(e)}},{key:"hashStruct",value:function(t,e){return Yr(this.encodeData(t,e))}},{key:"encode",value:function(t){return this.encodeData(this.primaryType,t)}},{key:"hash",value:function(t){return this.hashStruct(this.primaryType,t)}},{key:"_visit",value:function(t,e,r){var n=this;if(Dn(t))return r(t,e);var i=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&e.length!==a&&Pn.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e),e.map((function(t){return n._visit(o,t,r)}))}var s=this.types[t];return s?s.reduce((function(t,i){var o=i.name,a=i.type;return t[o]=n._visit(a,e[o],r),t}),{}):Pn.throwArgumentError("unknown type: ".concat(t),"type",t)}},{key:"visit",value:function(t,e){return this._visit(this.primaryType,t,e)}}],[{key:"from",value:function(e){return new t(e)}},{key:"getPrimaryType",value:function(e){return t.from(e).primaryType}},{key:"hashStruct",value:function(e,r,n){return t.from(r).hashStruct(e,n)}},{key:"hashDomain",value:function(e){var r=[];for(var n in e){var i=jn[n];i||Pn.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",e),r.push({name:n,type:i})}return r.sort((function(t,e){return Un.indexOf(t.name)-Un.indexOf(e.name)})),t.hashStruct("EIP712Domain",{EIP712Domain:r},e)}},{key:"encode",value:function(e,r,n){return jr(["0x1901",t.hashDomain(e),t.from(r).hash(n)])}},{key:"hash",value:function(e,r,n){return Yr(t.encode(e,r,n))}},{key:"resolveNames",value:function(e,r,n,i){return Rn(this,void 0,void 0,at().mark((function o(){var a,s,u;return at().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:e=sr(e),a={},e.verifyingContract&&!Ir(e.verifyingContract,20)&&(a[e.verifyingContract]="0x"),(s=t.from(r)).visit(n,(function(t,e){return"address"!==t||Ir(e,20)||(a[e]="0x"),e})),o.t0=at().keys(a);case 6:if((o.t1=o.t0()).done){o.next=13;break}return u=o.t1.value,o.next=10,i(u);case 10:a[u]=o.sent,o.next=6;break;case 13:return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=s.visit(n,(function(t,e){return"address"===t&&a[e]?a[e]:e})),o.abrupt("return",{domain:e,value:n});case 16:case"end":return o.stop()}}),o)})))}},{key:"getPayload",value:function(e,r,n){t.hashDomain(e);var i={},o=[];Un.forEach((function(t){var r=e[t];null!=r&&(i[t]=qn[t](r),o.push({name:t,type:jn[t]}))}));var a=t.from(r),s=sr(r);return s.EIP712Domain?Pn.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):s.EIP712Domain=o,a.encode(n),{types:s,domain:i,primaryType:a.primaryType,message:a.visit(n,(function(t,e){if(t.match(/^bytes(\d*)/))return Nr(Pr(e));if(t.match(/^u?int/))return Kr.from(e).toString();switch(t){case"address":return e.toLowerCase();case"bool":return!!e;case"string":return"string"!=typeof e&&Pn.throwArgumentError("invalid string","value",e),e}return Pn.throwArgumentError("unsupported type","type",t)}))}}}]),t}(),Vn=Kr.from(0),Wn=(r(65743),r(28721)),Kn=r.n(Wn);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;function Gn(t,e,r){return r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},t(r,r.exports),r.exports}var Zn=Jn;function Jn(t,e){if(!t)throw new Error(e||"Assertion failed")}Jn.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)};var $n=Gn((function(t,e){var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}})),Yn=Gn((function(t,e){var r=e;r.assert=Zn,r.toArray=$n.toArray,r.zero2=$n.zero2,r.toHex=$n.toHex,r.encode=$n.encode,r.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,o=t.clone(),a=0;a<n.length;a++){var s,u=o.andln(i-1);o.isOdd()?(s=u>(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var a,s,u=t.andln(3)+i&3,c=e.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0==(1&u)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0==(1&c)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},r.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new(xr())(t,"hex","le")}})),Xn=Yn.getNAF,Qn=Yn.getJSF,ti=Yn.assert;function ei(t,e){this.type=t,this.p=new(xr())(e.p,16),this.red=e.prime?xr().red(e.prime):xr().mont(this.p),this.zero=new(xr())(0).toRed(this.red),this.one=new(xr())(1).toRed(this.red),this.two=new(xr())(2).toRed(this.red),this.n=e.n&&new(xr())(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.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 ri=ei;function ni(t,e){this.curve=t,this.type=e,this.precomputed=null}ei.prototype.point=function(){throw new Error("Not implemented")},ei.prototype.validate=function(){throw new Error("Not implemented")},ei.prototype._fixedNafMul=function(t,e){ti(t.precomputed);var r=t._getDoubles(),n=Xn(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var o,a,s=[];for(o=0;o<n.length;o+=r.step){a=0;for(var u=o+r.step-1;u>=o;u--)a=(a<<1)+n[u];s.push(a)}for(var c=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=i;l>0;l--){for(o=0;o<s.length;o++)(a=s[o])===l?f=f.mixedAdd(r.points[o]):a===-l&&(f=f.mixedAdd(r.points[o].neg()));c=c.add(f)}return c.toP()},ei.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=Xn(e,r,this._bitLength),a=this.jpoint(null,null,null),s=o.length-1;s>=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=o[s];ti(0!==c),a="affine"===t.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===t.type?a.toP():a},ei.prototype._wnafMulAdd=function(t,e,r,n,i){var o,a,s,u=this._wnafT1,c=this._wnafT2,f=this._wnafT3,l=0;for(o=0;o<n;o++){var h=(s=e[o])._getNAFPoints(t);u[o]=h.wnd,c[o]=h.points}for(o=n-1;o>=1;o-=2){var d=o-1,p=o;if(1===u[d]&&1===u[p]){var v=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(v[1]=e[d].add(e[p]),v[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(v[1]=e[d].toJ().mixedAdd(e[p]),v[2]=e[d].add(e[p].neg())):(v[1]=e[d].toJ().mixedAdd(e[p]),v[2]=e[d].toJ().mixedAdd(e[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],y=Qn(r[d],r[p]);for(l=Math.max(y[0].length,l),f[d]=new Array(l),f[p]=new Array(l),a=0;a<l;a++){var g=0|y[0][a],b=0|y[1][a];f[d][a]=m[3*(g+1)+(b+1)],f[p][a]=0,c[d]=v}}else f[d]=Xn(r[d],u[d],this._bitLength),f[p]=Xn(r[p],u[p],this._bitLength),l=Math.max(f[d].length,l),l=Math.max(f[p].length,l)}var w=this.jpoint(null,null,null),_=this._wnafT4;for(o=l;o>=0;o--){for(var x=0;o>=0;){var k=!0;for(a=0;a<n;a++)_[a]=0|f[a][o],0!==_[a]&&(k=!1);if(!k)break;x++,o--}if(o>=0&&x++,w=w.dblp(x),o<0)break;for(a=0;a<n;a++){var E=_[a];0!==E&&(E>0?s=c[a][E-1>>1]:E<0&&(s=c[a][-E-1>>1].neg()),w="affine"===s.type?w.mixedAdd(s):w.add(s))}}for(o=0;o<n;o++)c[o]=null;return i?w:w.toP()},ei.BasePoint=ni,ni.prototype.eq=function(){throw new Error("Not implemented")},ni.prototype.validate=function(){return this.curve.validate(this)},ei.prototype.decodePoint=function(t,e){t=Yn.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?ti(t[t.length-1]%2==0):7===t[0]&&ti(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},ni.prototype.encodeCompressed=function(t){return this.encode(t,!0)},ni.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},ni.prototype.encode=function(t,e){return Yn.encode(this._encode(e),t)},ni.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},ni.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},ni.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},ni.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},ni.prototype._getBeta=function(){return null},ni.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e};var ii=Gn((function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}})),oi=Yn.assert;function ai(t){ri.call(this,"short",t),this.a=new(xr())(t.a,16).toRed(this.red),this.b=new(xr())(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}ii(ai,ri);var si=ai;function ui(t,e,r,n){ri.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new(xr())(e,16),this.y=new(xr())(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 ci(t,e,r,n){ri.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new(xr())(0)):(this.x=new(xr())(e,16),this.y=new(xr())(r,16),this.z=new(xr())(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}ai.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new(xr())(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new(xr())(t.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?r=i[0]:(r=i[1],oi(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new(xr())(t.a,16),b:new(xr())(t.b,16)}})):this._getEndoBasis(r)}}},ai.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:xr().mont(t),r=new(xr())(2).toRed(e).redInvm(),n=r.redNeg(),i=new(xr())(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},ai.prototype._getEndoBasis=function(t){for(var e,r,n,i,o,a,s,u,c,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,h=this.n.clone(),d=new(xr())(1),p=new(xr())(0),v=new(xr())(0),m=new(xr())(1),y=0;0!==l.cmpn(0);){var g=h.div(l);u=h.sub(g.mul(l)),c=v.sub(g.mul(d));var b=m.sub(g.mul(p));if(!n&&u.cmp(f)<0)e=s.neg(),r=d,n=u.neg(),i=c;else if(n&&2==++y)break;s=u,h=l,l=u,v=d,d=c,m=p,p=b}o=u.neg(),a=c;var w=n.sqr().add(i.sqr());return o.sqr().add(a.sqr()).cmp(w)>=0&&(o=e,a=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:n,b:i},{a:o,b:a}]},ai.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:t.sub(a).sub(s),k2:u.add(c).neg()}},ai.prototype.pointFromX=function(t,e){(t=new(xr())(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(t,n)},ai.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},ai.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var a=this._endoSplit(e[o]),s=t[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*o]=s,n[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),f=0;f<2*o;f++)n[f]=null,i[f]=null;return c},ii(ui,ri.BasePoint),ai.prototype.point=function(t,e,r){return new ui(this,t,e,r)},ai.prototype.pointFromJSON=function(t,e){return ui.fromJSON(this,t,e)},ui.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},ui.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},ui.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},ui.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},ui.prototype.isInfinity=function(){return this.inf},ui.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},ui.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},ui.prototype.getX=function(){return this.x.fromRed()},ui.prototype.getY=function(){return this.y.fromRed()},ui.prototype.mul=function(t){return t=new(xr())(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},ui.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},ui.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},ui.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},ui.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},ui.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},ii(ci,ri.BasePoint),ai.prototype.jpoint=function(t,e,r){return new ci(this,t,e,r)},ci.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},ci.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},ci.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(h,d,p)},ci.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},ci.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(e=0;e<t;e++){var f=o.redSqr(),l=c.redSqr(),h=l.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(u)),p=o.redMul(l),v=d.redSqr().redISub(p.redAdd(p)),m=p.redISub(v),y=d.redMul(m);y=y.redIAdd(y).redISub(h);var g=c.redMul(s);e+1<t&&(u=u.redMul(h)),o=v,s=g,c=y}return this.curve.jpoint(o,c.redMul(i),s)},ci.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},ci.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=u,e=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),h=l.redSqr(),d=this.x.redAdd(l).redSqr().redISub(f).redISub(h);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),v=p.redSqr(),m=h.redIAdd(h);m=(m=m.redIAdd(m)).redIAdd(m),t=v.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},ci.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);t=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),h=this.x.redMul(l),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=h.redIAdd(h),v=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(v),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var m=l.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),e=d.redMul(p.redISub(t)).redISub(m)}return this.curve.jpoint(t,e,r)},ci.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),c=(u=u.redIAdd(u)).redMul(a),f=s.redSqr().redISub(c.redAdd(c)),l=c.redISub(f),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=s.redMul(l).redISub(h),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,d,p)},ci.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),a=this.x.redAdd(e).redSqr().redISub(t).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),f=e.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(s).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(s)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(l,h,d)},ci.prototype.mul=function(t,e){return t=new(xr())(t,e),this.curve._wnafMul(this,t)},ci.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},ci.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},ci.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},ci.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var fi=Gn((function(t,e){var r=e;r.base=ri,r.short=si,r.mont=null,r.edwards=null})),li=Gn((function(t,e){var r,n=e,i=Yn.assert;function o(t){"short"===t.type?this.curve=new fi.short(t):"edwards"===t.type?this.curve=new fi.edwards(t):this.curve=new fi.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new o(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,a("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:Kn().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:Kn().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:Kn().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:Kn().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"]}),a("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:Kn().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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Kn().sha256,gRed:!1,g:["9"]}),a("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:Kn().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(s){r=void 0}a("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:Kn().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function hi(t){if(!(this instanceof hi))return new hi(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=$n.toArray(t.entropy,t.entropyEnc||"hex"),r=$n.toArray(t.nonce,t.nonceEnc||"hex"),n=$n.toArray(t.pers,t.persEnc||"hex");Zn(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var di=hi;hi.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},hi.prototype._hmac=function(){return new(Kn().hmac)(this.hash,this.K)},hi.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},hi.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=$n.toArray(t,e),r=$n.toArray(r,n),Zn(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},hi.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=$n.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<t;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,t);return this._update(r),this._reseed++,$n.encode(o,e)};var pi=Yn.assert;function vi(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var mi=vi;vi.fromPublic=function(t,e,r){return e instanceof vi?e:new vi(t,{pub:e,pubEnc:r})},vi.fromPrivate=function(t,e,r){return e instanceof vi?e:new vi(t,{priv:e,privEnc:r})},vi.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},vi.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},vi.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},vi.prototype._importPrivate=function(t,e){this.priv=new(xr())(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},vi.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?pi(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||pi(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},vi.prototype.derive=function(t){return t.validate()||pi(t.validate(),"public point not validated"),t.mul(this.priv).getX()},vi.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},vi.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},vi.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var yi=Yn.assert;function gi(t,e){if(t instanceof gi)return t;this._importDER(t,e)||(yi(t.r&&t.s,"Signature without r or s"),this.r=new(xr())(t.r,16),this.s=new(xr())(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var bi=gi;function wi(){this.place=0}function _i(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=e.place;o<n;o++,a++)i<<=8,i|=t[a],i>>>=0;return!(i<=127)&&(e.place=a,i)}function xi(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function ki(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}gi.prototype._importDER=function(t,e){t=Yn.toArray(t,e);var r=new wi;if(48!==t[r.place++])return!1;var n=_i(t,r);if(!1===n)return!1;if(n+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var i=_i(t,r);if(!1===i)return!1;var o=t.slice(r.place,i+r.place);if(r.place+=i,2!==t[r.place++])return!1;var a=_i(t,r);if(!1===a)return!1;if(t.length!==a+r.place)return!1;var s=t.slice(r.place,a+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new(xr())(o),this.s=new(xr())(s),this.recoveryParam=null,!0},gi.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=xi(e),r=xi(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];ki(n,e.length),(n=n.concat(e)).push(2),ki(n,r.length);var i=n.concat(r),o=[48];return ki(o,i.length),o=o.concat(i),Yn.encode(o,t)};var Ei=function(){throw new Error("unsupported")},Mi=Yn.assert;function Ai(t){if(!(this instanceof Ai))return new Ai(t);"string"==typeof t&&(Mi(Object.prototype.hasOwnProperty.call(li,t),"Unknown curve "+t),t=li[t]),t instanceof li.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var Si=Ai;Ai.prototype.keyPair=function(t){return new mi(this,t)},Ai.prototype.keyFromPrivate=function(t,e){return mi.fromPrivate(this,t,e)},Ai.prototype.keyFromPublic=function(t,e){return mi.fromPublic(this,t,e)},Ai.prototype.genKeyPair=function(t){t||(t={});for(var e=new di({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||Ei(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(xr())(2));;){var i=new(xr())(e.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},Ai.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},Ai.prototype.sign=function(t,e,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new(xr())(t,16));for(var i=this.n.byteLength(),o=e.getPrivate().toArray("be",i),a=t.toArray("be",i),s=new di({hash:this.hash,entropy:o,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),u=this.n.sub(new(xr())(1)),c=0;;c++){var f=n.k?n.k(c):new(xr())(s.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(u)>=0)){var l=this.g.mul(f);if(!l.isInfinity()){var h=l.getX(),d=h.umod(this.n);if(0!==d.cmpn(0)){var p=f.invm(this.n).mul(d.mul(e.getPrivate()).iadd(t));if(0!==(p=p.umod(this.n)).cmpn(0)){var v=(l.getY().isOdd()?1:0)|(0!==h.cmp(d)?2:0);return n.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),v^=1),new bi({r:d,s:p,recoveryParam:v})}}}}}},Ai.prototype.verify=function(t,e,r,n){t=this._truncateToN(new(xr())(t,16)),r=this.keyFromPublic(r,n);var i=(e=new bi(e,"hex")).r,o=e.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,s=o.invm(this.n),u=s.mul(t).umod(this.n),c=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)},Ai.prototype.recoverPubKey=function(t,e,r,n){Mi((3&r)===r,"The recovery param is more than two bits"),e=new bi(e,n);var i=this.n,o=new(xr())(t),a=e.r,s=e.s,u=1&r,c=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");a=c?this.curve.pointFromX(a.add(this.curve.n),u):this.curve.pointFromX(a,u);var f=e.r.invm(i),l=i.sub(o).mul(f).umod(i),h=s.mul(f).umod(i);return this.g.mulAdd(l,a,h)},Ai.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new bi(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var Ri=Gn((function(t,e){var r=e;r.version="6.5.4",r.utils=Yn,r.rand=function(){throw new Error("unsupported")},r.curve=fi,r.curves=li,r.ec=Si,r.eddsa=null})).ec,Pi=new er("signing-key/5.5.0"),Ti=null;function Oi(){return Ti||(Ti=new Ri("secp256k1")),Ti}var Ii=function(){function t(e){$(this,t),ir(this,"curve","secp256k1"),ir(this,"privateKey",Nr(e));var r=Oi().keyFromPrivate(Pr(this.privateKey));ir(this,"publicKey","0x"+r.getPublic(!1,"hex")),ir(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),ir(this,"_isSigningKey",!0)}return X(t,[{key:"_addPoint",value:function(t){var e=Oi().keyFromPublic(Pr(this.publicKey)),r=Oi().keyFromPublic(Pr(t));return"0x"+e.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(t){var e=Oi().keyFromPrivate(Pr(this.privateKey)),r=Pr(t);32!==r.length&&Pi.throwArgumentError("bad digest length","digest",t);var n=e.sign(r,{canonical:!0});return qr({recoveryParam:n.recoveryParam,r:Fr("0x"+n.r.toString(16),32),s:Fr("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(t){var e=Oi().keyFromPrivate(Pr(this.privateKey)),r=Oi().keyFromPublic(Pr(Ci(t)));return Fr("0x"+e.derive(r.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(t){return!(!t||!t._isSigningKey)}}]),t}();function Ci(t,e){var r=Pr(t);if(32===r.length){var n=new Ii(r);return e?"0x"+Oi().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}return 33===r.length?e?Nr(r):"0x"+Oi().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?e?"0x"+Oi().keyFromPublic(r).getPublic(!0,"hex"):Nr(r):Pi.throwArgumentError("invalid public or private key","key","[REDACTED]")}var Ni,Li=new er("transactions/5.5.0");function Bi(t){return"0x"===t?null:vn(t)}function ji(t){return"0x"===t?Vn:Kr.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(Ni||(Ni={}));function Ui(t,e){return function(t){return vn(Br(Yr(Br(Ci(t),1)),12))}(function(t,e){var r=qr(e),n={r:Pr(r.r),s:Pr(r.s)};return"0x"+Oi().recoverPubKey(Pr(t),n,r.recoveryParam).encode("hex",!1)}(Pr(t),e))}function Fi(t,e){var r=Or(Kr.from(t).toHexString());return r.length>32&&Li.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function qi(t,e){return{address:vn(t),storageKeys:(e||[]).map((function(e,r){return 32!==Lr(e)&&Li.throwArgumentError("invalid access list storageKey","accessList[".concat(t,":").concat(r,"]"),e),e.toLowerCase()}))}}function Di(t){if(Array.isArray(t))return t.map((function(t,e){return Array.isArray(t)?(t.length>2&&Li.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(e,"]"),t),qi(t[0],t[1])):qi(t.address,t.storageKeys)}));var e=Object.keys(t).map((function(e){var r=t[e].reduce((function(t,e){return t[e]=!0,t}),{});return qi(e,Object.keys(r).sort())}));return e.sort((function(t,e){return t.address.localeCompare(e.address)})),e}function zi(t){return Di(t).map((function(t){return[t.address,t.storageKeys]}))}function Hi(t,e){if(null!=t.gasPrice){var r=Kr.from(t.gasPrice),n=Kr.from(t.maxFeePerGas||0);r.eq(n)||Li.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var i=[Fi(t.chainId||0,"chainId"),Fi(t.nonce||0,"nonce"),Fi(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Fi(t.maxFeePerGas||0,"maxFeePerGas"),Fi(t.gasLimit||0,"gasLimit"),null!=t.to?vn(t.to):"0x",Fi(t.value||0,"value"),t.data||"0x",zi(t.accessList||[])];if(e){var o=qr(e);i.push(Fi(o.recoveryParam,"recoveryParam")),i.push(Or(o.r)),i.push(Or(o.s))}return jr(["0x02",rn(i)])}function Vi(t,e){var r=[Fi(t.chainId||0,"chainId"),Fi(t.nonce||0,"nonce"),Fi(t.gasPrice||0,"gasPrice"),Fi(t.gasLimit||0,"gasLimit"),null!=t.to?vn(t.to):"0x",Fi(t.value||0,"value"),t.data||"0x",zi(t.accessList||[])];if(e){var n=qr(e);r.push(Fi(n.recoveryParam,"recoveryParam")),r.push(Or(n.r)),r.push(Or(n.s))}return jr(["0x01",rn(r)])}function Wi(t,e,r){try{var n=ji(e[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");t.v=n}catch(o){Li.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Fr(e[1],32),t.s=Fr(e[2],32);try{var i=Yr(r(t));t.from=Ui(i,{r:t.r,s:t.s,recoveryParam:t.v})}catch(o){console.log(o)}}function Ki(t){var e=Pr(t);if(e[0]>127)return function(t){var e=an(t);9!==e.length&&6!==e.length&&Li.throwArgumentError("invalid raw transaction","rawTransaction",t);var r={nonce:ji(e[0]).toNumber(),gasPrice:ji(e[1]),gasLimit:ji(e[2]),to:Bi(e[3]),value:ji(e[4]),data:e[5],chainId:0};if(6===e.length)return r;try{r.v=Kr.from(e[6]).toNumber()}catch(a){return console.log(a),r}if(r.r=Fr(e[7],32),r.s=Fr(e[8],32),Kr.from(r.r).isZero()&&Kr.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);var n=r.v-27,i=e.slice(0,6);0!==r.chainId&&(i.push(Nr(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);var o=Yr(rn(i));try{r.from=Ui(o,{r:Nr(r.r),s:Nr(r.s),recoveryParam:n})}catch(a){console.log(a)}r.hash=Yr(t)}return r.type=null,r}(e);switch(e[0]){case 1:return function(t){var e=an(t.slice(1));8!==e.length&&11!==e.length&&Li.throwArgumentError("invalid component count for transaction type: 1","payload",Nr(t));var r={type:1,chainId:ji(e[0]).toNumber(),nonce:ji(e[1]).toNumber(),gasPrice:ji(e[2]),gasLimit:ji(e[3]),to:Bi(e[4]),value:ji(e[5]),data:e[6],accessList:Di(e[7])};return 8===e.length||(r.hash=Yr(t),Wi(r,e.slice(8),Vi)),r}(e);case 2:return function(t){var e=an(t.slice(1));9!==e.length&&12!==e.length&&Li.throwArgumentError("invalid component count for transaction type: 2","payload",Nr(t));var r=ji(e[2]),n=ji(e[3]),i={type:2,chainId:ji(e[0]).toNumber(),nonce:ji(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:ji(e[4]),to:Bi(e[5]),value:ji(e[6]),data:e[7],accessList:Di(e[8])};return 9===e.length||(i.hash=Yr(t),Wi(i,e.slice(9),Hi)),i}(e)}return Li.throwError("unsupported transaction type: ".concat(e[0]),er.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}function Gi(t){t=atob(t);for(var e=[],r=0;r<t.length;r++)e.push(t.charCodeAt(r));return Pr(e)}function Zi(t){t=Pr(t);for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}var Ji=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))};function $i(t,e){return Ji(this,void 0,void 0,at().mark((function r(){var n,i,o,a;return at().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==e&&(e={}),n={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0},!0!==e.skipFetchSetup&&(n.mode="cors",n.cache="no-cache",n.credentials="same-origin",n.redirect="follow",n.referrer="client"),r.next=6,fetch(t,n);case 6:return i=r.sent,r.next=9,i.arrayBuffer();case 9:return o=r.sent,a={},i.headers.forEach?i.headers.forEach((function(t,e){a[e.toLowerCase()]=t})):i.headers.keys().forEach((function(t){a[t.toLowerCase()]=i.headers.get(t)})),r.abrupt("return",{headers:a,statusCode:i.status,statusMessage:i.statusText,body:Pr(new Uint8Array(o))});case 13:case"end":return r.stop()}}),r)})))}var Yi=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Xi=new er("web/5.5.1");function Qi(t){return new Promise((function(e){setTimeout(e,t)}))}function to(t,e){if(null==t)return null;if("string"==typeof t)return t;if(Ar(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return Mn(t)}catch(r){}return Nr(t)}return t}function eo(t,e,r){var n=null;if(null!=e){n=kn(e);var i="string"==typeof t?{url:t}:sr(t);if(i.headers)0!==Object.keys(i.headers).filter((function(t){return"content-type"===t.toLowerCase()})).length||(i.headers=sr(i.headers),i.headers["content-type"]="application/json");else i.headers={"content-type":"application/json"};t=i}return function(t,e,r){var n="object"==typeof t&&null!=t.throttleLimit?t.throttleLimit:12;Xi.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);var i="object"==typeof t?t.throttleCallback:null,o="object"==typeof t&&"number"==typeof t.throttleSlotInterval?t.throttleSlotInterval:100;Xi.assertArgument(o>0&&o%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);var a={},s=null,u={method:"GET"},c=!1,f=12e4;if("string"==typeof t)s=t;else if("object"==typeof t){if(null!=t&&null!=t.url||Xi.throwArgumentError("missing URL","connection.url",t),s=t.url,"number"==typeof t.timeout&&t.timeout>0&&(f=t.timeout),t.headers)for(var l in t.headers)a[l.toLowerCase()]={key:l,value:String(t.headers[l])},["if-none-match","if-modified-since"].indexOf(l.toLowerCase())>=0&&(c=!0);if(u.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==s.substring(0,6)&&!0!==t.allowInsecureAuthentication&&Xi.throwError("basic authentication requires a secure https url",er.errors.INVALID_ARGUMENT,{argument:"url",url:s,user:t.user,password:"[REDACTED]"});var h=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+Zi(kn(h))}}}var d=new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$","i"),p=s?s.match(d):null;if(p)try{var v={statusCode:200,statusMessage:"OK",headers:{"content-type":p[1]},body:Gi(p[2])},m=v.body;return r&&(m=r(v.body,v)),Promise.resolve(m)}catch(w){Xi.throwError("processing response error",er.errors.SERVER_ERROR,{body:to(p[1],p[2]),error:w,requestBody:null,requestMethod:"GET",url:s})}e&&(u.method="POST",u.body=e,null==a["content-type"]&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==a["content-length"]&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));var y={};Object.keys(a).forEach((function(t){var e=a[t];y[e.key]=e.value})),u.headers=y;var g=function(){var t=null;return{promise:new Promise((function(e,r){f&&(t=setTimeout((function(){null!=t&&(t=null,r(Xi.makeError("timeout",er.errors.TIMEOUT,{requestBody:to(u.body,y["content-type"]),requestMethod:u.method,timeout:f,url:s})))}),f))})),cancel:function(){null!=t&&(clearTimeout(t),t=null)}}}(),b=function(){return Yi(this,void 0,void 0,at().mark((function t(){var e,a,f,l,h,d,p,v,m,b;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=0;case 1:if(!(e<n)){t.next=65;break}return a=null,t.prev=3,t.next=6,$i(s,u);case 6:if(a=t.sent,!(e<n)){t.next=28;break}if(301!==a.statusCode&&302!==a.statusCode){t.next=15;break}if(f=a.headers.location||"","GET"!==u.method||!f.match(/^https:/)){t.next=13;break}return s=a.headers.location,t.abrupt("continue",62);case 13:t.next=28;break;case 15:if(429!==a.statusCode){t.next=28;break}if(l=!0,!i){t.next=21;break}return t.next=20,i(e,s);case 20:l=t.sent;case 21:if(!l){t.next=28;break}return h=0,d=a.headers["retry-after"],h="string"==typeof d&&d.match(/^[1-9][0-9]*$/)?1e3*parseInt(d):o*parseInt(String(Math.random()*Math.pow(2,e))),t.next=27,Qi(h);case 27:return t.abrupt("continue",62);case 28:t.next=34;break;case 30:t.prev=30,t.t0=t.catch(3),null==(a=t.t0.response)&&(g.cancel(),Xi.throwError("missing response",er.errors.SERVER_ERROR,{requestBody:to(u.body,y["content-type"]),requestMethod:u.method,serverError:t.t0,url:s}));case 34:if(p=a.body,c&&304===a.statusCode?p=null:(a.statusCode<200||a.statusCode>=300)&&(g.cancel(),Xi.throwError("bad response",er.errors.SERVER_ERROR,{status:a.statusCode,headers:a.headers,body:to(p,a.headers?a.headers["content-type"]:null),requestBody:to(u.body,y["content-type"]),requestMethod:u.method,url:s})),!r){t.next=60;break}return t.prev=37,t.next=40,r(p,a);case 40:return v=t.sent,g.cancel(),t.abrupt("return",v);case 45:if(t.prev=45,t.t1=t.catch(37),!(t.t1.throttleRetry&&e<n)){t.next=58;break}if(m=!0,!i){t.next=53;break}return t.next=52,i(e,s);case 52:m=t.sent;case 53:if(!m){t.next=58;break}return b=o*parseInt(String(Math.random()*Math.pow(2,e))),t.next=57,Qi(b);case 57:return t.abrupt("continue",62);case 58:g.cancel(),Xi.throwError("processing response error",er.errors.SERVER_ERROR,{body:to(p,a.headers?a.headers["content-type"]:null),error:t.t1,requestBody:to(u.body,y["content-type"]),requestMethod:u.method,url:s});case 60:return g.cancel(),t.abrupt("return",p);case 62:e++,t.next=1;break;case 65:return t.abrupt("return",Xi.throwError("failed response",er.errors.SERVER_ERROR,{requestBody:to(u.body,y["content-type"]),requestMethod:u.method,url:s}));case 66:case"end":return t.stop()}}),t,null,[[3,30],[37,45]])})))}();return Promise.race([g.promise,b])}(t,n,(function(t,e){var n=null;if(null!=t)try{n=JSON.parse(Mn(t))}catch(i){Xi.throwError("invalid JSON",er.errors.SERVER_ERROR,{body:t,error:i})}return r&&(n=r(n,e)),n}))}function ro(t,e){return e||(e={}),null==(e=sr(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){var i=null,o=!1,a=function(){return!o&&(o=!0,i&&clearTimeout(i),!0)};e.timeout&&(i=setTimeout((function(){a()&&n(new Error("timeout"))}),e.timeout));var s=e.retryLimit,u=0;!function i(){return t().then((function(t){if(void 0!==t)a()&&r(t);else if(e.oncePoll)e.oncePoll.once("poll",i);else if(e.onceBlock)e.onceBlock.once("block",i);else if(!o){if(++u>s)return void(a()&&n(new Error("retry limit reached")));var c=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));c<e.floor&&(c=e.floor),c>e.ceiling&&(c=e.ceiling),setTimeout(i,c)}return null}),(function(t){a()&&n(t)}))}()}))}function no(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=it(t);if(e){var i=it(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nt(this,r)}}var io=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},oo=new er("abstract-provider/5.5.1"),ao=function(t){tt(r,t);var e=no(r);function r(){return $(this,r),e.apply(this,arguments)}return X(r,null,[{key:"isForkEvent",value:function(t){return!(!t||!t._isForkEvent)}}]),r}(hr),so=function(){function t(){$(this,t),oo.checkAbstract(this instanceof t?this.constructor:void 0,t),ir(this,"_isProvider",!0)}return X(t,[{key:"getFeeData",value:function(){return io(this,void 0,void 0,at().mark((function t(){var e,r,n,i,o;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ar({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((function(t){return null}))});case 2:return e=t.sent,r=e.block,n=e.gasPrice,i=null,o=null,r&&r.baseFeePerGas&&(o=Kr.from("2500000000"),i=r.baseFeePerGas.mul(2).add(o)),t.abrupt("return",{maxFeePerGas:i,maxPriorityFeePerGas:o,gasPrice:n});case 8:case"end":return t.stop()}}),t,this)})))}},{key:"addListener",value:function(t,e){return this.on(t,e)}},{key:"removeListener",value:function(t,e){return this.off(t,e)}}],[{key:"isProvider",value:function(t){return!(!t||!t._isProvider)}}]),t}(),uo=function(){function t(e){$(this,t),ir(this,"alphabet",e),ir(this,"base",e.length),ir(this,"_alphabetMap",{}),ir(this,"_leader",e.charAt(0));for(var r=0;r<e.length;r++)this._alphabetMap[e.charAt(r)]=r}return X(t,[{key:"encode",value:function(t){var e=Pr(t);if(0===e.length)return"";for(var r=[0],n=0;n<e.length;++n){for(var i=e[n],o=0;o<r.length;++o)i+=r[o]<<8,r[o]=i%this.base,i=i/this.base|0;for(;i>0;)r.push(i%this.base),i=i/this.base|0}for(var a="",s=0;0===e[s]&&s<e.length-1;++s)a+=this._leader;for(var u=r.length-1;u>=0;--u)a+=this.alphabet[r[u]];return a}},{key:"decode",value:function(t){if("string"!=typeof t)throw new TypeError("Expected String");var e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(var r=0;r<t.length;r++){var n=this._alphabetMap[t[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");for(var i=n,o=0;o<e.length;++o)i+=e[o]*this.base,e[o]=255&i,i>>=8;for(;i>0;)e.push(255&i),i>>=8}for(var a=0;t[a]===this._leader&&a<t.length-1;++a)e.push(0);return Pr(new Uint8Array(e.reverse()))}}]),t}(),co=(new uo("abcdefghijklmnopqrstuvwxyz234567"),new uo("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"));function fo(t,e){e||(e=function(t){return[parseInt(t,16)]});var r=0,n={};return t.split(",").forEach((function(t){var i=t.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])})),n}function lo(t){var e=0;return t.split(",").map((function(t){var r=t.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:e+parseInt(r[0],16),h:e=parseInt(r[1],16)}}))}function ho(t,e){for(var r=0,n=0;n<e.length;n++){var i=e[n];if(t>=(r+=i.l)&&t<=r+i.h&&(t-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(t-r))continue;return i}}return null}var po=lo("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),vo="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(t){return parseInt(t,16)})),mo=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],yo=fo("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),go=fo("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),bo=fo("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(t){if(t.length%4!=0)throw new Error("bad data");for(var e=[],r=0;r<t.length;r+=4)e.push(parseInt(t.substring(r,r+4),16));return e})),wo=lo("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function _o(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();var e,r=An(t);e=r.map((function(t){if(vo.indexOf(t)>=0)return[];if(t>=65024&&t<=65039)return[];var e=function(t){var e=ho(t,mo);if(e)return[t+e.s];var r=yo[t];if(r)return r;var n=go[t];return n?[t+n[0]]:bo[t]||null}(t);return e||[t]})),r=e.reduce((function(t,e){return e.forEach((function(e){t.push(e)})),t}),[]),(r=An(En(r),mn.NFKC)).forEach((function(t){if(ho(t,wo))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(t){if(ho(t,po))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var n=En(r);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");if(n.length>63)throw new Error("too long");return n}var xo=new er(gn),ko=new Uint8Array(32);ko.fill(0);var Eo=new RegExp("^((.*)\\.)?([^.]+)$");function Mo(t){"string"!=typeof t&&xo.throwArgumentError("invalid ENS name; not a string","name",t);for(var e=t,r=ko;e.length;){var n=e.match(Eo);null!=n&&""!==n[2]||xo.throwArgumentError("invalid ENS address; missing component","name",t),r=Yr(Tr([r,Yr(kn(_o(n[3])))])),e=n[2]||""}return Nr(r)}var Ao=new er("networks/5.5.2");function So(t){var e=function(e,r){null==r&&(r={});var n=[];if(e.InfuraProvider)try{n.push(new e.InfuraProvider(t,r.infura))}catch(a){}if(e.EtherscanProvider)try{n.push(new e.EtherscanProvider(t,r.etherscan))}catch(a){}if(e.AlchemyProvider)try{n.push(new e.AlchemyProvider(t,r.alchemy))}catch(a){}if(e.PocketProvider){try{var i=new e.PocketProvider(t);i.network&&-1===["goerli","ropsten","rinkeby"].indexOf(i.network.name)&&n.push(i)}catch(a){}}if(e.CloudflareProvider)try{n.push(new e.CloudflareProvider(t))}catch(a){}if(0===n.length)return null;if(e.FallbackProvider){var o=1;return null!=r.quorum?o=r.quorum:"homestead"===t&&(o=2),new e.FallbackProvider(n,o)}return n[0]};return e.renetwork=function(t){return So(t)},e}function Ro(t,e){var r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(t,e):null};return r.renetwork=function(e){return Ro(t,e)},r}var Po={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:So("homestead")},To={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:So("ropsten")},Oo={chainId:63,name:"classicMordor",_defaultProvider:Ro("https://www.ethercluster.com/mordor","classicMordor")},Io={unspecified:{chainId:0,name:"unspecified"},homestead:Po,mainnet:Po,morden:{chainId:2,name:"morden"},ropsten:To,testnet:To,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:So("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:So("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:So("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},classic:{chainId:61,name:"classic",_defaultProvider:Ro("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Oo,classicTestnet:Oo,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Ro("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic"},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism"},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};new er("sha2/5.5.0");function Co(t){return"0x"+Kn().sha256().update(Pr(t)).digest("hex")}var No=r(15246),Lo=r.n(No),Bo=new er(dr),jo=function(){function t(){$(this,t),Bo.checkNew(this instanceof t?this.constructor:void 0,t),this.formats=this.getDefaultFormats()}return X(t,[{key:"getDefaultFormats",value:function(){var e=this,r={},n=this.address.bind(this),i=this.bigNumber.bind(this),o=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),u=this.hex.bind(this),c=this.number.bind(this),f=this.type.bind(this);return r.transaction={hash:s,type:f,accessList:t.allowNull(this.accessList.bind(this),null),blockHash:t.allowNull(s,null),blockNumber:t.allowNull(c,null),transactionIndex:t.allowNull(c,null),confirmations:t.allowNull(c,null),from:n,gasPrice:t.allowNull(i),maxPriorityFeePerGas:t.allowNull(i),maxFeePerGas:t.allowNull(i),gasLimit:i,to:t.allowNull(n,null),value:i,nonce:c,data:a,r:t.allowNull(this.uint256),s:t.allowNull(this.uint256),v:t.allowNull(c),creates:t.allowNull(n,null),raw:t.allowNull(a)},r.transactionRequest={from:t.allowNull(n),nonce:t.allowNull(c),gasLimit:t.allowNull(i),gasPrice:t.allowNull(i),maxPriorityFeePerGas:t.allowNull(i),maxFeePerGas:t.allowNull(i),to:t.allowNull(n),value:t.allowNull(i),data:t.allowNull((function(t){return e.data(t,!0)})),type:t.allowNull(c),accessList:t.allowNull(this.accessList.bind(this),null)},r.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:s,address:n,topics:t.arrayOf(s),data:a,logIndex:c,blockHash:s},r.receipt={to:t.allowNull(this.address,null),from:t.allowNull(this.address,null),contractAddress:t.allowNull(n,null),transactionIndex:c,root:t.allowNull(u),gasUsed:i,logsBloom:t.allowNull(a),blockHash:s,transactionHash:s,logs:t.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:t.allowNull(c,null),cumulativeGasUsed:i,effectiveGasPrice:t.allowNull(i),status:t.allowNull(c),type:f},r.block={hash:s,parentHash:s,number:c,timestamp:c,nonce:t.allowNull(u),difficulty:this.difficulty.bind(this),gasLimit:i,gasUsed:i,miner:n,extraData:a,transactions:t.allowNull(t.arrayOf(s)),baseFeePerGas:t.allowNull(i)},r.blockWithTransactions=sr(r.block),r.blockWithTransactions.transactions=t.allowNull(t.arrayOf(this.transactionResponse.bind(this))),r.filter={fromBlock:t.allowNull(o,void 0),toBlock:t.allowNull(o,void 0),blockHash:t.allowNull(s,void 0),address:t.allowNull(n,void 0),topics:t.allowNull(this.topics.bind(this),void 0)},r.filterLog={blockNumber:t.allowNull(c),blockHash:t.allowNull(s),transactionIndex:c,removed:t.allowNull(this.boolean.bind(this)),address:n,data:t.allowFalsish(a,"0x"),topics:t.arrayOf(s),transactionHash:s,logIndex:c},r}},{key:"accessList",value:function(t){return Di(t||[])}},{key:"number",value:function(t){return"0x"===t?0:Kr.from(t).toNumber()}},{key:"type",value:function(t){return"0x"===t||null==t?0:Kr.from(t).toNumber()}},{key:"bigNumber",value:function(t){return Kr.from(t)}},{key:"boolean",value:function(t){if("boolean"==typeof t)return t;if("string"==typeof t){if("true"===(t=t.toLowerCase()))return!0;if("false"===t)return!1}throw new Error("invalid boolean - "+t)}},{key:"hex",value:function(t,e){return"string"==typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),Ir(t))?t.toLowerCase():Bo.throwArgumentError("invalid hash","value",t)}},{key:"data",value:function(t,e){var r=this.hex(t,e);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+t);return r}},{key:"address",value:function(t){return vn(t)}},{key:"callAddress",value:function(t){if(!Ir(t,32))return null;var e=vn(Br(t,12));return"0x0000000000000000000000000000000000000000"===e?null:e}},{key:"contractAddress",value:function(t){return function(t){var e=null;try{e=vn(t.from)}catch(r){sn.throwArgumentError("missing from address","transaction",t)}return vn(Br(Yr(rn([e,Or(Pr(Kr.from(t.nonce).toHexString()))])),12))}(t)}},{key:"blockTag",value:function(t){if(null==t)return"latest";if("earliest"===t)return"0x0";if("latest"===t||"pending"===t)return t;if("number"==typeof t||Ir(t))return Ur(t);throw new Error("invalid blockTag")}},{key:"hash",value:function(t,e){var r=this.hex(t,e);return 32!==Lr(r)?Bo.throwArgumentError("invalid hash","value",t):r}},{key:"difficulty",value:function(t){if(null==t)return null;var e=Kr.from(t);try{return e.toNumber()}catch(r){}return null}},{key:"uint256",value:function(t){if(!Ir(t))throw new Error("invalid uint256");return Fr(t,32)}},{key:"_block",value:function(e,r){null!=e.author&&null==e.miner&&(e.miner=e.author);var n=null!=e._difficulty?e._difficulty:e.difficulty,i=t.check(r,e);return i._difficulty=null==n?null:Kr.from(n),i}},{key:"block",value:function(t){return this._block(t,this.formats.block)}},{key:"blockWithTransactions",value:function(t){return this._block(t,this.formats.blockWithTransactions)}},{key:"transactionRequest",value:function(e){return t.check(this.formats.transactionRequest,e)}},{key:"transactionResponse",value:function(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&Kr.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);var r=t.check(this.formats.transaction,e);if(null!=e.chainId){var n=e.chainId;Ir(n)&&(n=Kr.from(n).toNumber()),r.chainId=n}else{var i=e.networkId;null==i&&null==r.v&&(i=e.chainId),Ir(i)&&(i=Kr.from(i).toNumber()),"number"!=typeof i&&null!=r.v&&((i=(r.v-35)/2)<0&&(i=0),i=parseInt(i)),"number"!=typeof i&&(i=0),r.chainId=i}return r.blockHash&&"x"===r.blockHash.replace(/0/g,"")&&(r.blockHash=null),r}},{key:"transaction",value:function(t){return Ki(t)}},{key:"receiptLog",value:function(e){return t.check(this.formats.receiptLog,e)}},{key:"receipt",value:function(e){var r=t.check(this.formats.receipt,e);if(null!=r.root)if(r.root.length<=4){var n=Kr.from(r.root).toNumber();0===n||1===n?(null!=r.status&&r.status!==n&&Bo.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):Bo.throwArgumentError("invalid alt-root-status","value.root",r.root)}else 66!==r.root.length&&Bo.throwArgumentError("invalid root hash","value.root",r.root);return null!=r.status&&(r.byzantium=!0),r}},{key:"topics",value:function(t){var e=this;return Array.isArray(t)?t.map((function(t){return e.topics(t)})):null!=t?this.hash(t,!0):null}},{key:"filter",value:function(e){return t.check(this.formats.filter,e)}},{key:"filterLog",value:function(e){return t.check(this.formats.filterLog,e)}}],[{key:"check",value:function(t,e){var r={};for(var n in t)try{var i=t[n](e[n]);void 0!==i&&(r[n]=i)}catch(o){throw o.checkKey=n,o.checkValue=e[n],o}return r}},{key:"allowNull",value:function(t,e){return function(r){return null==r?e:t(r)}}},{key:"allowFalsish",value:function(t,e){return function(r){return r?t(r):e}}},{key:"arrayOf",value:function(t){return function(e){if(!Array.isArray(e))throw new Error("not an array");var r=[];return e.forEach((function(e){r.push(t(e))})),r}}}]),t}();function Uo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=it(t);if(e){var i=it(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nt(this,r)}}var Fo=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},qo=new er(dr);function Do(t){return null==t?"null":(32!==Lr(t)&&qo.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function zo(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map((function(t){if(Array.isArray(t)){var e={};t.forEach((function(t){e[Do(t)]=!0}));var r=Object.keys(e);return r.sort(),r.join("|")}return Do(t)})).join("&")}function Ho(t){if("string"==typeof t){if(32===Lr(t=t.toLowerCase()))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+zo(t);if(ao.isForkEvent(t))throw qo.warn("not implemented"),new Error("not implemented");if(t&&"object"==typeof t)return"filter:"+(t.address||"*")+":"+zo(t.topics||[])}throw new Error("invalid event - "+t)}function Vo(){return(new Date).getTime()}function Wo(t){return new Promise((function(e){setTimeout(e,t)}))}var Ko=["block","network","pending","poll"],Go=function(){function t(e,r,n){$(this,t),ir(this,"tag",e),ir(this,"listener",r),ir(this,"once",n)}return X(t,[{key:"event",get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}},{key:"type",get:function(){return this.tag.split(":")[0]}},{key:"hash",get:function(){var t=this.tag.split(":");return"tx"!==t[0]?null:t[1]}},{key:"filter",get:function(){var t=this.tag.split(":");if("filter"!==t[0])return null;var e,r=t[1],n=""===(e=t[2])?[]:e.split(/&/g).map((function(t){if(""===t)return[];var e=t.split("|").map((function(t){return"null"===t?null:t}));return 1===e.length?e[0]:e})),i={};return n.length>0&&(i.topics=n),r&&"*"!==r&&(i.address=r),i}},{key:"pollable",value:function(){return this.tag.indexOf(":")>=0||Ko.indexOf(this.tag)>=0}}]),t}(),Zo={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Jo(t){return Fr(Kr.from(t).toHexString(),32)}function $o(t){return co.encode(Tr([t,Br(Co(Co(t)),0,4)]))}var Yo=new RegExp("^(ipfs)://(.*)$","i"),Xo=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Yo,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Qo(t){try{return Mn(ta(t))}catch(e){}return null}function ta(t){if("0x"===t)return null;var e=Kr.from(Br(t,0,32)).toNumber(),r=Kr.from(Br(t,e,e+32)).toNumber();return Br(t,e+32,e+32+r)}function ea(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):qo.throwArgumentError("unsupported IPFS format","link",t),"https://gateway.ipfs.io/ipfs/".concat(t)}var ra=function(){function t(e,r,n,i){$(this,t),ir(this,"provider",e),ir(this,"name",n),ir(this,"address",e.formatter.address(r)),ir(this,"_resolvedAddress",i)}return X(t,[{key:"_fetchBytes",value:function(t,e){return Fo(this,void 0,void 0,at().mark((function r(){var n;return at().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n={to:this.address,data:jr([t,Mo(this.name),e||"0x"])},r.prev=1,r.t0=ta,r.next=5,this.provider.call(n);case 5:return r.t1=r.sent,r.abrupt("return",(0,r.t0)(r.t1));case 9:if(r.prev=9,r.t2=r.catch(1),r.t2.code!==er.errors.CALL_EXCEPTION){r.next=13;break}return r.abrupt("return",null);case 13:return r.abrupt("return",null);case 14:case"end":return r.stop()}}),r,this,[[1,9]])})))}},{key:"_getAddress",value:function(t,e){var r=Zo[String(t)];if(null==r&&qo.throwError("unsupported coin type: ".concat(t),er.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(t,")")}),"eth"===r.ilk)return this.provider.formatter.address(e);var n=Pr(e);if(null!=r.p2pkh){var i=e.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){var o=parseInt(i[1],16);if(i[2].length===2*o&&o>=1&&o<=75)return $o(Tr([[r.p2pkh],"0x"+i[2]]))}}if(null!=r.p2sh){var a=e.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){var s=parseInt(a[1],16);if(a[2].length===2*s&&s>=1&&s<=75)return $o(Tr([[r.p2sh],"0x"+a[2]]))}}if(null!=r.prefix){var u=n[1],c=n[0];if(0===c?20!==u&&32!==u&&(c=-1):c=-1,c>=0&&n.length===2+u&&u>=1&&u<=75){var f=Lo().toWords(n.slice(2));return f.unshift(c),Lo().encode(r.prefix,f)}}return null}},{key:"getAddress",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n,i,o;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t&&(t=60),60!==t){e.next=17;break}return e.prev=2,r={to:this.address,data:"0x3b3b57de"+Mo(this.name).substring(2)},e.next=6,this.provider.call(r);case 6:if("0x"!==(n=e.sent)&&"0x0000000000000000000000000000000000000000000000000000000000000000"!==n){e.next=9;break}return e.abrupt("return",null);case 9:return e.abrupt("return",this.provider.formatter.callAddress(n));case 12:if(e.prev=12,e.t0=e.catch(2),e.t0.code!==er.errors.CALL_EXCEPTION){e.next=16;break}return e.abrupt("return",null);case 16:throw e.t0;case 17:return e.next=19,this._fetchBytes("0xf1cb7e06",Jo(t));case 19:if(null!=(i=e.sent)&&"0x"!==i){e.next=22;break}return e.abrupt("return",null);case 22:return null==(o=this._getAddress(t,i))&&qo.throwError("invalid or unsupported coin data",er.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(t,")"),coinType:t,data:i}),e.abrupt("return",o);case 25:case"end":return e.stop()}}),e,this,[[2,12]])})))}},{key:"getAvatar",value:function(){return Fo(this,void 0,void 0,at().mark((function t(){var e,r,n,i,o,a,s,u,c,f,l,h,d,p,v,m;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[{type:"name",content:this.name}],t.prev=1,t.next=4,this.getText("avatar");case 4:if(null!=(r=t.sent)){t.next=7;break}return t.abrupt("return",null);case 7:n=0;case 8:if(!(n<Xo.length)){t.next=91;break}if(null!=(i=r.match(Xo[n]))){t.next=12;break}return t.abrupt("continue",88);case 12:o=i[1].toLowerCase(),t.t0=o,t.next="https"===t.t0?16:"data"===t.t0?18:"ipfs"===t.t0?20:"erc721"===t.t0||"erc1155"===t.t0?22:88;break;case 16:return e.push({type:"url",content:r}),t.abrupt("return",{linkage:e,url:r});case 18:return e.push({type:"data",content:r}),t.abrupt("return",{linkage:e,url:r});case 20:return e.push({type:"ipfs",content:r}),t.abrupt("return",{linkage:e,url:ea(r)});case 22:if(a="erc721"===o?"0xc87b56dd":"0x0e89341c",e.push({type:o,content:r}),t.t1=this._resolvedAddress,t.t1){t.next=29;break}return t.next=28,this.getAddress();case 28:t.t1=t.sent;case 29:if(s=t.t1,2===(u=(i[2]||"").split("/")).length){t.next=33;break}return t.abrupt("return",null);case 33:return t.next=35,this.provider.formatter.address(u[0]);case 35:if(c=t.sent,f=Fr(Kr.from(u[1]).toHexString(),32),"erc721"!==o){t.next=48;break}return t.t2=this.provider.formatter,t.next=41,this.provider.call({to:c,data:jr(["0x6352211e",f])});case 41:if(t.t3=t.sent,l=t.t2.callAddress.call(t.t2,t.t3),s===l){t.next=45;break}return t.abrupt("return",null);case 45:e.push({type:"owner",content:l}),t.next=57;break;case 48:if("erc1155"!==o){t.next=57;break}return t.t4=Kr,t.next=52,this.provider.call({to:c,data:jr(["0x00fdd58e",Fr(s,32),f])});case 52:if(t.t5=t.sent,!(h=t.t4.from.call(t.t4,t.t5)).isZero()){t.next=56;break}return t.abrupt("return",null);case 56:e.push({type:"balance",content:h.toString()});case 57:return d={to:this.provider.formatter.address(u[0]),data:jr([a,f])},t.t6=Qo,t.next=61,this.provider.call(d);case 61:if(t.t7=t.sent,null!=(p=(0,t.t6)(t.t7))){t.next=65;break}return t.abrupt("return",null);case 65:return e.push({type:"metadata-url-base",content:p}),"erc1155"===o&&(p=p.replace("{id}",f.substring(2)),e.push({type:"metadata-url-expanded",content:p})),p.match(/^ipfs:/i)&&(p=ea(p)),e.push({type:"metadata-url",content:p}),t.next=71,eo(p);case 71:if(v=t.sent){t.next=74;break}return t.abrupt("return",null);case 74:if(e.push({type:"metadata",content:JSON.stringify(v)}),"string"==typeof(m=v.image)){t.next=78;break}return t.abrupt("return",null);case 78:if(!m.match(/^(https:\/\/|data:)/i)){t.next=81;break}t.next=86;break;case 81:if(null!=m.match(Yo)){t.next=84;break}return t.abrupt("return",null);case 84:e.push({type:"url-ipfs",content:m}),m=ea(m);case 86:return e.push({type:"url",content:m}),t.abrupt("return",{linkage:e,url:m});case 88:n++,t.next=8;break;case 91:t.next=95;break;case 93:t.prev=93,t.t8=t.catch(1);case 95:return t.abrupt("return",null);case 96:case"end":return t.stop()}}),t,this,[[1,93]])})))}},{key:"getContentHash",value:function(){return Fo(this,void 0,void 0,at().mark((function t(){var e,r,n,i;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._fetchBytes("0xbc1c58d1");case 2:if(null!=(e=t.sent)&&"0x"!==e){t.next=5;break}return t.abrupt("return",null);case 5:if(!(r=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/))){t.next=10;break}if(n=parseInt(r[3],16),r[4].length!==2*n){t.next=10;break}return t.abrupt("return","ipfs://"+co.encode("0x"+r[1]));case 10:if(!(i=e.match(/^0xe40101fa011b20([0-9a-f]*)$/))){t.next=14;break}if(64!==i[1].length){t.next=14;break}return t.abrupt("return","bzz://"+i[1]);case 14:return t.abrupt("return",qo.throwError("invalid or unsupported content hash data",er.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e}));case 15:case"end":return t.stop()}}),t,this)})))}},{key:"getText",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=kn(t),(r=Tr([Jo(64),Jo(r.length),r])).length%32!=0&&(r=Tr([r,Fr("0x",32-t.length%32)])),e.next=5,this._fetchBytes("0x59d1d43c",Nr(r));case 5:if(null!=(n=e.sent)&&"0x"!==n){e.next=8;break}return e.abrupt("return",null);case 8:return e.abrupt("return",Mn(n));case 9:case"end":return e.stop()}}),e,this)})))}}]),t}(),na=null,ia=1,oa=function(t){tt(r,t);var e=Uo(r);function r(t){var n;if($(this,r),qo.checkNew(this instanceof r?this.constructor:void 0,so),(n=e.call(this))._events=[],n._emitted={block:-2},n.formatter=(this instanceof r?this.constructor:void 0).getFormatter(),ir(rt(n),"anyNetwork","any"===t),n.anyNetwork&&(t=n.detectNetwork()),t instanceof Promise)n._networkPromise=t,t.catch((function(t){})),n._ready().catch((function(t){}));else{var i=or(this instanceof r?this.constructor:void 0,"getNetwork")(t);i?(ir(rt(n),"_network",i),n.emit("network",i,null)):qo.throwArgumentError("invalid network","network",t)}return n._maxInternalBlockNumber=-1024,n._lastBlockNumber=-2,n._pollingInterval=4e3,n._fastQueryDate=0,n}return X(r,[{key:"_ready",value:function(){return Fo(this,void 0,void 0,at().mark((function t(){var e;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=this._network){t.next=17;break}if(e=null,!this._networkPromise){t.next=11;break}return t.prev=3,t.next=6,this._networkPromise;case 6:e=t.sent,t.next=11;break;case 9:t.prev=9,t.t0=t.catch(3);case 11:if(null!=e){t.next=15;break}return t.next=14,this.detectNetwork();case 14:e=t.sent;case 15:e||qo.throwError("no network detected",er.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:ir(this,"_network",e),this.emit("network",e,null));case 17:return t.abrupt("return",this._network);case 18:case"end":return t.stop()}}),t,this,[[3,9]])})))}},{key:"ready",get:function(){var t=this;return ro((function(){return t._ready().then((function(t){return t}),(function(t){if(t.code!==er.errors.NETWORK_ERROR||"noNetwork"!==t.event)throw t}))}))}},{key:"_getInternalBlockNumber",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n,i,o,a=this;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready();case 2:if(!(t>0)){e.next=20;break}case 3:if(!this._internalBlockNumber){e.next=20;break}return r=this._internalBlockNumber,e.prev=5,e.next=8,r;case 8:if(n=e.sent,!(Vo()-n.respTime<=t)){e.next=11;break}return e.abrupt("return",n.blockNumber);case 11:return e.abrupt("break",20);case 14:if(e.prev=14,e.t0=e.catch(5),this._internalBlockNumber!==r){e.next=18;break}return e.abrupt("break",20);case 18:e.next=3;break;case 20:return i=Vo(),o=ar({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((function(t){return null}),(function(t){return t}))}).then((function(t){var e=t.blockNumber,r=t.networkError;if(r)throw a._internalBlockNumber===o&&(a._internalBlockNumber=null),r;var n=Vo();return(e=Kr.from(e).toNumber())<a._maxInternalBlockNumber&&(e=a._maxInternalBlockNumber),a._maxInternalBlockNumber=e,a._setFastBlockNumber(e),{blockNumber:e,reqTime:i,respTime:n}})),this._internalBlockNumber=o,o.catch((function(t){a._internalBlockNumber===o&&(a._internalBlockNumber=null)})),e.next=26,o;case 26:return e.abrupt("return",e.sent.blockNumber);case 27:case"end":return e.stop()}}),e,this,[[5,14]])})))}},{key:"poll",value:function(){return Fo(this,void 0,void 0,at().mark((function t(){var e,r,n,i,o=this;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=ia++,r=[],n=null,t.prev=3,t.next=6,this._getInternalBlockNumber(100+this.pollingInterval/2);case 6:n=t.sent,t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(3),this.emit("error",t.t0),t.abrupt("return");case 13:if(this._setFastBlockNumber(n),this.emit("poll",e,n),n!==this._lastBlockNumber){t.next=18;break}return this.emit("didPoll",e),t.abrupt("return");case 18:if(-2===this._emitted.block&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)qo.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(n,")")),this.emit("error",qo.makeError("network block skew detected",er.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(i=this._emitted.block+1;i<=n;i++)this.emit("block",i);return this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach((function(t){if("block"!==t){var e=o._emitted[t];"pending"!==e&&n-e>12&&delete o._emitted[t]}}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=n-1),this._events.forEach((function(t){switch(t.type){case"tx":var e=t.hash,i=o.getTransactionReceipt(e).then((function(t){return t&&null!=t.blockNumber?(o._emitted["t:"+e]=t.blockNumber,o.emit(e,t),null):null})).catch((function(t){o.emit("error",t)}));r.push(i);break;case"filter":var a=t.filter;a.fromBlock=o._lastBlockNumber+1,a.toBlock=n;var s=o.getLogs(a).then((function(t){0!==t.length&&t.forEach((function(t){o._emitted["b:"+t.blockHash]=t.blockNumber,o._emitted["t:"+t.transactionHash]=t.blockNumber,o.emit(a,t)}))})).catch((function(t){o.emit("error",t)}));r.push(s)}})),this._lastBlockNumber=n,Promise.all(r).then((function(){o.emit("didPoll",e)})).catch((function(t){o.emit("error",t)})),t.abrupt("return");case 26:case"end":return t.stop()}}),t,this,[[3,9]])})))}},{key:"resetEventsBlock",value:function(t){this._lastBlockNumber=t-1,this.polling&&this.poll()}},{key:"network",get:function(){return this._network}},{key:"detectNetwork",value:function(){return Fo(this,void 0,void 0,at().mark((function t(){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",qo.throwError("provider does not support network detection",er.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"}));case 1:case"end":return t.stop()}}),t)})))}},{key:"getNetwork",value:function(){return Fo(this,void 0,void 0,at().mark((function t(){var e,r,n;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._ready();case 2:return e=t.sent,t.next=5,this.detectNetwork();case 5:if(r=t.sent,e.chainId===r.chainId){t.next=23;break}if(!this.anyNetwork){t.next=20;break}return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),t.next=19,Wo(0);case 19:return t.abrupt("return",this._network);case 20:throw n=qo.makeError("underlying network changed",er.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r}),this.emit("error",n),n;case 23:return t.abrupt("return",e);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"blockNumber",get:function(){var t=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then((function(e){t._setFastBlockNumber(e)}),(function(t){})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}},{key:"polling",get:function(){return null!=this._poller},set:function(t){var e=this;t&&!this._poller?(this._poller=setInterval((function(){e.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((function(){e.poll(),e._bootstrapPoll=setTimeout((function(){e._poller||e.poll(),e._bootstrapPoll=null}),e.pollingInterval)}),0))):!t&&this._poller&&(clearInterval(this._poller),this._poller=null)}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(t){var e=this;if("number"!=typeof t||t<=0||parseInt(String(t))!=t)throw new Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){e.poll()}),this._pollingInterval))}},{key:"_getFastBlockNumber",value:function(){var t=this,e=Vo();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((function(e){return(null==t._fastBlockNumber||e>t._fastBlockNumber)&&(t._fastBlockNumber=e),t._fastBlockNumber}))),this._fastBlockNumberPromise}},{key:"_setFastBlockNumber",value:function(t){null!=this._fastBlockNumber&&t<this._fastBlockNumber||(this._fastQueryDate=Vo(),(null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))}},{key:"waitForTransaction",value:function(t,e,r){return Fo(this,void 0,void 0,at().mark((function n(){return at().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this._waitForTransaction(t,null==e?1:e,r||0,null));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"_waitForTransaction",value:function(t,e,r,n){return Fo(this,void 0,void 0,at().mark((function i(){var o,a=this;return at().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.getTransactionReceipt(t);case 2:if(!(((o=i.sent)?o.confirmations:0)>=e)){i.next=5;break}return i.abrupt("return",o);case 5:return i.abrupt("return",new Promise((function(i,o){var s=[],u=!1,c=function(){return!!u||(u=!0,s.forEach((function(t){t()})),!1)},f=function(t){t.confirmations<e||c()||i(t)};if(a.on(t,f),s.push((function(){a.removeListener(t,f)})),n){var l=n.startBlock,h=null,d=function r(i){return Fo(a,void 0,void 0,at().mark((function a(){var s=this;return at().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!u){a.next=2;break}return a.abrupt("return");case 2:return a.next=4,Wo(1e3);case 4:this.getTransactionCount(n.from).then((function(a){return Fo(s,void 0,void 0,at().mark((function s(){var f,d,p,v,m,y;return at().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!u){s.next=2;break}return s.abrupt("return");case 2:if(!(a<=n.nonce)){s.next=6;break}l=i,s.next=41;break;case 6:return s.next=8,this.getTransaction(t);case 8:if(!(f=s.sent)||null==f.blockNumber){s.next=11;break}return s.abrupt("return");case 11:null==h&&(h=l-3)<n.startBlock&&(h=n.startBlock);case 12:if(!(h<=i)){s.next=41;break}if(!u){s.next=15;break}return s.abrupt("return");case 15:return s.next=17,this.getBlockWithTransactions(h);case 17:d=s.sent,p=0;case 19:if(!(p<d.transactions.length)){s.next=38;break}if((v=d.transactions[p]).hash!==t){s.next=23;break}return s.abrupt("return");case 23:if(v.from!==n.from||v.nonce!==n.nonce){s.next=35;break}if(!u){s.next=26;break}return s.abrupt("return");case 26:return s.next=28,this.waitForTransaction(v.hash,e);case 28:if(m=s.sent,!c()){s.next=31;break}return s.abrupt("return");case 31:return y="replaced",v.data===n.data&&v.to===n.to&&v.value.eq(n.value)?y="repriced":"0x"===v.data&&v.from===v.to&&v.value.isZero()&&(y="cancelled"),o(qo.makeError("transaction was replaced",er.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===y||"cancelled"===y,reason:y,replacement:this._wrapTransaction(v),hash:t,receipt:m})),s.abrupt("return");case 35:p++,s.next=19;break;case 38:h++,s.next=12;break;case 41:if(!u){s.next=43;break}return s.abrupt("return");case 43:this.once("block",r);case 44:case"end":return s.stop()}}),s,this)})))}),(function(t){u||s.once("block",r)}));case 5:case"end":return a.stop()}}),a,this)})))};if(u)return;a.once("block",d),s.push((function(){a.removeListener("block",d)}))}if("number"==typeof r&&r>0){var p=setTimeout((function(){c()||o(qo.makeError("timeout exceeded",er.errors.TIMEOUT,{timeout:r}))}),r);p.unref&&p.unref(),s.push((function(){clearTimeout(p)}))}})));case 6:case"end":return i.stop()}}),i,this)})))}},{key:"getBlockNumber",value:function(){return Fo(this,void 0,void 0,at().mark((function t(){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._getInternalBlockNumber(0));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getGasPrice",value:function(){return Fo(this,void 0,void 0,at().mark((function t(){var e;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,this.perform("getGasPrice",{});case 4:return e=t.sent,t.prev=5,t.abrupt("return",Kr.from(e));case 9:return t.prev=9,t.t0=t.catch(5),t.abrupt("return",qo.throwError("bad result from backend",er.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t.t0}));case 12:case"end":return t.stop()}}),t,this,[[5,9]])})))}},{key:"getBalance",value:function(t,e){return Fo(this,void 0,void 0,at().mark((function r(){var n,i;return at().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,ar({address:this._getAddress(t),blockTag:this._getBlockTag(e)});case 4:return n=r.sent,r.next=7,this.perform("getBalance",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",Kr.from(i));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",qo.throwError("bad result from backend",er.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getTransactionCount",value:function(t,e){return Fo(this,void 0,void 0,at().mark((function r(){var n,i;return at().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,ar({address:this._getAddress(t),blockTag:this._getBlockTag(e)});case 4:return n=r.sent,r.next=7,this.perform("getTransactionCount",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",Kr.from(i).toNumber());case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",qo.throwError("bad result from backend",er.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getCode",value:function(t,e){return Fo(this,void 0,void 0,at().mark((function r(){var n,i;return at().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,ar({address:this._getAddress(t),blockTag:this._getBlockTag(e)});case 4:return n=r.sent,r.next=7,this.perform("getCode",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",Nr(i));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",qo.throwError("bad result from backend",er.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getStorageAt",value:function(t,e,r){return Fo(this,void 0,void 0,at().mark((function n(){var i,o;return at().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,ar({address:this._getAddress(t),blockTag:this._getBlockTag(r),position:Promise.resolve(e).then((function(t){return Ur(t)}))});case 4:return i=n.sent,n.next=7,this.perform("getStorageAt",i);case 7:return o=n.sent,n.prev=8,n.abrupt("return",Nr(o));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",qo.throwError("bad result from backend",er.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"_wrapTransaction",value:function(t,e,r){var n=this;if(null!=e&&32!==Lr(e))throw new Error("invalid response - sendTransaction");var i=t;return null!=e&&t.hash!==e&&qo.throwError("Transaction hash mismatch from Provider.sendTransaction.",er.errors.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:e}),i.wait=function(e,i){return Fo(n,void 0,void 0,at().mark((function n(){var o,a;return at().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==e&&(e=1),null==i&&(i=0),o=void 0,0!==e&&null!=r&&(o={data:t.data,from:t.from,nonce:t.nonce,to:t.to,value:t.value,startBlock:r}),n.next=6,this._waitForTransaction(t.hash,e,i,o);case 6:if(null!=(a=n.sent)||0!==e){n.next=9;break}return n.abrupt("return",null);case 9:return this._emitted["t:"+t.hash]=a.blockNumber,0===a.status&&qo.throwError("transaction failed",er.errors.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t,receipt:a}),n.abrupt("return",a);case 12:case"end":return n.stop()}}),n,this)})))},i}},{key:"sendTransaction",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n,i,o;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,Promise.resolve(t).then((function(t){return Nr(t)}));case 4:return r=e.sent,null==(n=this.formatter.transaction(t)).confirmations&&(n.confirmations=0),e.next=9,this._getInternalBlockNumber(100+2*this.pollingInterval);case 9:return i=e.sent,e.prev=10,e.next=13,this.perform("sendTransaction",{signedTransaction:r});case 13:return o=e.sent,e.abrupt("return",this._wrapTransaction(n,o,i));case 17:throw e.prev=17,e.t0=e.catch(10),e.t0.transaction=n,e.t0.transactionHash=n.hash,e.t0;case 22:case"end":return e.stop()}}),e,this,[[10,17]])})))}},{key:"_getTransactionRequest",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n,i=this;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return r=e.sent,n={},["from","to"].forEach((function(t){null!=r[t]&&(n[t]=Promise.resolve(r[t]).then((function(t){return t?i._getAddress(t):null})))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((function(t){null!=r[t]&&(n[t]=Promise.resolve(r[t]).then((function(t){return t?Kr.from(t):null})))})),["type"].forEach((function(t){null!=r[t]&&(n[t]=Promise.resolve(r[t]).then((function(t){return null!=t?t:null})))})),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach((function(t){null!=r[t]&&(n[t]=Promise.resolve(r[t]).then((function(t){return t?Nr(t):null})))})),e.t0=this.formatter,e.next=12,ar(n);case 12:return e.t1=e.sent,e.abrupt("return",e.t0.transactionRequest.call(e.t0,e.t1));case 14:case"end":return e.stop()}}),e,this)})))}},{key:"_getFilter",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n=this;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return t=e.sent,r={},null!=t.address&&(r.address=this._getAddress(t.address)),["blockHash","topics"].forEach((function(e){null!=t[e]&&(r[e]=t[e])})),["fromBlock","toBlock"].forEach((function(e){null!=t[e]&&(r[e]=n._getBlockTag(t[e]))})),e.t0=this.formatter,e.next=10,ar(r);case 10:return e.t1=e.sent,e.abrupt("return",e.t0.filter.call(e.t0,e.t1));case 12:case"end":return e.stop()}}),e,this)})))}},{key:"call",value:function(t,e){return Fo(this,void 0,void 0,at().mark((function r(){var n,i;return at().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,ar({transaction:this._getTransactionRequest(t),blockTag:this._getBlockTag(e)});case 4:return n=r.sent,r.next=7,this.perform("call",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",Nr(i));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",qo.throwError("bad result from backend",er.errors.SERVER_ERROR,{method:"call",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"estimateGas",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,ar({transaction:this._getTransactionRequest(t)});case 4:return r=e.sent,e.next=7,this.perform("estimateGas",r);case 7:return n=e.sent,e.prev=8,e.abrupt("return",Kr.from(n));case 12:return e.prev=12,e.t0=e.catch(8),e.abrupt("return",qo.throwError("bad result from backend",er.errors.SERVER_ERROR,{method:"estimateGas",params:r,result:n,error:e.t0}));case 15:case"end":return e.stop()}}),e,this,[[8,12]])})))}},{key:"_getAddress",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return"string"!=typeof(t=e.sent)&&qo.throwArgumentError("invalid address or ENS name","name",t),e.next=6,this.resolveName(t);case 6:return null==(r=e.sent)&&qo.throwError("ENS name not configured",er.errors.UNSUPPORTED_OPERATION,{operation:"resolveName(".concat(JSON.stringify(t),")")}),e.abrupt("return",r);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"_getBlock",value:function(t,e){return Fo(this,void 0,void 0,at().mark((function r(){var n,i,o=this;return at().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,t;case 4:if(t=r.sent,n=-128,i={includeTransactions:!!e},!Ir(t,32)){r.next=11;break}i.blockHash=t,r.next=21;break;case 11:return r.prev=11,r.next=14,this._getBlockTag(t);case 14:i.blockTag=r.sent,Ir(i.blockTag)&&(n=parseInt(i.blockTag.substring(2),16)),r.next=21;break;case 18:r.prev=18,r.t0=r.catch(11),qo.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",t);case 21:return r.abrupt("return",ro((function(){return Fo(o,void 0,void 0,at().mark((function t(){var r,o,a,s,u,c,f=this;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.perform("getBlock",i);case 2:if(null!=(r=t.sent)){t.next=11;break}if(null==i.blockHash){t.next=7;break}if(null!=this._emitted["b:"+i.blockHash]){t.next=7;break}return t.abrupt("return",null);case 7:if(null==i.blockTag){t.next=10;break}if(!(n>this._emitted.block)){t.next=10;break}return t.abrupt("return",null);case 10:return t.abrupt("return",void 0);case 11:if(!e){t.next=34;break}o=null,a=0;case 14:if(!(a<r.transactions.length)){t.next=31;break}if(null!=(s=r.transactions[a]).blockNumber){t.next=20;break}s.confirmations=0,t.next=28;break;case 20:if(null!=s.confirmations){t.next=28;break}if(null!=o){t.next=25;break}return t.next=24,this._getInternalBlockNumber(100+2*this.pollingInterval);case 24:o=t.sent;case 25:(u=o-s.blockNumber+1)<=0&&(u=1),s.confirmations=u;case 28:a++,t.next=14;break;case 31:return(c=this.formatter.blockWithTransactions(r)).transactions=c.transactions.map((function(t){return f._wrapTransaction(t)})),t.abrupt("return",c);case 34:return t.abrupt("return",this.formatter.block(r));case 35:case"end":return t.stop()}}),t,this)})))}),{oncePoll:this}));case 22:case"end":return r.stop()}}),r,this,[[11,18]])})))}},{key:"getBlock",value:function(t){return this._getBlock(t,!1)}},{key:"getBlockWithTransactions",value:function(t){return this._getBlock(t,!0)}},{key:"getTransaction",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n=this;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,t;case 4:return t=e.sent,r={transactionHash:this.formatter.hash(t,!0)},e.abrupt("return",ro((function(){return Fo(n,void 0,void 0,at().mark((function e(){var n,i,o,a;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.perform("getTransaction",r);case 2:if(null!=(n=e.sent)){e.next=7;break}if(null!=this._emitted["t:"+t]){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",void 0);case 7:if(null!=(i=this.formatter.transactionResponse(n)).blockNumber){e.next=12;break}i.confirmations=0,e.next=19;break;case 12:if(null!=i.confirmations){e.next=19;break}return e.next=15,this._getInternalBlockNumber(100+2*this.pollingInterval);case 15:o=e.sent,(a=o-i.blockNumber+1)<=0&&(a=1),i.confirmations=a;case 19:return e.abrupt("return",this._wrapTransaction(i));case 20:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this}));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"getTransactionReceipt",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n=this;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,t;case 4:return t=e.sent,r={transactionHash:this.formatter.hash(t,!0)},e.abrupt("return",ro((function(){return Fo(n,void 0,void 0,at().mark((function e(){var n,i,o,a;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.perform("getTransactionReceipt",r);case 2:if(null!=(n=e.sent)){e.next=7;break}if(null!=this._emitted["t:"+t]){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",void 0);case 7:if(null!=n.blockHash){e.next=9;break}return e.abrupt("return",void 0);case 9:if(null!=(i=this.formatter.receipt(n)).blockNumber){e.next=14;break}i.confirmations=0,e.next=21;break;case 14:if(null!=i.confirmations){e.next=21;break}return e.next=17,this._getInternalBlockNumber(100+2*this.pollingInterval);case 17:o=e.sent,(a=o-i.blockNumber+1)<=0&&(a=1),i.confirmations=a;case 21:return e.abrupt("return",i);case 22:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this}));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"getLogs",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,ar({filter:this._getFilter(t)});case 4:return r=e.sent,e.next=7,this.perform("getLogs",r);case 7:return(n=e.sent).forEach((function(t){null==t.removed&&(t.removed=!1)})),e.abrupt("return",jo.arrayOf(this.formatter.filterLog.bind(this.formatter))(n));case 10:case"end":return e.stop()}}),e,this)})))}},{key:"getEtherPrice",value:function(){return Fo(this,void 0,void 0,at().mark((function t(){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.abrupt("return",this.perform("getEtherPrice",{}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"_getBlockTag",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:if(!("number"==typeof(t=e.sent)&&t<0)){e.next=11;break}return t%1&&qo.throwArgumentError("invalid BlockTag","blockTag",t),e.next=7,this._getInternalBlockNumber(100+2*this.pollingInterval);case 7:return r=e.sent,(r+=t)<0&&(r=0),e.abrupt("return",this.formatter.blockTag(r));case 11:return e.abrupt("return",this.formatter.blockTag(t));case 12:case"end":return e.stop()}}),e,this)})))}},{key:"getResolver",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getResolver(t);case 3:if(null!=(r=e.sent)){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",new ra(this,r,t));case 9:if(e.prev=9,e.t0=e.catch(0),e.t0.code!==er.errors.CALL_EXCEPTION){e.next=13;break}return e.abrupt("return",null);case 13:throw e.t0;case 14:case"end":return e.stop()}}),e,this,[[0,9]])})))}},{key:"_getResolver",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return(r=e.sent).ensAddress||qo.throwError("network does not support ENS",er.errors.UNSUPPORTED_OPERATION,{operation:"ENS",network:r.name}),n={to:r.ensAddress,data:"0x0178b8bf"+Mo(t).substring(2)},e.prev=5,e.t0=this.formatter,e.next=9,this.call(n);case 9:return e.t1=e.sent,e.abrupt("return",e.t0.callAddress.call(e.t0,e.t1));case 13:if(e.prev=13,e.t2=e.catch(5),e.t2.code!==er.errors.CALL_EXCEPTION){e.next=17;break}return e.abrupt("return",null);case 17:throw e.t2;case 18:case"end":return e.stop()}}),e,this,[[5,13]])})))}},{key:"resolveName",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return t=e.sent,e.prev=3,e.abrupt("return",Promise.resolve(this.formatter.address(t)));case 7:if(e.prev=7,e.t0=e.catch(3),!Ir(t)){e.next=11;break}throw e.t0;case 11:return"string"!=typeof t&&qo.throwArgumentError("invalid ENS name","name",t),e.next=14,this.getResolver(t);case 14:if(r=e.sent){e.next=17;break}return e.abrupt("return",null);case 17:return e.next=19,r.getAddress();case 19:return e.abrupt("return",e.sent);case 20:case"end":return e.stop()}}),e,this,[[3,7]])})))}},{key:"lookupAddress",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n,i,o,a;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return t=e.sent,t=this.formatter.address(t),r=t.substring(2).toLowerCase()+".addr.reverse",e.next=7,this._getResolver(r);case 7:if(n=e.sent){e.next=10;break}return e.abrupt("return",null);case 10:return e.t0=Pr,e.next=13,this.call({to:n,data:"0x691f3431"+Mo(r).substring(2)});case 13:if(e.t1=e.sent,!((i=(0,e.t0)(e.t1)).length<32)&&Kr.from(i.slice(0,32)).eq(32)){e.next=17;break}return e.abrupt("return",null);case 17:if(!((i=i.slice(32)).length<32)){e.next=20;break}return e.abrupt("return",null);case 20:if(o=Kr.from(i.slice(0,32)).toNumber(),i=i.slice(32),!(o>i.length)){e.next=24;break}return e.abrupt("return",null);case 24:return a=Mn(i.slice(0,o)),e.next=27,this.resolveName(a);case 27:if(e.sent==t){e.next=30;break}return e.abrupt("return",null);case 30:return e.abrupt("return",a);case 31:case"end":return e.stop()}}),e,this)})))}},{key:"getAvatar",value:function(t){return Fo(this,void 0,void 0,at().mark((function e(){var r,n,i,o,a;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null,!Ir(t)){e.next=12;break}return n=this.formatter.address(t),i=n.substring(2).toLowerCase()+".addr.reverse",e.next=6,this._getResolver(i);case 6:if(o=e.sent){e.next=9;break}return e.abrupt("return",null);case 9:r=new ra(this,o,"_",n),e.next=17;break;case 12:return e.next=14,this.getResolver(t);case 14:if(r=e.sent){e.next=17;break}return e.abrupt("return",null);case 17:return e.next=19,r.getAvatar();case 19:if(null!=(a=e.sent)){e.next=22;break}return e.abrupt("return",null);case 22:return e.abrupt("return",a.url);case 23:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(t,e){return qo.throwError(t+" not implemented",er.errors.NOT_IMPLEMENTED,{operation:t})}},{key:"_startEvent",value:function(t){this.polling=this._events.filter((function(t){return t.pollable()})).length>0}},{key:"_stopEvent",value:function(t){this.polling=this._events.filter((function(t){return t.pollable()})).length>0}},{key:"_addEventListener",value:function(t,e,r){var n=new Go(Ho(t),e,r);return this._events.push(n),this._startEvent(n),this}},{key:"on",value:function(t,e){return this._addEventListener(t,e,!1)}},{key:"once",value:function(t,e){return this._addEventListener(t,e,!0)}},{key:"emit",value:function(t){for(var e=this,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var o=!1,a=[],s=Ho(t);return this._events=this._events.filter((function(t){return t.tag!==s||(setTimeout((function(){t.listener.apply(e,n)}),0),o=!0,!t.once||(a.push(t),!1))})),a.forEach((function(t){e._stopEvent(t)})),o}},{key:"listenerCount",value:function(t){if(!t)return this._events.length;var e=Ho(t);return this._events.filter((function(t){return t.tag===e})).length}},{key:"listeners",value:function(t){if(null==t)return this._events.map((function(t){return t.listener}));var e=Ho(t);return this._events.filter((function(t){return t.tag===e})).map((function(t){return t.listener}))}},{key:"off",value:function(t,e){var r=this;if(null==e)return this.removeAllListeners(t);var n=[],i=!1,o=Ho(t);return this._events=this._events.filter((function(t){return t.tag!==o||t.listener!=e||(!!i||(i=!0,n.push(t),!1))})),n.forEach((function(t){r._stopEvent(t)})),this}},{key:"removeAllListeners",value:function(t){var e=this,r=[];if(null==t)r=this._events,this._events=[];else{var n=Ho(t);this._events=this._events.filter((function(t){return t.tag!==n||(r.push(t),!1)}))}return r.forEach((function(t){e._stopEvent(t)})),this}}],[{key:"getFormatter",value:function(){return null==na&&(na=new jo),na}},{key:"getNetwork",value:function(t){return function(t){if(null==t)return null;if("number"==typeof t){for(var e in Io){var r=Io[e];if(r.chainId===t)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"==typeof t){var n=Io[t];return null==n?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}var i=Io[t.name];if(!i)return"number"!=typeof t.chainId&&Ao.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==i.chainId&&Ao.throwArgumentError("network chainId mismatch","network",t);var o,a=t._defaultProvider||null;return null==a&&i._defaultProvider&&(a=(o=i._defaultProvider)&&"function"==typeof o.renetwork?i._defaultProvider.renetwork(t):i._defaultProvider),{name:t.name,chainId:i.chainId,ensAddress:t.ensAddress||i.ensAddress||null,_defaultProvider:a}}(null==t?"homestead":t)}}]),r}(so);function aa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=it(t);if(e){var i=it(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nt(this,r)}}var sa=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(e){o(e)}}function s(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},ua=new er(dr),ca=["call","estimateGas"];function fa(t,e,r){if("call"===t&&e.code===er.errors.SERVER_ERROR){var n=e.error;if(n&&n.message.match("reverted")&&Ir(n.data))return n.data;ua.throwError("missing revert data in call exception",er.errors.CALL_EXCEPTION,{error:e,data:"0x"})}var i=e.message;e.code===er.errors.SERVER_ERROR&&e.error&&"string"==typeof e.error.message?i=e.error.message:"string"==typeof e.body?i=e.body:"string"==typeof e.responseText&&(i=e.responseText),i=(i||"").toLowerCase();var o=r.transaction||r.signedTransaction;throw i.match(/insufficient funds|base fee exceeds gas limit/)&&ua.throwError("insufficient funds for intrinsic transaction cost",er.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:o}),i.match(/nonce too low/)&&ua.throwError("nonce has already been used",er.errors.NONCE_EXPIRED,{error:e,method:t,transaction:o}),i.match(/replacement transaction underpriced/)&&ua.throwError("replacement fee too low",er.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:o}),i.match(/only replay-protected/)&&ua.throwError("legacy pre-eip-155 transactions not supported",er.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:o}),ca.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted/)&&ua.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",er.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:o}),e}function la(t){return new Promise((function(e){setTimeout(e,t)}))}function ha(t){if(t.error){var e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function da(t){return t?t.toLowerCase():t}var pa={},va=function(t){tt(r,t);var e=aa(r);function r(t,n,i){var o;if($(this,r),ua.checkNew(this instanceof r?this.constructor:void 0,r),o=e.call(this),t!==pa)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return ir(rt(o),"provider",n),null==i&&(i=0),"string"==typeof i?(ir(rt(o),"_address",o.provider.formatter.address(i)),ir(rt(o),"_index",null)):"number"==typeof i?(ir(rt(o),"_index",i),ir(rt(o),"_address",null)):ua.throwArgumentError("invalid address or index","addressOrIndex",i),o}return X(r,[{key:"connect",value:function(t){return ua.throwError("cannot alter JSON-RPC Signer connection",er.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}},{key:"connectUnchecked",value:function(){return new ma(pa,this.provider,this._address||this._index)}},{key:"getAddress",value:function(){var t=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(e){return e.length<=t._index&&ua.throwError("unknown account #"+t._index,er.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),t.provider.formatter.address(e[t._index])}))}},{key:"sendUncheckedTransaction",value:function(t){var e=this;t=sr(t);var r=this.getAddress().then((function(t){return t&&(t=t.toLowerCase()),t}));if(null==t.gasLimit){var n=sr(t);n.from=r,t.gasLimit=this.provider.estimateGas(n)}return null!=t.to&&(t.to=Promise.resolve(t.to).then((function(t){return sa(e,void 0,void 0,at().mark((function e(){var r;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",null);case 2:return e.next=4,this.provider.resolveName(t);case 4:return null==(r=e.sent)&&ua.throwArgumentError("provided ENS name resolves to null","tx.to",t),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})))}))),ar({tx:ar(t),sender:r}).then((function(r){var n=r.tx,i=r.sender;null!=n.from?n.from.toLowerCase()!==i&&ua.throwArgumentError("from address mismatch","transaction",t):n.from=i;var o=e.provider.constructor.hexlifyTransaction(n,{from:!0});return e.provider.send("eth_sendTransaction",[o]).then((function(t){return t}),(function(t){return fa("sendTransaction",t,o)}))}))}},{key:"signTransaction",value:function(t){return ua.throwError("signing transactions is unsupported",er.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}},{key:"sendTransaction",value:function(t){return sa(this,void 0,void 0,at().mark((function e(){var r,n,i=this;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval);case 2:return r=e.sent,e.next=5,this.sendUncheckedTransaction(t);case 5:return n=e.sent,e.prev=6,e.next=9,ro((function(){return sa(i,void 0,void 0,at().mark((function t(){var e;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.provider.getTransaction(n);case 2:if(null!==(e=t.sent)){t.next=5;break}return t.abrupt("return",void 0);case 5:return t.abrupt("return",this.provider._wrapTransaction(e,n,r));case 6:case"end":return t.stop()}}),t,this)})))}),{oncePoll:this.provider});case 9:return e.abrupt("return",e.sent);case 12:throw e.prev=12,e.t0=e.catch(6),e.t0.transactionHash=n,e.t0;case 16:case"end":return e.stop()}}),e,this,[[6,12]])})))}},{key:"signMessage",value:function(t){return sa(this,void 0,void 0,at().mark((function e(){var r,n;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="string"==typeof t?kn(t):t,e.next=3,this.getAddress();case 3:return n=e.sent,e.next=6,this.provider.send("personal_sign",[Nr(r),n.toLowerCase()]);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"_legacySignMessage",value:function(t){return sa(this,void 0,void 0,at().mark((function e(){var r,n;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="string"==typeof t?kn(t):t,e.next=3,this.getAddress();case 3:return n=e.sent,e.next=6,this.provider.send("eth_sign",[n.toLowerCase(),Nr(r)]);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"_signTypedData",value:function(t,e,r){return sa(this,void 0,void 0,at().mark((function n(){var i,o,a=this;return at().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Hn.resolveNames(t,e,r,(function(t){return a.provider.resolveName(t)}));case 2:return i=n.sent,n.next=5,this.getAddress();case 5:return o=n.sent,n.next=8,this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(Hn.getPayload(i.domain,e,i.value))]);case 8:return n.abrupt("return",n.sent);case 9:case"end":return n.stop()}}),n,this)})))}},{key:"unlock",value:function(t){return sa(this,void 0,void 0,at().mark((function e(){var r,n;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.provider,e.next=3,this.getAddress();case 3:return n=e.sent,e.abrupt("return",r.send("personal_unlockAccount",[n.toLowerCase(),t,null]));case 5:case"end":return e.stop()}}),e,this)})))}}]),r}(wr),ma=function(t){tt(r,t);var e=aa(r);function r(){return $(this,r),e.apply(this,arguments)}return X(r,[{key:"sendTransaction",value:function(t){var e=this;return this.sendUncheckedTransaction(t).then((function(t){return{hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(r){return e.provider.waitForTransaction(t,r)}}}))}}]),r}(va),ya={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},ga=function(t){tt(r,t);var e=aa(r);function r(t,n){var i;$(this,r),ua.checkNew(this instanceof r?this.constructor:void 0,r);var o=n;return null==o&&(o=new Promise((function(t,e){setTimeout((function(){i.detectNetwork().then((function(e){t(e)}),(function(t){e(t)}))}),0)}))),i=e.call(this,o),t||(t=or(i.constructor,"defaultUrl")()),ir(rt(i),"connection","string"==typeof t?Object.freeze({url:t}):Object.freeze(sr(t))),i._nextId=42,i}return X(r,[{key:"_cache",get:function(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}},{key:"detectNetwork",value:function(){var t=this;return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((function(){t._cache.detectNetwork=null}),0)),this._cache.detectNetwork}},{key:"_uncachedDetectNetwork",value:function(){return sa(this,void 0,void 0,at().mark((function t(){var e,r;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,la(0);case 2:return e=null,t.prev=3,t.next=6,this.send("eth_chainId",[]);case 6:e=t.sent,t.next=19;break;case 9:return t.prev=9,t.t0=t.catch(3),t.prev=11,t.next=14,this.send("net_version",[]);case 14:e=t.sent,t.next=19;break;case 17:t.prev=17,t.t1=t.catch(11);case 19:if(null==e){t.next=28;break}return r=or(this.constructor,"getNetwork"),t.prev=21,t.abrupt("return",r(Kr.from(e).toNumber()));case 25:return t.prev=25,t.t2=t.catch(21),t.abrupt("return",ua.throwError("could not detect network",er.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t.t2}));case 28:return t.abrupt("return",ua.throwError("could not detect network",er.errors.NETWORK_ERROR,{event:"noNetwork"}));case 29:case"end":return t.stop()}}),t,this,[[3,9],[11,17],[21,25]])})))}},{key:"getSigner",value:function(t){return new va(pa,this,t)}},{key:"getUncheckedSigner",value:function(t){return this.getSigner(t).connectUnchecked()}},{key:"listAccounts",value:function(){var t=this;return this.send("eth_accounts",[]).then((function(e){return e.map((function(e){return t.formatter.address(e)}))}))}},{key:"send",value:function(t,e){var r=this,n={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:lr(n),provider:this});var i=["eth_chainId","eth_blockNumber"].indexOf(t)>=0;if(i&&this._cache[t])return this._cache[t];var o=eo(this.connection,JSON.stringify(n),ha).then((function(t){return r.emit("debug",{action:"response",request:n,response:t,provider:r}),t}),(function(t){throw r.emit("debug",{action:"response",error:t,request:n,provider:r}),t}));return i&&(this._cache[t]=o,setTimeout((function(){r._cache[t]=null}),0)),o}},{key:"prepareRequest",value:function(t,e){switch(t){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[da(e.address),e.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[da(e.address),e.blockTag]];case"getCode":return["eth_getCode",[da(e.address),e.blockTag]];case"getStorageAt":return["eth_getStorageAt",[da(e.address),e.position,e.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[e.signedTransaction]];case"getBlock":return e.blockTag?["eth_getBlockByNumber",[e.blockTag,!!e.includeTransactions]]:e.blockHash?["eth_getBlockByHash",[e.blockHash,!!e.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[e.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[e.transactionHash]];case"call":return["eth_call",[or(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0}),e.blockTag]];case"estimateGas":return["eth_estimateGas",[or(this.constructor,"hexlifyTransaction")(e.transaction,{from:!0})]];case"getLogs":return e.filter&&null!=e.filter.address&&(e.filter.address=da(e.filter.address)),["eth_getLogs",[e.filter]]}return null}},{key:"perform",value:function(t,e){return sa(this,void 0,void 0,at().mark((function r(){var n,i,o;return at().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("call"!==t&&"estimateGas"!==t){r.next=8;break}if(!(n=e.transaction)||null==n.type||!Kr.from(n.type).isZero()){r.next=8;break}if(null!=n.maxFeePerGas||null!=n.maxPriorityFeePerGas){r.next=8;break}return r.next=6,this.getFeeData();case 6:null==(i=r.sent).maxFeePerGas&&null==i.maxPriorityFeePerGas&&((e=sr(e)).transaction=sr(n),delete e.transaction.type);case 8:return null==(o=this.prepareRequest(t,e))&&ua.throwError(t+" not implemented",er.errors.NOT_IMPLEMENTED,{operation:t}),r.prev=10,r.next=13,this.send(o[0],o[1]);case 13:return r.abrupt("return",r.sent);case 16:return r.prev=16,r.t0=r.catch(10),r.abrupt("return",fa(t,r.t0,e));case 19:case"end":return r.stop()}}),r,this,[[10,16]])})))}},{key:"_startEvent",value:function(t){"pending"===t.tag&&this._startPending(),vr(it(r.prototype),"_startEvent",this).call(this,t)}},{key:"_startPending",value:function(){if(null==this._pendingFilter){var t=this,e=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=e,e.then((function(r){return function n(){t.send("eth_getFilterChanges",[r]).then((function(r){if(t._pendingFilter!=e)return null;var n=Promise.resolve();return r.forEach((function(e){t._emitted["t:"+e.toLowerCase()]="pending",n=n.then((function(){return t.getTransaction(e).then((function(e){return t.emit("pending",e),null}))}))})),n.then((function(){return la(1e3)}))})).then((function(){if(t._pendingFilter==e)return setTimeout((function(){n()}),0),null;t.send("eth_uninstallFilter",[r])})).catch((function(t){}))}(),r})).catch((function(t){}))}}},{key:"_stopEvent",value:function(t){"pending"===t.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),vr(it(r.prototype),"_stopEvent",this).call(this,t)}}],[{key:"defaultUrl",value:function(){return"http://localhost:8545"}},{key:"hexlifyTransaction",value:function(t,e){var r,n,i=sr(ya);if(e)for(var o in e)e[o]&&(i[o]=!0);n=i,(r=t)&&"object"==typeof r||nr.throwArgumentError("invalid object","object",r),Object.keys(r).forEach((function(t){n[t]||nr.throwArgumentError("invalid object key - "+t,"transaction:"+t,r)}));var a={};return["gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(e){if(null!=t[e]){var r=Ur(t[e]);"gasLimit"===e&&(e="gas"),a[e]=r}})),["from","to","data"].forEach((function(e){null!=t[e]&&(a[e]=Nr(t[e]))})),t.accessList&&(a.accessList=Di(t.accessList)),a}}]),r}(oa);function ba(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=it(t);if(e){var i=it(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nt(this,r)}}var wa=new er(dr),_a=1;function xa(t,e){var r="Web3LegacyFetcher";return function(t,n){var i=this,o={method:t,params:n,id:_a++,jsonrpc:"2.0"};return new Promise((function(t,n){i.emit("debug",{action:"request",fetcher:r,request:lr(o),provider:i}),e(o,(function(e,a){if(e)return i.emit("debug",{action:"response",fetcher:r,error:e,request:o,provider:i}),n(e);if(i.emit("debug",{action:"response",fetcher:r,request:o,response:a,provider:i}),a.error){var s=new Error(a.error.message);return s.code=a.error.code,s.data=a.error.data,n(s)}t(a.result)}))}))}}var ka=function(t){tt(r,t);var e=ba(r);function r(t,n){var i;$(this,r),wa.checkNew(this instanceof r?this.constructor:void 0,r),null==t&&wa.throwArgumentError("missing provider","provider",t);var o=null,a=null,s=null;return"function"==typeof t?(o="unknown:",a=t):(!(o=t.host||t.path||"")&&t.isMetaMask&&(o="metamask"),s=t,t.request?(""===o&&(o="eip-1193:"),a=function(t){return function(e,r){var n=this;null==r&&(r=[]);var i={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:lr(i),provider:this}),t.request(i).then((function(t){return n.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,response:t,provider:n}),t}),(function(t){throw n.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,error:t,provider:n}),t}))}}(t)):t.sendAsync?a=xa(0,t.sendAsync.bind(t)):t.send?a=xa(0,t.send.bind(t)):wa.throwArgumentError("unsupported provider","provider",t),o||(o="unknown:")),ir(rt(i=e.call(this,o,n)),"jsonRpcFetchFunc",a),ir(rt(i),"provider",s),i}return X(r,[{key:"send",value:function(t,e){return this.jsonRpcFetchFunc(t,e)}}]),r}(ga),Ea="undefined"!=typeof window?r(35547):null,Ma=(0,a.createContext)({}),Aa=function(t){var e=t.children,r=(0,a.useState)(void 0),n=r[0],i=r[1],o=(0,a.useState)(void 0),s=o[0],u=o[1],c={walletconnect:{package:We,options:{infuraId:"854b581018fe44a59897b53ee6a19551"}}},f=Ea&&new Ea.default({cacheProvider:!0,providerOptions:c}),l=void 0!==n,h=l&&new ka(n,"any"),d=h&&h.getSigner(),p=function(){d.getAddress().then((function(t){return u(t)}))};return(0,a.useEffect)((function(){n&&(p(),n.on("accountsChanged",p),n.on("chainChanged",p))}),[n]),(0,R.tZ)(Ma.Provider,{value:{web3:n,setWeb3:i,handleConnect:function(){f.connect().then(i)},isConnected:l,handleAddChain:function(t){var e;h.send("wallet_addEthereumChain",[{chainId:"0x"+t.chainId.toString(16),chainName:t.name,nativeCurrency:t.nativeCurrency,rpcUrls:t.rpc,blockExplorerUrls:null===(e=t.explorers)||void 0===e?void 0:e.map((function(t){return t.url}))}])},address:s}},e)},Sa=r(93723),Ra=["name","chainId","nativeCurrency","icon"],Pa=function(t){var e=t.name,r=t.chainId,n=t.nativeCurrency,o=t.icon,s=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(t,Ra),u=(0,a.useContext)(Ma),c=u.isConnected,f=u.handleConnect,l=u.handleAddChain;return(0,R.tZ)(i.kC,{flexDirection:"column",px:"5",py:"4",borderWidth:"1px",rounded:"md",boxShadow:"base"},(0,R.tZ)(i.kC,{justifyContent:"space-between"},(0,R.tZ)(i.kC,{flexDirection:"column",minW:"200px"},(0,R.tZ)(i.kC,{mb:"2"},(0,R.tZ)(i.xv,{fontSize:"lg",fontWeight:"semibold",lineHeight:"short",isTruncated:!0,verticalAlign:"middle"},e)),(0,R.tZ)(k,{mb:"2"},(0,R.tZ)(x,null,(0,R.tZ)(y,null,"Chain ID"),(0,R.tZ)(b,{fontSize:"md"},r)),(0,R.tZ)(x,null,(0,R.tZ)(y,null,"Currency"),(0,R.tZ)(b,{fontSize:"md"},n.symbol)))),o&&(0,R.tZ)(i.kC,null,(0,R.tZ)(Sa.G,{objectFit:"scale-down",image:o,alt:e}))),(0,R.tZ)(i.M5,{mt:"auto"},c?(0,R.tZ)(W,{onClick:function(){l(Object.assign({name:e,chainId:r,nativeCurrency:n},s))}},"Add Chain"):(0,R.tZ)(W,{onClick:f},"Connect Wallet")))},Ta=function(t){var e=t.chains,r=t.icons;return(0,R.tZ)(a.Fragment,null,(0,R.tZ)(i.MI,{minChildWidth:"300px",spacing:4},e.map((function(t){return(0,R.tZ)(Pa,(0,s.Z)({key:t.id},t,{icon:r[t.icon]}))}))))};function Oa(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ia(t){return t instanceof Oa(t).Element||t instanceof Element}function Ca(t){return t instanceof Oa(t).HTMLElement||t instanceof HTMLElement}function Na(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Oa(t).ShadowRoot||t instanceof ShadowRoot)}var La=Math.max,Ba=Math.min,ja=Math.round;function Ua(t,e){void 0===e&&(e=!1);var r=t.getBoundingClientRect(),n=1,i=1;if(Ca(t)&&e){var o=t.offsetHeight,a=t.offsetWidth;a>0&&(n=ja(r.width)/a||1),o>0&&(i=ja(r.height)/o||1)}return{width:r.width/n,height:r.height/i,top:r.top/i,right:r.right/n,bottom:r.bottom/i,left:r.left/n,x:r.left/n,y:r.top/i}}function Fa(t){var e=Oa(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function qa(t){return t?(t.nodeName||"").toLowerCase():null}function Da(t){return((Ia(t)?t.ownerDocument:t.document)||window.document).documentElement}function za(t){return Ua(Da(t)).left+Fa(t).scrollLeft}function Ha(t){return Oa(t).getComputedStyle(t)}function Va(t){var e=Ha(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function Wa(t,e,r){void 0===r&&(r=!1);var n,i,o=Ca(e),a=Ca(e)&&function(t){var e=t.getBoundingClientRect(),r=ja(e.width)/t.offsetWidth||1,n=ja(e.height)/t.offsetHeight||1;return 1!==r||1!==n}(e),s=Da(e),u=Ua(t,a),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(o||!o&&!r)&&(("body"!==qa(e)||Va(s))&&(c=(n=e)!==Oa(n)&&Ca(n)?{scrollLeft:(i=n).scrollLeft,scrollTop:i.scrollTop}:Fa(n)),Ca(e)?((f=Ua(e,!0)).x+=e.clientLeft,f.y+=e.clientTop):s&&(f.x=za(s))),{x:u.left+c.scrollLeft-f.x,y:u.top+c.scrollTop-f.y,width:u.width,height:u.height}}function Ka(t){var e=Ua(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function Ga(t){return"html"===qa(t)?t:t.assignedSlot||t.parentNode||(Na(t)?t.host:null)||Da(t)}function Za(t){return["html","body","#document"].indexOf(qa(t))>=0?t.ownerDocument.body:Ca(t)&&Va(t)?t:Za(Ga(t))}function Ja(t,e){var r;void 0===e&&(e=[]);var n=Za(t),i=n===(null==(r=t.ownerDocument)?void 0:r.body),o=Oa(n),a=i?[o].concat(o.visualViewport||[],Va(n)?n:[]):n,s=e.concat(a);return i?s:s.concat(Ja(Ga(a)))}function $a(t){return["table","td","th"].indexOf(qa(t))>=0}function Ya(t){return Ca(t)&&"fixed"!==Ha(t).position?t.offsetParent:null}function Xa(t){for(var e=Oa(t),r=Ya(t);r&&$a(r)&&"static"===Ha(r).position;)r=Ya(r);return r&&("html"===qa(r)||"body"===qa(r)&&"static"===Ha(r).position)?e:r||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Ca(t)&&"fixed"===Ha(t).position)return null;for(var r=Ga(t);Ca(r)&&["html","body"].indexOf(qa(r))<0;){var n=Ha(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(t)||e}var Qa="top",ts="bottom",es="right",rs="left",ns="auto",is=[Qa,ts,es,rs],os="start",as="end",ss="viewport",us="popper",cs=is.reduce((function(t,e){return t.concat([e+"-"+os,e+"-"+as])}),[]),fs=[].concat(is,[ns]).reduce((function(t,e){return t.concat([e,e+"-"+os,e+"-"+as])}),[]),ls=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function hs(t){var e=new Map,r=new Set,n=[];function i(t){r.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!r.has(t)){var n=e.get(t);n&&i(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){r.has(t.name)||i(t)})),n}var ds={placement:"bottom",modifiers:[],strategy:"absolute"};function ps(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function vs(t){void 0===t&&(t={});var e=t,r=e.defaultModifiers,n=void 0===r?[]:r,i=e.defaultOptions,o=void 0===i?ds:i;return function(t,e,r){void 0===r&&(r=o);var i,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},ds,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},u=[],c=!1,f={state:s,setOptions:function(r){var i="function"==typeof r?r(s.options):r;l(),s.options=Object.assign({},o,s.options,i),s.scrollParents={reference:Ia(t)?Ja(t):t.contextElement?Ja(t.contextElement):[],popper:Ja(e)};var a=function(t){var e=hs(t);return ls.reduce((function(t,r){return t.concat(e.filter((function(t){return t.phase===r})))}),[])}(function(t){var e=t.reduce((function(t,e){var r=t[e.name];return t[e.name]=r?Object.assign({},r,e,{options:Object.assign({},r.options,e.options),data:Object.assign({},r.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(n,s.options.modifiers)));return s.orderedModifiers=a.filter((function(t){return t.enabled})),s.orderedModifiers.forEach((function(t){var e=t.name,r=t.options,n=void 0===r?{}:r,i=t.effect;if("function"==typeof i){var o=i({state:s,name:e,instance:f,options:n}),a=function(){};u.push(o||a)}})),f.update()},forceUpdate:function(){if(!c){var t=s.elements,e=t.reference,r=t.popper;if(ps(e,r)){s.rects={reference:Wa(e,Xa(r),"fixed"===s.options.strategy),popper:Ka(r)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(t){return s.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var i=s.orderedModifiers[n],o=i.fn,a=i.options,u=void 0===a?{}:a,l=i.name;"function"==typeof o&&(s=o({state:s,options:u,name:l,instance:f})||s)}else s.reset=!1,n=-1}}},update:(i=function(){return new Promise((function(t){f.forceUpdate(),t(s)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(i())}))}))),a}),destroy:function(){l(),c=!0}};if(!ps(t,e))return f;function l(){u.forEach((function(t){return t()})),u=[]}return f.setOptions(r).then((function(t){!c&&r.onFirstUpdate&&r.onFirstUpdate(t)})),f}}var ms={passive:!0};function ys(t){return t.split("-")[0]}function gs(t){return t.split("-")[1]}function bs(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ws(t){var e,r=t.reference,n=t.element,i=t.placement,o=i?ys(i):null,a=i?gs(i):null,s=r.x+r.width/2-n.width/2,u=r.y+r.height/2-n.height/2;switch(o){case Qa:e={x:s,y:r.y-n.height};break;case ts:e={x:s,y:r.y+r.height};break;case es:e={x:r.x+r.width,y:u};break;case rs:e={x:r.x-n.width,y:u};break;default:e={x:r.x,y:r.y}}var c=o?bs(o):null;if(null!=c){var f="y"===c?"height":"width";switch(a){case os:e[c]=e[c]-(r[f]/2-n[f]/2);break;case as:e[c]=e[c]+(r[f]/2-n[f]/2)}}return e}var _s={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xs(t){var e,r=t.popper,n=t.popperRect,i=t.placement,o=t.variation,a=t.offsets,s=t.position,u=t.gpuAcceleration,c=t.adaptive,f=t.roundOffsets,l=t.isFixed,h=a.x,d=void 0===h?0:h,p=a.y,v=void 0===p?0:p,m="function"==typeof f?f({x:d,y:v}):{x:d,y:v};d=m.x,v=m.y;var y=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),b=rs,w=Qa,_=window;if(c){var x=Xa(r),k="clientHeight",E="clientWidth";if(x===Oa(r)&&"static"!==Ha(x=Da(r)).position&&"absolute"===s&&(k="scrollHeight",E="scrollWidth"),x=x,i===Qa||(i===rs||i===es)&&o===as)w=ts,v-=(l&&_.visualViewport?_.visualViewport.height:x[k])-n.height,v*=u?1:-1;if(i===rs||(i===Qa||i===ts)&&o===as)b=es,d-=(l&&_.visualViewport?_.visualViewport.width:x[E])-n.width,d*=u?1:-1}var M,A=Object.assign({position:s},c&&_s),S=!0===f?function(t){var e=t.x,r=t.y,n=window.devicePixelRatio||1;return{x:ja(e*n)/n||0,y:ja(r*n)/n||0}}({x:d,y:v}):{x:d,y:v};return d=S.x,v=S.y,u?Object.assign({},A,((M={})[w]=g?"0":"",M[b]=y?"0":"",M.transform=(_.devicePixelRatio||1)<=1?"translate("+d+"px, "+v+"px)":"translate3d("+d+"px, "+v+"px, 0)",M)):Object.assign({},A,((e={})[w]=g?v+"px":"",e[b]=y?d+"px":"",e.transform="",e))}var ks={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,r=t.options,n=t.name,i=r.offset,o=void 0===i?[0,0]:i,a=fs.reduce((function(t,r){return t[r]=function(t,e,r){var n=ys(t),i=[rs,Qa].indexOf(n)>=0?-1:1,o="function"==typeof r?r(Object.assign({},e,{placement:t})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[rs,es].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}(r,e.rects,o),t}),{}),s=a[e.placement],u=s.x,c=s.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=a}},Es={left:"right",right:"left",bottom:"top",top:"bottom"};function Ms(t){return t.replace(/left|right|bottom|top/g,(function(t){return Es[t]}))}var As={start:"end",end:"start"};function Ss(t){return t.replace(/start|end/g,(function(t){return As[t]}))}function Rs(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&Na(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ps(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ts(t,e){return e===ss?Ps(function(t){var e=Oa(t),r=Da(t),n=e.visualViewport,i=r.clientWidth,o=r.clientHeight,a=0,s=0;return n&&(i=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,s=n.offsetTop)),{width:i,height:o,x:a+za(t),y:s}}(t)):Ia(e)?function(t){var e=Ua(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):Ps(function(t){var e,r=Da(t),n=Fa(t),i=null==(e=t.ownerDocument)?void 0:e.body,o=La(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=La(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+za(t),u=-n.scrollTop;return"rtl"===Ha(i||r).direction&&(s+=La(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}(Da(t)))}function Os(t,e,r){var n="clippingParents"===e?function(t){var e=Ja(Ga(t)),r=["absolute","fixed"].indexOf(Ha(t).position)>=0&&Ca(t)?Xa(t):t;return Ia(r)?e.filter((function(t){return Ia(t)&&Rs(t,r)&&"body"!==qa(t)})):[]}(t):[].concat(e),i=[].concat(n,[r]),o=i[0],a=i.reduce((function(e,r){var n=Ts(t,r);return e.top=La(n.top,e.top),e.right=Ba(n.right,e.right),e.bottom=Ba(n.bottom,e.bottom),e.left=La(n.left,e.left),e}),Ts(t,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Is(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Cs(t,e){return e.reduce((function(e,r){return e[r]=t,e}),{})}function Ns(t,e){void 0===e&&(e={});var r=e,n=r.placement,i=void 0===n?t.placement:n,o=r.boundary,a=void 0===o?"clippingParents":o,s=r.rootBoundary,u=void 0===s?ss:s,c=r.elementContext,f=void 0===c?us:c,l=r.altBoundary,h=void 0!==l&&l,d=r.padding,p=void 0===d?0:d,v=Is("number"!=typeof p?p:Cs(p,is)),m=f===us?"reference":us,y=t.rects.popper,g=t.elements[h?m:f],b=Os(Ia(g)?g:g.contextElement||Da(t.elements.popper),a,u),w=Ua(t.elements.reference),_=ws({reference:w,element:y,strategy:"absolute",placement:i}),x=Ps(Object.assign({},y,_)),k=f===us?x:w,E={top:b.top-k.top+v.top,bottom:k.bottom-b.bottom+v.bottom,left:b.left-k.left+v.left,right:k.right-b.right+v.right},M=t.modifiersData.offset;if(f===us&&M){var A=M[i];Object.keys(E).forEach((function(t){var e=[es,ts].indexOf(t)>=0?1:-1,r=[Qa,ts].indexOf(t)>=0?"y":"x";E[t]+=A[r]*e}))}return E}var Ls={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=r.mainAxis,o=void 0===i||i,a=r.altAxis,s=void 0===a||a,u=r.fallbackPlacements,c=r.padding,f=r.boundary,l=r.rootBoundary,h=r.altBoundary,d=r.flipVariations,p=void 0===d||d,v=r.allowedAutoPlacements,m=e.options.placement,y=ys(m),g=u||(y===m||!p?[Ms(m)]:function(t){if(ys(t)===ns)return[];var e=Ms(t);return[Ss(t),e,Ss(e)]}(m)),b=[m].concat(g).reduce((function(t,r){return t.concat(ys(r)===ns?function(t,e){void 0===e&&(e={});var r=e,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,u=r.allowedAutoPlacements,c=void 0===u?fs:u,f=gs(n),l=f?s?cs:cs.filter((function(t){return gs(t)===f})):is,h=l.filter((function(t){return c.indexOf(t)>=0}));0===h.length&&(h=l);var d=h.reduce((function(e,r){return e[r]=Ns(t,{placement:r,boundary:i,rootBoundary:o,padding:a})[ys(r)],e}),{});return Object.keys(d).sort((function(t,e){return d[t]-d[e]}))}(e,{placement:r,boundary:f,rootBoundary:l,padding:c,flipVariations:p,allowedAutoPlacements:v}):r)}),[]),w=e.rects.reference,_=e.rects.popper,x=new Map,k=!0,E=b[0],M=0;M<b.length;M++){var A=b[M],S=ys(A),R=gs(A)===os,P=[Qa,ts].indexOf(S)>=0,T=P?"width":"height",O=Ns(e,{placement:A,boundary:f,rootBoundary:l,altBoundary:h,padding:c}),I=P?R?es:rs:R?ts:Qa;w[T]>_[T]&&(I=Ms(I));var C=Ms(I),N=[];if(o&&N.push(O[S]<=0),s&&N.push(O[I]<=0,O[C]<=0),N.every((function(t){return t}))){E=A,k=!1;break}x.set(A,N)}if(k)for(var L=function(t){var e=b.find((function(e){var r=x.get(e);if(r)return r.slice(0,t).every((function(t){return t}))}));if(e)return E=e,"break"},B=p?3:1;B>0;B--){if("break"===L(B))break}e.placement!==E&&(e.modifiersData[n]._skip=!0,e.placement=E,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Bs(t,e,r){return La(t,Ba(e,r))}var js={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,n=t.name,i=r.mainAxis,o=void 0===i||i,a=r.altAxis,s=void 0!==a&&a,u=r.boundary,c=r.rootBoundary,f=r.altBoundary,l=r.padding,h=r.tether,d=void 0===h||h,p=r.tetherOffset,v=void 0===p?0:p,m=Ns(e,{boundary:u,rootBoundary:c,padding:l,altBoundary:f}),y=ys(e.placement),g=gs(e.placement),b=!g,w=bs(y),_="x"===w?"y":"x",x=e.modifiersData.popperOffsets,k=e.rects.reference,E=e.rects.popper,M="function"==typeof v?v(Object.assign({},e.rects,{placement:e.placement})):v,A="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),S=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,R={x:0,y:0};if(x){if(o){var P,T="y"===w?Qa:rs,O="y"===w?ts:es,I="y"===w?"height":"width",C=x[w],N=C+m[T],L=C-m[O],B=d?-E[I]/2:0,j=g===os?k[I]:E[I],U=g===os?-E[I]:-k[I],F=e.elements.arrow,q=d&&F?Ka(F):{width:0,height:0},D=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=D[T],H=D[O],V=Bs(0,k[I],q[I]),W=b?k[I]/2-B-V-z-A.mainAxis:j-V-z-A.mainAxis,K=b?-k[I]/2+B+V+H+A.mainAxis:U+V+H+A.mainAxis,G=e.elements.arrow&&Xa(e.elements.arrow),Z=G?"y"===w?G.clientTop||0:G.clientLeft||0:0,J=null!=(P=null==S?void 0:S[w])?P:0,$=C+K-J,Y=Bs(d?Ba(N,C+W-J-Z):N,C,d?La(L,$):L);x[w]=Y,R[w]=Y-C}if(s){var X,Q="x"===w?Qa:rs,tt="x"===w?ts:es,et=x[_],rt="y"===_?"height":"width",nt=et+m[Q],it=et-m[tt],ot=-1!==[Qa,rs].indexOf(y),at=null!=(X=null==S?void 0:S[_])?X:0,st=ot?nt:et-k[rt]-E[rt]-at+A.altAxis,ut=ot?et+k[rt]+E[rt]-at-A.altAxis:it,ct=d&&ot?function(t,e,r){var n=Bs(t,e,r);return n>r?r:n}(st,et,ut):Bs(d?st:nt,et,d?ut:it);x[_]=ct,R[_]=ct-et}e.modifiersData[n]=R}},requiresIfExists:["offset"]};var Us={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,r=t.state,n=t.name,i=t.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=ys(r.placement),u=bs(s),c=[rs,es].indexOf(s)>=0?"height":"width";if(o&&a){var f=function(t,e){return Is("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Cs(t,is))}(i.padding,r),l=Ka(o),h="y"===u?Qa:rs,d="y"===u?ts:es,p=r.rects.reference[c]+r.rects.reference[u]-a[u]-r.rects.popper[c],v=a[u]-r.rects.reference[u],m=Xa(o),y=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,g=p/2-v/2,b=f[h],w=y-l[c]-f[d],_=y/2-l[c]/2+g,x=Bs(b,_,w),k=u;r.modifiersData[n]=((e={})[k]=x,e.centerOffset=x-_,e)}},effect:function(t){var e=t.state,r=t.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Rs(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fs(t,e,r){return void 0===r&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function qs(t){return[Qa,es,ts,rs].some((function(e){return t[e]>=0}))}var Ds=vs({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,o=void 0===i||i,a=n.resize,s=void 0===a||a,u=Oa(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",r.update,ms)})),s&&u.addEventListener("resize",r.update,ms),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",r.update,ms)})),s&&u.removeEventListener("resize",r.update,ms)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,r=t.name;e.modifiersData[r]=ws({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=void 0===n||n,o=r.adaptive,a=void 0===o||o,s=r.roundOffsets,u=void 0===s||s,c={placement:ys(e.placement),variation:gs(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,xs(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:u})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,xs(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var r=e.styles[t]||{},n=e.attributes[t]||{},i=e.elements[t];Ca(i)&&qa(i)&&(Object.assign(i.style,r),Object.keys(n).forEach((function(t){var e=n[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],i=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:r[t]).reduce((function(t,e){return t[e]="",t}),{});Ca(n)&&qa(n)&&(Object.assign(n.style,o),Object.keys(i).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]},ks,Ls,js,Us,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=Ns(e,{elementContext:"reference"}),s=Ns(e,{altBoundary:!0}),u=Fs(a,n),c=Fs(s,i,o),f=qs(u),l=qs(c);e.modifiersData[r]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:l},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":l})}}]});function zs(){return zs=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zs.apply(this,arguments)}var Hs=function(t,e){return{var:t,varRef:e?"var("+t+", "+e+")":"var("+t+")"}},Vs={arrowShadowColor:Hs("--popper-arrow-shadow-color"),arrowSize:Hs("--popper-arrow-size","8px"),arrowSizeHalf:Hs("--popper-arrow-size-half"),arrowBg:Hs("--popper-arrow-bg"),transformOrigin:Hs("--popper-transform-origin"),arrowOffset:Hs("--popper-arrow-offset")};var Ws={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Ks={scroll:!0,resize:!0};var Gs={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;e.styles.popper.width=e.rects.reference.width+"px"},effect:function(t){var e=t.state;return function(){var t=e.elements.reference;e.elements.popper.style.width=t.offsetWidth+"px"}}},Zs={name:"transformOrigin",enabled:!0,phase:"write",fn:function(t){var e=t.state;Js(e)},effect:function(t){var e=t.state;return function(){Js(e)}}},Js=function(t){var e;t.elements.popper.style.setProperty(Vs.transformOrigin.var,(e=t.placement,Ws[e]))},$s={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:function(t){var e=t.state;Ys(e)}},Ys=function(t){var e;if(t.placement){var r=Xs(t.placement);if(null!=(e=t.elements)&&e.arrow&&r){var n,i;Object.assign(t.elements.arrow.style,((n={})[r.property]=r.value,n.width=Vs.arrowSize.varRef,n.height=Vs.arrowSize.varRef,n.zIndex=-1,n));var o=((i={})[Vs.arrowSizeHalf.var]="calc("+Vs.arrowSize.varRef+" / 2)",i[Vs.arrowOffset.var]="calc("+Vs.arrowSizeHalf.varRef+" * -1)",i);for(var a in o)t.elements.arrow.style.setProperty(a,o[a])}}},Xs=function(t){return t.startsWith("top")?{property:"bottom",value:Vs.arrowOffset.varRef}:t.startsWith("bottom")?{property:"top",value:Vs.arrowOffset.varRef}:t.startsWith("left")?{property:"right",value:Vs.arrowOffset.varRef}:t.startsWith("right")?{property:"left",value:Vs.arrowOffset.varRef}:void 0},Qs={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:function(t){var e=t.state;tu(e)},effect:function(t){var e=t.state;return function(){tu(e)}}},tu=function(t){if(t.elements.arrow){var e,r=t.elements.arrow.querySelector("[data-popper-arrow-inner]");if(r)Object.assign(r.style,{transform:"rotate(45deg)",background:Vs.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:(e=t.placement,e.includes("top")?"1px 1px 1px 0 var(--popper-arrow-shadow-color)":e.includes("bottom")?"-1px -1px 1px 0 var(--popper-arrow-shadow-color)":e.includes("right")?"-1px 1px 1px 0 var(--popper-arrow-shadow-color)":e.includes("left")?"1px -1px 1px 0 var(--popper-arrow-shadow-color)":void 0)})}},eu={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},ru={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};var nu=["size","shadowColor","bg","style"];function iu(t){void 0===t&&(t={});var e=t,r=e.enabled,n=void 0===r||r,i=e.modifiers,o=e.placement,s=void 0===o?"bottom":o,u=e.strategy,c=void 0===u?"absolute":u,f=e.arrowPadding,l=void 0===f?8:f,h=e.eventListeners,d=void 0===h||h,p=e.offset,v=e.gutter,m=void 0===v?8:v,y=e.flip,g=void 0===y||y,b=e.boundary,w=void 0===b?"clippingParents":b,_=e.preventOverflow,x=void 0===_||_,k=e.matchWidth,E=e.direction,M=void 0===E?"ltr":E,A=(0,a.useRef)(null),R=(0,a.useRef)(null),P=(0,a.useRef)(null),T=function(t,e){var r,n;void 0===e&&(e="ltr");var i=(null==(r=eu[t])?void 0:r[e])||t;return"ltr"===e?i:null!=(n=ru[t])?n:i}(s,M),O=(0,a.useRef)((function(){})),I=(0,a.useCallback)((function(){var t;n&&A.current&&R.current&&(null==O.current||O.current(),P.current=Ds(A.current,R.current,{placement:T,modifiers:[Qs,$s,Zs,zs({},Gs,{enabled:!!k}),zs({name:"eventListeners"},(t=d,"object"==typeof t?{enabled:!0,options:zs({},Ks,t)}:{enabled:t,options:Ks})),{name:"arrow",options:{padding:l}},{name:"offset",options:{offset:null!=p?p:[0,m]}},{name:"flip",enabled:!!g,options:{padding:8}},{name:"preventOverflow",enabled:!!x,options:{boundary:w}}].concat(null!=i?i:[]),strategy:c}),P.current.forceUpdate(),O.current=P.current.destroy)}),[T,n,i,k,d,l,p,m,g,x,w,c]);(0,a.useEffect)((function(){return function(){var t;A.current||R.current||(null==(t=P.current)||t.destroy(),P.current=null)}}),[]);var C=(0,a.useCallback)((function(t){A.current=t,I()}),[I]),N=(0,a.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),zs({},t,{ref:(0,S.lq)(C,e)})}),[C]),L=(0,a.useCallback)((function(t){R.current=t,I()}),[I]),B=(0,a.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),zs({},t,{ref:(0,S.lq)(L,e),style:zs({},t.style,{position:c,minWidth:"max-content",inset:"0 auto auto 0"})})}),[c,L]),j=(0,a.useCallback)((function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var r=t;r.size,r.shadowColor,r.bg,r.style;var n=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(r,nu);return zs({},n,{ref:e,"data-popper-arrow":"",style:ou(t)})}),[]),U=(0,a.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),zs({},t,{ref:e,"data-popper-arrow-inner":""})}),[]);return{update:function(){var t;null==(t=P.current)||t.update()},forceUpdate:function(){var t;null==(t=P.current)||t.forceUpdate()},transformOrigin:Vs.transformOrigin.varRef,referenceRef:C,popperRef:L,getPopperProps:B,getArrowProps:j,getArrowInnerProps:U,getReferenceProps:N}}function ou(t){var e=t.size,r=t.shadowColor,n=t.bg,i=zs({},t.style,{position:"absolute"});return e&&(i["--popper-arrow-size"]=e),r&&(i["--popper-arrow-shadow-color"]=r),n&&(i["--popper-arrow-bg"]=n),i}var au=r(30403),su=r(79900),uu=function(t){return{isEnabled:function(e){return t.some((function(t){return!!e[t]}))}}},cu={measureLayout:uu(["layout","layoutId","drag"]),animation:uu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:uu(["exit"]),drag:uu(["drag","dragControls"]),focus:uu(["whileFocus"]),hover:uu(["whileHover","onHoverStart","onHoverEnd"]),tap:uu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:uu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:uu(["whileInView","onViewportEnter","onViewportLeave"])};var fu=(0,a.createContext)({strict:!1}),lu=Object.keys(cu),hu=lu.length;var du=(0,a.createContext)({transformPagePoint:function(t){return t},isStatic:!1,reducedMotion:"never"}),pu=(0,a.createContext)({});var vu=(0,a.createContext)(null),mu="undefined"!=typeof window,yu=mu?a.useLayoutEffect:a.useEffect,gu={current:null},bu=!1;function wu(){return!bu&&function(){if(bu=!0,"undefined"!=typeof window)if(window.matchMedia){var t=window.matchMedia("(prefers-reduced-motion)"),e=function(){return gu.current=t.matches};t.addListener(e),e()}else gu.current=!1}(),(0,su.__read)((0,a.useState)(gu.current),1)[0]}function _u(t,e,r,n){var i,o,s=(0,a.useContext)(fu),u=(0,a.useContext)(pu).visualElement,c=(0,a.useContext)(vu),f=(i=wu(),"never"!==(o=(0,a.useContext)(du).reducedMotion)&&("always"===o||i)),l=(0,a.useRef)(void 0);n||(n=s.renderer),!l.current&&n&&(l.current=n(t,{visualState:e,parent:u,props:r,presenceId:null==c?void 0:c.id,blockInitialAnimation:!1===(null==c?void 0:c.initial),shouldReduceMotion:f}));var h=l.current;return yu((function(){null==h||h.syncRender()})),(0,a.useEffect)((function(){var t;null===(t=null==h?void 0:h.animationState)||void 0===t||t.animateChanges()})),yu((function(){return function(){return null==h?void 0:h.notifyUnmount()}}),[]),h}function xu(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function ku(t){return Array.isArray(t)}function Eu(t){return"string"==typeof t||ku(t)}function Mu(t,e,r,n,i){var o;return void 0===n&&(n={}),void 0===i&&(i={}),"function"==typeof e&&(e=e(null!=r?r:t.custom,n,i)),"string"==typeof e&&(e=null===(o=t.variants)||void 0===o?void 0:o[e]),"function"==typeof e&&(e=e(null!=r?r:t.custom,n,i)),e}function Au(t,e,r){var n=t.getProps();return Mu(n,e,null!=r?r:n.custom,function(t){var e={};return t.forEachValue((function(t,r){return e[r]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,r){return e[r]=t.getVelocity()})),e}(t))}function Su(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||Eu(t.initial)||Eu(t.animate)||Eu(t.whileHover)||Eu(t.whileDrag)||Eu(t.whileTap)||Eu(t.whileFocus)||Eu(t.exit)}function Ru(t){return Boolean(Su(t)||t.variants)}function Pu(t){var e=function(t,e){if(Su(t)){var r=t.initial,n=t.animate;return{initial:!1===r||Eu(r)?r:void 0,animate:Eu(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,(0,a.useContext)(pu)),r=e.initial,n=e.animate;return(0,a.useMemo)((function(){return{initial:r,animate:n}}),[Tu(r),Tu(n)])}function Tu(t){return Array.isArray(t)?t.join(" "):t}function Ou(t){var e=(0,a.useRef)(null);return null===e.current&&(e.current=t()),e.current}var Iu=1/60*1e3,Cu="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},Nu="undefined"!=typeof window?function(t){return window.requestAnimationFrame(t)}:function(t){return setTimeout((function(){return t(Cu())}),Iu)};var Lu=!0,Bu=!1,ju=!1,Uu={delta:0,timestamp:0},Fu=["read","update","preRender","render","postRender"],qu=Fu.reduce((function(t,e){return t[e]=function(t){var e=[],r=[],n=0,i=!1,o=!1,a=new WeakSet,s={schedule:function(t){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&i,s=o?e:r;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&a.add(t),-1===s.indexOf(t)&&(s.push(t),o&&i&&(n=e.length)),t},cancel:function(t){var e=r.indexOf(t);-1!==e&&r.splice(e,1),a.delete(t)},process:function(u){if(i)o=!0;else{i=!0;var c=[r,e];if(e=c[0],(r=c[1]).length=0,n=e.length)for(var f=0;f<n;f++){var l=e[f];l(u),a.has(l)&&(s.schedule(l),t())}i=!1,o&&(o=!1,s.process(u))}}};return s}((function(){return Bu=!0})),t}),{}),Du=Fu.reduce((function(t,e){var r=qu[e];return t[e]=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Bu||Ku(),r.schedule(t,e,n)},t}),{}),zu=Fu.reduce((function(t,e){return t[e]=qu[e].cancel,t}),{}),Hu=Fu.reduce((function(t,e){return t[e]=function(){return qu[e].process(Uu)},t}),{}),Vu=function(t){return qu[t].process(Uu)},Wu=function t(e){Bu=!1,Uu.delta=Lu?Iu:Math.max(Math.min(e-Uu.timestamp,40),1),Uu.timestamp=e,ju=!0,Fu.forEach(Vu),ju=!1,Bu&&(Lu=!1,Nu(t))},Ku=function(){Bu=!0,Lu=!0,ju||Nu(Wu)},Gu=function(){return Uu},Zu=Du,Ju=function(t,e,r){return-r*t+r*e+t};function $u(t,e){return e?t*(1e3/e):0}function Yu(t,e){-1===t.indexOf(e)&&t.push(e)}function Xu(t,e){var r=t.indexOf(e);r>-1&&t.splice(r,1)}var Qu=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e=this;return Yu(this.subscriptions,t),function(){return Xu(e.subscriptions,t)}},t.prototype.notify=function(t,e,r){var n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,r);else for(var i=0;i<n;i++){var o=this.subscriptions[i];o&&o(t,e,r)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),tc=function(){function t(t){var e,r=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Qu,this.velocityUpdateSubscribers=new Qu,this.renderSubscribers=new Qu,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),r.prev=r.current,r.current=t;var n=Gu(),i=n.delta,o=n.timestamp;r.lastUpdated!==o&&(r.timeDelta=i,r.lastUpdated=o,Zu.postRender(r.scheduleVelocityCheck)),r.prev!==r.current&&r.updateSubscribers.notify(r.current),r.velocityUpdateSubscribers.getSize()&&r.velocityUpdateSubscribers.notify(r.getVelocity()),e&&r.renderSubscribers.notify(r.current)},this.scheduleVelocityCheck=function(){return Zu.postRender(r.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==r.lastUpdated&&(r.prev=r.current,r.velocityUpdateSubscribers.notify(r.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?$u(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(r){e.hasAnimated=!0,e.stopAnimation=t(r)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function ec(t){return new tc(t)}var rc=function(t){return Boolean(null!==t&&"object"==typeof t&&t.getVelocity)};var nc=function(t,e,r){return Math.min(Math.max(r,t),e)},ic=.001;function oc(t){var e,r,n=t.duration,i=void 0===n?800:n,o=t.bounce,a=void 0===o?.25:o,s=t.velocity,u=void 0===s?0:s,c=t.mass,f=void 0===c?1:c,l=1-a;l=nc(.05,1,l),i=nc(.01,10,i/1e3),l<1?(e=function(t){var e=t*l,r=e*i,n=e-u,o=ac(t,l),a=Math.exp(-r);return ic-n/o*a},r=function(t){var r=t*l*i,n=r*u+u,o=Math.pow(l,2)*Math.pow(t,2)*i,a=Math.exp(-r),s=ac(Math.pow(t,2),l);return(-e(t)+ic>0?-1:1)*((n-o)*a)/s}):(e=function(t){return Math.exp(-t*i)*((t-u)*i+1)-.001},r=function(t){return Math.exp(-t*i)*(i*i*(u-t))});var h=function(t,e,r){for(var n=r,i=1;i<12;i++)n-=t(n)/e(n);return n}(e,r,5/i);if(i*=1e3,isNaN(h))return{stiffness:100,damping:10,duration:i};var d=Math.pow(h,2)*f;return{stiffness:d,damping:2*l*Math.sqrt(f*d),duration:i}}function ac(t,e){return t*Math.sqrt(1-e*e)}var sc=["duration","bounce"],uc=["stiffness","damping","mass"];function cc(t,e){return e.some((function(e){return void 0!==t[e]}))}function fc(t){var e=t.from,r=void 0===e?0:e,n=t.to,i=void 0===n?1:n,o=t.restSpeed,a=void 0===o?2:o,s=t.restDelta,u=(0,su.__rest)(t,["from","to","restSpeed","restDelta"]),c={done:!1,value:r},f=function(t){var e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!cc(t,uc)&&cc(t,sc)){var r=oc(t);(e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1})).isResolvedFromDuration=!0}return e}(u),l=f.stiffness,h=f.damping,d=f.mass,p=f.velocity,v=f.duration,m=f.isResolvedFromDuration,y=lc,g=lc;function b(){var t=p?-p/1e3:0,e=i-r,n=h/(2*Math.sqrt(l*d)),o=Math.sqrt(l/d)/1e3;if(void 0===s&&(s=Math.min(Math.abs(i-r)/100,.4)),n<1){var a=ac(o,n);y=function(r){var s=Math.exp(-n*o*r);return i-s*((t+n*o*e)/a*Math.sin(a*r)+e*Math.cos(a*r))},g=function(r){var i=Math.exp(-n*o*r);return n*o*i*(Math.sin(a*r)*(t+n*o*e)/a+e*Math.cos(a*r))-i*(Math.cos(a*r)*(t+n*o*e)-a*e*Math.sin(a*r))}}else if(1===n)y=function(r){return i-Math.exp(-o*r)*(e+(t+o*e)*r)};else{var u=o*Math.sqrt(n*n-1);y=function(r){var a=Math.exp(-n*o*r),s=Math.min(u*r,300);return i-a*((t+n*o*e)*Math.sinh(s)+u*e*Math.cosh(s))/u}}}return b(),{next:function(t){var e=y(t);if(m)c.done=t>=v;else{var r=1e3*g(t),n=Math.abs(r)<=a,o=Math.abs(i-e)<=s;c.done=n&&o}return c.value=c.done?i:e,c},flipTarget:function(){p=-p;var t=[i,r];r=t[0],i=t[1],b()}}}fc.needsInterpolation=function(t,e){return"string"==typeof t||"string"==typeof e};var lc=function(t){return 0};var hc=r(40181);function dc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}(t,e)||(0,hc.Z)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var pc=function(t,e,r){var n=e-t;return 0===n?1:(r-t)/n},vc=function(t,e){return function(r){return Math.max(Math.min(r,e),t)}},mc=function(t){return t%1?Number(t.toFixed(5)):t},yc=/(-)?([\d]*\.?[\d])+/g,gc=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,bc=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function wc(t){return"string"==typeof t}var _c={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},xc=Object.assign(Object.assign({},_c),{transform:vc(0,1)}),kc=Object.assign(Object.assign({},_c),{default:1}),Ec=function(t,e){return function(r){return Boolean(wc(r)&&bc.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e))}},Mc=function(t,e,r){return function(n){var i;if(!wc(n))return n;var o=dc(n.match(yc),4),a=o[0],s=o[1],u=o[2],c=o[3];return _t(i={},t,parseFloat(a)),_t(i,e,parseFloat(s)),_t(i,r,parseFloat(u)),_t(i,"alpha",void 0!==c?parseFloat(c):1),i}},Ac=vc(0,255),Sc=Object.assign(Object.assign({},_c),{transform:function(t){return Math.round(Ac(t))}}),Rc={test:Ec("rgb","red"),parse:Mc("red","green","blue"),transform:function(t){var e=t.red,r=t.green,n=t.blue,i=t.alpha,o=void 0===i?1:i;return"rgba("+Sc.transform(e)+", "+Sc.transform(r)+", "+Sc.transform(n)+", "+mc(xc.transform(o))+")"}};var Pc={test:Ec("#"),parse:function(t){var e="",r="",n="",i="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),i=t.substr(4,1),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:Rc.transform},Tc=function(t){return{test:function(e){return wc(e)&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return"".concat(e).concat(t)}}},Oc=Tc("deg"),Ic=Tc("%"),Cc=Tc("px"),Nc=Tc("vh"),Lc=Tc("vw"),Bc=Object.assign(Object.assign({},Ic),{parse:function(t){return Ic.parse(t)/100},transform:function(t){return Ic.transform(100*t)}}),jc={test:Ec("hsl","hue"),parse:Mc("hue","saturation","lightness"),transform:function(t){var e=t.hue,r=t.saturation,n=t.lightness,i=t.alpha,o=void 0===i?1:i;return"hsla("+Math.round(e)+", "+Ic.transform(mc(r))+", "+Ic.transform(mc(n))+", "+mc(xc.transform(o))+")"}};function Uc(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Fc(t){var e=t.hue,r=t.saturation,n=t.lightness,i=t.alpha;e/=360,n/=100;var o=0,a=0,s=0;if(r/=100){var u=n<.5?n*(1+r):n+r-n*r,c=2*n-u;o=Uc(c,u,e+1/3),a=Uc(c,u,e),s=Uc(c,u,e-1/3)}else o=a=s=n;return{red:Math.round(255*o),green:Math.round(255*a),blue:Math.round(255*s),alpha:i}}var qc=function(t,e,r){var n=t*t,i=e*e;return Math.sqrt(Math.max(0,r*(i-n)+n))},Dc=[Pc,Rc,jc],zc=function(t){return Dc.find((function(e){return e.test(t)}))},Hc=function(t){return"'".concat(t,"' is not an animatable color. Use the equivalent color code instead.")},Vc=function(t,e){var r=zc(t),n=zc(e);Hc(t),Hc(e);var i=r.parse(t),o=n.parse(e);r===jc&&(i=Fc(i),r=Rc),n===jc&&(o=Fc(o),n=Rc);var a=Object.assign({},i);return function(t){for(var e in a)"alpha"!==e&&(a[e]=qc(i[e],o[e],t));return a.alpha=Ju(i.alpha,o.alpha,t),r.transform(a)}},Wc={test:function(t){return Rc.test(t)||Pc.test(t)||jc.test(t)},parse:function(t){return Rc.test(t)?Rc.parse(t):jc.test(t)?jc.parse(t):Pc.parse(t)},transform:function(t){return wc(t)?t:t.hasOwnProperty("red")?Rc.transform(t):jc.transform(t)}},Kc="${c}",Gc="${n}";function Zc(t){"number"==typeof t&&(t="".concat(t));var e=[],r=0,n=t.match(gc);n&&(r=n.length,t=t.replace(gc,Kc),e.push.apply(e,(0,st.Z)(n.map(Wc.parse))));var i=t.match(yc);return i&&(t=t.replace(yc,Gc),e.push.apply(e,(0,st.Z)(i.map(_c.parse)))),{values:e,numColors:r,tokenised:t}}function Jc(t){return Zc(t).values}function $c(t){var e=Zc(t),r=e.values,n=e.numColors,i=e.tokenised,o=r.length;return function(t){for(var e=i,r=0;r<o;r++)e=e.replace(r<n?Kc:Gc,r<n?Wc.transform(t[r]):mc(t[r]));return e}}var Yc=function(t){return"number"==typeof t?0:t};var Xc={test:function(t){var e,r,n,i;return isNaN(t)&&wc(t)&&(null!==(r=null===(e=t.match(yc))||void 0===e?void 0:e.length)&&void 0!==r?r:0)+(null!==(i=null===(n=t.match(gc))||void 0===n?void 0:n.length)&&void 0!==i?i:0)>0},parse:Jc,createTransformer:$c,getAnimatableNone:function(t){var e=Jc(t);return $c(t)(e.map(Yc))}},Qc=function(t){return"number"==typeof t},tf=function(t,e){return function(r){return e(t(r))}},ef=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.reduce(tf)};function rf(t,e){return Qc(t)?function(r){return Ju(t,e,r)}:Wc.test(t)?Vc(t,e):sf(t,e)}var nf=function(t,e){var r=(0,st.Z)(t),n=r.length,i=t.map((function(t,r){return rf(t,e[r])}));return function(t){for(var e=0;e<n;e++)r[e]=i[e](t);return r}},of=function(t,e){var r=Object.assign(Object.assign({},t),e),n={};for(var i in r)void 0!==t[i]&&void 0!==e[i]&&(n[i]=rf(t[i],e[i]));return function(t){for(var e in n)r[e]=n[e](t);return r}};function af(t){for(var e=Xc.parse(t),r=e.length,n=0,i=0,o=0,a=0;a<r;a++)n||"number"==typeof e[a]?n++:void 0!==e[a].hue?o++:i++;return{parsed:e,numNumbers:n,numRGB:i,numHSL:o}}var sf=function(t,e){var r=Xc.createTransformer(e),n=af(t),i=af(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?ef(nf(n.parsed,i.parsed),r):("Complex values '".concat(t,"' and '").concat(e,"' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition."),function(r){return"".concat(r>0?e:t)})},uf=function(t,e){return function(r){return Ju(t,e,r)}};function cf(t,e,r){for(var n,i=[],o=r||("number"==typeof(n=t[0])?uf:"string"==typeof n?Wc.test(n)?Vc:sf:Array.isArray(n)?nf:"object"==typeof n?of:void 0),a=t.length-1,s=0;s<a;s++){var u=o(t[s],t[s+1]);if(e){var c=Array.isArray(e)?e[s]:e;u=ef(c,u)}i.push(u)}return i}function ff(t,e){var r=dc(t,2),n=r[0],i=r[1],o=dc(e,1)[0];return function(t){return o(pc(n,i,t))}}function lf(t,e){var r=t.length,n=r-1;return function(i){var o=0,a=!1;if(i<=t[0]?a=!0:i>=t[n]&&(o=n-1,a=!0),!a){for(var s=1;s<r&&!(t[s]>i||s===n);s++);o=s-1}var u=pc(t[o],t[o+1],i);return e[o](u)}}function hf(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.clamp,i=void 0===n||n,o=r.ease,a=r.mixer,s=t.length;e.length,!o||!Array.isArray(o)||o.length,t[0]>t[s-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());var u=cf(e,o,a),c=2===s?ff(t,u):lf(t,u);return i?function(e){return c(nc(t[0],t[s-1],e))}:c}var df,pf=function(t){return function(e){return 1-t(1-e)}},vf=function(t){return function(e){return e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2}},mf=function(t){return function(e){return e*e*((t+1)*e-t)}},yf=function(t){return t},gf=(df=2,function(t){return Math.pow(t,df)}),bf=pf(gf),wf=vf(gf),_f=function(t){return 1-Math.sin(Math.acos(t))},xf=pf(_f),kf=vf(xf),Ef=mf(1.525),Mf=pf(Ef),Af=vf(Ef),Sf=function(t){var e=mf(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}}(1.525),Rf=function(t){if(1===t||0===t)return t;var e=t*t;return t<.36363636363636365?7.5625*e:t<.7272727272727273?9.075*e-9.9*t+3.4:t<.9?12.066481994459833*e-19.63545706371191*t+8.898060941828255:10.8*t*t-20.52*t+10.72},Pf=pf(Rf);function Tf(t,e){return t.map((function(){return e||wf})).splice(0,t.length-1)}function Of(t){var e=t.from,r=void 0===e?0:e,n=t.to,i=void 0===n?1:n,o=t.ease,a=t.offset,s=t.duration,u=void 0===s?300:s,c={done:!1,value:r},f=Array.isArray(i)?i:[r,i],l=function(t,e){return t.map((function(t){return t*e}))}(a&&a.length===f.length?a:function(t){var e=t.length;return t.map((function(t,r){return 0!==r?r/(e-1):0}))}(f),u);function h(){return hf(l,f,{ease:Array.isArray(o)?o:Tf(f,o)})}var d=h();return{next:function(t){return c.value=d(t),c.done=t>=u,c},flipTarget:function(){f.reverse(),d=h()}}}var If={keyframes:Of,spring:fc,decay:function(t){var e=t.velocity,r=void 0===e?0:e,n=t.from,i=void 0===n?0:n,o=t.power,a=void 0===o?.8:o,s=t.timeConstant,u=void 0===s?350:s,c=t.restDelta,f=void 0===c?.5:c,l=t.modifyTarget,h={done:!1,value:i},d=a*r,p=i+d,v=void 0===l?p:l(p);return v!==p&&(d=v-i),{next:function(t){var e=-d*Math.exp(-t/u);return h.done=!(e>f||e<-f),h.value=h.done?v:v+e,h},flipTarget:function(){}}}};function Cf(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t-e-r}var Nf=function(t){var e=function(e){var r=e.delta;return t(r)};return{start:function(){return Zu.update(e,!0)},stop:function(){return zu.update(e)}}};function Lf(t){var e,r,n,i,o,a=t.from,s=t.autoplay,u=void 0===s||s,c=t.driver,f=void 0===c?Nf:c,l=t.elapsed,h=void 0===l?0:l,d=t.repeat,p=void 0===d?0:d,v=t.repeatType,m=void 0===v?"loop":v,y=t.repeatDelay,g=void 0===y?0:y,b=t.onPlay,w=t.onStop,_=t.onComplete,x=t.onRepeat,k=t.onUpdate,E=(0,su.__rest)(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),M=E.to,A=0,S=E.duration,R=!1,P=!0,T=function(t){if(Array.isArray(t.to))return Of;if(If[t.type])return If[t.type];var e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Of:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?fc:Of}(E);(null===(r=(e=T).needsInterpolation)||void 0===r?void 0:r.call(e,a,M))&&(o=hf([0,100],[a,M],{clamp:!1}),a=0,M=100);var O=T(Object.assign(Object.assign({},E),{from:a,to:M}));function I(){A++,"reverse"===m?h=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?e-(t-e)+r:Cf(e+-t,e,r)}(h,S,g,P=A%2==0):(h=Cf(h,S,g),"mirror"===m&&O.flipTarget()),R=!1,x&&x()}function C(t){if(P||(t=-t),h+=t,!R){var e=O.next(Math.max(0,h));i=e.value,o&&(i=o(i)),R=P?e.done:h<=0}null==k||k(i),R&&(0===A&&(null!=S||(S=h)),A<p?function(t,e,r,n){return n?t>=e+r:t<=-r}(h,S,g,P)&&I():(n.stop(),_&&_()))}return u&&(null==b||b(),(n=f(C)).start()),{stop:function(){null==w||w(),n.stop()}}}var Bf=function(t){return 1e3*t},jf=function(t,e){return 1-3*e+3*t},Uf=function(t,e){return 3*e-6*t},Ff=function(t){return 3*t},qf=function(t,e,r){return((jf(e,r)*t+Uf(e,r))*t+Ff(e))*t},Df=function(t,e,r){return 3*jf(e,r)*t*t+2*Uf(e,r)*t+Ff(e)};var zf=.1;function Hf(t,e,r,n){if(t===e&&r===n)return yf;for(var i=new Float32Array(11),o=0;o<11;++o)i[o]=qf(o*zf,t,r);function a(e){for(var n=0,o=1;10!==o&&i[o]<=e;++o)n+=zf;--o;var a=n+(e-i[o])/(i[o+1]-i[o])*zf,s=Df(a,t,r);return s>=.001?function(t,e,r,n){for(var i=0;i<8;++i){var o=Df(e,r,n);if(0===o)return e;e-=(qf(e,r,n)-t)/o}return e}(e,a,t,r):0===s?a:function(t,e,r,n,i){var o,a,s=0;do{(o=qf(a=e+(r-e)/2,n,i)-t)>0?r=a:e=a}while(Math.abs(o)>1e-7&&++s<10);return a}(e,n,n+zf,t,r)}return function(t){return 0===t||1===t?t:qf(a(t),e,n)}}var Vf={linear:yf,easeIn:gf,easeInOut:wf,easeOut:bf,circIn:_f,circInOut:kf,circOut:xf,backIn:Ef,backInOut:Af,backOut:Mf,anticipate:Sf,bounceIn:Pf,bounceInOut:function(t){return t<.5?.5*(1-Rf(1-2*t)):.5*Rf(2*t-1)+.5},bounceOut:Rf},Wf=function(t){if(Array.isArray(t)){t.length;var e=(0,su.__read)(t,4);return Hf(e[0],e[1],e[2],e[3])}return"string"==typeof t?("Invalid easing type '".concat(t,"'"),Vf[t]):t},Kf=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Xc.test(e)||e.startsWith("url(")))},Gf=function(t){return Array.isArray(t)},Zf=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},Jf=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}},$f=function(){return{type:"keyframes",ease:"linear",duration:.3}},Yf=function(t){return{type:"keyframes",duration:.8,values:t}},Xf={x:Zf,y:Zf,z:Zf,rotate:Zf,rotateX:Zf,rotateY:Zf,rotateZ:Zf,scaleX:Jf,scaleY:Jf,scale:Jf,opacity:$f,backgroundColor:$f,color:$f,default:Jf},Qf=new Set(["brightness","contrast","saturate","opacity"]);function tl(t){var e=dc(t.slice(0,-1).split("("),2),r=e[0],n=e[1];if("drop-shadow"===r)return t;var i=dc(n.match(yc)||[],1)[0];if(!i)return t;var o=n.replace(i,""),a=Qf.has(r)?1:0;return i!==n&&(a*=100),r+"("+a+o+")"}var el=/([a-z-]*)\(.*?\)/g,rl=Object.assign(Object.assign({},Xc),{getAnimatableNone:function(t){var e=t.match(el);return e?e.map(tl).join(" "):t}}),nl=(0,su.__assign)((0,su.__assign)({},_c),{transform:Math.round}),il={borderWidth:Cc,borderTopWidth:Cc,borderRightWidth:Cc,borderBottomWidth:Cc,borderLeftWidth:Cc,borderRadius:Cc,radius:Cc,borderTopLeftRadius:Cc,borderTopRightRadius:Cc,borderBottomRightRadius:Cc,borderBottomLeftRadius:Cc,width:Cc,maxWidth:Cc,height:Cc,maxHeight:Cc,size:Cc,top:Cc,right:Cc,bottom:Cc,left:Cc,padding:Cc,paddingTop:Cc,paddingRight:Cc,paddingBottom:Cc,paddingLeft:Cc,margin:Cc,marginTop:Cc,marginRight:Cc,marginBottom:Cc,marginLeft:Cc,rotate:Oc,rotateX:Oc,rotateY:Oc,rotateZ:Oc,scale:kc,scaleX:kc,scaleY:kc,scaleZ:kc,skew:Oc,skewX:Oc,skewY:Oc,distance:Cc,translateX:Cc,translateY:Cc,translateZ:Cc,x:Cc,y:Cc,z:Cc,perspective:Cc,transformPerspective:Cc,opacity:xc,originX:Bc,originY:Bc,originZ:Cc,zIndex:nl,fillOpacity:xc,strokeOpacity:xc,numOctaves:nl},ol=(0,su.__assign)((0,su.__assign)({},il),{color:Wc,backgroundColor:Wc,outlineColor:Wc,fill:Wc,stroke:Wc,borderColor:Wc,borderTopColor:Wc,borderRightColor:Wc,borderBottomColor:Wc,borderLeftColor:Wc,filter:rl,WebkitFilter:rl}),al=function(t){return ol[t]};function sl(t,e){var r,n=al(t);return n!==rl&&(n=Xc),null===(r=n.getAnimatableNone)||void 0===r?void 0:r.call(n,e)}var ul=!1,cl=function(t){return Gf(t)?t[t.length-1]||0:t};function fl(t){var e=t.ease,r=t.times,n=t.yoyo,i=t.flip,o=t.loop,a=(0,su.__rest)(t,["ease","times","yoyo","flip","loop"]),s=(0,su.__assign)({},a);return r&&(s.offset=r),a.duration&&(s.duration=Bf(a.duration)),a.repeatDelay&&(s.repeatDelay=Bf(a.repeatDelay)),e&&(s.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(e)?e.map(Wf):Wf(e)),"tween"===a.type&&(s.type="keyframes"),(n||o||i)&&(!0,n?s.repeatType="reverse":o?s.repeatType="loop":i&&(s.repeatType="mirror"),s.repeat=o||n||i||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}function ll(t,e,r){var n,i,o,a;return Array.isArray(e.to)&&(null!==(n=t.duration)&&void 0!==n||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=(0,su.__spreadArray)([],(0,su.__read)(t.to),!1),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=(0,su.__rest)(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=(0,su.__assign)((0,su.__assign)({},t),(i=r,o=e.to,a=Gf(o)?Yf:Xf[i]||Xf.default,(0,su.__assign)({to:o},a(o))))),(0,su.__assign)((0,su.__assign)({},e),fl(t))}function hl(t,e,r,n,i){var o,a=vl(n,t),s=null!==(o=a.from)&&void 0!==o?o:e.get(),u=Kf(t,r);"none"===s&&u&&"string"==typeof r?s=sl(t,r):dl(s)&&"string"==typeof r?s=pl(r):!Array.isArray(r)&&dl(r)&&"string"==typeof s&&(r=pl(s));var c=Kf(t,s);return"You are trying to animate ".concat(t,' from "').concat(s,'" to "').concat(r,'". ').concat(s," is not an animatable value - to enable this animation set ").concat(s," to a value animatable to ").concat(r," via the `style` property."),c&&u&&!1!==a.type?function(){var n={from:s,to:r,velocity:e.getVelocity(),onComplete:i,onUpdate:function(t){return e.set(t)}};return"inertia"===a.type||"decay"===a.type?function(t){var e,r=t.from,n=void 0===r?0:r,i=t.velocity,o=void 0===i?0:i,a=t.min,s=t.max,u=t.power,c=void 0===u?.8:u,f=t.timeConstant,l=void 0===f?750:f,h=t.bounceStiffness,d=void 0===h?500:h,p=t.bounceDamping,v=void 0===p?10:p,m=t.restDelta,y=void 0===m?1:m,g=t.modifyTarget,b=t.driver,w=t.onUpdate,_=t.onComplete,x=t.onStop;function k(t){return void 0!==a&&t<a||void 0!==s&&t>s}function E(t){return void 0===a?s:void 0===s||Math.abs(a-t)<Math.abs(s-t)?a:s}function M(t){null==e||e.stop(),e=Lf(Object.assign(Object.assign({},t),{driver:b,onUpdate:function(e){var r;null==w||w(e),null===(r=t.onUpdate)||void 0===r||r.call(t,e)},onComplete:_,onStop:x}))}function A(t){M(Object.assign({type:"spring",stiffness:d,damping:v,restDelta:y},t))}if(k(n))A({from:n,velocity:o,to:E(n)});else{var S=c*o+n;void 0!==g&&(S=g(S));var R,P,T=E(S),O=T===a?-1:1;M({type:"decay",from:n,velocity:o,timeConstant:l,power:c,restDelta:y,modifyTarget:g,onUpdate:k(S)?function(t){R=P,P=t,o=$u(t-R,Gu().delta),(1===O&&t>T||-1===O&&t<T)&&A({from:t,to:T,velocity:o})}:void 0})}return{stop:function(){return null==e?void 0:e.stop()}}}((0,su.__assign)((0,su.__assign)({},n),a)):Lf((0,su.__assign)((0,su.__assign)({},ll(a,n,t)),{onUpdate:function(t){var e;n.onUpdate(t),null===(e=a.onUpdate)||void 0===e||e.call(a,t)},onComplete:function(){var t;n.onComplete(),null===(t=a.onComplete)||void 0===t||t.call(a)}}))}:function(){var t,n,o=cl(r);return e.set(o),i(),null===(t=null==a?void 0:a.onUpdate)||void 0===t||t.call(a,o),null===(n=null==a?void 0:a.onComplete)||void 0===n||n.call(a),{stop:function(){}}}}function dl(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function pl(t){return"number"==typeof t?0:sl("",t)}function vl(t,e){return t[e]||t.default||t}function ml(t,e,r,n){return void 0===n&&(n={}),ul&&(n={type:!1}),e.start((function(i){var o,a,s=hl(t,e,r,n,i),u=function(t,e){var r,n;return null!==(n=null!==(r=(vl(t,e)||{}).delay)&&void 0!==r?r:t.delay)&&void 0!==n?n:0}(n,t),c=function(){return a=s()};return u?o=window.setTimeout(c,Bf(u)):c(),function(){clearTimeout(o),null==a||a.stop()}}))}var yl=["TopLeft","TopRight","BottomLeft","BottomRight"],gl=yl.length,bl=function(t){return"string"==typeof t?parseFloat(t):t},wl=function(t){return"number"==typeof t||Cc.test(t)};function _l(t,e){var r;return null!==(r=t[e])&&void 0!==r?r:t.borderRadius}var xl=El(0,.5,xf),kl=El(.5,.95,yf);function El(t,e,r){return function(n){return n<t?0:n>e?1:r(pc(t,e,n))}}function Ml(t,e){t.min=e.min,t.max=e.max}function Al(t,e){Ml(t.x,e.x),Ml(t.y,e.y)}function Sl(t){return void 0===t||1===t}function Rl(t){var e=t.scale,r=t.scaleX,n=t.scaleY;return!Sl(e)||!Sl(r)||!Sl(n)}function Pl(t){return Rl(t)||Tl(t.x)||Tl(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function Tl(t){return t&&"0%"!==t}function Ol(t,e,r){return r+e*(t-r)}function Il(t,e,r,n,i){return void 0!==i&&(t=Ol(t,i,n)),Ol(t,r,n)+e}function Cl(t,e,r,n,i){void 0===e&&(e=0),void 0===r&&(r=1),t.min=Il(t.min,e,r,n,i),t.max=Il(t.max,e,r,n,i)}function Nl(t,e){var r=e.x,n=e.y;Cl(t.x,r.translate,r.scale,r.originPoint),Cl(t.y,n.translate,n.scale,n.originPoint)}function Ll(t,e){t.min=t.min+e,t.max=t.max+e}function Bl(t,e,r){var n=(0,su.__read)(r,3),i=n[0],o=n[1],a=n[2],s=void 0!==e[a]?e[a]:.5,u=Ju(t.min,t.max,s);Cl(t,e[i],e[o],u,e.scale)}var jl=["x","scaleX","originX"],Ul=["y","scaleY","originY"];function Fl(t,e){Bl(t.x,e,jl),Bl(t.y,e,Ul)}var ql=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},Dl=function(t){return ql(t)&&t.hasOwnProperty("z")},zl=function(t,e){return Math.abs(t-e)};function Hl(t,e){if(Qc(t)&&Qc(e))return zl(t,e);if(ql(t)&&ql(e)){var r=zl(t.x,e.x),n=zl(t.y,e.y),i=Dl(t)&&Dl(e)?zl(t.z,e.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(i,2))}}function Vl(t){return t.max-t.min}function Wl(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=.01),Hl(t,e)<r}function Kl(t,e,r,n){void 0===n&&(n=.5),t.origin=n,t.originPoint=Ju(e.min,e.max,t.origin),t.scale=Vl(r)/Vl(e),(Wl(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ju(r.min,r.max,t.origin)-t.originPoint,(Wl(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Gl(t,e,r,n){Kl(t.x,e.x,r.x,null==n?void 0:n.originX),Kl(t.y,e.y,r.y,null==n?void 0:n.originY)}function Zl(t,e,r){t.min=r.min+e.min,t.max=t.min+Vl(e)}function Jl(t,e,r){t.min=e.min-r.min,t.max=t.min+Vl(e)}function $l(t,e,r){Jl(t.x,e.x,r.x),Jl(t.y,e.y,r.y)}function Yl(t,e,r,n,i){return t=Ol(t-=e,1/r,n),void 0!==i&&(t=Ol(t,1/i,n)),t}function Xl(t,e,r,n,i){var o=(0,su.__read)(r,3),a=o[0],s=o[1],u=o[2];!function(t,e,r,n,i,o,a){if(void 0===e&&(e=0),void 0===r&&(r=1),void 0===n&&(n=.5),void 0===o&&(o=t),void 0===a&&(a=t),Ic.test(e)&&(e=parseFloat(e),e=Ju(a.min,a.max,e/100)-a.min),"number"==typeof e){var s=Ju(o.min,o.max,n);t===o&&(s-=e),t.min=Yl(t.min,e,r,s,i),t.max=Yl(t.max,e,r,s,i)}}(t,e[a],e[s],e[u],e.scale,n,i)}var Ql=["x","scaleX","originX"],th=["y","scaleY","originY"];function eh(t,e,r,n){Xl(t.x,e,Ql,null==r?void 0:r.x,null==n?void 0:n.x),Xl(t.y,e,th,null==r?void 0:r.y,null==n?void 0:n.y)}function rh(t){return 0===t.translate&&1===t.scale}function nh(t){return rh(t.x)&&rh(t.y)}function ih(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}var oh=function(){function t(){this.members=[]}return t.prototype.add=function(t){Yu(this.members,t),t.scheduleRender()},t.prototype.remove=function(t){if(Xu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var e=this.members[this.members.length-1];e&&this.promote(e)}},t.prototype.relegate=function(t){var e,r=this.members.findIndex((function(e){return t===e}));if(0===r)return!1;for(var n=r;n>=0;n--){var i=this.members[n];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)},t.prototype.promote=function(t,e){var r,n=this.lead;t!==n&&(this.prevLead=n,this.lead=t,t.show(),n&&(n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues,t.snapshot.isShared=!0),(null===(r=t.root)||void 0===r?void 0:r.isUpdating)&&(t.isLayoutDirty=!0),!1===t.options.crossfade&&n.hide()))},t.prototype.exitAnimationComplete=function(){this.members.forEach((function(t){var e,r,n,i,o;null===(r=(e=t.options).onExitComplete)||void 0===r||r.call(e),null===(o=null===(n=t.resumingFrom)||void 0===n?void 0:(i=n.options).onExitComplete)||void 0===o||o.call(i)}))},t.prototype.scheduleRender=function(){this.members.forEach((function(t){t.instance&&t.scheduleRender(!1)}))},t.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},t}(),ah={};function sh(t,e,r){var n=t.x.translate/e.x,i=t.y.translate/e.y,o="translate3d(".concat(n,"px, ").concat(i,"px, 0) ");if(r){var a=r.rotate,s=r.rotateX,u=r.rotateY;a&&(o+="rotate(".concat(a,"deg) ")),s&&(o+="rotateX(".concat(s,"deg) ")),u&&(o+="rotateY(".concat(u,"deg) "))}return"translate3d(0px, 0px, 0) scale(1, 1)"===(o+="scale(".concat(t.x.scale,", ").concat(t.y.scale,")"))?"none":o}function uh(t){return[t("x"),t("y")]}var ch=["","X","Y","Z"],fh=["transformPerspective","x","y","z"];function lh(t,e){return fh.indexOf(t)-fh.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return ch.forEach((function(e){return fh.push(t+e)}))}));var hh=new Set(fh);function dh(t){return hh.has(t)}var ph=new Set(["originX","originY","originZ"]);function vh(t){return ph.has(t)}var mh=function(t,e){return t.depth-e.depth},yh=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(t){Yu(this.children,t),this.isDirty=!0},t.prototype.remove=function(t){Xu(this.children,t),this.isDirty=!0},t.prototype.forEach=function(t){this.isDirty&&this.children.sort(mh),this.isDirty=!1,this.children.forEach(t)},t}();function gh(t){var e,r=rc(t)?t.get():t;return e=r,Boolean(e&&"object"==typeof e&&e.mix&&e.toValue)?r.toValue():r}var bh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wh(t){var e=t.attachResizeListener,r=t.defaultParent,n=t.measureScroll,i=t.resetTransform;return function(){function t(t,e,n){var i=this;void 0===e&&(e={}),void 0===n&&(n=null==r?void 0:r()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){i.isUpdating&&(i.isUpdating=!1,i.clearAllSnapshots())},this.updateProjection=function(){i.nodes.forEach(Sh),i.nodes.forEach(Rh)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=t,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?(0,su.__spreadArray)((0,su.__spreadArray)([],(0,su.__read)(n.path),!1),[n],!1):[],this.parent=n,this.depth=n?n.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(var o=0;o<this.path.length;o++)this.path[o].shouldResetTransform=!0;this.root===this&&(this.nodes=new yh)}return t.prototype.addEventListener=function(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Qu),this.eventHandlers.get(t).add(e)},t.prototype.notifyListeners=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=this.eventHandlers.get(t);null==n||n.notify.apply(n,(0,su.__spreadArray)([],(0,su.__read)(e),!1))},t.prototype.hasListeners=function(t){return this.eventHandlers.has(t)},t.prototype.registerPotentialNode=function(t,e){this.potentialNodes.set(t,e)},t.prototype.mount=function(t,r){var n,i=this;if(void 0===r&&(r=!1),!this.instance){this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;var o=this.options,a=o.layoutId,s=o.layout,u=o.visualElement;if(u&&!u.getInstance()&&u.mount(t),this.root.nodes.add(this),null===(n=this.parent)||void 0===n||n.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),r&&(s||a)&&(this.isLayoutDirty=!0),e){var c,f=function(){return i.root.updateBlockedByResize=!1};e(t,(function(){i.root.updateBlockedByResize=!0,clearTimeout(c),c=window.setTimeout(f,250),bh.hasAnimatedSinceResize&&(bh.hasAnimatedSinceResize=!1,i.nodes.forEach(Ah))}))}a&&this.root.registerSharedNode(a,this),!1!==this.options.animate&&u&&(a||s)&&this.addEventListener("didUpdate",(function(t){var e,r,n,o,a,s=t.delta,c=t.hasLayoutChanged,f=t.hasRelativeTargetChanged,l=t.layout;if(i.isTreeAnimationBlocked())return i.target=void 0,void(i.relativeTarget=void 0);var h=null!==(r=null!==(e=i.options.transition)&&void 0!==e?e:u.getDefaultTransition())&&void 0!==r?r:Nh,d=u.getProps().onLayoutAnimationComplete,p=!i.targetLayout||!ih(i.targetLayout,l)||f,v=!c&&f;if((null===(n=i.resumeFrom)||void 0===n?void 0:n.instance)||v||c&&(p||!i.currentAnimation)){i.resumeFrom&&(i.resumingFrom=i.resumeFrom,i.resumingFrom.resumingFrom=void 0),i.setAnimationOrigin(s,v);var m=(0,su.__assign)((0,su.__assign)({},vl(h,"layout")),{onComplete:d});u.shouldReduceMotion&&(m.delay=0,m.type=!1),i.startAnimation(m)}else c||0!==i.animationProgress||i.finishAnimation(),i.isLead()&&(null===(a=(o=i.options).onExitComplete)||void 0===a||a.call(o));i.targetLayout=l}))}},t.prototype.unmount=function(){var t,e;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(t=this.getStack())||void 0===t||t.remove(this),null===(e=this.parent)||void 0===e||e.children.delete(this),this.instance=void 0,zu.preRender(this.updateProjection)},t.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},t.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},t.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},t.prototype.isTreeAnimationBlocked=function(){var t;return this.isAnimationBlocked||(null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimationBlocked())||!1},t.prototype.startUpdate=function(){var t;this.isUpdateBlocked()||(this.isUpdating=!0,null===(t=this.nodes)||void 0===t||t.forEach(Ph))},t.prototype.willUpdate=function(t){var e,r,n;if(void 0===t&&(t=!0),this.root.isUpdateBlocked())null===(r=(e=this.options).onExitComplete)||void 0===r||r.call(e);else if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var i=0;i<this.path.length;i++){var o=this.path[i];o.shouldResetTransform=!0,o.updateScroll()}var a=this.options,s=a.layoutId,u=a.layout;if(void 0!==s||u){var c=null===(n=this.options.visualElement)||void 0===n?void 0:n.getProps().transformTemplate;this.prevTransformTemplateValue=null==c?void 0:c(this.latestValues,""),this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}}},t.prototype.didUpdate=function(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Eh);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(Lh),this.potentialNodes.clear()),this.nodes.forEach(Mh),this.nodes.forEach(_h),this.nodes.forEach(xh),this.clearAllSnapshots(),Hu.update(),Hu.preRender(),Hu.render())},t.prototype.clearAllSnapshots=function(){this.nodes.forEach(kh),this.sharedNodes.forEach(Th)},t.prototype.scheduleUpdateProjection=function(){Zu.preRender(this.updateProjection,!1,!0)},t.prototype.scheduleCheckAfterUnmount=function(){var t=this;Zu.postRender((function(){t.isLayoutDirty?t.root.didUpdate():t.root.checkUpdateFailed()}))},t.prototype.updateSnapshot=function(){if(!this.snapshot&&this.instance){var t=this.measure(),e=this.removeTransform(this.removeElementScroll(t));jh(e),this.snapshot={measured:t,layout:e,latestValues:{}}}},t.prototype.updateLayout=function(){var t;if(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)){if(this.resumeFrom&&!this.resumeFrom.instance)for(var e=0;e<this.path.length;e++){this.path[e].updateScroll()}var r=this.measure();jh(r);var n=this.layout;this.layout={measured:r,actual:this.removeElementScroll(r)},this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),null===(t=this.options.visualElement)||void 0===t||t.notifyLayoutMeasure(this.layout.actual,null==n?void 0:n.actual)}},t.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.scroll=n(this.instance))},t.prototype.resetTransform=function(){var t;if(i){var e=this.isLayoutDirty||this.shouldResetTransform,r=this.projectionDelta&&!nh(this.projectionDelta),n=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate,o=null==n?void 0:n(this.latestValues,""),a=o!==this.prevTransformTemplateValue;e&&(r||Pl(this.latestValues)||a)&&(i(this.instance,o),this.shouldResetTransform=!1,this.scheduleRender())}},t.prototype.measure=function(){var t=this.options.visualElement;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};var e=t.measureViewportBox(),r=this.root.scroll;return r&&(Ll(e.x,r.x),Ll(e.y,r.y)),e},t.prototype.removeElementScroll=function(t){var e={x:{min:0,max:0},y:{min:0,max:0}};Al(e,t);for(var r=0;r<this.path.length;r++){var n=this.path[r],i=n.scroll,o=n.options;n!==this.root&&i&&o.layoutScroll&&(Ll(e.x,i.x),Ll(e.y,i.y))}return e},t.prototype.applyTransform=function(t,e){void 0===e&&(e=!1);var r={x:{min:0,max:0},y:{min:0,max:0}};Al(r,t);for(var n=0;n<this.path.length;n++){var i=this.path[n];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Fl(r,{x:-i.scroll.x,y:-i.scroll.y}),Pl(i.latestValues)&&Fl(r,i.latestValues)}return Pl(this.latestValues)&&Fl(r,this.latestValues),r},t.prototype.removeTransform=function(t){var e,r={x:{min:0,max:0},y:{min:0,max:0}};Al(r,t);for(var n=0;n<this.path.length;n++){var i=this.path[n];if(i.instance&&Pl(i.latestValues)){Rl(i.latestValues)&&i.updateSnapshot();var o={x:{min:0,max:0},y:{min:0,max:0}};Al(o,i.measure()),eh(r,i.latestValues,null===(e=i.snapshot)||void 0===e?void 0:e.layout,o)}}return Pl(this.latestValues)&&eh(r,this.latestValues),r},t.prototype.setTargetDelta=function(t){this.targetDelta=t,this.root.scheduleUpdateProjection()},t.prototype.setOptions=function(t){var e;this.options=(0,su.__assign)((0,su.__assign)((0,su.__assign)({},this.options),t),{crossfade:null===(e=t.crossfade)||void 0===e||e})},t.prototype.clearMeasurements=function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1},t.prototype.resolveTargetDelta=function(){var t,e,r,n,i=this.options,o=i.layout,a=i.layoutId;this.layout&&(o||a)&&(this.targetDelta||this.relativeTarget||(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},$l(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),Al(this.relativeTarget,this.relativeTargetOrigin))),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&(null===(t=this.relativeParent)||void 0===t?void 0:t.target)?(e=this.target,r=this.relativeTarget,n=this.relativeParent.target,Zl(e.x,r.x,n.x),Zl(e.y,r.y,n.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):Al(this.target,this.layout.actual),Nl(this.target,this.targetDelta)):Al(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&Boolean(this.relativeParent.resumingFrom)===Boolean(this.resumingFrom)&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},$l(this.relativeTargetOrigin,this.target,this.relativeParent.target),Al(this.relativeTarget,this.relativeTargetOrigin)))))},t.prototype.getClosestProjectingParent=function(){if(this.parent&&!Pl(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},t.prototype.calcProjection=function(){var t,e=this.options,r=e.layout,n=e.layoutId;if(this.isTreeAnimating=Boolean((null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),this.layout&&(r||n)){var i=this.getLead();Al(this.layoutCorrected,this.layout.actual),function(t,e,r,n){var i,o;void 0===n&&(n=!1);var a=r.length;if(a){var s,u;e.x=e.y=1;for(var c=0;c<a;c++)u=(s=r[c]).projectionDelta,"contents"!==(null===(o=null===(i=s.instance)||void 0===i?void 0:i.style)||void 0===o?void 0:o.display)&&(n&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Fl(t,{x:-s.scroll.x,y:-s.scroll.y}),u&&(e.x*=u.x.scale,e.y*=u.y.scale,Nl(t,u)),n&&Pl(s.latestValues)&&Fl(t,s.latestValues))}}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==i);var o=i.target;if(o){this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});var a=this.treeScale.x,s=this.treeScale.y,u=this.projectionTransform;Gl(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.projectionTransform=sh(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===a&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}}},t.prototype.hide=function(){this.isVisible=!1},t.prototype.show=function(){this.isVisible=!0},t.prototype.scheduleRender=function(t){var e,r,n;void 0===t&&(t=!0),null===(r=(e=this.options).scheduleRender)||void 0===r||r.call(e),t&&(null===(n=this.getStack())||void 0===n||n.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},t.prototype.setAnimationOrigin=function(t,e){var r,n=this;void 0===e&&(e=!1);var i=this.snapshot,o=(null==i?void 0:i.latestValues)||{},a=(0,su.__assign)({},this.latestValues),s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!e;var u={x:{min:0,max:0},y:{min:0,max:0}},c=null==i?void 0:i.isShared,f=((null===(r=this.getStack())||void 0===r?void 0:r.members.length)||0)<=1,l=Boolean(c&&!f&&!0===this.options.crossfade&&!this.path.some(Ch));this.animationProgress=0,this.mixTargetDelta=function(e){var r,i,h,d,p,v=e/1e3;Oh(s.x,t.x,v),Oh(s.y,t.y,v),n.setTargetDelta(s),n.relativeTarget&&n.relativeTargetOrigin&&n.layout&&(null===(r=n.relativeParent)||void 0===r?void 0:r.layout)&&($l(u,n.layout.actual,n.relativeParent.layout.actual),i=n.relativeTarget,h=n.relativeTargetOrigin,d=u,p=v,Ih(i.x,h.x,d.x,p),Ih(i.y,h.y,d.y,p)),c&&(n.animationValues=a,function(t,e,r,n,i,o){var a,s,u,c;i?(t.opacity=Ju(0,null!==(a=r.opacity)&&void 0!==a?a:1,xl(n)),t.opacityExit=Ju(null!==(s=e.opacity)&&void 0!==s?s:1,0,kl(n))):o&&(t.opacity=Ju(null!==(u=e.opacity)&&void 0!==u?u:1,null!==(c=r.opacity)&&void 0!==c?c:1,n));for(var f=0;f<gl;f++){var l="border".concat(yl[f],"Radius"),h=_l(e,l),d=_l(r,l);void 0===h&&void 0===d||(h||(h=0),d||(d=0),0===h||0===d||wl(h)===wl(d)?(t[l]=Math.max(Ju(bl(h),bl(d),n),0),(Ic.test(d)||Ic.test(h))&&(t[l]+="%")):t[l]=d)}(e.rotate||r.rotate)&&(t.rotate=Ju(e.rotate||0,r.rotate||0,n))}(a,o,n.latestValues,v,l,f)),n.root.scheduleUpdateProjection(),n.scheduleRender(),n.animationProgress=v},this.mixTargetDelta(0)},t.prototype.startAnimation=function(t){var e,r,n=this;null===(e=this.currentAnimation)||void 0===e||e.stop(),this.resumingFrom&&(null===(r=this.resumingFrom.currentAnimation)||void 0===r||r.stop()),this.pendingAnimation&&(zu.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Zu.update((function(){bh.hasAnimatedSinceResize=!0,n.currentAnimation=function(t,e,r){void 0===r&&(r={});var n=rc(t)?t:ec(t);return ml("",n,e,r),{stop:function(){return n.stop()},isAnimating:function(){return n.isAnimating()}}}(0,1e3,(0,su.__assign)((0,su.__assign)({},t),{onUpdate:function(e){var r;n.mixTargetDelta(e),null===(r=t.onUpdate)||void 0===r||r.call(t,e)},onComplete:function(){var e;null===(e=t.onComplete)||void 0===e||e.call(t),n.completeAnimation()}})),n.resumingFrom&&(n.resumingFrom.currentAnimation=n.currentAnimation),n.pendingAnimation=void 0}))},t.prototype.completeAnimation=function(){var t;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(t=this.getStack())||void 0===t||t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},t.prototype.finishAnimation=function(){var t;this.currentAnimation&&(null===(t=this.mixTargetDelta)||void 0===t||t.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()},t.prototype.applyTransformsToTarget=function(){var t=this.getLead(),e=t.targetWithTransforms,r=t.target,n=t.layout,i=t.latestValues;e&&r&&n&&(Al(e,r),Fl(e,i),Gl(this.projectionDeltaWithTransform,this.layoutCorrected,e,i))},t.prototype.registerSharedNode=function(t,e){var r,n,i;this.sharedNodes.has(t)||this.sharedNodes.set(t,new oh),this.sharedNodes.get(t).add(e),e.promote({transition:null===(r=e.options.initialPromotionConfig)||void 0===r?void 0:r.transition,preserveFollowOpacity:null===(i=null===(n=e.options.initialPromotionConfig)||void 0===n?void 0:n.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(n,e)})},t.prototype.isLead=function(){var t=this.getStack();return!t||t.lead===this},t.prototype.getLead=function(){var t;return this.options.layoutId&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this},t.prototype.getPrevLead=function(){var t;return this.options.layoutId?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0},t.prototype.getStack=function(){var t=this.options.layoutId;if(t)return this.root.sharedNodes.get(t)},t.prototype.promote=function(t){var e=void 0===t?{}:t,r=e.needsReset,n=e.transition,i=e.preserveFollowOpacity,o=this.getStack();o&&o.promote(this,i),r&&(this.projectionDelta=void 0,this.needsReset=!0),n&&this.setOptions({transition:n})},t.prototype.relegate=function(){var t=this.getStack();return!!t&&t.relegate(this)},t.prototype.resetRotation=function(){var t=this.options.visualElement;if(t){for(var e=!1,r={},n=0;n<ch.length;n++){var i="rotate"+ch[n];t.getStaticValue(i)&&(e=!0,r[i]=t.getStaticValue(i),t.setStaticValue(i,0))}if(e){for(var i in null==t||t.syncRender(),r)t.setStaticValue(i,r[i]);t.scheduleRender()}}},t.prototype.getProjectionStyles=function(t){var e,r,n,i,o,a;void 0===t&&(t={});var s={};if(!this.instance||this.isSVG)return s;if(!this.isVisible)return{visibility:"hidden"};s.visibility="";var u=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=gh(t.pointerEvents)||"",s.transform=u?u(this.latestValues,""):"none",s;var c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){var f={};return this.options.layoutId&&(f.opacity=null!==(r=this.latestValues.opacity)&&void 0!==r?r:1,f.pointerEvents=gh(t.pointerEvents)||""),this.hasProjected&&!Pl(this.latestValues)&&(f.transform=u?u({},""):"none",this.hasProjected=!1),f}var l=c.animationValues||c.latestValues;this.applyTransformsToTarget(),s.transform=sh(this.projectionDeltaWithTransform,this.treeScale,l),u&&(s.transform=u(l,s.transform));var h=this.projectionDelta,d=h.x,p=h.y;for(var v in s.transformOrigin="".concat(100*d.origin,"% ").concat(100*p.origin,"% 0"),c.animationValues?s.opacity=c===this?null!==(i=null!==(n=l.opacity)&&void 0!==n?n:this.latestValues.opacity)&&void 0!==i?i:1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:s.opacity=c===this?null!==(o=l.opacity)&&void 0!==o?o:"":null!==(a=l.opacityExit)&&void 0!==a?a:0,ah)if(void 0!==l[v]){var m=ah[v],y=m.correct,g=m.applyTo,b=y(l[v],c);if(g)for(var w=g.length,_=0;_<w;_++)s[g[_]]=b;else s[v]=b}return this.options.layoutId&&(s.pointerEvents=c===this?gh(t.pointerEvents)||"":"none"),s},t.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},t.prototype.resetTree=function(){this.root.nodes.forEach((function(t){var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(Eh),this.root.sharedNodes.clear()},t}()}function _h(t){t.updateLayout()}function xh(t){var e,r,n,i,o=null!==(r=null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)&&void 0!==r?r:t.snapshot;if(t.isLead()&&t.layout&&o&&t.hasListeners("didUpdate")){var a=t.layout,s=a.actual,u=a.measured;"size"===t.options.animationType?uh((function(t){var e=o.isShared?o.measured[t]:o.layout[t],r=Vl(e);e.min=s[t].min,e.max=e.min+r})):"position"===t.options.animationType&&uh((function(t){var e=o.isShared?o.measured[t]:o.layout[t],r=Vl(s[t]);e.max=e.min+r}));var c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Gl(c,s,o.layout);var f={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o.isShared?Gl(f,t.applyTransform(u,!0),o.measured):Gl(f,s,o.layout);var l=!nh(c),h=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){var d=t.relativeParent,p=d.snapshot,v=d.layout;if(p&&v){var m={x:{min:0,max:0},y:{min:0,max:0}};$l(m,o.layout,p.layout);var y={x:{min:0,max:0},y:{min:0,max:0}};$l(y,s,v.actual),ih(m,y)||(h=!0)}}t.notifyListeners("didUpdate",{layout:s,snapshot:o,delta:f,layoutDelta:c,hasLayoutChanged:l,hasRelativeTargetChanged:h})}else t.isLead()&&(null===(i=(n=t.options).onExitComplete)||void 0===i||i.call(n));t.options.transition=void 0}function kh(t){t.clearSnapshot()}function Eh(t){t.clearMeasurements()}function Mh(t){var e=t.options.visualElement;(null==e?void 0:e.getProps().onBeforeLayoutMeasure)&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}function Ah(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function Sh(t){t.resolveTargetDelta()}function Rh(t){t.calcProjection()}function Ph(t){t.resetRotation()}function Th(t){t.removeLeadSnapshot()}function Oh(t,e,r){t.translate=Ju(e.translate,0,r),t.scale=Ju(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function Ih(t,e,r,n){t.min=Ju(e.min,r.min,n),t.max=Ju(e.max,r.max,n)}function Ch(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}var Nh={duration:.45,ease:[.4,0,.1,1]};function Lh(t,e){for(var r=t.root,n=t.path.length-1;n>=0;n--)if(Boolean(t.path[n].instance)){r=t.path[n];break}var i=(r&&r!==t.root?r.instance:document).querySelector('[data-projection-id="'.concat(e,'"]'));i&&t.mount(i,!0)}function Bh(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function jh(t){Bh(t.x),Bh(t.y)}var Uh=1;var Fh=(0,a.createContext)({}),qh=(0,a.createContext)({});var Dh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,su.__extends)(e,t),e.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},e.prototype.componentDidUpdate=function(){},e.prototype.updateProps=function(){var t=this.props,e=t.visualElement,r=t.props;e&&e.setProps(r)},e.prototype.render=function(){return this.props.children},e}(a.Component);function zh(t){var e=t.preloadedFeatures,r=t.createVisualElement,n=t.projectionNodeConstructor,i=t.useRender,o=t.useVisualState,s=t.Component;return e&&function(t){for(var e in t)null!==t[e]&&("projectionNodeConstructor"===e?cu.projectionNodeConstructor=t[e]:cu[e].Component=t[e])}(e),(0,a.forwardRef)((function(t,e){var u=function(t){var e,r=t.layoutId,n=null===(e=(0,a.useContext)(Fh))||void 0===e?void 0:e.id;return n&&void 0!==r?n+"-"+r:r}(t);t=(0,su.__assign)((0,su.__assign)({},t),{layoutId:u});var c=(0,a.useContext)(du),f=null,l=Pu(t),h=c.isStatic?void 0:Ou((function(){if(bh.hasEverUpdated)return Uh++})),d=o(t,c.isStatic);return!c.isStatic&&mu&&(l.visualElement=_u(s,d,(0,su.__assign)((0,su.__assign)({},c),t),r),function(t,e,r,n){var i,o=e.layoutId,s=e.layout,u=e.drag,c=e.dragConstraints,f=e.layoutScroll,l=(0,a.useContext)(qh);n&&r&&!(null==r?void 0:r.projection)&&(r.projection=new n(t,r.getLatestValues(),null===(i=r.parent)||void 0===i?void 0:i.projection),r.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:Boolean(u)||c&&xu(c),visualElement:r,scheduleRender:function(){return r.scheduleRender()},animationType:"string"==typeof s?s:"both",initialPromotionConfig:l,layoutScroll:f}))}(h,t,l.visualElement,n||cu.projectionNodeConstructor),f=function(t,e,r){var n=[];if((0,a.useContext)(fu),!e)return null;for(var i=0;i<hu;i++){var o=lu[i],s=cu[o],u=s.isEnabled,c=s.Component;u(t)&&c&&n.push(a.createElement(c,(0,su.__assign)({key:o},t,{visualElement:e})))}return n}(t,l.visualElement)),a.createElement(Dh,{visualElement:l.visualElement,props:(0,su.__assign)((0,su.__assign)({},c),t)},f,a.createElement(pu.Provider,{value:l},i(s,t,h,function(t,e,r){return(0,a.useCallback)((function(n){var i;n&&(null===(i=t.mount)||void 0===i||i.call(t,n)),e&&(n?e.mount(n):e.unmount()),r&&("function"==typeof r?r(n):xu(r)&&(r.current=n))}),[e])}(d,l.visualElement,e),d,c.isStatic,l.visualElement)))}))}function Hh(t){function e(e,r){return void 0===r&&(r={}),zh(t(e,r))}if("undefined"==typeof Proxy)return e;var r=new Map;return new Proxy(e,{get:function(t,n){return r.has(n)||r.set(n,e(n)),r.get(n)}})}var Vh=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Wh(t){return"string"==typeof t&&!t.includes("-")&&!!(Vh.indexOf(t)>-1||/[A-Z]/.test(t))}function Kh(t,e){var r=e.layout,n=e.layoutId;return dh(t)||vh(t)||(r||void 0!==n)&&(!!ah[t]||"opacity"===t)}var Gh={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Zh(t){return t.startsWith("--")}var Jh=function(t,e){return e&&"number"==typeof t?e.transform(t):t};function $h(t,e,r,n){var i,o=t.style,a=t.vars,s=t.transform,u=t.transformKeys,c=t.transformOrigin;u.length=0;var f=!1,l=!1,h=!0;for(var d in e){var p=e[d];if(Zh(d))a[d]=p;else{var v=il[d],m=Jh(p,v);if(dh(d)){if(f=!0,s[d]=m,u.push(d),!h)continue;p!==(null!==(i=v.default)&&void 0!==i?i:0)&&(h=!1)}else vh(d)?(c[d]=m,l=!0):o[d]=m}}f?o.transform=function(t,e,r,n){var i=t.transform,o=t.transformKeys,a=e.enableHardwareAcceleration,s=void 0===a||a,u=e.allowTransformNone,c=void 0===u||u,f="";o.sort(lh);for(var l=!1,h=o.length,d=0;d<h;d++){var p=o[d];f+="".concat(Gh[p]||p,"(").concat(i[p],") "),"z"===p&&(l=!0)}return!l&&s?f+="translateZ(0)":f=f.trim(),n?f=n(i,r?"":f):c&&r&&(f="none"),f}(t,r,h,n):n?o.transform=n({},""):!e.transform&&o.transform&&(o.transform="none"),l&&(o.transformOrigin=function(t){var e=t.originX,r=void 0===e?"50%":e,n=t.originY,i=void 0===n?"50%":n,o=t.originZ,a=void 0===o?0:o;return"".concat(r," ").concat(i," ").concat(a)}(c))}var Yh=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function Xh(t,e,r){for(var n in e)rc(e[n])||Kh(n,r)||(t[n]=e[n])}function Qh(t,e,r){var n={};return Xh(n,t.style||{},t),Object.assign(n,function(t,e,r){var n=t.transformTemplate;return(0,a.useMemo)((function(){var t={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};$h(t,e,{enableHardwareAcceleration:!r},n);var i=t.vars,o=t.style;return(0,su.__assign)((0,su.__assign)({},i),o)}),[e])}(t,e,r)),t.transformValues&&(n=t.transformValues(n)),n}function td(t,e,r){var n={},i=Qh(t,e,r);return Boolean(t.drag)&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-".concat("x"===t.drag?"y":"x")),n.style=i,n}var ed=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function rd(t){return ed.has(t)}var nd,id=function(t){return!rd(t)};try{(nd=r(18475).Z)&&(id=function(t){return t.startsWith("on")?!rd(t):nd(t)})}catch(Gy){}function od(t,e,r){return"string"==typeof t?t:Cc.transform(e+r*t)}var ad={offset:"stroke-dashoffset",array:"stroke-dasharray"},sd={offset:"strokeDashoffset",array:"strokeDasharray"};function ud(t,e,r,n){var i=e.attrX,o=e.attrY,a=e.originX,s=e.originY,u=e.pathLength,c=e.pathSpacing,f=void 0===c?1:c,l=e.pathOffset,h=void 0===l?0:l;$h(t,(0,su.__rest)(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),r,n),t.attrs=t.style,t.style={};var d=t.attrs,p=t.style,v=t.dimensions;d.transform&&(v&&(p.transform=d.transform),delete d.transform),v&&(void 0!==a||void 0!==s||p.transform)&&(p.transformOrigin=function(t,e,r){var n=od(e,t.x,t.width),i=od(r,t.y,t.height);return"".concat(n," ").concat(i)}(v,void 0!==a?a:.5,void 0!==s?s:.5)),void 0!==i&&(d.x=i),void 0!==o&&(d.y=o),void 0!==u&&function(t,e,r,n,i){void 0===r&&(r=1),void 0===n&&(n=0),void 0===i&&(i=!0),t.pathLength=1;var o=i?ad:sd;t[o.offset]=Cc.transform(-n);var a=Cc.transform(e),s=Cc.transform(r);t[o.array]="".concat(a," ").concat(s)}(d,u,f,h,!1)}var cd=function(){return(0,su.__assign)((0,su.__assign)({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function fd(t,e){var r=(0,a.useMemo)((function(){var r=cd();return ud(r,e,{enableHardwareAcceleration:!1},t.transformTemplate),(0,su.__assign)((0,su.__assign)({},r.attrs),{style:(0,su.__assign)({},r.style)})}),[e]);if(t.style){var n={};Xh(n,t.style,t),r.style=(0,su.__assign)((0,su.__assign)({},n),r.style)}return r}function ld(t){void 0===t&&(t=!1);return function(e,r,n,i,o,s){var u=o.latestValues,c=(Wh(e)?fd:td)(r,u,s),f=function(t,e,r){var n={};for(var i in t)(id(i)||!0===r&&rd(i)||!e&&!rd(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}(r,"string"==typeof e,t),l=(0,su.__assign)((0,su.__assign)((0,su.__assign)({},f),c),{ref:i});return n&&(l["data-projection-id"]=n),(0,a.createElement)(e,l)}}var hd=/([a-z])([A-Z])/g,dd=function(t){return t.replace(hd,"$1-$2").toLowerCase()};function pd(t,e,r,n){var i=e.style,o=e.vars;for(var a in Object.assign(t.style,i,n&&n.getProjectionStyles(r)),o)t.style.setProperty(a,o[a])}var vd=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function md(t,e){for(var r in pd(t,e),e.attrs)t.setAttribute(vd.has(r)?r:dd(r),e.attrs[r])}function yd(t){var e=t.style,r={};for(var n in e)(rc(e[n])||Kh(n,t))&&(r[n]=e[n]);return r}function gd(t){var e=yd(t);for(var r in t){if(rc(t[r]))e["x"===r||"y"===r?"attr"+r.toUpperCase():r]=t[r]}return e}function bd(t){return"object"==typeof t&&"function"==typeof t.start}function wd(t,e,r,n){var i=t.scrapeMotionValuesFromProps,o=t.createRenderState,a=t.onMount,s={latestValues:xd(e,r,n,i),renderState:o()};return a&&(s.mount=function(t){return a(e,t,s)}),s}var _d=function(t){return function(e,r){var n=(0,a.useContext)(pu),i=(0,a.useContext)(vu);return r?wd(t,e,n,i):Ou((function(){return wd(t,e,n,i)}))}};function xd(t,e,r,n){var i={},o=!1===(null==r?void 0:r.initial),a=n(t);for(var s in a)i[s]=gh(a[s]);var u=t.initial,c=t.animate,f=Su(t),l=Ru(t);e&&l&&!f&&!1!==t.inherit&&(null!=u||(u=e.initial),null!=c||(c=e.animate));var h=o||!1===u,d=h?c:u;d&&"boolean"!=typeof d&&!bd(d)&&(Array.isArray(d)?d:[d]).forEach((function(e){var r=Mu(t,e);if(r){var n=r.transitionEnd;r.transition;var o=(0,su.__rest)(r,["transitionEnd","transition"]);for(var a in o){var s=o[a];if(Array.isArray(s))s=s[h?s.length-1:0];null!==s&&(i[a]=s)}for(var a in n)i[a]=n[a]}}));return i}var kd,Ed={useVisualState:_d({scrapeMotionValuesFromProps:gd,createRenderState:cd,onMount:function(t,e,r){var n=r.renderState,i=r.latestValues;try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(o){n.dimensions={x:0,y:0,width:0,height:0}}ud(n,i,{enableHardwareAcceleration:!1},t.transformTemplate),md(e,n)}})},Md={useVisualState:_d({scrapeMotionValuesFromProps:yd,createRenderState:Yh})};function Ad(t,e,r,n){return t.addEventListener(e,r,n),function(){return t.removeEventListener(e,r,n)}}function Sd(t,e,r,n){(0,a.useEffect)((function(){var i=t.current;if(r&&i)return Ad(i,e,r,n)}),[t,e,r,n])}function Rd(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function Pd(t){return!!t.touches}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(kd||(kd={}));var Td={pageX:0,pageY:0};function Od(t,e){void 0===e&&(e="page");var r=t.touches[0]||t.changedTouches[0]||Td;return{x:r[e+"X"],y:r[e+"Y"]}}function Id(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function Cd(t,e){return void 0===e&&(e="page"),{point:Pd(t)?Od(t,e):Id(t,e)}}var Nd=function(t,e){void 0===e&&(e=!1);var r,n=function(e){return t(e,Cd(e))};return e?(r=n,function(t){var e=t instanceof MouseEvent;(!e||e&&0===t.button)&&r(t)}):n},Ld={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Bd={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function jd(t){return mu&&null===window.onpointerdown?t:mu&&null===window.ontouchstart?Bd[t]:mu&&null===window.onmousedown?Ld[t]:t}function Ud(t,e,r,n){return Ad(t,jd(e),Nd(r,"pointerdown"===e),n)}function Fd(t,e,r,n){return Sd(t,jd(e),r&&Nd(r,"pointerdown"===e),n)}function qd(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Dd=qd("dragHorizontal"),zd=qd("dragVertical");function Hd(t){var e=!1;if("y"===t)e=zd();else if("x"===t)e=Dd();else{var r=Dd(),n=zd();r&&n?e=function(){r(),n()}:(r&&r(),n&&n())}return e}function Vd(){var t=Hd(!0);return!t||(t(),!1)}function Wd(t,e,r){return function(n,i){var o;Rd(n)&&!Vd()&&(null===(o=t.animationState)||void 0===o||o.setActive(kd.Hover,e),null==r||r(n,i))}}var Kd=function t(e,r){return!!r&&(e===r||t(e,r.parentElement))};function Gd(t){return(0,a.useEffect)((function(){return function(){return t()}}),[])}var Zd=new WeakMap,Jd=new WeakMap,$d=function(t){var e;null===(e=Zd.get(t.target))||void 0===e||e(t)},Yd=function(t){t.forEach($d)};function Xd(t,e,r){var n=function(t){var e=t.root,r=(0,su.__rest)(t,["root"]),n=e||document;Jd.has(n)||Jd.set(n,{});var i=Jd.get(n),o=JSON.stringify(r);return i[o]||(i[o]=new IntersectionObserver(Yd,(0,su.__assign)({root:e},r))),i[o]}(e);return Zd.set(t,r),n.observe(t),function(){Zd.delete(t),n.unobserve(t)}}var Qd={some:0,all:1};function tp(t,e,r,n){var i=n.root,o=n.margin,s=n.amount,u=void 0===s?"some":s,c=n.once;(0,a.useEffect)((function(){if(t){var n={root:null==i?void 0:i.current,rootMargin:o,threshold:"number"==typeof u?u:Qd[u]};return Xd(r.getInstance(),n,(function(t){var n,i=t.isIntersecting;if(e.isInView!==i&&(e.isInView=i,!c||i||!e.hasEnteredView)){i&&(e.hasEnteredView=!0),null===(n=r.animationState)||void 0===n||n.setActive(kd.InView,i);var o=r.getProps(),a=i?o.onViewportEnter:o.onViewportLeave;null==a||a(t)}}))}}),[t,i,o,u])}function ep(t,e,r,n){var i=n.fallback,o=void 0===i||i;(0,a.useEffect)((function(){t&&o&&requestAnimationFrame((function(){var t;e.hasEnteredView=!0;var n=r.getProps().onViewportEnter;null==n||n(null),null===(t=r.animationState)||void 0===t||t.setActive(kd.InView,!0)}))}),[t])}var rp=function(t){return function(e){return t(e),null}},np={inView:rp((function(t){var e=t.visualElement,r=t.whileInView,n=t.onViewportEnter,i=t.onViewportLeave,o=t.viewport,s=void 0===o?{}:o,u=(0,a.useRef)({hasEnteredView:!1,isInView:!1}),c=Boolean(r||n||i);s.once&&u.current.hasEnteredView&&(c=!1),("undefined"==typeof IntersectionObserver?ep:tp)(c,u.current,e,s)})),tap:rp((function(t){var e=t.onTap,r=t.onTapStart,n=t.onTapCancel,i=t.whileTap,o=t.visualElement,s=e||r||n||i,u=(0,a.useRef)(!1),c=(0,a.useRef)(null);function f(){var t;null===(t=c.current)||void 0===t||t.call(c),c.current=null}function l(){var t;return f(),u.current=!1,null===(t=o.animationState)||void 0===t||t.setActive(kd.Tap,!1),!Vd()}function h(t,r){l()&&(Kd(o.getInstance(),t.target)?null==e||e(t,r):null==n||n(t,r))}function d(t,e){l()&&(null==n||n(t,e))}Fd(o,"pointerdown",s?function(t,e){var n;f(),u.current||(u.current=!0,c.current=ef(Ud(window,"pointerup",h),Ud(window,"pointercancel",d)),null===(n=o.animationState)||void 0===n||n.setActive(kd.Tap,!0),null==r||r(t,e))}:void 0),Gd(f)})),focus:rp((function(t){var e=t.whileFocus,r=t.visualElement;Sd(r,"focus",e?function(){var t;null===(t=r.animationState)||void 0===t||t.setActive(kd.Focus,!0)}:void 0),Sd(r,"blur",e?function(){var t;null===(t=r.animationState)||void 0===t||t.setActive(kd.Focus,!1)}:void 0)})),hover:rp((function(t){var e=t.onHoverStart,r=t.onHoverEnd,n=t.whileHover,i=t.visualElement;Fd(i,"pointerenter",e||n?Wd(i,!0,e):void 0),Fd(i,"pointerleave",r||n?Wd(i,!1,r):void 0)}))},ip=0,op=function(){return ip++},ap=function(){return Ou(op)};function sp(){var t=(0,a.useContext)(vu);if(null===t)return[!0,null];var e=t.isPresent,r=t.onExitComplete,n=t.register,i=ap();(0,a.useEffect)((function(){return n(i)}),[]);return!e&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function up(t,e){if(!Array.isArray(e))return!1;var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0}var cp=function(t){return/^0[^.\s]+$/.test(t)},fp=function(t){return function(e){return e.test(t)}},lp=[_c,Cc,Ic,Oc,Lc,Nc,{test:function(t){return"auto"===t},parse:function(t){return t}}],hp=function(t){return lp.find(fp(t))},dp=(0,su.__spreadArray)((0,su.__spreadArray)([],(0,su.__read)(lp),!1),[Wc,Xc],!1),pp=function(t){return dp.find(fp(t))};function vp(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,ec(r))}function mp(t,e){var r=Au(t,e),n=r?t.makeTargetAnimatable(r,!1):{},i=n.transitionEnd,o=void 0===i?{}:i;n.transition;var a=(0,su.__rest)(n,["transitionEnd","transition"]);for(var s in a=(0,su.__assign)((0,su.__assign)({},a),o)){vp(t,s,cl(a[s]))}}function yp(t,e){if(e)return(e[t]||e.default||e).from}function gp(t,e,r){var n;void 0===r&&(r={});var i=Au(t,e,r.custom),o=(i||{}).transition,a=void 0===o?t.getDefaultTransition()||{}:o;r.transitionOverride&&(a=r.transitionOverride);var s=i?function(){return bp(t,i,r)}:function(){return Promise.resolve()},u=(null===(n=t.variantChildren)||void 0===n?void 0:n.size)?function(n){void 0===n&&(n=0);var i=a.delayChildren,o=void 0===i?0:i,s=a.staggerChildren,u=a.staggerDirection;return function(t,e,r,n,i,o){void 0===r&&(r=0);void 0===n&&(n=0);void 0===i&&(i=1);var a=[],s=(t.variantChildren.size-1)*n,u=1===i?function(t){return void 0===t&&(t=0),t*n}:function(t){return void 0===t&&(t=0),s-t*n};return Array.from(t.variantChildren).sort(wp).forEach((function(t,n){a.push(gp(t,e,(0,su.__assign)((0,su.__assign)({},o),{delay:r+u(n)})).then((function(){return t.notifyAnimationComplete(e)})))})),Promise.all(a)}(t,e,o+n,s,u,r)}:function(){return Promise.resolve()},c=a.when;if(c){var f=(0,su.__read)("beforeChildren"===c?[s,u]:[u,s],2),l=f[0],h=f[1];return l().then(h)}return Promise.all([s(),u(r.delay)])}function bp(t,e,r){var n,i=void 0===r?{}:r,o=i.delay,a=void 0===o?0:o,s=i.transitionOverride,u=i.type,c=t.makeTargetAnimatable(e),f=c.transition,l=void 0===f?t.getDefaultTransition():f,h=c.transitionEnd,d=(0,su.__rest)(c,["transition","transitionEnd"]);s&&(l=s);var p=[],v=u&&(null===(n=t.animationState)||void 0===n?void 0:n.getState()[u]);for(var m in d){var y=t.getValue(m),g=d[m];if(!(!y||void 0===g||v&&_p(v,m))){var b=(0,su.__assign)({delay:a},l);t.shouldReduceMotion&&dh(m)&&(b=(0,su.__assign)((0,su.__assign)({},b),{type:!1,delay:0}));var w=ml(m,y,g,b);p.push(w)}}return Promise.all(p).then((function(){h&&mp(t,h)}))}function wp(t,e){return t.sortNodePosition(e)}function _p(t,e){var r=t.protectedKeys,n=t.needsAnimating,i=r.hasOwnProperty(e)&&!0!==n[e];return n[e]=!1,i}var xp=[kd.Animate,kd.InView,kd.Focus,kd.Hover,kd.Tap,kd.Drag,kd.Exit],kp=(0,su.__spreadArray)([],(0,su.__read)(xp),!1).reverse(),Ep=xp.length;function Mp(t){return function(e){return Promise.all(e.map((function(e){var r=e.animation,n=e.options;return function(t,e,r){var n;if(void 0===r&&(r={}),t.notifyAnimationStart(e),Array.isArray(e)){var i=e.map((function(e){return gp(t,e,r)}));n=Promise.all(i)}else if("string"==typeof e)n=gp(t,e,r);else{var o="function"==typeof e?Au(t,e,r.custom):e;n=bp(t,o,r)}return n.then((function(){return t.notifyAnimationComplete(e)}))}(t,r,n)})))}}function Ap(t){var e,r=Mp(t),n=((e={})[kd.Animate]=Sp(!0),e[kd.InView]=Sp(),e[kd.Hover]=Sp(),e[kd.Tap]=Sp(),e[kd.Drag]=Sp(),e[kd.Focus]=Sp(),e[kd.Exit]=Sp(),e),i={},o=!0,a=function(e,r){var n=Au(t,r);if(n){n.transition;var i=n.transitionEnd,o=(0,su.__rest)(n,["transition","transitionEnd"]);e=(0,su.__assign)((0,su.__assign)((0,su.__assign)({},e),o),i)}return e};function s(e,s){for(var u,c=t.getProps(),f=t.getVariantContext(!0)||{},l=[],h=new Set,d={},p=1/0,v=function(r){var i=kp[r],v=n[i],m=null!==(u=c[i])&&void 0!==u?u:f[i],y=Eu(m),g=i===s?v.isActive:null;!1===g&&(p=r);var b=m===f[i]&&m!==c[i]&&y;if(b&&o&&t.manuallyAnimateOnMount&&(b=!1),v.protectedKeys=(0,su.__assign)({},d),!v.isActive&&null===g||!m&&!v.prevProp||bd(m)||"boolean"==typeof m)return"continue";var w=function(t,e){if("string"==typeof e)return e!==t;if(ku(e))return!up(e,t);return!1}(v.prevProp,m),_=w||i===s&&v.isActive&&!b&&y||r>p&&y,x=Array.isArray(m)?m:[m],k=x.reduce(a,{});!1===g&&(k={});var E=v.prevResolvedValues,M=void 0===E?{}:E,A=(0,su.__assign)((0,su.__assign)({},M),k),S=function(t){_=!0,h.delete(t),v.needsAnimating[t]=!0};for(var R in A){var P=k[R],T=M[R];d.hasOwnProperty(R)||(P!==T?Gf(P)&&Gf(T)?!up(P,T)||w?S(R):v.protectedKeys[R]=!0:void 0!==P?S(R):h.add(R):void 0!==P&&h.has(R)?S(R):v.protectedKeys[R]=!0)}v.prevProp=m,v.prevResolvedValues=k,v.isActive&&(d=(0,su.__assign)((0,su.__assign)({},d),k)),o&&t.blockInitialAnimation&&(_=!1),_&&!b&&l.push.apply(l,(0,su.__spreadArray)([],(0,su.__read)(x.map((function(t){return{animation:t,options:(0,su.__assign)({type:i},e)}}))),!1))},m=0;m<Ep;m++)v(m);if(i=(0,su.__assign)({},d),h.size){var y={};h.forEach((function(e){var r=t.getBaseTarget(e);void 0!==r&&(y[e]=r)})),l.push({animation:y})}var g=Boolean(l.length);return o&&!1===c.initial&&!t.manuallyAnimateOnMount&&(g=!1),o=!1,g?r(l):Promise.resolve()}return{isAnimated:function(t){return void 0!==i[t]},animateChanges:s,setActive:function(e,r,i){var o;if(n[e].isActive===r)return Promise.resolve();null===(o=t.variantChildren)||void 0===o||o.forEach((function(t){var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,r)})),n[e].isActive=r;var a=s(i,e);for(var u in n)n[u].protectedKeys={};return a},setAnimateFunction:function(e){r=e(t)},getState:function(){return n}}}function Sp(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var Rp={animation:rp((function(t){var e=t.visualElement,r=t.animate;e.animationState||(e.animationState=Ap(e)),bd(r)&&(0,a.useEffect)((function(){return r.subscribe(e)}),[r])})),exit:rp((function(t){var e=t.custom,r=t.visualElement,n=(0,su.__read)(sp(),2),i=n[0],o=n[1],s=(0,a.useContext)(vu);(0,a.useEffect)((function(){var t,n;r.isPresent=i;var a=null===(t=r.animationState)||void 0===t?void 0:t.setActive(kd.Exit,!i,{custom:null!==(n=null==s?void 0:s.custom)&&void 0!==n?n:e});!i&&(null==a||a.then(o))}),[i])}))},Pp=function(){function t(t,e,r){var n=this,i=(void 0===r?{}:r).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(n.lastMoveEvent&&n.lastMoveEventInfo){var t=Ip(n.lastMoveEventInfo,n.history),e=null!==n.startEvent,r=Hl(t.offset,{x:0,y:0})>=3;if(e||r){var i=t.point,o=Gu().timestamp;n.history.push((0,su.__assign)((0,su.__assign)({},i),{timestamp:o}));var a=n.handlers,s=a.onStart,u=a.onMove;e||(s&&s(n.lastMoveEvent,t),n.startEvent=n.lastMoveEvent),u&&u(n.lastMoveEvent,t)}}},this.handlePointerMove=function(t,e){n.lastMoveEvent=t,n.lastMoveEventInfo=Tp(e,n.transformPagePoint),Rd(t)&&0===t.buttons?n.handlePointerUp(t,e):Zu.update(n.updatePoint,!0)},this.handlePointerUp=function(t,e){n.end();var r=n.handlers,i=r.onEnd,o=r.onSessionEnd,a=Ip(Tp(e,n.transformPagePoint),n.history);n.startEvent&&i&&i(t,a),o&&o(t,a)},!(Pd(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=i;var o=Tp(Cd(t),this.transformPagePoint),a=o.point,s=Gu().timestamp;this.history=[(0,su.__assign)((0,su.__assign)({},a),{timestamp:s})];var u=e.onSessionStart;u&&u(t,Ip(o,this.history)),this.removeListeners=ef(Ud(window,"pointermove",this.handlePointerMove),Ud(window,"pointerup",this.handlePointerUp),Ud(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),zu.update(this.updatePoint)},t}();function Tp(t,e){return e?{point:e(t.point)}:t}function Op(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ip(t,e){var r=t.point;return{point:r,delta:Op(r,Np(e)),offset:Op(r,Cp(e)),velocity:Lp(e,.1)}}function Cp(t){return t[0]}function Np(t){return t[t.length-1]}function Lp(t,e){if(t.length<2)return{x:0,y:0};for(var r=t.length-1,n=null,i=Np(t);r>=0&&(n=t[r],!(i.timestamp-n.timestamp>Bf(e)));)r--;if(!n)return{x:0,y:0};var o=(i.timestamp-n.timestamp)/1e3;if(0===o)return{x:0,y:0};var a={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Bp(t,e,r){return{min:void 0!==e?t.min+e:void 0,max:void 0!==r?t.max+r-(t.max-t.min):void 0}}function jp(t,e){var r,n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&(n=(r=(0,su.__read)([i,n],2))[0],i=r[1]),{min:n,max:i}}var Up=.35;function Fp(t,e,r){return{min:qp(t,e),max:qp(t,r)}}function qp(t,e){var r;return"number"==typeof t?t:null!==(r=t[e])&&void 0!==r?r:0}function Dp(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}function zp(t,e){return Dp(function(t,e){if(!e)return t;var r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}var Hp=new WeakMap,Vp=function(){function t(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}return t.prototype.start=function(t,e){var r=this,n=(void 0===e?{}:e).snapToCursor,i=void 0!==n&&n;if(!1!==this.visualElement.isPresent){this.panSession=new Pp(t,{onSessionStart:function(t){r.stopAnimation(),i&&r.snapToCursor(Cd(t,"page").point)},onStart:function(t,e){var n,i=r.getProps(),o=i.drag,a=i.dragPropagation,s=i.onDragStart;(!o||a||(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=Hd(o),r.openGlobalLock))&&(r.isDragging=!0,r.currentDirection=null,r.resolveConstraints(),r.visualElement.projection&&(r.visualElement.projection.isAnimationBlocked=!0,r.visualElement.projection.target=void 0),uh((function(t){var e,n,i=r.getAxisMotionValue(t).get()||0;if(Ic.test(i)){var o=null===(n=null===(e=r.visualElement.projection)||void 0===e?void 0:e.layout)||void 0===n?void 0:n.actual[t];if(o)i=Vl(o)*(parseFloat(i)/100)}r.originPoint[t]=i})),null==s||s(t,e),null===(n=r.visualElement.animationState)||void 0===n||n.setActive(kd.Drag,!0))},onMove:function(t,e){var n=r.getProps(),i=n.dragPropagation,o=n.dragDirectionLock,a=n.onDirectionLock,s=n.onDrag;if(i||r.openGlobalLock){var u=e.offset;if(o&&null===r.currentDirection)return r.currentDirection=function(t,e){void 0===e&&(e=10);var r=null;Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x");return r}(u),void(null!==r.currentDirection&&(null==a||a(r.currentDirection)));r.updateAxis("x",e.point,u),r.updateAxis("y",e.point,u),r.visualElement.syncRender(),null==s||s(t,e)}},onSessionEnd:function(t,e){return r.stop(t,e)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},t.prototype.stop=function(t,e){var r=this.isDragging;if(this.cancel(),r){var n=e.velocity;this.startAnimation(n);var i=this.getProps().onDragEnd;null==i||i(t,e)}},t.prototype.cancel=function(){var t,e;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(t=this.panSession)||void 0===t||t.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(kd.Drag,!1)},t.prototype.updateAxis=function(t,e,r){var n=this.getProps().drag;if(r&&Wp(t,n,this.currentDirection)){var i,o,a,s,u,c=this.getAxisMotionValue(t),f=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=f,o=this.constraints[t],a=this.elastic[t],s=o.min,u=o.max,void 0!==s&&i<s?i=a?Ju(s,i,a.min):Math.max(i,s):void 0!==u&&i>u&&(i=a?Ju(u,i,a.max):Math.min(i,u)),f=i),c.set(f)}},t.prototype.resolveConstraints=function(){var t=this,e=this.getProps(),r=e.dragConstraints,n=e.dragElastic,i=(this.visualElement.projection||{}).layout,o=this.constraints;r&&xu(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!r||!i)&&function(t,e){var r=e.top,n=e.left,i=e.bottom,o=e.right;return{x:Bp(t.x,n,o),y:Bp(t.y,r,i)}}(i.actual,r),this.elastic=function(t){return void 0===t&&(t=Up),!1===t?t=0:!0===t&&(t=Up),{x:Fp(t,"left","right"),y:Fp(t,"top","bottom")}}(n),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&uh((function(e){t.getAxisMotionValue(e)&&(t.constraints[e]=function(t,e){var r={};return void 0!==e.min&&(r.min=e.min-t.min),void 0!==e.max&&(r.max=e.max-t.min),r}(i.actual[e],t.constraints[e]))}))},t.prototype.resolveRefConstraints=function(){var t=this.getProps(),e=t.dragConstraints,r=t.onMeasureDragConstraints;if(!e||!xu(e))return!1;var n=e.current,i=this.visualElement.projection;if(!i||!i.layout)return!1;var o=function(t,e,r){var n=zp(t,r),i=e.scroll;return i&&(Ll(n.x,i.x),Ll(n.y,i.y)),n}(n,i.root,this.visualElement.getTransformPagePoint()),a=function(t,e){return{x:jp(t.x,e.x),y:jp(t.y,e.y)}}(i.layout.actual,o);if(r){var s=r(function(t){var e=t.x,r=t.y;return{top:r.min,right:e.max,bottom:r.max,left:e.min}}(a));this.hasMutatedConstraints=!!s,s&&(a=Dp(s))}return a},t.prototype.startAnimation=function(t){var e=this,r=this.getProps(),n=r.drag,i=r.dragMomentum,o=r.dragElastic,a=r.dragTransition,s=r.dragSnapToOrigin,u=r.onDragTransitionEnd,c=this.constraints||{},f=uh((function(r){var u;if(Wp(r,n,e.currentDirection)){var f=null!==(u=null==c?void 0:c[r])&&void 0!==u?u:{};s&&(f={min:0,max:0});var l=o?200:1e6,h=o?40:1e7,d=(0,su.__assign)((0,su.__assign)({type:"inertia",velocity:i?t[r]:0,bounceStiffness:l,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10},a),f);return e.startAxisValueAnimation(r,d)}}));return Promise.all(f).then(u)},t.prototype.startAxisValueAnimation=function(t,e){return ml(t,this.getAxisMotionValue(t),0,e)},t.prototype.stopAnimation=function(){var t=this;uh((function(e){return t.getAxisMotionValue(e).stop()}))},t.prototype.getAxisMotionValue=function(t){var e,r,n="_drag"+t.toUpperCase(),i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(t,null!==(r=null===(e=this.visualElement.getProps().initial)||void 0===e?void 0:e[t])&&void 0!==r?r:0)},t.prototype.snapToCursor=function(t){var e=this;uh((function(r){if(Wp(r,e.getProps().drag,e.currentDirection)){var n=e.visualElement.projection,i=e.getAxisMotionValue(r);if(n&&n.layout){var o=n.layout.actual[r],a=o.min,s=o.max;i.set(t[r]-Ju(a,s,.5))}}}))},t.prototype.scalePositionWithinConstraints=function(){var t,e=this,r=this.getProps(),n=r.drag,i=r.dragConstraints,o=this.visualElement.projection;if(xu(i)&&o&&this.constraints){this.stopAnimation();var a={x:0,y:0};uh((function(t){var r,n,i,o,s,u=e.getAxisMotionValue(t);if(u){var c=u.get();a[t]=(r={min:c,max:c},n=e.constraints[t],i=.5,o=Vl(r),(s=Vl(n))>o?i=pc(n.min,n.max-o,r.min):o>s&&(i=pc(r.min,r.max-s,n.min)),nc(0,1,i))}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=s?s({},""):"none",null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout(),this.resolveConstraints(),uh((function(t){if(Wp(t,n,null)){var r=e.getAxisMotionValue(t),i=e.constraints[t],o=i.min,s=i.max;r.set(Ju(o,s,a[t]))}}))}},t.prototype.addListeners=function(){var t,e=this;Hp.set(this.visualElement,this);var r=Ud(this.visualElement.getInstance(),"pointerdown",(function(t){var r=e.getProps(),n=r.drag,i=r.dragListener;n&&(void 0===i||i)&&e.start(t)})),n=function(){xu(e.getProps().dragConstraints)&&(e.constraints=e.resolveRefConstraints())},i=this.visualElement.projection,o=i.addEventListener("measure",n);i&&!i.layout&&(null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout()),n();var a=Ad(window,"resize",(function(){e.scalePositionWithinConstraints()}));return i.addEventListener("didUpdate",(function(t){var r=t.delta,n=t.hasLayoutChanged;e.isDragging&&n&&(uh((function(t){var n=e.getAxisMotionValue(t);n&&(e.originPoint[t]+=r[t].translate,n.set(n.get()+r[t].translate))})),e.visualElement.syncRender())})),function(){a(),r(),o()}},t.prototype.getProps=function(){var t=this.visualElement.getProps(),e=t.drag,r=void 0!==e&&e,n=t.dragDirectionLock,i=void 0!==n&&n,o=t.dragPropagation,a=void 0!==o&&o,s=t.dragConstraints,u=void 0!==s&&s,c=t.dragElastic,f=void 0===c?Up:c,l=t.dragMomentum,h=void 0===l||l;return(0,su.__assign)((0,su.__assign)({},t),{drag:r,dragDirectionLock:i,dragPropagation:a,dragConstraints:u,dragElastic:f,dragMomentum:h})},t}();function Wp(t,e,r){return!(!0!==e&&e!==t||null!==r&&r!==t)}var Kp={pan:rp((function(t){var e=t.onPan,r=t.onPanStart,n=t.onPanEnd,i=t.onPanSessionStart,o=t.visualElement,s=e||r||n||i,u=(0,a.useRef)(null),c=(0,a.useContext)(du).transformPagePoint,f={onSessionStart:i,onStart:r,onMove:e,onEnd:function(t,e){u.current=null,n&&n(t,e)}};(0,a.useEffect)((function(){null!==u.current&&u.current.updateHandlers(f)})),Fd(o,"pointerdown",s&&function(t){u.current=new Pp(t,f,{transformPagePoint:c})}),Gd((function(){return u.current&&u.current.end()}))})),drag:rp((function(t){var e=t.dragControls,r=t.visualElement,n=Ou((function(){return new Vp(r)}));(0,a.useEffect)((function(){return e&&e.subscribe(n)}),[n,e]),(0,a.useEffect)((function(){return n.addListeners()}),[n])}))},Gp=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];var Zp=function(t){var e=t.treeType,r=void 0===e?"":e,n=t.build,i=t.getBaseTarget,o=t.makeTargetAnimatable,a=t.measureViewportBox,s=t.render,u=t.readValueFromInstance,c=t.removeValueFromRenderState,f=t.sortNodePosition,l=t.scrapeMotionValuesFromProps;return function(t,e){var h=t.parent,d=t.props,p=t.presenceId,v=t.blockInitialAnimation,m=t.visualState,y=t.shouldReduceMotion;void 0===e&&(e={});var g,b,w=!1,_=m.latestValues,x=m.renderState,k=function(){var t=Gp.map((function(){return new Qu})),e={},r={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){Gp.forEach((function(n){var i,o="on"+n,a=t[o];null===(i=e[n])||void 0===i||i.call(e),a&&(e[n]=r[o](a))}))}};return t.forEach((function(t,e){r["on"+Gp[e]]=function(e){return t.add(e)},r["notify"+Gp[e]]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.notify.apply(t,(0,su.__spreadArray)([],(0,su.__read)(e),!1))}})),r}(),E=new Map,M=new Map,A={},S=(0,su.__assign)({},_);function R(){g&&w&&(P(),s(g,x,d.style,j.projection))}function P(){n(j,x,_,e,d)}function T(){k.notifyUpdate(_)}function O(t,e){var r=e.onChange((function(e){_[t]=e,d.onUpdate&&Zu.update(T,!1,!0)})),n=e.onRenderRequest(j.scheduleRender);M.set(t,(function(){r(),n()}))}var I=l(d);for(var C in I){var N=I[C];void 0!==_[C]&&rc(N)&&N.set(_[C],!1)}var L=Su(d),B=Ru(d),j=(0,su.__assign)((0,su.__assign)({treeType:r,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:p,shouldReduceMotion:y,variantChildren:B?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==h?void 0:h.isMounted()),blockInitialAnimation:v,isMounted:function(){return Boolean(g)},mount:function(t){w=!0,g=j.current=t,j.projection&&j.projection.mount(t),B&&h&&!L&&(b=null==h?void 0:h.addVariantChild(j)),E.forEach((function(t,e){return O(e,t)})),null==h||h.children.add(j),j.setProps(d)},unmount:function(){var t;null===(t=j.projection)||void 0===t||t.unmount(),zu.update(T),zu.render(R),M.forEach((function(t){return t()})),null==b||b(),null==h||h.children.delete(j),k.clearAllListeners(),g=void 0,w=!1},addVariantChild:function(t){var e,r=j.getClosestVariantNode();if(r)return null===(e=r.variantChildren)||void 0===e||e.add(t),function(){return r.variantChildren.delete(t)}},sortNodePosition:function(t){return f&&r===t.treeType?f(j.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return B?j:null==h?void 0:h.getClosestVariantNode()},getLayoutId:function(){return d.layoutId},getInstance:function(){return g},getStaticValue:function(t){return _[t]},setStaticValue:function(t,e){return _[t]=e},getLatestValues:function(){return _},setVisibility:function(t){j.isVisible!==t&&(j.isVisible=t,j.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),o(j,t,d,e)},measureViewportBox:function(){return a(g,d)},addValue:function(t,e){j.hasValue(t)&&j.removeValue(t),E.set(t,e),_[t]=e.get(),O(t,e)},removeValue:function(t){var e;E.delete(t),null===(e=M.get(t))||void 0===e||e(),M.delete(t),delete _[t],c(t,x)},hasValue:function(t){return E.has(t)},getValue:function(t,e){var r=E.get(t);return void 0===r&&void 0!==e&&(r=ec(e),j.addValue(t,r)),r},forEachValue:function(t){return E.forEach(t)},readValue:function(t){var r;return null!==(r=_[t])&&void 0!==r?r:u(g,t,e)},setBaseTarget:function(t,e){S[t]=e},getBaseTarget:function(t){if(i){var e=i(d,t);if(void 0!==e&&!rc(e))return e}return S[t]}},k),{build:function(){return P(),x},scheduleRender:function(){Zu.render(R,!1,!0)},syncRender:R,setProps:function(t){(t.transformTemplate||d.transformTemplate)&&j.scheduleRender(),d=t,k.updatePropListeners(t),A=function(t,e,r){var n;for(var i in e){var o=e[i],a=r[i];if(rc(o))t.addValue(i,o);else if(rc(a))t.addValue(i,ec(o));else if(a!==o)if(t.hasValue(i)){var s=t.getValue(i);!s.hasAnimated&&s.set(o)}else t.addValue(i,ec(null!==(n=t.getStaticValue(i))&&void 0!==n?n:o))}for(var i in r)void 0===e[i]&&t.removeValue(i);return e}(j,l(d),A)},getProps:function(){return d},getVariant:function(t){var e;return null===(e=d.variants)||void 0===e?void 0:e[t]},getDefaultTransition:function(){return d.transition},getTransformPagePoint:function(){return d.transformPagePoint},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==h?void 0:h.getVariantContext();if(!L){var e=(null==h?void 0:h.getVariantContext())||{};return void 0!==d.initial&&(e.initial=d.initial),e}for(var r={},n=0;n<$p;n++){var i=Jp[n],o=d[i];(Eu(o)||!1===o)&&(r[i]=o)}return r}});return j}},Jp=(0,su.__spreadArray)(["initial"],(0,su.__read)(xp),!1),$p=Jp.length;function Yp(t){return"string"==typeof t&&t.startsWith("var(--")}var Xp=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Qp(t,e,r){void 0===r&&(r=1),'Max CSS variable fallback depth detected in property "'.concat(t,'". This may indicate a circular fallback dependency.');var n=(0,su.__read)(function(t){var e=Xp.exec(t);if(!e)return[,];var r=(0,su.__read)(e,3);return[r[1],r[2]]}(t),2),i=n[0],o=n[1];if(i){var a=window.getComputedStyle(e).getPropertyValue(i);return a?a.trim():Yp(o)?Qp(o,e,r+1):o}}var tv,ev=new Set(["width","height","top","left","right","bottom","x","y"]),rv=function(t){return ev.has(t)},nv=function(t,e){t.set(e,!1),t.set(e)},iv=function(t){return t===_c||t===Cc};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(tv||(tv={}));var ov=function(t,e){return parseFloat(t.split(", ")[e])},av=function(t,e){return function(r,n){var i=n.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return ov(o[1],e);var a=i.match(/^matrix\((.+)\)$/);return a?ov(a[1],t):0}},sv=new Set(["x","y","z"]),uv=fh.filter((function(t){return!sv.has(t)}));var cv={width:function(t,e){var r=t.x,n=e.paddingLeft,i=void 0===n?"0":n,o=e.paddingRight,a=void 0===o?"0":o;return r.max-r.min-parseFloat(i)-parseFloat(a)},height:function(t,e){var r=t.y,n=e.paddingTop,i=void 0===n?"0":n,o=e.paddingBottom,a=void 0===o?"0":o;return r.max-r.min-parseFloat(i)-parseFloat(a)},top:function(t,e){var r=e.top;return parseFloat(r)},left:function(t,e){var r=e.left;return parseFloat(r)},bottom:function(t,e){var r=t.y,n=e.top;return parseFloat(n)+(r.max-r.min)},right:function(t,e){var r=t.x,n=e.left;return parseFloat(n)+(r.max-r.min)},x:av(4,13),y:av(5,14)},fv=function(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n={}),e=(0,su.__assign)({},e),n=(0,su.__assign)({},n);var i=Object.keys(e).filter(rv),o=[],a=!1,s=[];if(i.forEach((function(i){var u=t.getValue(i);if(t.hasValue(i)){var c,f=r[i],l=hp(f),h=e[i];if(Gf(h)){var d=h.length,p=null===h[0]?1:0;f=h[p],l=hp(f);for(var v=p;v<d;v++)c?hp(h[v]):(c=hp(h[v]))===l||iv(l)&&iv(c)}else c=hp(h);if(l!==c)if(iv(l)&&iv(c)){var m=u.get();"string"==typeof m&&u.set(parseFloat(m)),"string"==typeof h?e[i]=parseFloat(h):Array.isArray(h)&&c===Cc&&(e[i]=h.map(parseFloat))}else(null==l?void 0:l.transform)&&(null==c?void 0:c.transform)&&(0===f||0===h)?0===f?u.set(c.transform(f)):e[i]=l.transform(h):(a||(o=function(t){var e=[];return uv.forEach((function(r){var n=t.getValue(r);void 0!==n&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))})),e.length&&t.syncRender(),e}(t),a=!0),s.push(i),n[i]=void 0!==n[i]?n[i]:e[i],nv(u,h))}})),s.length){var u=function(t,e,r){var n=e.measureViewportBox(),i=e.getInstance(),o=getComputedStyle(i),a=o.display,s={};"none"===a&&e.setStaticValue("display",t.display||"block"),r.forEach((function(t){s[t]=cv[t](n,o)})),e.syncRender();var u=e.measureViewportBox();return r.forEach((function(r){var n=e.getValue(r);nv(n,s[r]),t[r]=cv[r](u,o)})),t}(e,t,s);return o.length&&o.forEach((function(e){var r=(0,su.__read)(e,2),n=r[0],i=r[1];t.getValue(n).set(i)})),t.syncRender(),{target:u,transitionEnd:n}}return{target:e,transitionEnd:n}};function lv(t,e,r,n){return function(t){return Object.keys(t).some(rv)}(e)?fv(t,e,r,n):{target:e,transitionEnd:n}}var hv=function(t,e,r,n){var i=function(t,e,r){var n,i=(0,su.__rest)(e,[]),o=t.getInstance();if(!(o instanceof Element))return{target:i,transitionEnd:r};for(var a in r&&(r=(0,su.__assign)({},r)),t.forEachValue((function(t){var e=t.get();if(Yp(e)){var r=Qp(e,o);r&&t.set(r)}})),i){var s=i[a];if(Yp(s)){var u=Qp(s,o);u&&(i[a]=u,r&&(null!==(n=r[a])&&void 0!==n||(r[a]=s)))}}return{target:i,transitionEnd:r}}(t,e,n);return lv(t,e=i.target,r,n=i.transitionEnd)};var dv={treeType:"dom",readValueFromInstance:function(t,e){if(dh(e)){var r=al(e);return r&&r.default||0}var n,i=(n=t,window.getComputedStyle(n));return(Zh(e)?i.getPropertyValue(e):i[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var r;return null===(r=t.style)||void 0===r?void 0:r[e]},measureViewportBox:function(t,e){return zp(t,e.transformPagePoint)},resetTransform:function(t,e,r){var n=r.transformTemplate;e.style.transform=n?n({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var r=e.vars,n=e.style;delete r[t],delete n[t]},makeTargetAnimatable:function(t,e,r,n){var i=r.transformValues;void 0===n&&(n=!0);var o=e.transition,a=e.transitionEnd,s=(0,su.__rest)(e,["transition","transitionEnd"]),u=function(t,e,r){var n,i,o={};for(var a in t)o[a]=null!==(n=yp(a,e))&&void 0!==n?n:null===(i=r.getValue(a))||void 0===i?void 0:i.get();return o}(s,o||{},t);if(i&&(a&&(a=i(a)),s&&(s=i(s)),u&&(u=i(u))),n){!function(t,e,r){var n,i,o,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),u=s.length;if(u)for(var c=0;c<u;c++){var f=s[c],l=e[f],h=null;Array.isArray(l)&&(h=l[0]),null===h&&(h=null!==(i=null!==(n=r[f])&&void 0!==n?n:t.readValue(f))&&void 0!==i?i:e[f]),null!=h&&("string"==typeof h&&(/^\-?\d*\.?\d+$/.test(h)||cp(h))?h=parseFloat(h):!pp(h)&&Xc.test(l)&&(h=sl(f,l)),t.addValue(f,ec(h)),null!==(o=(a=r)[f])&&void 0!==o||(a[f]=h),t.setBaseTarget(f,h))}}(t,s,u);var c=hv(t,s,u,a);a=c.transitionEnd,s=c.target}return(0,su.__assign)({transition:o,transitionEnd:a},s)},scrapeMotionValuesFromProps:yd,build:function(t,e,r,n,i){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),$h(e,r,n,i.transformTemplate)},render:pd},pv=Zp(dv),vv=Zp((0,su.__assign)((0,su.__assign)({},dv),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var r;return dh(e)?(null===(r=al(e))||void 0===r?void 0:r.default)||0:(e=vd.has(e)?e:dd(e),t.getAttribute(e))},scrapeMotionValuesFromProps:gd,build:function(t,e,r,n,i){ud(e,r,n,i.transformTemplate)},render:md})),mv=function(t,e){return Wh(t)?vv(e,{enableHardwareAcceleration:!1}):pv(e,{enableHardwareAcceleration:!0})};function yv(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var gv={correct:function(t,e){if(!e.target)return t;if("string"==typeof t){if(!Cc.test(t))return t;t=parseFloat(t)}var r=yv(t,e.target.x),n=yv(t,e.target.y);return"".concat(r,"% ").concat(n,"%")}},bv="_$css",wv={correct:function(t,e){var r=e.treeScale,n=e.projectionDelta,i=t,o=t.includes("var("),a=[];o&&(t=t.replace(Xp,(function(t){return a.push(t),bv})));var s=Xc.parse(t);if(s.length>5)return i;var u=Xc.createTransformer(t),c="number"!=typeof s[0]?1:0,f=n.x.scale*r.x,l=n.y.scale*r.y;s[0+c]/=f,s[1+c]/=l;var h=Ju(f,l,.5);"number"==typeof s[2+c]&&(s[2+c]/=h),"number"==typeof s[3+c]&&(s[3+c]/=h);var d=u(s);if(o){var p=0;d=d.replace(bv,(function(){var t=a[p];return p++,t}))}return d}},_v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,su.__extends)(e,t),e.prototype.componentDidMount=function(){var t,e=this,r=this.props,n=r.visualElement,i=r.layoutGroup,o=r.switchLayoutGroup,a=r.layoutId,s=n.projection;t=xv,Object.assign(ah,t),s&&((null==i?void 0:i.group)&&i.group.add(s),(null==o?void 0:o.register)&&a&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(function(){e.safeToRemove()})),s.setOptions((0,su.__assign)((0,su.__assign)({},s.options),{onExitComplete:function(){return e.safeToRemove()}}))),bh.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(t){var e=this,r=this.props,n=r.layoutDependency,i=r.visualElement,o=r.drag,a=r.isPresent,s=i.projection;return s?(s.isPresent=a,o||t.layoutDependency!==n||void 0===n?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||Zu.postRender((function(){var t;(null===(t=s.getStack())||void 0===t?void 0:t.members.length)||e.safeToRemove()}))),null):null},e.prototype.componentDidUpdate=function(){var t=this.props.visualElement.projection;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var t=this.props,e=t.visualElement,r=t.layoutGroup,n=t.switchLayoutGroup,i=e.projection;i&&(i.scheduleCheckAfterUnmount(),(null==r?void 0:r.group)&&r.group.remove(i),(null==n?void 0:n.deregister)&&n.deregister(i))},e.prototype.safeToRemove=function(){var t=this.props.safeToRemove;null==t||t()},e.prototype.render=function(){return null},e}(a.Component);var xv={borderRadius:(0,su.__assign)((0,su.__assign)({},gv),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:gv,borderTopRightRadius:gv,borderBottomLeftRadius:gv,borderBottomRightRadius:gv,boxShadow:wv},kv={measureLayout:function(t){var e=(0,su.__read)(sp(),2),r=e[0],n=e[1],i=(0,a.useContext)(Fh);return a.createElement(_v,(0,su.__assign)({},t,{layoutGroup:i,switchLayoutGroup:(0,a.useContext)(qh),isPresent:r,safeToRemove:n}))}},Ev=wh({attachResizeListener:function(t,e){return t.addEventListener("resize",e,{passive:!0}),function(){return t.removeEventListener("resize",e)}},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}}}),Mv={current:void 0},Av=wh({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!Mv.current){var t=new Ev(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Mv.current=t}return Mv.current},resetTransform:function(t,e){t.style.transform=null!=e?e:"none"}}),Sv=(0,su.__assign)((0,su.__assign)((0,su.__assign)((0,su.__assign)({},Rp),np),Kp),kv),Rv=Hh((function(t,e){return function(t,e,r,n,i){var o=e.forwardMotionProps,a=void 0!==o&&o,s=Wh(t)?Ed:Md;return(0,su.__assign)((0,su.__assign)({},s),{preloadedFeatures:r,useRender:ld(a),createVisualElement:n,projectionNodeConstructor:i,Component:t})}(t,e,Sv,mv,Av)}));function Pv(){var t=(0,a.useRef)(!1);return yu((function(){return t.current=!0,function(){t.current=!1}}),[]),t}var Tv=function(t){var e=t.children,r=t.initial,n=t.isPresent,i=t.onExitComplete,o=t.custom,s=t.presenceAffectsLayout,u=Ou(Ov),c=ap(),f=(0,a.useMemo)((function(){return{id:c,initial:r,isPresent:n,custom:o,onExitComplete:function(t){var e,r;u.set(t,!0);try{for(var n=(0,su.__values)(u.values()),o=n.next();!o.done;o=n.next()){if(!o.value)return}}catch(a){e={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}null==i||i()},register:function(t){return u.set(t,!1),function(){return u.delete(t)}}}}),s?void 0:[n]);return(0,a.useMemo)((function(){u.forEach((function(t,e){return u.set(e,!1)}))}),[n]),a.useEffect((function(){!n&&!u.size&&(null==i||i())}),[n]),a.createElement(vu.Provider,{value:f},e)};function Ov(){return new Map}var Iv=function(t){return t.key||""};var Cv=function(t){var e=t.children,r=t.custom,n=t.initial,i=void 0===n||n,o=t.onExitComplete,s=t.exitBeforeEnter,u=t.presenceAffectsLayout,c=void 0===u||u,f=(0,su.__read)(function(){var t=Pv(),e=(0,su.__read)((0,a.useState)(0),2),r=e[0],n=e[1],i=(0,a.useCallback)((function(){t.current&&n(r+1)}),[r]);return[(0,a.useCallback)((function(){return Zu.postRender(i)}),[i]),r]}(),1),l=f[0],h=(0,a.useContext)(Fh).forceRender;h&&(l=h);var d=Pv(),p=function(t){var e=[];return a.Children.forEach(t,(function(t){(0,a.isValidElement)(t)&&e.push(t)})),e}(e),v=p,m=new Set,y=(0,a.useRef)(v),g=(0,a.useRef)(new Map).current,b=(0,a.useRef)(!0);if(yu((function(){b.current=!1,function(t,e){t.forEach((function(t){var r=Iv(t);e.set(r,t)}))}(p,g),y.current=v})),Gd((function(){b.current=!0,g.clear(),m.clear()})),b.current)return a.createElement(a.Fragment,null,v.map((function(t){return a.createElement(Tv,{key:Iv(t),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:c},t)})));v=(0,su.__spreadArray)([],(0,su.__read)(v),!1);for(var w=y.current.map(Iv),_=p.map(Iv),x=w.length,k=0;k<x;k++){var E=w[k];-1===_.indexOf(E)&&m.add(E)}return s&&m.size&&(v=[]),m.forEach((function(t){if(-1===_.indexOf(t)){var e=g.get(t);if(e){var n=w.indexOf(t);v.splice(n,0,a.createElement(Tv,{key:Iv(e),isPresent:!1,onExitComplete:function(){g.delete(t),m.delete(t);var e=y.current.findIndex((function(e){return e.key===t}));if(y.current.splice(e,1),!m.size){if(y.current=p,!1===d.current)return;l(),o&&o()}},custom:r,presenceAffectsLayout:c},e))}}})),v=v.map((function(t){var e=t.key;return m.has(e)?t:a.createElement(Tv,{key:Iv(t),isPresent:!0,presenceAffectsLayout:c},t)})),a.createElement(a.Fragment,null,m.size?v:v.map((function(t){return(0,a.cloneElement)(t)})))},Nv=r(86957);function Lv(){return Lv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Lv.apply(this,arguments)}function Bv(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}var jv={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},Uv=["openDelay","closeDelay","closeOnClick","closeOnMouseDown","onOpen","onClose","placement","id","isOpen","defaultIsOpen","arrowSize","arrowShadowColor","arrowPadding","modifiers","isDisabled","gutter","offset","direction"];var Fv=["children","label","shouldWrapChildren","aria-label","hasArrow","bg","portalProps","background","backgroundColor","bgColor"],qv=(0,c.m$)(Rv.div),Dv=(0,c.Gp)((function(t,e){var r,n,i=(0,c.mq)("Tooltip",t),o=(0,c.Lr)(t),s=(0,c.Fg)(),u=o.children,l=o.label,d=o.shouldWrapChildren,p=o["aria-label"],v=o.hasArrow,m=o.bg,y=o.portalProps,g=o.background,b=o.backgroundColor,w=o.bgColor,_=Bv(o,Fv),x=null!=(r=null!=(n=null!=g?g:b)?n:m)?r:w;x&&(i.bg=x,i[Vs.arrowBg.var]=(0,f.K1)(s,"colors",x));var k,M=function(t){void 0===t&&(t={});var e=t,r=e.openDelay,n=void 0===r?0:r,i=e.closeDelay,o=void 0===i?0:i,s=e.closeOnClick,u=void 0===s||s,c=e.closeOnMouseDown,l=e.onOpen,h=e.onClose,d=e.placement,p=e.id,v=e.isOpen,m=e.defaultIsOpen,y=e.arrowSize,g=void 0===y?10:y,b=e.arrowShadowColor,w=e.arrowPadding,_=e.modifiers,x=e.isDisabled,k=e.gutter,M=e.offset,A=e.direction,R=Bv(e,Uv),P=(0,E.qY)({isOpen:v,defaultIsOpen:m,onOpen:l,onClose:h}),T=P.isOpen,O=P.onOpen,I=P.onClose,C=iu({enabled:T,placement:d,arrowPadding:w,modifiers:_,gutter:k,offset:M,direction:A}),N=C.referenceRef,L=C.getPopperProps,B=C.getArrowInnerProps,j=C.getArrowProps,U=(0,E.Me)(p,"tooltip"),F=a.useRef(null),q=a.useRef(),D=a.useRef(),z=a.useCallback((function(){x||(q.current=window.setTimeout(O,n))}),[x,O,n]),H=a.useCallback((function(){q.current&&clearTimeout(q.current),D.current=window.setTimeout(I,o)}),[o,I]),V=a.useCallback((function(){u&&H()}),[u,H]),W=a.useCallback((function(){c&&H()}),[c,H]),K=a.useCallback((function(t){T&&"Escape"===t.key&&H()}),[T,H]);(0,Nv.b)("keydown",K),a.useEffect((function(){return function(){clearTimeout(q.current),clearTimeout(D.current)}}),[]),(0,Nv.b)("mouseleave",H,(function(){return F.current}));var G=a.useCallback((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),Lv({},t,{ref:(0,S.lq)(F,e,N),onMouseEnter:(0,f.v0)(t.onMouseEnter,z),onClick:(0,f.v0)(t.onClick,V),onMouseDown:(0,f.v0)(t.onMouseDown,W),onFocus:(0,f.v0)(t.onFocus,z),onBlur:(0,f.v0)(t.onBlur,H),"aria-describedby":T?U:void 0})}),[z,H,W,T,U,V,N]),Z=a.useCallback((function(t,e){var r;return void 0===t&&(t={}),void 0===e&&(e=null),L(Lv({},t,{style:Lv({},t.style,(r={},r[Vs.arrowSize.var]=g?(0,f.px)(g):void 0,r[Vs.arrowShadowColor.var]=b,r))}),e)}),[L,g,b]),J=a.useCallback((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),Lv({ref:e},R,t,{id:U,role:"tooltip",style:Lv({},t.style,{position:"relative",transformOrigin:Vs.transformOrigin.varRef})})}),[R,U]);return{isOpen:T,show:z,hide:H,getTriggerProps:G,getTooltipProps:J,getTooltipPositionerProps:Z,getArrowProps:j,getArrowInnerProps:B}}(Lv({},_,{direction:s.direction}));if((0,f.HD)(u)||d)k=a.createElement(c.m$.span,Lv({tabIndex:0},M.getTriggerProps()),u);else{var A=a.Children.only(u);k=a.cloneElement(A,M.getTriggerProps(A.props,A.ref))}var R=!!p,P=M.getTooltipProps({},e),T=R?(0,f.CE)(P,["role","id"]):P,O=(0,f.ei)(P,["role","id"]);return l?a.createElement(a.Fragment,null,k,a.createElement(Cv,null,M.isOpen&&a.createElement(au.h_,y,a.createElement(c.m$.div,Lv({},M.getTooltipPositionerProps(),{__css:{zIndex:i.zIndex,pointerEvents:"none"}}),a.createElement(qv,Lv({variants:jv},T,{initial:"exit",animate:"enter",exit:"exit",__css:i}),l,R&&a.createElement(h,O,p),v&&a.createElement(c.m$.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},a.createElement(c.m$.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:i.bg}}))))))):a.createElement(a.Fragment,null,u)}));f.Ts&&(Dv.displayName="Tooltip");(0,u.IU)({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});var zv=(0,u.IU)({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"}),Hv=((0,u.IU)({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"}),(0,u.IU)({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"})),Vv=(0,u.IU)({displayName:"SunIcon",path:a.createElement("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor"},a.createElement("circle",{cx:"12",cy:"12",r:"5"}),a.createElement("path",{d:"M12 1v2"}),a.createElement("path",{d:"M12 21v2"}),a.createElement("path",{d:"M4.22 4.22l1.42 1.42"}),a.createElement("path",{d:"M18.36 18.36l1.42 1.42"}),a.createElement("path",{d:"M1 12h2"}),a.createElement("path",{d:"M21 12h2"}),a.createElement("path",{d:"M4.22 19.78l1.42-1.42"}),a.createElement("path",{d:"M18.36 5.64l1.42-1.42"}))}),Wv=(0,u.IU)({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"}),Kv=((0,u.IU)({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:a.createElement("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})}),(0,u.IU)({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"}),(0,u.IU)({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"}),(0,u.IU)({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"}),(0,u.IU)({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"}),(0,u.IU)({displayName:"ViewIcon",path:a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),a.createElement("circle",{cx:"12",cy:"12",r:"2"}))}),(0,u.IU)({displayName:"ViewOffIcon",path:a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),a.createElement("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"}))}),(0,u.IU)({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"}),(0,u.IU)({displayName:"DeleteIcon",path:a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"}))}),(0,u.IU)({displayName:"RepeatIcon",path:a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),a.createElement("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"}))}),(0,u.IU)({displayName:"RepeatClockIcon",path:a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),a.createElement("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"}))}),(0,u.IU)({displayName:"EditIcon",path:a.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"},a.createElement("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),a.createElement("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"}))}),(0,u.IU)({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"}),(0,u.IU)({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"}),(0,u.IU)({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}),(0,u.IU)({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),(0,u.IU)({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"}),(0,u.IU)({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"}),(0,u.IU)({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"}),(0,u.IU)({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"}),(0,u.IU)({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"}),(0,u.IU)({displayName:"ExternalLinkIcon",path:a.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"},a.createElement("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),a.createElement("path",{d:"M15 3h6v6"}),a.createElement("path",{d:"M10 14L21 3"}))}),(0,u.IU)({displayName:"LinkIcon",path:a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),a.createElement("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"}))}),(0,u.IU)({displayName:"PlusSquareIcon",path:a.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2"},a.createElement("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),a.createElement("path",{d:"M12 8v8"}),a.createElement("path",{d:"M8 12h8"}))}),(0,u.IU)({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"}),(0,u.IU)({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"}),(0,u.IU)({displayName:"TimeIcon",path:a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),a.createElement("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"}))}),(0,u.IU)({displayName:"ArrowRightIcon",path:a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),a.createElement("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"}))}),(0,u.IU)({displayName:"ArrowLeftIcon",path:a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),a.createElement("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"}))}),(0,u.IU)({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"}),(0,u.IU)({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"}),(0,u.IU)({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"}),(0,u.IU)({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"}),(0,u.IU)({displayName:"EmailIcon",path:a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),a.createElement("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"}))}),(0,u.IU)({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"}),(0,u.IU)({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"}),(0,u.IU)({displayName:"SpinnerIcon",path:a.createElement(a.Fragment,null,a.createElement("defs",null,a.createElement("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a"},a.createElement("stop",{stopColor:"currentColor",offset:"0%"}),a.createElement("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"}))),a.createElement("g",{transform:"translate(2)",fill:"none"},a.createElement("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),a.createElement("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),a.createElement("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})))}),(0,u.IU)({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),(0,u.IU)({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:a.createElement("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})}),(0,u.IU)({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"}),(0,u.IU)({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"}),(0,u.IU)({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"}),(0,u.IU)({displayName:"InfoOutlineIcon",path:a.createElement("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2"},a.createElement("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),a.createElement("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),a.createElement("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"}))}),(0,u.IU)({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"}),(0,u.IU)({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"}),(0,u.IU)({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"}),(0,u.IU)({displayName:"QuestionOutlineIcon",path:a.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},a.createElement("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),a.createElement("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),a.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"}))}),(0,u.IU)({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"}),(0,u.IU)({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"}),(0,u.IU)({viewBox:"0 0 14 14",path:a.createElement("g",{fill:"currentColor"},a.createElement("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"}))}),(0,u.IU)({displayName:"MinusIcon",path:a.createElement("g",{fill:"currentColor"},a.createElement("rect",{height:"4",width:"20",x:"2",y:"10"}))}),(0,u.IU)({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"}),r(28262)),Gv=function(t){var e=(0,Kv.If)(),r=e.colorMode,n=e.toggleColorMode;return(0,R.tZ)(Z,(0,s.Z)({},t,{"aria-label":"Toggle Dark Mode",onClick:n,icon:"light"===r?(0,R.tZ)(Hv,null):(0,R.tZ)(Vv,null)}))};function Zv(){return Zv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Zv.apply(this,arguments)}function Jv(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}var $v=["id","isRequired","isInvalid","isDisabled","isReadOnly"],Yv=["getRootProps","htmlProps"],Xv=(0,S.kr)({strict:!1,name:"FormControlContext"}),Qv=Xv[0],tm=Xv[1];var em=(0,c.Gp)((function(t,e){var r=(0,c.jC)("Form",t),n=function(t){var e=t.id,r=t.isRequired,n=t.isInvalid,i=t.isDisabled,o=t.isReadOnly,s=Jv(t,$v),u=(0,E.Me)(),c=e||"field-"+u,l=c+"-label",h=c+"-feedback",d=c+"-helptext",p=a.useState(!1),v=p[0],m=p[1],y=a.useState(!1),g=y[0],b=y[1],w=(0,E.kt)(),_=w[0],x=w[1],k=a.useCallback((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),Zv({id:d},t,{ref:(0,S.lq)(e,(function(t){t&&b(!0)}))})}),[d]),M=a.useCallback((function(t,e){var r,a;return void 0===t&&(t={}),void 0===e&&(e=null),Zv({},t,{ref:e,"data-focus":(0,f.PB)(_),"data-disabled":(0,f.PB)(i),"data-invalid":(0,f.PB)(n),"data-readonly":(0,f.PB)(o),id:null!=(r=t.id)?r:l,htmlFor:null!=(a=t.htmlFor)?a:c})}),[c,i,_,n,o,l]),A=a.useCallback((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),Zv({id:h},t,{ref:(0,S.lq)(e,(function(t){t&&m(!0)})),"aria-live":"polite"})}),[h]),R=a.useCallback((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),Zv({},t,s,{ref:e,role:"group"})}),[s]),P=a.useCallback((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),Zv({},t,{ref:e,role:"presentation","aria-hidden":!0,children:t.children||"*"})}),[]);return{isRequired:!!r,isInvalid:!!n,isReadOnly:!!o,isDisabled:!!i,isFocused:!!_,onFocus:x.on,onBlur:x.off,hasFeedbackText:v,setHasFeedbackText:m,hasHelpText:g,setHasHelpText:b,id:c,labelId:l,feedbackId:h,helpTextId:d,htmlProps:s,getHelpTextProps:k,getErrorMessageProps:A,getRootProps:R,getLabelProps:M,getRequiredIndicatorProps:P}}((0,c.Lr)(t)),i=n.getRootProps;n.htmlProps;var o=Jv(n,Yv),s=(0,f.cx)("chakra-form-control",t.className);return a.createElement(Qv,{value:o},a.createElement(c.Fo,{value:r},a.createElement(c.m$.div,Zv({},i({},e),{className:s,__css:r.container}))))}));f.Ts&&(em.displayName="FormControl");var rm=(0,c.Gp)((function(t,e){var r=tm(),n=(0,c.yK)(),i=(0,f.cx)("chakra-form__helper-text",t.className);return a.createElement(c.m$.div,Zv({},null==r?void 0:r.getHelpTextProps(t,e),{__css:n.helperText,className:i}))}));f.Ts&&(rm.displayName="FormHelperText");var nm=["isDisabled","isInvalid","isReadOnly","isRequired"],im=["id","disabled","readOnly","required","isRequired","isInvalid","isReadOnly","isDisabled","onFocus","onBlur"];function om(t){var e=function(t){var e,r,n,i=tm(),o=t.id,a=t.disabled,s=t.readOnly,u=t.required,c=t.isRequired,l=t.isInvalid,h=t.isReadOnly,d=t.isDisabled,p=t.onFocus,v=t.onBlur,m=Jv(t,im),y=t["aria-describedby"]?[t["aria-describedby"]]:[];null!=i&&i.hasFeedbackText&&null!=i&&i.isInvalid&&y.push(i.feedbackId);null!=i&&i.hasHelpText&&y.push(i.helpTextId);return Zv({},m,{"aria-describedby":y.join(" ")||void 0,id:null!=o?o:null==i?void 0:i.id,isDisabled:null!=(e=null!=a?a:d)?e:null==i?void 0:i.isDisabled,isReadOnly:null!=(r=null!=s?s:h)?r:null==i?void 0:i.isReadOnly,isRequired:null!=(n=null!=u?u:c)?n:null==i?void 0:i.isRequired,isInvalid:null!=l?l:null==i?void 0:i.isInvalid,onFocus:(0,f.v0)(null==i?void 0:i.onFocus,p),onBlur:(0,f.v0)(null==i?void 0:i.onBlur,v)})}(t),r=e.isDisabled,n=e.isInvalid,i=e.isReadOnly,o=e.isRequired;return Zv({},Jv(e,nm),{disabled:r,readOnly:i,required:o,"aria-invalid":(0,f.Qm)(n),"aria-required":(0,f.Qm)(o),"aria-readonly":(0,f.Qm)(i)})}var am=(0,c.Gp)((function(t,e){var r=(0,c.jC)("FormError",t),n=(0,c.Lr)(t),i=tm();return null!=i&&i.isInvalid?a.createElement(c.Fo,{value:r},a.createElement(c.m$.div,Zv({},null==i?void 0:i.getErrorMessageProps(n,e),{className:(0,f.cx)("chakra-form__error-message",t.className),__css:Zv({display:"flex",alignItems:"center"},r.text)}))):null}));f.Ts&&(am.displayName="FormErrorMessage");var sm=(0,c.Gp)((function(t,e){var r=(0,c.yK)(),n=tm();if(null==n||!n.isInvalid)return null;var i=(0,f.cx)("chakra-form__error-icon",t.className);return a.createElement(u.ZP,Zv({ref:e,"aria-hidden":!0},t,{__css:r.icon,className:i}),a.createElement("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"}))}));f.Ts&&(sm.displayName="FormErrorIcon");var um=["className","children","requiredIndicator"],cm=(0,c.Gp)((function(t,e){var r,n=(0,c.mq)("FormLabel",t),i=(0,c.Lr)(t);i.className;var o=i.children,s=i.requiredIndicator,u=void 0===s?a.createElement(fm,null):s,l=Jv(i,um),h=tm(),d=null!=(r=null==h?void 0:h.getLabelProps(l,e))?r:Zv({ref:e},l);return a.createElement(c.m$.label,Zv({},d,{className:(0,f.cx)("chakra-form__label",i.className),__css:Zv({display:"block",textAlign:"start"},n)}),o,null!=h&&h.isRequired?u:null)}));f.Ts&&(cm.displayName="FormLabel");var fm=(0,c.Gp)((function(t,e){var r=tm(),n=(0,c.yK)();if(null==r||!r.isRequired)return null;var i=(0,f.cx)("chakra-form__required-indicator",t.className);return a.createElement(c.m$.span,Zv({},null==r?void 0:r.getRequiredIndicatorProps(t,e),{__css:n.requiredIndicator,className:i}))}));function lm(){return lm=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},lm.apply(this,arguments)}function hm(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}f.Ts&&(fm.displayName="RequiredIndicator");var dm=["htmlSize"],pm=(0,c.Gp)((function(t,e){var r=t.htmlSize,n=hm(t,dm),i=(0,c.jC)("Input",n),o=om((0,c.Lr)(n)),s=(0,f.cx)("chakra-input",t.className);return a.createElement(c.m$.input,lm({size:r},o,{__css:i.field,ref:e,className:s}))}));f.Ts&&(pm.displayName="Input"),pm.id="Input";var vm=["placement"],mm={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},ym=(0,c.m$)("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),gm=(0,c.Gp)((function(t,e){var r,n=t.placement,i=void 0===n?"left":n,o=hm(t,vm),s=null!=(r=mm[i])?r:{},u=(0,c.yK)();return a.createElement(ym,lm({ref:e},o,{__css:lm({},u.addon,s)}))}));f.Ts&&(gm.displayName="InputAddon");var bm=(0,c.Gp)((function(t,e){return a.createElement(gm,lm({ref:e,placement:"left"},t,{className:(0,f.cx)("chakra-input__left-addon",t.className)}))}));f.Ts&&(bm.displayName="InputLeftAddon"),bm.id="InputLeftAddon";var wm=(0,c.Gp)((function(t,e){return a.createElement(gm,lm({ref:e,placement:"right"},t,{className:(0,f.cx)("chakra-input__right-addon",t.className)}))}));f.Ts&&(wm.displayName="InputRightAddon"),wm.id="InputRightAddon";var _m=["children","className"],xm=(0,c.Gp)((function(t,e){var r=(0,c.jC)("Input",t),n=(0,c.Lr)(t),i=n.children,o=n.className,s=hm(n,_m),u=(0,f.cx)("chakra-input__group",o),l={},h=(0,S.WR)(i),d=r.field;h.forEach((function(t){if(r){var e,n;if(d&&"InputLeftElement"===t.type.id)l.paddingStart=null!=(e=d.height)?e:d.h;if(d&&"InputRightElement"===t.type.id)l.paddingEnd=null!=(n=d.height)?n:d.h;"InputRightAddon"===t.type.id&&(l.borderEndRadius=0),"InputLeftAddon"===t.type.id&&(l.borderStartRadius=0)}}));var p=h.map((function(e){var r,n,i=(0,f.YU)({size:(null==(r=e.props)?void 0:r.size)||t.size,variant:(null==(n=e.props)?void 0:n.variant)||t.variant});return"Input"!==e.type.id?a.cloneElement(e,i):a.cloneElement(e,Object.assign(i,l,e.props))}));return a.createElement(c.m$.div,lm({className:u,ref:e,__css:{width:"100%",display:"flex",position:"relative"}},s),a.createElement(c.Fo,{value:r},p))}));f.Ts&&(xm.displayName="InputGroup");var km=["placement"],Em=["className"],Mm=["className"],Am=(0,c.m$)("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),Sm=(0,c.Gp)((function(t,e){var r,n,i,o=t.placement,s=void 0===o?"left":o,u=hm(t,km),f=(0,c.yK)(),l=f.field,h=lm(((i={})["left"===s?"insetStart":"insetEnd"]="0",i.width=null!=(r=null==l?void 0:l.height)?r:null==l?void 0:l.h,i.height=null!=(n=null==l?void 0:l.height)?n:null==l?void 0:l.h,i.fontSize=null==l?void 0:l.fontSize,i),f.element);return a.createElement(Am,lm({ref:e,__css:h},u))}));Sm.id="InputElement",f.Ts&&(Sm.displayName="InputElement");var Rm=(0,c.Gp)((function(t,e){var r=t.className,n=hm(t,Em),i=(0,f.cx)("chakra-input__left-element",r);return a.createElement(Sm,lm({ref:e,placement:"left",className:i},n))}));Rm.id="InputLeftElement",f.Ts&&(Rm.displayName="InputLeftElement");var Pm=(0,c.Gp)((function(t,e){var r=t.className,n=hm(t,Mm),i=(0,f.cx)("chakra-input__right-element",r);return a.createElement(Sm,lm({ref:e,placement:"right",className:i},n))}));Pm.id="InputRightElement",f.Ts&&(Pm.displayName="InputRightElement");var Tm,Om,Im,Cm,Nm=function(t){var e=t.setSearchQuery,r=t.searchQuery;return(0,R.tZ)(xm,{size:"lg",mx:{base:0,md:"5"},mb:{base:"2",md:0}},(0,R.tZ)(Rm,{pointerEvents:"none",children:(0,R.tZ)(zv,{color:"gray.300"})}),(0,R.tZ)(pm,{type:"text",placeholder:"Search",value:r,onChange:function(t){return e(t.target.value)}}))},Lm=r(23201),Bm=function(t){var e=(0,a.useContext)(Ma),r=e.handleConnect,n=e.isConnected,o=e.address;return(0,R.tZ)(i.kC,{pb:"2",flexDirection:{base:"column",md:"row"},justifyContent:"space-between"},(0,R.tZ)(i.X6,null,"Chainlist"),(0,R.tZ)(Nm,t),(0,R.tZ)(i.kC,null,(0,R.tZ)(Dv,{label:"Add Network"},(0,R.tZ)(i.rU,{href:"https://github.com/ethereum-lists/chains/pulls",isExternal:!0},(0,R.tZ)(Z,{size:"lg","aria-label":"Add",icon:(0,R.tZ)(Wv,null),mr:"1"}))),(0,R.tZ)(Dv,{label:"GitHub"},(0,R.tZ)(i.rU,{href:"https://github.com/FrederikBolding/chainlist",isExternal:!0},(0,R.tZ)(Z,{size:"lg","aria-label":"GitHub",icon:(0,R.tZ)(Lm.hJX,null),mr:"1"}))),(0,R.tZ)(Gv,{size:"lg",mr:"1"}),n?(0,R.tZ)(W,{size:"lg",w:{base:"100%",md:"auto"}},(0,R.tZ)(i.xv,{fontSize:"sm",isTruncated:!0},o)):(0,R.tZ)(W,{w:{base:"100%",md:"auto"},size:"lg",onClick:r},"Connect Wallet")))},jm=r(45697),Um=r.n(jm),Fm=r(24839),qm=r.n(Fm),Dm=r(32993),zm=r.n(Dm),Hm=r(46494),Vm=r.n(Hm),Wm="bodyAttributes",Km="htmlAttributes",Gm="titleAttributes",Zm={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},Jm=(Object.keys(Zm).map((function(t){return Zm[t]})),"charset"),$m="cssText",Ym="href",Xm="http-equiv",Qm="innerHTML",ty="itemprop",ey="name",ry="property",ny="rel",iy="src",oy="target",ay={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},sy="defaultTitle",uy="defer",cy="encodeSpecialCharacters",fy="onChangeClientState",ly="titleTemplate",hy=Object.keys(ay).reduce((function(t,e){return t[ay[e]]=e,t}),{}),dy=[Zm.NOSCRIPT,Zm.SCRIPT,Zm.STYLE],py="data-react-helmet",vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},my=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},yy=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),gy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},by=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},wy=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},_y=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===e?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},xy=function(t){var e=Sy(t,Zm.TITLE),r=Sy(t,ly);if(r&&e)return r.replace(/%s/g,(function(){return Array.isArray(e)?e.join(""):e}));var n=Sy(t,sy);return e||n||void 0},ky=function(t){return Sy(t,fy)||function(){}},Ey=function(t,e){return e.filter((function(e){return void 0!==e[t]})).map((function(e){return e[t]})).reduce((function(t,e){return gy({},t,e)}),{})},My=function(t,e){return e.filter((function(t){return void 0!==t[Zm.BASE]})).map((function(t){return t[Zm.BASE]})).reverse().reduce((function(e,r){if(!e.length)for(var n=Object.keys(r),i=0;i<n.length;i++){var o=n[i].toLowerCase();if(-1!==t.indexOf(o)&&r[o])return e.concat(r)}return e}),[])},Ay=function(t,e,r){var n={};return r.filter((function(e){return!!Array.isArray(e[t])||(void 0!==e[t]&&Iy("Helmet: "+t+' should be of type "Array". Instead found type "'+vy(e[t])+'"'),!1)})).map((function(e){return e[t]})).reverse().reduce((function(t,r){var i={};r.filter((function(t){for(var r=void 0,o=Object.keys(t),a=0;a<o.length;a++){var s=o[a],u=s.toLowerCase();-1===e.indexOf(u)||r===ny&&"canonical"===t[r].toLowerCase()||u===ny&&"stylesheet"===t[u].toLowerCase()||(r=u),-1===e.indexOf(s)||s!==Qm&&s!==$m&&s!==ty||(r=s)}if(!r||!t[r])return!1;var c=t[r].toLowerCase();return n[r]||(n[r]={}),i[r]||(i[r]={}),!n[r][c]&&(i[r][c]=!0,!0)})).reverse().forEach((function(e){return t.push(e)}));for(var o=Object.keys(i),a=0;a<o.length;a++){var s=o[a],u=Vm()({},n[s],i[s]);n[s]=u}return t}),[]).reverse()},Sy=function(t,e){for(var r=t.length-1;r>=0;r--){var n=t[r];if(n.hasOwnProperty(e))return n[e]}return null},Ry=(Tm=Date.now(),function(t){var e=Date.now();e-Tm>16?(Tm=e,t(e)):setTimeout((function(){Ry(t)}),0)}),Py=function(t){return clearTimeout(t)},Ty="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Ry:r.g.requestAnimationFrame||Ry,Oy="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||Py:r.g.cancelAnimationFrame||Py,Iy=function(t){return console&&"function"==typeof console.warn&&console.warn(t)},Cy=null,Ny=function(t,e){var r=t.baseTag,n=t.bodyAttributes,i=t.htmlAttributes,o=t.linkTags,a=t.metaTags,s=t.noscriptTags,u=t.onChangeClientState,c=t.scriptTags,f=t.styleTags,l=t.title,h=t.titleAttributes;jy(Zm.BODY,n),jy(Zm.HTML,i),By(l,h);var d={baseTag:Uy(Zm.BASE,r),linkTags:Uy(Zm.LINK,o),metaTags:Uy(Zm.META,a),noscriptTags:Uy(Zm.NOSCRIPT,s),scriptTags:Uy(Zm.SCRIPT,c),styleTags:Uy(Zm.STYLE,f)},p={},v={};Object.keys(d).forEach((function(t){var e=d[t],r=e.newTags,n=e.oldTags;r.length&&(p[t]=r),n.length&&(v[t]=d[t].oldTags)})),e&&e(),u(t,p,v)},Ly=function(t){return Array.isArray(t)?t.join(""):t},By=function(t,e){void 0!==t&&document.title!==t&&(document.title=Ly(t)),jy(Zm.TITLE,e)},jy=function(t,e){var r=document.getElementsByTagName(t)[0];if(r){for(var n=r.getAttribute(py),i=n?n.split(","):[],o=[].concat(i),a=Object.keys(e),s=0;s<a.length;s++){var u=a[s],c=e[u]||"";r.getAttribute(u)!==c&&r.setAttribute(u,c),-1===i.indexOf(u)&&i.push(u);var f=o.indexOf(u);-1!==f&&o.splice(f,1)}for(var l=o.length-1;l>=0;l--)r.removeAttribute(o[l]);i.length===o.length?r.removeAttribute(py):r.getAttribute(py)!==a.join(",")&&r.setAttribute(py,a.join(","))}},Uy=function(t,e){var r=document.head||document.querySelector(Zm.HEAD),n=r.querySelectorAll(t+"["+"data-react-helmet]"),i=Array.prototype.slice.call(n),o=[],a=void 0;return e&&e.length&&e.forEach((function(e){var r=document.createElement(t);for(var n in e)if(e.hasOwnProperty(n))if(n===Qm)r.innerHTML=e.innerHTML;else if(n===$m)r.styleSheet?r.styleSheet.cssText=e.cssText:r.appendChild(document.createTextNode(e.cssText));else{var s=void 0===e[n]?"":e[n];r.setAttribute(n,s)}r.setAttribute(py,"true"),i.some((function(t,e){return a=e,r.isEqualNode(t)}))?i.splice(a,1):o.push(r)})),i.forEach((function(t){return t.parentNode.removeChild(t)})),o.forEach((function(t){return r.appendChild(t)})),{oldTags:i,newTags:o}},Fy=function(t){return Object.keys(t).reduce((function(e,r){var n=void 0!==t[r]?r+'="'+t[r]+'"':""+r;return e?e+" "+n:n}),"")},qy=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,r){return e[ay[r]||r]=t[r],e}),e)},Dy=function(t,e,r){switch(t){case Zm.TITLE:return{toComponent:function(){return t=e.title,r=e.titleAttributes,(n={key:t})[py]=!0,i=qy(r,n),[a.createElement(Zm.TITLE,i,t)];var t,r,n,i},toString:function(){return function(t,e,r,n){var i=Fy(r),o=Ly(e);return i?"<"+t+' data-react-helmet="true" '+i+">"+_y(o,n)+"</"+t+">":"<"+t+' data-react-helmet="true">'+_y(o,n)+"</"+t+">"}(t,e.title,e.titleAttributes,r)}};case Wm:case Km:return{toComponent:function(){return qy(e)},toString:function(){return Fy(e)}};default:return{toComponent:function(){return function(t,e){return e.map((function(e,r){var n,i=((n={key:r})[py]=!0,n);return Object.keys(e).forEach((function(t){var r=ay[t]||t;if(r===Qm||r===$m){var n=e.innerHTML||e.cssText;i.dangerouslySetInnerHTML={__html:n}}else i[r]=e[t]})),a.createElement(t,i)}))}(t,e)},toString:function(){return function(t,e,r){return e.reduce((function(e,n){var i=Object.keys(n).filter((function(t){return!(t===Qm||t===$m)})).reduce((function(t,e){var i=void 0===n[e]?e:e+'="'+_y(n[e],r)+'"';return t?t+" "+i:i}),""),o=n.innerHTML||n.cssText||"",a=-1===dy.indexOf(t);return e+"<"+t+' data-react-helmet="true" '+i+(a?"/>":">"+o+"</"+t+">")}),"")}(t,e,r)}}}},zy=function(t){var e=t.baseTag,r=t.bodyAttributes,n=t.encode,i=t.htmlAttributes,o=t.linkTags,a=t.metaTags,s=t.noscriptTags,u=t.scriptTags,c=t.styleTags,f=t.title,l=void 0===f?"":f,h=t.titleAttributes;return{base:Dy(Zm.BASE,e,n),bodyAttributes:Dy(Wm,r,n),htmlAttributes:Dy(Km,i,n),link:Dy(Zm.LINK,o,n),meta:Dy(Zm.META,a,n),noscript:Dy(Zm.NOSCRIPT,s,n),script:Dy(Zm.SCRIPT,u,n),style:Dy(Zm.STYLE,c,n),title:Dy(Zm.TITLE,{title:l,titleAttributes:h},n)}},Hy=qm()((function(t){return{baseTag:My([Ym,oy],t),bodyAttributes:Ey(Wm,t),defer:Sy(t,uy),encode:Sy(t,cy),htmlAttributes:Ey(Km,t),linkTags:Ay(Zm.LINK,[ny,Ym],t),metaTags:Ay(Zm.META,[ey,Jm,Xm,ry,ty],t),noscriptTags:Ay(Zm.NOSCRIPT,[Qm],t),onChangeClientState:ky(t),scriptTags:Ay(Zm.SCRIPT,[iy,Qm],t),styleTags:Ay(Zm.STYLE,[$m],t),title:xy(t),titleAttributes:Ey(Gm,t)}}),(function(t){Cy&&Oy(Cy),t.defer?Cy=Ty((function(){Ny(t,(function(){Cy=null}))})):(Ny(t),Cy=null)}),zy)((function(){return null})),Vy=(Om=Hy,Cm=Im=function(t){function e(){return my(this,e),wy(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.shouldComponentUpdate=function(t){return!zm()(this.props,t)},e.prototype.mapNestedChildrenToProps=function(t,e){if(!e)return null;switch(t.type){case Zm.SCRIPT:case Zm.NOSCRIPT:return{innerHTML:e};case Zm.STYLE:return{cssText:e}}throw new Error("<"+t.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},e.prototype.flattenArrayTypeChildren=function(t){var e,r=t.child,n=t.arrayTypeChildren,i=t.newChildProps,o=t.nestedChildren;return gy({},n,((e={})[r.type]=[].concat(n[r.type]||[],[gy({},i,this.mapNestedChildrenToProps(r,o))]),e))},e.prototype.mapObjectTypeChildren=function(t){var e,r,n=t.child,i=t.newProps,o=t.newChildProps,a=t.nestedChildren;switch(n.type){case Zm.TITLE:return gy({},i,((e={})[n.type]=a,e.titleAttributes=gy({},o),e));case Zm.BODY:return gy({},i,{bodyAttributes:gy({},o)});case Zm.HTML:return gy({},i,{htmlAttributes:gy({},o)})}return gy({},i,((r={})[n.type]=gy({},o),r))},e.prototype.mapArrayTypeChildrenToProps=function(t,e){var r=gy({},e);return Object.keys(t).forEach((function(e){var n;r=gy({},r,((n={})[e]=t[e],n))})),r},e.prototype.warnOnInvalidChildren=function(t,e){return!0},e.prototype.mapChildrenToProps=function(t,e){var r=this,n={};return a.Children.forEach(t,(function(t){if(t&&t.props){var i=t.props,o=i.children,a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,r){return e[hy[r]||r]=t[r],e}),e)}(by(i,["children"]));switch(r.warnOnInvalidChildren(t,o),t.type){case Zm.LINK:case Zm.META:case Zm.NOSCRIPT:case Zm.SCRIPT:case Zm.STYLE:n=r.flattenArrayTypeChildren({child:t,arrayTypeChildren:n,newChildProps:a,nestedChildren:o});break;default:e=r.mapObjectTypeChildren({child:t,newProps:e,newChildProps:a,nestedChildren:o})}}})),e=this.mapArrayTypeChildrenToProps(n,e)},e.prototype.render=function(){var t=this.props,e=t.children,r=by(t,["children"]),n=gy({},r);return e&&(n=this.mapChildrenToProps(e,n)),a.createElement(Om,n)},yy(e,null,[{key:"canUseDOM",set:function(t){Om.canUseDOM=t}}]),e}(a.Component),Im.propTypes={base:Um().object,bodyAttributes:Um().object,children:Um().oneOfType([Um().arrayOf(Um().node),Um().node]),defaultTitle:Um().string,defer:Um().bool,encodeSpecialCharacters:Um().bool,htmlAttributes:Um().object,link:Um().arrayOf(Um().object),meta:Um().arrayOf(Um().object),noscript:Um().arrayOf(Um().object),onChangeClientState:Um().func,script:Um().arrayOf(Um().object),style:Um().arrayOf(Um().object),title:Um().string,titleAttributes:Um().object,titleTemplate:Um().string},Im.defaultProps={defer:!0,encodeSpecialCharacters:!0},Im.peek=Om.peek,Im.rewind=function(){var t=Om.rewind();return t||(t=zy({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},Cm);Vy.renderStatic=Vy.rewind;var Wy=function(t){var e,r,n=t.lang,i=void 0===n?"en":n,a=t.meta,s=void 0===a?[]:a,u=(0,o.K2)("63159454").site,c=u.siteMetadata.description,f=null===(e=u.siteMetadata)||void 0===e?void 0:e.title;return(0,R.tZ)(Vy,{htmlAttributes:{lang:i},title:f,titleTemplate:"%s",meta:[{name:"description",content:c},{property:"og:title",content:f},{property:"og:description",content:c},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary"},{name:"twitter:creator",content:(null===(r=u.siteMetadata)||void 0===r?void 0:r.author)||""},{name:"twitter:title",content:f},{name:"twitter:description",content:c}].concat(s)})},Ky=function(){var t=(0,o.K2)("52831919"),e=t.allChainsJson.nodes,r=t.allImageSharp.nodes.reduce((function(t,e){var r;return Object.assign({},t,((r={})[e.fluid.originalName.split(".")[0]]=e.gatsbyImageData,r))}),{}),n=(0,a.useState)(""),s=n[0],u=n[1],c=s.length>0?e.filter((function(t){return t.name.toLowerCase().includes(s.toLowerCase())||t.chainId.toString().includes(s)||t.nativeCurrency.symbol.toLowerCase().includes(s.toLowerCase())})):e;return(0,R.tZ)(Aa,null,(0,R.tZ)(Wy,null),(0,R.tZ)(i.xu,{py:"4",px:"8"},(0,R.tZ)(Bm,{searchQuery:s,setSearchQuery:u}),(0,R.tZ)(Ta,{chains:c,icons:r})))}},62705:function(t,e,r){var n=r(55639).Symbol;t.exports=n},14636:function(t,e,r){var n=r(22545),i=r(35694),o=r(1469),a=r(44144),s=r(65776),u=r(36719),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),f=!r&&i(t),l=!r&&!f&&a(t),h=!r&&!f&&!l&&u(t),d=r||f||l||h,p=d?n(t.length,String):[],v=p.length;for(var m in t)!e&&!c.call(t,m)||d&&("length"==m||l&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,v))||p.push(m);return p}},44239:function(t,e,r){var n=r(62705),i=r(89607),o=r(2333),a=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},9454:function(t,e,r){var n=r(44239),i=r(37005);t.exports=function(t){return i(t)&&"[object Arguments]"==n(t)}},38749:function(t,e,r){var n=r(44239),i=r(41780),o=r(37005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[n(t)]}},280:function(t,e,r){var n=r(25726),i=r(86916),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},22545:function(t){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},7518:function(t){t.exports=function(t){return function(e){return t(e)}}},31957:function(t,e,r){var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},89607:function(t,e,r){var n=r(62705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(u){}var i=a.call(t);return n&&(e?t[s]=r:delete t[s]),i}},65776:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r}},25726:function(t){var e=Object.prototype;t.exports=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}},86916:function(t,e,r){var n=r(5569)(Object.keys,Object);t.exports=n},31167:function(t,e,r){t=r.nmd(t);var n=r(31957),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,a=o&&o.exports===i&&n.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(e){}}();t.exports=s},2333:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:function(t){t.exports=function(t,e){return function(r){return t(e(r))}}},55639:function(t,e,r){var n=r(31957),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},35694:function(t,e,r){var n=r(9454),i=r(37005),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},1469:function(t){var e=Array.isArray;t.exports=e},98612:function(t,e,r){var n=r(23560),i=r(41780);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},44144:function(t,e,r){t=r.nmd(t);var n=r(55639),i=r(95062),o=e&&!e.nodeType&&e,a=o&&t&&!t.nodeType&&t,s=a&&a.exports===o?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u},23560:function(t,e,r){var n=r(44239),i=r(13218);t.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},41780:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},13218:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},37005:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},36719:function(t,e,r){var n=r(38749),i=r(7518),o=r(31167),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},3674:function(t,e,r){var n=r(14636),i=r(280),o=r(98612);t.exports=function(t){return o(t)?n(t):i(t)}},50308:function(t){t.exports=function(){}},95062:function(t){t.exports=function(){return!1}},35666:function(t){var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(O){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new R(n||[]);return o._invoke=function(t,e,r){var n=l;return function(i,o){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw o;return T()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=M(a,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var u=f(t,e,r);if("normal"===u.type){if(n=r.done?p:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(t,r,a),o}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=c;var l="suspendedStart",h="suspendedYield",d="executing",p="completed",v={};function m(){}function y(){}function g(){}var b={};u(b,o,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==r&&n.call(_,o)&&(b=_);var x=g.prototype=m.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function M(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,M(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=f(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function P(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:T}}function T(){return{value:e,done:!0}}return y.prototype=g,u(x,"constructor",g),u(g,"constructor",y),y.displayName=u(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},k(E.prototype),u(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new E(c(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,s,"Generator"),u(x,o,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(r){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},36563:function(){},46601:function(){},89214:function(){},52361:function(){},94616:function(){},6567:function(){},15861:function(t,e,r){"use strict";function n(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void r(c)}s.done?e(u):Promise.resolve(u).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,u,"next",t)}function u(t){n(a,i,o,s,u,"throw",t)}s(void 0)}))}}r.d(e,{Z:function(){return i}})},18597:function(t){"use strict";t.exports={i8:"6.5.4"}},16523:function(t){"use strict";t.exports=JSON.parse('{"genesisGasLimit":{"v":5000,"d":"Gas limit of the Genesis block."},"genesisDifficulty":{"v":17179869184,"d":"Difficulty of the Genesis block."},"genesisNonce":{"v":"0x0000000000000042","d":"the geneis nonce"},"genesisExtraData":{"v":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa","d":"extra data "},"genesisHash":{"v":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3","d":"genesis hash"},"genesisStateRoot":{"v":"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544","d":"the genesis state root"},"minGasLimit":{"v":5000,"d":"Minimum the gas limit may ever be."},"gasLimitBoundDivisor":{"v":1024,"d":"The bound divisor of the gas limit, used in update calculations."},"minimumDifficulty":{"v":131072,"d":"The minimum that the difficulty may ever be."},"difficultyBoundDivisor":{"v":2048,"d":"The bound divisor of the difficulty, used in the update calculations."},"durationLimit":{"v":13,"d":"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not."},"maximumExtraDataSize":{"v":32,"d":"Maximum size extra data may be after Genesis."},"epochDuration":{"v":30000,"d":"Duration between proof-of-work epochs."},"stackLimit":{"v":1024,"d":"Maximum size of VM stack allowed."},"callCreateDepth":{"v":1024,"d":"Maximum depth of call/create stack."},"tierStepGas":{"v":[0,2,3,5,8,10,20],"d":"Once per operation, for a selection of them."},"expGas":{"v":10,"d":"Once per EXP instuction."},"expByteGas":{"v":10,"d":"Times ceil(log256(exponent)) for the EXP instruction."},"sha3Gas":{"v":30,"d":"Once per SHA3 operation."},"sha3WordGas":{"v":6,"d":"Once per word of the SHA3 operation\'s data."},"sloadGas":{"v":50,"d":"Once per SLOAD operation."},"sstoreSetGas":{"v":20000,"d":"Once per SSTORE operation if the zeroness changes from zero."},"sstoreResetGas":{"v":5000,"d":"Once per SSTORE operation if the zeroness does not change from zero."},"sstoreRefundGas":{"v":15000,"d":"Once per SSTORE operation if the zeroness changes to zero."},"jumpdestGas":{"v":1,"d":"Refunded gas, once per SSTORE operation if the zeroness changes to zero."},"logGas":{"v":375,"d":"Per LOG* operation."},"logDataGas":{"v":8,"d":"Per byte in a LOG* operation\'s data."},"logTopicGas":{"v":375,"d":"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas."},"createGas":{"v":32000,"d":"Once per CREATE operation & contract-creation transaction."},"callGas":{"v":40,"d":"Once per CALL operation & message call transaction."},"callStipend":{"v":2300,"d":"Free gas given at beginning of call."},"callValueTransferGas":{"v":9000,"d":"Paid for CALL when the value transfor is non-zero."},"callNewAccountGas":{"v":25000,"d":"Paid for CALL when the destination address didn\'t exist prior."},"suicideRefundGas":{"v":24000,"d":"Refunded following a suicide operation."},"memoryGas":{"v":3,"d":"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL."},"quadCoeffDiv":{"v":512,"d":"Divisor for the quadratic particle of the memory cost equation."},"createDataGas":{"v":200,"d":""},"txGas":{"v":21000,"d":"Per transaction. NOTE: Not payable on data of calls between transactions."},"txCreation":{"v":32000,"d":"the cost of creating a contract via tx"},"txDataZeroGas":{"v":4,"d":"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions."},"txDataNonZeroGas":{"v":68,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions."},"copyGas":{"v":3,"d":"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added."},"ecrecoverGas":{"v":3000,"d":""},"sha256Gas":{"v":60,"d":""},"sha256WordGas":{"v":12,"d":""},"ripemd160Gas":{"v":600,"d":""},"ripemd160WordGas":{"v":120,"d":""},"identityGas":{"v":15,"d":""},"identityWordGas":{"v":3,"d":""},"minerReward":{"v":"5000000000000000000","d":"the amount a miner get rewarded for mining a block"},"ommerReward":{"v":"625000000000000000","d":"The amount of wei a miner of an uncle block gets for being inculded in the blockchain"},"niblingReward":{"v":"156250000000000000","d":"the amount a miner gets for inculding a uncle"},"homeSteadForkNumber":{"v":1150000,"d":"the block that the Homestead fork started at"},"homesteadRepriceForkNumber":{"v":2463000,"d":"the block that the Homestead Reprice (EIP150) fork started at"},"timebombPeriod":{"v":100000,"d":"Exponential difficulty timebomb period"},"freeBlockPeriod":{"v":2}}')}}]);
//# sourceMappingURL=component---src-pages-index-tsx-8470bd1d1e26b2eedfd7.js.map