/*! For license information please see main.5efa6d40.js.LICENSE.txt */ (()=>{var __webpack_modules__={67938:(e,t,r)=>{e.exports=r(16140)},56545:(e,t,r)=>{"use strict";var n=r(37623),i=r(90337),o=r(30651),a=r(58963),s=r(19546),c=r(40073),u=r(95325),l=r(95222),d=r(96314),f=r(4927);e.exports=function(e){return new Promise((function(t,r){var h,p=e.data,g=e.headers,m=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}n.isFormData(p)&&delete g["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+w)}var A=s(e.baseURL,e.url);function _(){if(v){var n="getAllResponseHeaders"in v?c(v.getAllResponseHeaders()):null,o={data:m&&"text"!==m&&"json"!==m?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v};i((function(e){t(e),y()}),(function(e){r(e),y()}),o),v=null}}if(v.open(e.method.toUpperCase(),a(A,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=_:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(_)},v.onabort=function(){v&&(r(l("Request aborted",e,"ECONNABORTED",v)),v=null)},v.onerror=function(){r(l("Network Error",e,null,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},n.isStandardBrowserEnv()){var E=(e.withCredentials||u(A))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;E&&(g[e.xsrfHeaderName]=E)}"setRequestHeader"in v&&n.forEach(g,(function(e,t){"undefined"===typeof p&&"content-type"===t.toLowerCase()?delete g[t]:v.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),m&&"json"!==m&&(v.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){v&&(r(!e||e&&e.type?new f("canceled"):e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),p||(p=null),v.send(p)}))}},16140:(e,t,r)=>{"use strict";var n=r(37623),i=r(47369),o=r(7414),a=r(76138);var s=function e(t){var r=new o(t),s=i(o.prototype.request,r);return n.extend(s,o.prototype,r),n.extend(s,r),s.create=function(r){return e(a(t,r))},s}(r(96314));s.Axios=o,s.Cancel=r(4927),s.CancelToken=r(41870),s.isCancel=r(1987),s.VERSION=r(90028).version,s.all=function(e){return Promise.all(e)},s.spread=r(42729),s.isAxiosError=r(67238),e.exports=s,e.exports.default=s},4927:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},41870:(e,t,r)=>{"use strict";var n=r(4927);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},7414:(e,t,r)=>{"use strict";var n=r(37623),i=r(58963),o=r(78532),a=r(77215),s=r(76138),c=r(6906),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!n){var l=[a,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(o),i=Promise.resolve(e);l.length;)i=i.then(l.shift(),l.shift());return i}for(var d=e;r.length;){var f=r.shift(),h=r.shift();try{d=f(d)}catch(p){h(p);break}}try{i=a(d)}catch(p){return Promise.reject(p)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},l.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=l},78532:(e,t,r)=>{"use strict";var n=r(37623);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},19546:(e,t,r)=>{"use strict";var n=r(3446),i=r(90919);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},95222:(e,t,r)=>{"use strict";var n=r(64898);e.exports=function(e,t,r,i,o){var a=new Error(e);return n(a,t,r,i,o)}},77215:(e,t,r)=>{"use strict";var n=r(37623),i=r(75948),o=r(1987),a=r(96314),s=r(4927);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(c(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},64898:e=>{"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},76138:(e,t,r)=>{"use strict";var n=r(37623);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function a(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function s(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function c(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||o,i=t(e);n.isUndefined(i)&&t!==c||(r[e]=i)})),r}},90337:(e,t,r)=>{"use strict";var n=r(95222);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},75948:(e,t,r)=>{"use strict";var n=r(37623),i=r(96314);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,(function(r){e=r.call(o,e,t)})),e}},96314:(e,t,r)=>{"use strict";var n=r(37623),i=r(16213),o=r(64898),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=r(56545)),e}(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,r=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||i&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(a){if("SyntaxError"===s.name)throw o(s,this,"E_JSON_PARSE");throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){c.headers[e]=n.merge(a)})),e.exports=c},90028:e=>{e.exports={version:"0.24.0"}},47369:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n{"use strict";var n=r(37623);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},90919:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},30651:(e,t,r)=>{"use strict";var n=r(37623);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},3446:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},67238:e=>{"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},95325:(e,t,r)=>{"use strict";var n=r(37623);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},16213:(e,t,r)=>{"use strict";var n=r(37623);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},40073:(e,t,r)=>{"use strict";var n=r(37623),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},42729:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},6906:(e,t,r)=>{"use strict";var n=r(90028).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var o={};i.transitional=function(e,t,r){function i(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new Error(i(n," has been removed"+(t?" in "+t:"")));return t&&!o[n]&&(o[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={assertOptions:function(e,t,r){if("object"!==typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],c=void 0===s||a(s,o,e);if(!0!==c)throw new TypeError("option "+o+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:i}},37623:(e,t,r)=>{"use strict";var n=r(47369),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function c(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),o(e))for(var r=0,n=e.length;r0){var o=n.substring(0,i).trim(),a=n.substring(i+1).trim();this.append(o,a)}}},e.prototype.delete=function(e,t){var r=n.normalizeName(e);if(void 0===t)delete this.headersMap[r];else{var i=this.headersMap[r];if(i){var o=i.indexOf(t);o>=0&&i.splice(o,1),0===i.length&&delete this.headersMap[r]}}},e.prototype.append=function(e,t){var r=this,i=n.normalizeName(e);Array.isArray(this.headersMap[i])||(this.headersMap[i]=[]),Array.isArray(t)?t.forEach((function(e){r.headersMap[i].push(n.normalizeValue(e))})):this.headersMap[i].push(n.normalizeValue(t))},e.prototype.set=function(e,t){var r=n.normalizeName(e);if(Array.isArray(t)){var i=[];t.forEach((function(e){i.push(n.normalizeValue(e))})),this.headersMap[r]=i}else this.headersMap[r]=[n.normalizeValue(t)]},e.prototype.has=function(e,t){var r=this.headersMap[n.normalizeName(e)];if(!Array.isArray(r))return!1;if(void 0!==t){var i=n.normalizeValue(t);return r.indexOf(i)>=0}return!0},e.prototype.get=function(e){var t=this.headersMap[n.normalizeName(e)];return void 0!==t?t.concat():[]},e.prototype.forEach=function(e){var t=this;Object.getOwnPropertyNames(this.headersMap).forEach((function(r){e(r,t.headersMap[r])}),this)},e.prototype.toHeaders=function(){if("undefined"!=typeof Headers){var e=new Headers;return this.forEach((function(t,r){r.forEach((function(r){e.append(t,r)}))})),e}throw new Error("Headers class is not defined")},e}();t.BrowserHeaders=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.BrowserHeaders=n.BrowserHeaders},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iterateHeaders=function(e,t){for(var r=e[Symbol.iterator](),n=r.next();!n.done;)t(n.value[0]),n=r.next()},t.iterateHeadersKeys=function(e,t){for(var r=e.keys(),n=r.next();!n.done;)t(n.value),n=r.next()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2);t.normalizeName=function(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()},t.normalizeValue=function(e){return"string"!=typeof e&&(e=String(e)),e},t.getHeaderValues=function(e,t){var r=e;if(r instanceof Headers&&r.getAll)return r.getAll(t);var n=r.get(t);return n&&"string"==typeof n?[n]:n},t.getHeaderKeys=function(e){var t=e,r={},i=[];return t.keys?n.iterateHeadersKeys(t,(function(e){r[e]||(r[e]=!0,i.push(e))})):t.forEach?t.forEach((function(e,t){r[t]||(r[t]=!0,i.push(t))})):n.iterateHeaders(t,(function(e){var t=e[0];r[t]||(r[t]=!0,i.push(t))})),i},t.splitHeaderValue=function(e){var t=[];return e.split(", ").forEach((function(e){e.split(",").forEach((function(e){t.push(e)}))})),t}}]))},617:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkParser=t.ChunkType=t.encodeASCII=t.decodeASCII=void 0;var n,i=r(65);function o(e){return 9===(t=e)||10===t||13===t||e>=32&&e<=126;var t}function a(e){for(var t=0;t!==e.length;++t)if(!o(e[t]))throw new Error("Metadata is not valid (printable) ASCII");return String.fromCharCode.apply(String,Array.prototype.slice.call(e))}function s(e){return 128==(128&e.getUint8(0))}function c(e){return e.getUint32(1,!1)}function u(e,t,r){return e.byteLength-t>=r}function l(e,t,r){if(e.slice)return e.slice(t,r);var n=e.length;void 0!==r&&(n=r);for(var i=new Uint8Array(n-t),o=0,a=t;a=0?r:o.httpStatusToCode(t);this.props.debug&&a.debug("onHeaders.code",n);var i=e.get("grpc-message")||[];if(this.props.debug&&a.debug("onHeaders.gRPCMessage",i),this.rawOnHeaders(e),n!==o.Code.OK){var s=this.decodeGRPCStatus(i[0]);this.rawOnError(n,s,e)}}},e.prototype.onTransportChunk=function(e){var t=this;if(this.closed)this.props.debug&&a.debug("grpc.onChunk received after request was closed - ignoring");else{var r=[];try{r=this.parser.parse(e)}catch(e){return this.props.debug&&a.debug("onChunk.parsing error",e,e.message),void this.rawOnError(o.Code.Internal,"parsing error: "+e.message)}r.forEach((function(e){if(e.chunkType===i.ChunkType.MESSAGE){var r=t.methodDefinition.responseType.deserializeBinary(e.data);t.rawOnMessage(r)}else e.chunkType===i.ChunkType.TRAILERS&&(t.responseHeaders?(t.responseTrailers=new n.Metadata(e.trailers),t.props.debug&&a.debug("onChunk.trailers",t.responseTrailers)):(t.responseHeaders=new n.Metadata(e.trailers),t.rawOnHeaders(t.responseHeaders)))}))}},e.prototype.onTransportEnd=function(){if(this.props.debug&&a.debug("grpc.onEnd"),this.closed)this.props.debug&&a.debug("grpc.onEnd received after request was closed - ignoring");else if(void 0!==this.responseTrailers){var e=l(this.responseTrailers);if(null!==e){var t=this.responseTrailers.get("grpc-message"),r=this.decodeGRPCStatus(t[0]);this.rawOnEnd(e,r,this.responseTrailers)}else this.rawOnError(o.Code.Internal,"Response closed without grpc-status (Trailers provided)")}else{if(void 0===this.responseHeaders)return void this.rawOnError(o.Code.Unknown,"Response closed without headers");var n=l(this.responseHeaders),i=this.responseHeaders.get("grpc-message");if(this.props.debug&&a.debug("grpc.headers only response ",n,i),null===n)return void this.rawOnEnd(o.Code.Unknown,"Response closed without grpc-status (Headers only)",this.responseHeaders);var s=this.decodeGRPCStatus(i[0]);this.rawOnEnd(n,s,this.responseHeaders)}},e.prototype.decodeGRPCStatus=function(e){if(!e)return"";try{return decodeURIComponent(e)}catch(t){return e}},e.prototype.rawOnEnd=function(e,t,r){var n=this;this.props.debug&&a.debug("rawOnEnd",e,t,r),this.completed||(this.completed=!0,this.onEndCallbacks.forEach((function(i){if(!n.closed)try{i(e,t,r)}catch(e){setTimeout((function(){throw e}),0)}})))},e.prototype.rawOnHeaders=function(e){this.props.debug&&a.debug("rawOnHeaders",e),this.completed||this.onHeadersCallbacks.forEach((function(t){try{t(e)}catch(e){setTimeout((function(){throw e}),0)}}))},e.prototype.rawOnError=function(e,t,r){var i=this;void 0===r&&(r=new n.Metadata),this.props.debug&&a.debug("rawOnError",e,t),this.completed||(this.completed=!0,this.onEndCallbacks.forEach((function(n){if(!i.closed)try{n(e,t,r)}catch(e){setTimeout((function(){throw e}),0)}})))},e.prototype.rawOnMessage=function(e){var t=this;this.props.debug&&a.debug("rawOnMessage",e.toObject()),this.completed||this.closed||this.onMessageCallbacks.forEach((function(r){if(!t.closed)try{r(e)}catch(e){setTimeout((function(){throw e}),0)}}))},e.prototype.onHeaders=function(e){this.onHeadersCallbacks.push(e)},e.prototype.onMessage=function(e){this.onMessageCallbacks.push(e)},e.prototype.onEnd=function(e){this.onEndCallbacks.push(e)},e.prototype.start=function(e){if(this.started)throw new Error("Client already started - cannot .start()");this.started=!0;var t=new n.Metadata(e||{});t.set("content-type","application/grpc-web+proto"),t.set("x-grpc-web","1"),this.transport.start(t)},e.prototype.send=function(e){if(!this.started)throw new Error("Client not started - .start() must be called before .send()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .send()");if(!this.methodDefinition.requestStream&&this.sentFirstMessage)throw new Error("Message already sent for non-client-streaming method - cannot .send()");this.sentFirstMessage=!0;var t=c.frameRequest(e);this.transport.sendMessage(t)},e.prototype.finishSend=function(){if(!this.started)throw new Error("Client not started - .finishSend() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .finishSend()");this.finishedSending=!0,this.transport.finishSend()},e.prototype.close=function(){if(!this.started)throw new Error("Client not started - .start() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .close()");this.closed=!0,this.props.debug&&a.debug("request.abort aborting request"),this.transport.cancel()},e}();function l(e){var t=e.get("grpc-status")||[];if(t.length>0)try{var r=t[0];return parseInt(r,10)}catch(e){return null}return null}},346:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debug=void 0,t.debug=function(){for(var e=[],t=0;t=55296&&r<=56319){var n=e.charCodeAt(t+1);n>=56320&&n<=57343&&(r=65536+(r-55296<<10)+(n-56320))}return r}function d(e){for(var t=new Uint8Array(e.length),r=0,n=0;n{const{refreshToken:n}=(0,l.getCookies)(),o=b??C();return m?(0,i.fromPromise)(new Promise((e=>{y.push((()=>e()))}))):(m=!0,(0,i.fromPromise)(o.mutate({context:{uri:g.hosts.authHost},variables:{refreshToken:n},mutation:g.authSchema.RefreshTokenDocument}).then((e=>{let{data:{refreshToken:{tokenAuth:t,tokenRefresh:r}}}=e;return(0,l.refreshCookies)(t,r,v),y.map((e=>e())),y=[],!0})).catch((async()=>(await(b?.mutate({context:{uri:g.hosts.authHost},mutation:g.authSchema.RevokeTokenDocument})),(0,l.destroyCookies)(v),y=[],r?(r(),null):(window.location.reload(),!1)))).finally((()=>{m=!1}))).filter((e=>Boolean(e))))},A=(0,o.onError)((e=>{let{graphQLErrors:t,networkError:r,operation:n,forward:i}=e;const{authToken:o}=(0,l.getCookies)();if(t){t.forEach((e=>{let{message:t,locations:r,path:n}=e;return console.warn(`[GraphQL error]: Message: ${t}, Location: ${r}, Path: ${n}`)}));for(const e of t)if(e.message.includes("Auth token not found")&&o)return w().flatMap((()=>i(n)))}if(r&&(console.warn(`[Network error]: ${r}`),r.message.includes("503")&&console.error(`[503 Service Unavailable]: ${r.message}`),r.message.includes("401")&&o))return w().flatMap((()=>i(n)))})),_=(0,a.setContext)((async(e,t)=>{let{headers:r}=t;const{authToken:n}=(0,l.getCookies)();return{headers:(n?{headers:{...r,"x-client-authorization":`${n}`}}:{headers:{...r}}).headers}})),E=(0,s.createUploadLink)({uri:g.hosts.authHost}),S="undefined"!==typeof window?new f.GraphQLWsLink((0,p.createClient)({url:g.hosts.notificationsSubscriptionHost,retryAttempts:3,on:{connected:()=>console.log("GraphQLWsLink connected"),closed:()=>console.log("GraphQLWsLink closed")}})):null,k=(0,i.from)([A,_,E]),x="undefined"!==typeof window&&null!==S?(0,i.split)((e=>{let{query:t}=e;const r=(0,h.getMainDefinition)(t);return"OperationDefinition"===r.kind&&"subscription"===r.operation}),S,k):E;function C(){return new i.ApolloClient({ssrMode:"undefined"===typeof window,link:x,cache:new i.InMemoryCache({typePolicies:d.typePoliciesPortal,addTypename:!0,resultCaching:!0})})}t.initializeApollo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;const r=b??C();if(v=t||"",e){const t=r.extract(),n=(0,c.default)(t,e,{arrayMerge:(e,t)=>[...t,...e.filter((e=>t.every((t=>!(0,u.default)(e,t)))))]});r.cache.restore(n)}return"undefined"===typeof window||b||(b=r),r},t.createErrorAuthInterceptor=function(e,t){const r=(0,o.onError)((e=>{let{graphQLErrors:r,networkError:n,operation:i,forward:o}=e;const{authToken:a}=(0,l.getCookies)();if(r)for(const s of r)if(s.message.includes("Auth token not found")&&a)return w(0,0,t).flatMap((()=>o(i)));if(n&&n.message.includes("401")&&a)return w(0,0,t).flatMap((()=>o(i)))})),n=i.ApolloLink.from([r,e.link]);return e.setLink(n),e}},65432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.typePoliciesPortal=void 0,t.typePoliciesPortal={Query:{fields:{fetchAsset:{keyArgs:["rank","likes","assetId"],merge:!0},fetchUserGalleries:{keyArgs:["galleryId"],merge:!0},fetchUserFavorites:{keyArgs:["galleryId"],merge:!0},fetchUserFavoritesV2:{keyArgs:["galleryId"],merge:!0},fetchMyFavoritesV2:{keyArgs:["galleryId"],merge:!0},fetchMyGalleriesV2:{keyArgs:["galleryId"],merge:!0},fetchUserGalleriesV2:{keyArgs:["galleryId"],merge:!0},fetchCreations:{keyArgs:["itemId"],merge:!0},CollectionPage:{keyArgs:["collectionId"],merge:!0},fetchCreationsByType:{keyArgs:["nextPageToken"],merge:!0},fetchAllCreations:{keyArgs:["nextPageToken"],merge:!0}}}}},53553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCookies=t.destroyCookies=t.refreshCookies=t.assignCookies=void 0;const n=r(93258),i="1.0.3";t.assignCookies=(e,t,r,o,a,s,c,u)=>{(e=>{(0,n.setCookie)(null,"versionAuth",i,{maxAge:26298e5,path:"/",domain:e})})(u),e&&(0,n.setCookie)(null,"userId",e,{maxAge:26298e5,path:"/",domain:u}),t&&(0,n.setCookie)(null,"wallets",JSON.stringify(t),{maxAge:26298e5,path:"/",domain:u}),r&&(0,n.setCookie)(null,"authToken",r,{maxAge:26298e5,path:"/",domain:u}),o&&(0,n.setCookie)(null,"refreshToken",o,{maxAge:26298e5,path:"/",domain:u}),a&&(0,n.setCookie)(null,"newUser",a,{maxAge:26298e5,path:"/",domain:u}),s&&(0,n.setCookie)(null,"inviteCode",s,{maxAge:26298e5,path:"/",domain:u}),s&&(0,n.setCookie)(null,"role",c,{maxAge:26298e5,path:"/",domain:u})};t.refreshCookies=(e,t,r)=>{e&&(0,n.setCookie)(null,"authToken",e,{maxAge:26298e5,path:"/",domain:r}),t&&(0,n.setCookie)(null,"refreshToken",t,{maxAge:26298e5,path:"/",domain:r})};t.getCookies=e=>{const{authToken:t,refreshToken:r,userId:o,wallets:a,newUser:s,inviteCode:c,role:u,versionAuth:l}=(0,n.parseCookies)(e),d={authToken:null,refreshToken:null,userId:null,wallets:null,newUser:null,inviteCode:null,role:null};if(t&&r&&o&&a&&s&&c&&l&&u&&l===i){let e;try{if(e=JSON.parse(a),!Array.isArray(e))return d}catch(f){return d}return{authToken:t,refreshToken:r,userId:o,wallets:e,newUser:s,inviteCode:c,role:u}}return d};t.destroyCookies=(e,t)=>{(0,n.destroyCookie)(null,"userId",{path:"/",domain:e}),(0,n.destroyCookie)(null,"wallets",{path:"/",domain:e}),(0,n.destroyCookie)(null,"authToken",{path:"/",domain:e}),(0,n.destroyCookie)(null,"refreshToken",{path:"/",domain:e}),(0,n.destroyCookie)(null,"newUser",{path:"/",domain:e}),(0,n.destroyCookie)(null,"inviteCode",{path:"/",domain:e}),(0,n.destroyCookie)(null,"role",{path:"/",domain:e})}},65780:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useCheckInviteCodeLazyQuery=t.useCheckInviteCodeQuery=t.CheckInviteCodeDocument=t.useUpdateProfileStatusMutation=t.UpdateProfileStatusDocument=t.useUpdateOpportunityArchivedStatusMutation=t.UpdateOpportunityArchivedStatusDocument=t.useUpdateOpportunityMutation=t.UpdateOpportunityDocument=t.useUpdateCategoryArchivedStatusMutation=t.UpdateCategoryArchivedStatusDocument=t.useUpdateCategoryMutation=t.UpdateCategoryDocument=t.useUpdateBrandArchivedStatusMutation=t.UpdateBrandArchivedStatusDocument=t.useUpdateBrandMutation=t.UpdateBrandDocument=t.useRemoveInviteCodeMutation=t.RemoveInviteCodeDocument=t.useAddInviteCodesMutation=t.AddInviteCodesDocument=t.useCreateAdminOpportunityMutation=t.CreateAdminOpportunityDocument=t.useCreateBrandMutation=t.CreateBrandDocument=t.useCreateCategoryMutation=t.CreateCategoryDocument=t.useChangeXpPointsMutation=t.ChangeXpPointsDocument=t.useUpdateTierArchivedStatusMutation=t.UpdateTierArchivedStatusDocument=t.useUpdateTierMutation=t.UpdateTierDocument=t.useUpdateReferralTypeArchivedStatusMutation=t.UpdateReferralTypeArchivedStatusDocument=t.useUpdateReferralTypeMutation=t.UpdateReferralTypeDocument=t.useUpdateOpportunityPushStatusMutation=t.UpdateOpportunityPushStatusDocument=t.useUpdateInviteCodeUsagesLimitMutation=t.UpdateInviteCodeUsagesLimitDocument=t.useTriggerOpportunityNotificationMutation=t.TriggerOpportunityNotificationDocument=t.useCreateTierMutation=t.CreateTierDocument=t.useCreateReferralTypeMutation=t.CreateReferralTypeDocument=t.ISortDirection=t.IReftypeColor=t.ILocationType=void 0,t.useFetchAdminOpportunitiesPageQuery=t.FetchAdminOpportunitiesPageDocument=t.useFetchAdminInvitesPageLazyQuery=t.useFetchAdminInvitesPageQuery=t.FetchAdminInvitesPageDocument=t.useFetchAdminCategoriesPageLazyQuery=t.useFetchAdminCategoriesPageQuery=t.FetchAdminCategoriesPageDocument=t.useFetchAdminCategoriesLazyQuery=t.useFetchAdminCategoriesQuery=t.FetchAdminCategoriesDocument=t.useFetchAdminBrandsPageLazyQuery=t.useFetchAdminBrandsPageQuery=t.FetchAdminBrandsPageDocument=t.useFetchAdminBrandsLazyQuery=t.useFetchAdminBrandsQuery=t.FetchAdminBrandsDocument=t.useFetchUserFeedbackPageLazyQuery=t.useFetchUserFeedbackPageQuery=t.FetchUserFeedbackPageDocument=t.useFetchTiersPageLazyQuery=t.useFetchTiersPageQuery=t.FetchTiersPageDocument=t.useFetchTiersLazyQuery=t.useFetchTiersQuery=t.FetchTiersDocument=t.useFetchRegistrationInvitePageLazyQuery=t.useFetchRegistrationInvitePageQuery=t.FetchRegistrationInvitePageDocument=t.useFetchReferralTypesPageLazyQuery=t.useFetchReferralTypesPageQuery=t.FetchReferralTypesPageDocument=t.useFetchUnarchivedReferralTypesLazyQuery=t.useFetchUnarchivedReferralTypesQuery=t.FetchUnarchivedReferralTypesDocument=t.useFetchPartnershipInquiryPageLazyQuery=t.useFetchPartnershipInquiryPageQuery=t.FetchPartnershipInquiryPageDocument=t.useFetchInvestorInquiryPageLazyQuery=t.useFetchInvestorInquiryPageQuery=t.FetchInvestorInquiryPageDocument=t.useFetchFormOpportunityPageLazyQuery=t.useFetchFormOpportunityPageQuery=t.FetchFormOpportunityPageDocument=t.useFetchContentReportPageLazyQuery=t.useFetchContentReportPageQuery=t.FetchContentReportPageDocument=t.useFetchContactSupportPageLazyQuery=t.useFetchContactSupportPageQuery=t.FetchContactSupportPageDocument=void 0,t.useFetchBlockchainsLazyQuery=t.useFetchBlockchainsQuery=t.FetchBlockchainsDocument=t.useFetchAllCountriesLazyQuery=t.useFetchAllCountriesQuery=t.FetchAllCountriesDocument=t.useFetchAdminXpPageLazyQuery=t.useFetchAdminXpPageQuery=t.FetchAdminXpPageDocument=t.useFetchAdminUsersPageLazyQuery=t.useFetchAdminUsersPageQuery=t.FetchAdminUsersPageDocument=t.useFetchAdminReferralsPageLazyQuery=t.useFetchAdminReferralsPageQuery=t.FetchAdminReferralsPageDocument=t.useFetchAdminOpportunitiesPageLazyQuery=void 0;const a=r(84161),s=o(r(84161));var c,u,l;!function(e){e.Continent="CONTINENT",e.Country="COUNTRY"}(c||(t.ILocationType=c={})),function(e){e.Red="RED",e.Green="GREEN",e.Blue="BLUE",e.Yellow="YELLOW",e.Orange="ORANGE",e.White="WHITE",e.Black="BLACK",e.Grey="GREY",e.Purple="PURPLE",e.Gold="GOLD"}(u||(t.IReftypeColor=u={})),function(e){e.Asc="asc",e.Desc="desc"}(l||(t.ISortDirection=l={})),t.CreateReferralTypeDocument=a.gql` mutation CreateReferralType($input: ReferralTypeInput!) { createReferralType(input: $input) } `,t.useCreateReferralTypeMutation=function(e){return s.useMutation(t.CreateReferralTypeDocument,e)},t.CreateTierDocument=a.gql` mutation CreateTier($input: TierInput!) { createTier(input: $input) } `,t.useCreateTierMutation=function(e){return s.useMutation(t.CreateTierDocument,e)},t.TriggerOpportunityNotificationDocument=a.gql` mutation TriggerOpportunityNotification($opportunityId: ID!) { triggerOpportunityNotification(opportunityId: $opportunityId) } `,t.useTriggerOpportunityNotificationMutation=function(e){return s.useMutation(t.TriggerOpportunityNotificationDocument,e)},t.UpdateInviteCodeUsagesLimitDocument=a.gql` mutation UpdateInviteCodeUsagesLimit($code: String!, $usagesLimit: Int!) { updateInviteCodeUsagesLimit(code: $code, usagesLimit: $usagesLimit) } `,t.useUpdateInviteCodeUsagesLimitMutation=function(e){return s.useMutation(t.UpdateInviteCodeUsagesLimitDocument,e)},t.UpdateOpportunityPushStatusDocument=a.gql` mutation UpdateOpportunityPushStatus($opportunityId: ID!, $isActive: Boolean!) { updateOpportunityPushStatus(opportunityId: $opportunityId, isActive: $isActive) } `,t.useUpdateOpportunityPushStatusMutation=function(e){return s.useMutation(t.UpdateOpportunityPushStatusDocument,e)},t.UpdateReferralTypeDocument=a.gql` mutation UpdateReferralType($id: ID!, $input: ReferralTypeInput!) { updateReferralType(id: $id, input: $input) } `,t.useUpdateReferralTypeMutation=function(e){return s.useMutation(t.UpdateReferralTypeDocument,e)},t.UpdateReferralTypeArchivedStatusDocument=a.gql` mutation UpdateReferralTypeArchivedStatus($id: ID!, $isArchived: Boolean!) { updateReferralTypeArchivedStatus(id: $id, archived: $isArchived) } `,t.useUpdateReferralTypeArchivedStatusMutation=function(e){return s.useMutation(t.UpdateReferralTypeArchivedStatusDocument,e)},t.UpdateTierDocument=a.gql` mutation UpdateTier($id: ID!, $input: TierInput!) { updateTier(id: $id, input: $input) } `,t.useUpdateTierMutation=function(e){return s.useMutation(t.UpdateTierDocument,e)},t.UpdateTierArchivedStatusDocument=a.gql` mutation UpdateTierArchivedStatus($id: ID!, $isArchived: Boolean!) { updateTierArchivedStatus(id: $id, isArchived: $isArchived) } `,t.useUpdateTierArchivedStatusMutation=function(e){return s.useMutation(t.UpdateTierArchivedStatusDocument,e)},t.ChangeXpPointsDocument=a.gql` mutation ChangeXpPoints($userId: ID!, $pointsDiff: Int!) { changeXpPoints(userId: $userId, pointsDiff: $pointsDiff) } `,t.useChangeXpPointsMutation=function(e){return s.useMutation(t.ChangeXpPointsDocument,e)},t.CreateCategoryDocument=a.gql` mutation CreateCategory($name: String!, $matchingWords: [String!]!) { createCategory(name: $name, matchingWords: $matchingWords) } `,t.useCreateCategoryMutation=function(e){return s.useMutation(t.CreateCategoryDocument,e)},t.CreateBrandDocument=a.gql` mutation CreateBrand($brand: BrandInput!, $file: Upload) { createBrand(brand: $brand, file: $file) } `,t.useCreateBrandMutation=function(e){return s.useMutation(t.CreateBrandDocument,e)},t.CreateAdminOpportunityDocument=a.gql` mutation createAdminOpportunity($file: Upload, $input: AdminOpportunityInput!) { createAdminOpportunity(file: $file, input: $input) } `,t.useCreateAdminOpportunityMutation=function(e){return s.useMutation(t.CreateAdminOpportunityDocument,e)},t.AddInviteCodesDocument=a.gql` mutation AddInviteCodes($userId: String!, $codesNum: Int!, $reftypeId: String) { addInviteCodes(userId: $userId, codesNum: $codesNum, reftypeId: $reftypeId) } `,t.useAddInviteCodesMutation=function(e){return s.useMutation(t.AddInviteCodesDocument,e)},t.RemoveInviteCodeDocument=a.gql` mutation RemoveInviteCode($inviteCode: String!) { removeInviteCode(inviteCode: $inviteCode) } `,t.useRemoveInviteCodeMutation=function(e){return s.useMutation(t.RemoveInviteCodeDocument,e)},t.UpdateBrandDocument=a.gql` mutation updateBrand($id: ID!, $input: BrandInput!, $file: Upload) { updateBrand(id: $id, file: $file, input: $input) } `,t.useUpdateBrandMutation=function(e){return s.useMutation(t.UpdateBrandDocument,e)},t.UpdateBrandArchivedStatusDocument=a.gql` mutation UpdateBrandArchivedStatus($id: ID!, $isArchived: Boolean!) { updateBrandArchivedStatus(id: $id, isArchived: $isArchived) } `,t.useUpdateBrandArchivedStatusMutation=function(e){return s.useMutation(t.UpdateBrandArchivedStatusDocument,e)},t.UpdateCategoryDocument=a.gql` mutation updateCategory($id: ID!, $input: CategoryInput!) { updateCategory(id: $id, input: $input) } `,t.useUpdateCategoryMutation=function(e){return s.useMutation(t.UpdateCategoryDocument,e)},t.UpdateCategoryArchivedStatusDocument=a.gql` mutation UpdateCategoryArchivedStatus($id: ID!, $isArchived: Boolean!) { updateCategoryArchivedStatus(id: $id, isArchived: $isArchived) } `,t.useUpdateCategoryArchivedStatusMutation=function(e){return s.useMutation(t.UpdateCategoryArchivedStatusDocument,e)},t.UpdateOpportunityDocument=a.gql` mutation updateOpportunity($id: ID!, $input: AdminOpportunityInput!, $file: Upload) { updateOpportunity(id: $id, file: $file, input: $input) } `,t.useUpdateOpportunityMutation=function(e){return s.useMutation(t.UpdateOpportunityDocument,e)},t.UpdateOpportunityArchivedStatusDocument=a.gql` mutation UpdateOpportunityArchivedStatus($id: ID!, $isArchived: Boolean!) { updateOpportunityArchivedStatus(id: $id, isArchived: $isArchived) } `,t.useUpdateOpportunityArchivedStatusMutation=function(e){return s.useMutation(t.UpdateOpportunityArchivedStatusDocument,e)},t.UpdateProfileStatusDocument=a.gql` mutation UpdateProfileStatus($userId: ID!, $isActive: Boolean!) { updateProfileStatus(userId: $userId, isActive: $isActive) } `,t.useUpdateProfileStatusMutation=function(e){return s.useMutation(t.UpdateProfileStatusDocument,e)},t.CheckInviteCodeDocument=a.gql` query CheckInviteCode($code: String!) { checkInviteCode(code: $code) { code isAvailable usedTimes maxUsagesLimit } } `,t.useCheckInviteCodeQuery=function(e){return s.useQuery(t.CheckInviteCodeDocument,e)},t.useCheckInviteCodeLazyQuery=function(e){return s.useLazyQuery(t.CheckInviteCodeDocument,e)},t.FetchContactSupportPageDocument=a.gql` query FetchContactSupportPage($filter: ContactSupportFilterInput!, $sort: ContactSupportSortInput!, $page: AdminPageInput!) { fetchContactSupportPage(filter: $filter, sort: $sort, page: $page) { contactSupports { userId id email walletAddress category description priority } nextPage { elements lastNum num size token } } } `,t.useFetchContactSupportPageQuery=function(e){return s.useQuery(t.FetchContactSupportPageDocument,e)},t.useFetchContactSupportPageLazyQuery=function(e){return s.useLazyQuery(t.FetchContactSupportPageDocument,e)},t.FetchContentReportPageDocument=a.gql` query FetchContentReportPage($filter: ContentReportFilterInput!, $sort: ContentReportSortInput!, $page: AdminPageInput!) { fetchContentReportPage(filter: $filter, sort: $sort, page: $page) { contentReports { userId id email description nameOfSubject contentType contentId reportReason evidenceFileUrl } nextPage { elements lastNum num size token } } } `,t.useFetchContentReportPageQuery=function(e){return s.useQuery(t.FetchContentReportPageDocument,e)},t.useFetchContentReportPageLazyQuery=function(e){return s.useLazyQuery(t.FetchContentReportPageDocument,e)},t.FetchFormOpportunityPageDocument=a.gql` query FetchFormOpportunityPage($filter: FormOpportunityFilterInput!, $sort: FormOpportunitySortInput!, $page: AdminPageInput!) { fetchFormOpportunityPage(filter: $filter, sort: $sort, page: $page) { opportunities { userId id name submitterEmail description registrationLink startDate endDate } nextPage { elements lastNum num size token } } } `,t.useFetchFormOpportunityPageQuery=function(e){return s.useQuery(t.FetchFormOpportunityPageDocument,e)},t.useFetchFormOpportunityPageLazyQuery=function(e){return s.useLazyQuery(t.FetchFormOpportunityPageDocument,e)},t.FetchInvestorInquiryPageDocument=a.gql` query FetchInvestorInquiryPage($filter: InvestorInquiryFilterInput!, $sort: InvestorInquirySortInput!, $page: AdminPageInput!) { fetchInvestorInquiryPage(filter: $filter, sort: $sort, page: $page) { investorInquiries { userId id email name phoneNumber telegramId investorType investmentAmount investmentExperience assistanceRequest ludoReferrerInfo } nextPage { elements lastNum num size token } } } `,t.useFetchInvestorInquiryPageQuery=function(e){return s.useQuery(t.FetchInvestorInquiryPageDocument,e)},t.useFetchInvestorInquiryPageLazyQuery=function(e){return s.useLazyQuery(t.FetchInvestorInquiryPageDocument,e)},t.FetchPartnershipInquiryPageDocument=a.gql` query FetchPartnershipInquiryPage($filter: PartnershipInquiryFilterInput!, $sort: PartnershipInquirySortInput!, $page: AdminPageInput!) { fetchPartnershipInquiryPage(filter: $filter, sort: $sort, page: $page) { partnershipInquiries { userId id email name projectName website aboutProject partnershipType ludoReferrerInfo } nextPage { elements lastNum num size token } } } `,t.useFetchPartnershipInquiryPageQuery=function(e){return s.useQuery(t.FetchPartnershipInquiryPageDocument,e)},t.useFetchPartnershipInquiryPageLazyQuery=function(e){return s.useLazyQuery(t.FetchPartnershipInquiryPageDocument,e)},t.FetchUnarchivedReferralTypesDocument=a.gql` query FetchUnarchivedReferralTypes { fetchUnarchivedReferralTypes { id name description archived discountPercentage color } } `,t.useFetchUnarchivedReferralTypesQuery=function(e){return s.useQuery(t.FetchUnarchivedReferralTypesDocument,e)},t.useFetchUnarchivedReferralTypesLazyQuery=function(e){return s.useLazyQuery(t.FetchUnarchivedReferralTypesDocument,e)},t.FetchReferralTypesPageDocument=a.gql` query FetchReferralTypesPage($filter: ReferralTypeFilterInput!, $sort: ReferralTypeSortInput!, $page: AdminPageInput!) { fetchReferralTypesPage(filter: $filter, sort: $sort, page: $page) { referralTypes { id name description discountPercentage archived color } nextPage { elements lastNum num size token } } } `,t.useFetchReferralTypesPageQuery=function(e){return s.useQuery(t.FetchReferralTypesPageDocument,e)},t.useFetchReferralTypesPageLazyQuery=function(e){return s.useLazyQuery(t.FetchReferralTypesPageDocument,e)},t.FetchRegistrationInvitePageDocument=a.gql` query FetchRegistrationInvitePage($filter: RegistrationInviteFilterInput!, $sort: RegistrationInviteSortInput!, $page: AdminPageInput!) { fetchRegistrationInvitePage(filter: $filter, sort: $sort, page: $page) { registrationInvites { userId id ludoIdOrAddress reason } nextPage { elements lastNum num size token } } } `,t.useFetchRegistrationInvitePageQuery=function(e){return s.useQuery(t.FetchRegistrationInvitePageDocument,e)},t.useFetchRegistrationInvitePageLazyQuery=function(e){return s.useLazyQuery(t.FetchRegistrationInvitePageDocument,e)},t.FetchTiersDocument=a.gql` query FetchTiers { fetchTiers { id name description fee archived } } `,t.useFetchTiersQuery=function(e){return s.useQuery(t.FetchTiersDocument,e)},t.useFetchTiersLazyQuery=function(e){return s.useLazyQuery(t.FetchTiersDocument,e)},t.FetchTiersPageDocument=a.gql` query FetchTiersPage($filter: TiersFilterInput!, $sort: TiersSortInput!, $page: AdminPageInput!) { fetchTiersPage(filter: $filter, sort: $sort, page: $page) { tiers { id name description fee archived } nextPage { elements lastNum num size token } } } `,t.useFetchTiersPageQuery=function(e){return s.useQuery(t.FetchTiersPageDocument,e)},t.useFetchTiersPageLazyQuery=function(e){return s.useLazyQuery(t.FetchTiersPageDocument,e)},t.FetchUserFeedbackPageDocument=a.gql` query FetchUserFeedbackPage($filter: UserFeedbackFilterInput!, $sort: UserFeedbackSortInput!, $page: AdminPageInput!) { fetchUserFeedbackPage(filter: $filter, sort: $sort, page: $page) { userFeedbacks { userId id email satisfactionScore missedFeature howEasyToUseScore performanceScore whatToImprove comments } nextPage { elements lastNum num size token } } } `,t.useFetchUserFeedbackPageQuery=function(e){return s.useQuery(t.FetchUserFeedbackPageDocument,e)},t.useFetchUserFeedbackPageLazyQuery=function(e){return s.useLazyQuery(t.FetchUserFeedbackPageDocument,e)},t.FetchAdminBrandsDocument=a.gql` query FetchAdminBrands { fetchAdminBrands { id name } } `,t.useFetchAdminBrandsQuery=function(e){return s.useQuery(t.FetchAdminBrandsDocument,e)},t.useFetchAdminBrandsLazyQuery=function(e){return s.useLazyQuery(t.FetchAdminBrandsDocument,e)},t.FetchAdminBrandsPageDocument=a.gql` query FetchAdminBrandsPage($filter: BrandsFilterInput!, $sort: BrandsSortInput!, $page: AdminPageInput!) { fetchAdminBrandsPage(filter: $filter, sort: $sort, page: $page) { brands { description id industry link matchingWords media name archived addedBy } nextPage { num lastNum size elements } } } `,t.useFetchAdminBrandsPageQuery=function(e){return s.useQuery(t.FetchAdminBrandsPageDocument,e)},t.useFetchAdminBrandsPageLazyQuery=function(e){return s.useLazyQuery(t.FetchAdminBrandsPageDocument,e)},t.FetchAdminCategoriesDocument=a.gql` query FetchAdminCategories { fetchAdminCategories { id name } } `,t.useFetchAdminCategoriesQuery=function(e){return s.useQuery(t.FetchAdminCategoriesDocument,e)},t.useFetchAdminCategoriesLazyQuery=function(e){return s.useLazyQuery(t.FetchAdminCategoriesDocument,e)},t.FetchAdminCategoriesPageDocument=a.gql` query FetchAdminCategoriesPage($filter: CategoriesFilterInput!, $sort: CategoriesSortInput!, $page: AdminPageInput!) { fetchAdminCategoriesPage(filter: $filter, sort: $sort, page: $page) { categories { id name matchingWords archived addedBy } nextPage { num lastNum size elements } } } `,t.useFetchAdminCategoriesPageQuery=function(e){return s.useQuery(t.FetchAdminCategoriesPageDocument,e)},t.useFetchAdminCategoriesPageLazyQuery=function(e){return s.useLazyQuery(t.FetchAdminCategoriesPageDocument,e)},t.FetchAdminInvitesPageDocument=a.gql` query fetchAdminInvitesPage($filter: InvitesFilterInput!, $sort: InvitesSortInput!, $page: AdminPageInput!) { fetchAdminInvitesPage(filter: $filter, sort: $sort, page: $page) { invites { userId username wallet { address blockchain chainId } activeInvites { inviteCode createdAt usedTimes maxUsagesLimit reftypeId reftypeName reftypeColor } referredUsers userXpLevel } nextPage { num lastNum size elements token } } } `,t.useFetchAdminInvitesPageQuery=function(e){return s.useQuery(t.FetchAdminInvitesPageDocument,e)},t.useFetchAdminInvitesPageLazyQuery=function(e){return s.useLazyQuery(t.FetchAdminInvitesPageDocument,e)},t.FetchAdminOpportunitiesPageDocument=a.gql` query FetchAdminOpportunitiesPage($filter: OpportunitiesFilterInput!, $sort: OpportunitiesSortInput!, $page: AdminPageInput!) { fetchAdminOpportunitiesPage(filter: $filter, sort: $sort, page: $page) { opportunities { opportunityId name brandName industry category ludoUrl projectUrl pushNotificationsEnabled status media description activeFrom activeUntil minXpLevel maxXpLevel minLudoRank maxLudoRank minWalletValue maxWalletValue clicks views addedBy archived geolocations } nextPage { elements lastNum num size token } } } `,t.useFetchAdminOpportunitiesPageQuery=function(e){return s.useQuery(t.FetchAdminOpportunitiesPageDocument,e)},t.useFetchAdminOpportunitiesPageLazyQuery=function(e){return s.useLazyQuery(t.FetchAdminOpportunitiesPageDocument,e)},t.FetchAdminReferralsPageDocument=a.gql` query FetchAdminReferralsPage($filter: ReferralsFilterInput!, $sort: ReferralsSortInput!, $page: AdminPageInput!) { fetchAdminReferralsPage(filter: $filter, sort: $sort, page: $page) { adminReferrals { userId username mainWallet { address blockchain chainId } referredUsersNum referrals { userRefUrl opportunityUrl referredUsersPerUrlNum } } nextPage { elements lastNum num size token } } } `,t.useFetchAdminReferralsPageQuery=function(e){return s.useQuery(t.FetchAdminReferralsPageDocument,e)},t.useFetchAdminReferralsPageLazyQuery=function(e){return s.useLazyQuery(t.FetchAdminReferralsPageDocument,e)},t.FetchAdminUsersPageDocument=a.gql` query fetchAdminUsersPage($filter: UsersFilterInput!, $sort: UsersSortInput!, $page: AdminPageInput!) { fetchAdminUsersPage(filter: $filter, sort: $sort, page: $page) { users { userId username wallets { address blockchain chainId } connectedBlockchains isActive createdAt topInterests walletsValue xpLevel ludoRank inviterId ip location userLanguage } nextPage { num lastNum size elements token } } } `,t.useFetchAdminUsersPageQuery=function(e){return s.useQuery(t.FetchAdminUsersPageDocument,e)},t.useFetchAdminUsersPageLazyQuery=function(e){return s.useLazyQuery(t.FetchAdminUsersPageDocument,e)},t.FetchAdminXpPageDocument=a.gql` query FetchAdminXpPage($filter: XpFilterInput!, $sort: XpSortInput!, $page: AdminPageInput!) { fetchAdminXpPage(filter: $filter, sort: $sort, page: $page) { xps { userId username mainWallet { address blockchain chainId } userXpLevel userXpPoints referredUsers referredUsersNum joinedOpportunityIds connectedWalletsNum suggestedOpportunityIds } nextPage { elements lastNum num size token } } } `,t.useFetchAdminXpPageQuery=function(e){return s.useQuery(t.FetchAdminXpPageDocument,e)},t.useFetchAdminXpPageLazyQuery=function(e){return s.useLazyQuery(t.FetchAdminXpPageDocument,e)},t.FetchAllCountriesDocument=a.gql` query FetchAllCountries { fetchAllCountries { continent country } } `,t.useFetchAllCountriesQuery=function(e){return s.useQuery(t.FetchAllCountriesDocument,e)},t.useFetchAllCountriesLazyQuery=function(e){return s.useLazyQuery(t.FetchAllCountriesDocument,e)},t.FetchBlockchainsDocument=a.gql` query FetchBlockchains { fetchBlockchains } `,t.useFetchBlockchainsQuery=function(e){return s.useQuery(t.FetchBlockchainsDocument,e)},t.useFetchBlockchainsLazyQuery=function(e){return s.useLazyQuery(t.FetchBlockchainsDocument,e)}},72846:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useLikeAssetMutation=t.LikeAssetDocument=t.useDislikeAssetMutation=t.DislikeAssetDocument=void 0;const a=r(84161),s=o(r(84161));t.DislikeAssetDocument=a.gql` mutation DislikeAsset($assetId: String!) { dislikeAsset(assetId: $assetId) } `,t.useDislikeAssetMutation=function(e){return s.useMutation(t.DislikeAssetDocument,e)},t.LikeAssetDocument=a.gql` mutation LikeAsset($assetId: String!) { likeAsset(assetId: $assetId) } `,t.useLikeAssetMutation=function(e){return s.useMutation(t.LikeAssetDocument,e)}},25199:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useRevokeTokenMutation=t.RevokeTokenDocument=t.useRefreshTokenMutation=t.RefreshTokenDocument=void 0;const a=r(84161),s=o(r(84161));t.RefreshTokenDocument=a.gql` mutation RefreshToken($refreshToken: String!, $showNsfw: Boolean) { refreshToken(refreshToken: $refreshToken, showNsfw: $showNsfw) { userId tokenAuth tokenRefresh role } } `,t.useRefreshTokenMutation=function(e){return s.useMutation(t.RefreshTokenDocument,e)},t.RevokeTokenDocument=a.gql` mutation RevokeToken { revokeToken } `,t.useRevokeTokenMutation=function(e){return s.useMutation(t.RevokeTokenDocument,e)}},2154:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useLikeCollectionMutation=t.LikeCollectionDocument=t.useDislikeCollectionMutation=t.DislikeCollectionDocument=void 0;const a=r(84161),s=o(r(84161));t.DislikeCollectionDocument=a.gql` mutation DislikeCollection($collectionId: String!) { dislikeCollection(collectionId: $collectionId) } `,t.useDislikeCollectionMutation=function(e){return s.useMutation(t.DislikeCollectionDocument,e)},t.LikeCollectionDocument=a.gql` mutation LikeCollection($collectionId: String!) { likeCollection(collectionId: $collectionId) } `,t.useLikeCollectionMutation=function(e){return s.useMutation(t.LikeCollectionDocument,e)}},76970:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useOnUserOpportunityNotificationSubscription=t.OnUserOpportunityNotificationDocument=t.useOnMyExperienceUpdatedSubscription=t.OnMyExperienceUpdatedDocument=t.useOnMyExperienceIncrementedSubscription=t.OnMyExperienceIncrementedDocument=t.useOnInviteCodeUsedSubscription=t.OnInviteCodeUsedDocument=t.useOnCommonOpportunityNotificationSubscription=t.OnCommonOpportunityNotificationDocument=t.useFetchMyTasksLazyQuery=t.useFetchMyTasksQuery=t.FetchMyTasksDocument=t.useFetchMyExperienceV2LazyQuery=t.useFetchMyExperienceV2Query=t.FetchMyExperienceV2Document=void 0;const a=r(84161),s=o(r(84161));t.FetchMyExperienceV2Document=a.gql` query FetchMyExperienceV2 { fetchMyExperienceV2 { xps level levelMaxXps levelMinXps } } `,t.useFetchMyExperienceV2Query=function(e){return s.useQuery(t.FetchMyExperienceV2Document,e)},t.useFetchMyExperienceV2LazyQuery=function(e){return s.useLazyQuery(t.FetchMyExperienceV2Document,e)},t.FetchMyTasksDocument=a.gql` query FetchMyTasks { fetchMyTasks { taskId userId taskType name description repeatable maxRepeats minPointsAward maxPointsAward repeatsCompleted } } `,t.useFetchMyTasksQuery=function(e){return s.useQuery(t.FetchMyTasksDocument,e)},t.useFetchMyTasksLazyQuery=function(e){return s.useLazyQuery(t.FetchMyTasksDocument,e)},t.OnCommonOpportunityNotificationDocument=a.gql` subscription OnCommonOpportunityNotification { onCommonOpportunityNotification { opportunityId name description notificationType media projectUrl } } `,t.useOnCommonOpportunityNotificationSubscription=function(e){return s.useSubscription(t.OnCommonOpportunityNotificationDocument,e)},t.OnInviteCodeUsedDocument=a.gql` subscription onInviteCodeUsed($authToken: String!) { onInviteCodeUsed(authToken: $authToken) { userId inviteCode inviteeId } } `,t.useOnInviteCodeUsedSubscription=function(e){return s.useSubscription(t.OnInviteCodeUsedDocument,e)},t.OnMyExperienceIncrementedDocument=a.gql` subscription onMyExperienceIncremented($authToken: String!) { onMyExperienceIncremented(authToken: $authToken) { xpsIncrement description xps level levelMinXps levelMaxXps } } `,t.useOnMyExperienceIncrementedSubscription=function(e){return s.useSubscription(t.OnMyExperienceIncrementedDocument,e)},t.OnMyExperienceUpdatedDocument=a.gql` subscription OnMyExperienceUpdated($authToken: String!) { onMyExperienceUpdated(authToken: $authToken) { xps level levelMinXps levelMaxXps } } `,t.useOnMyExperienceUpdatedSubscription=function(e){return s.useSubscription(t.OnMyExperienceUpdatedDocument,e)},t.OnUserOpportunityNotificationDocument=a.gql` subscription OnUserOpportunityNotification($authToken: String!) { onUserOpportunityNotification(authToken: $authToken) { opportunityId name description notificationType media projectUrl } } `,t.useOnUserOpportunityNotificationSubscription=function(e){return s.useSubscription(t.OnUserOpportunityNotificationDocument,e)}},72370:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useFetchWalletRanksV2LazyQuery=t.useFetchWalletRanksV2Query=t.FetchWalletRanksV2Document=t.useFetchWalletRanksLazyQuery=t.useFetchWalletRanksQuery=t.FetchWalletRanksDocument=t.useFetchNftRanksLazyQuery=t.useFetchNftRanksQuery=t.FetchNftRanksDocument=t.useFetchNftDataLazyQuery=t.useFetchNftDataQuery=t.FetchNftDataDocument=t.useFetchExtensionOpportunitiesV2LazyQuery=t.useFetchExtensionOpportunitiesV2Query=t.FetchExtensionOpportunitiesV2Document=t.useFetchExtensionCategoriesLazyQuery=t.useFetchExtensionCategoriesQuery=t.FetchExtensionCategoriesDocument=t.useFetchExtensionBrandsLazyQuery=t.useFetchExtensionBrandsQuery=t.FetchExtensionBrandsDocument=t.useFetchCollectionRanksLazyQuery=t.useFetchCollectionRanksQuery=t.FetchCollectionRanksDocument=t.useVisitPageV2Mutation=t.VisitPageV2Document=t.useOpenOpportunityV2Mutation=t.OpenOpportunityV2Document=t.useHideOpportunityV2Mutation=t.HideOpportunityV2Document=void 0;const a=r(84161),s=o(r(84161));t.HideOpportunityV2Document=a.gql` mutation HideOpportunityV2($opportunityId: ID!) { hideOpportunityV2(opportunityId: $opportunityId) } `,t.useHideOpportunityV2Mutation=function(e){return s.useMutation(t.HideOpportunityV2Document,e)},t.OpenOpportunityV2Document=a.gql` mutation OpenOpportunityV2($opportunityId: ID!) { openOpportunityV2(opportunityId: $opportunityId) } `,t.useOpenOpportunityV2Mutation=function(e){return s.useMutation(t.OpenOpportunityV2Document,e)},t.VisitPageV2Document=a.gql` mutation VisitPageV2($domain: String!, $title: String!, $description: String, $tags: [String], $brandId: String, $categoryId: String) { visitPageV2( domain: $domain title: $title description: $description tags: $tags brandId: $brandId categoryId: $categoryId ) { opportunityId brandId categoryId opportunityStatus opportunityType notificationType name brandName brandDescription brandMedia brandUrl brandIndustry categoryName description ludoUrl projectUrl activeFrom activeUntil media reportLink shareLink } } `,t.useVisitPageV2Mutation=function(e){return s.useMutation(t.VisitPageV2Document,e)},t.FetchCollectionRanksDocument=a.gql` query FetchCollectionRanks($collectionKeys: [CollectionKey!]!) { fetchCollectionRanks(collectionKeys: $collectionKeys) { blockchain address tokenId id collectionTitle rank } } `,t.useFetchCollectionRanksQuery=function(e){return s.useQuery(t.FetchCollectionRanksDocument,e)},t.useFetchCollectionRanksLazyQuery=function(e){return s.useLazyQuery(t.FetchCollectionRanksDocument,e)},t.FetchExtensionBrandsDocument=a.gql` query FetchExtensionBrands { fetchExtensionBrands { brandId name matchingWords description industry link media } } `,t.useFetchExtensionBrandsQuery=function(e){return s.useQuery(t.FetchExtensionBrandsDocument,e)},t.useFetchExtensionBrandsLazyQuery=function(e){return s.useLazyQuery(t.FetchExtensionBrandsDocument,e)},t.FetchExtensionCategoriesDocument=a.gql` query FetchExtensionCategories { fetchExtensionCategories { categoryId name matchingWords } } `,t.useFetchExtensionCategoriesQuery=function(e){return s.useQuery(t.FetchExtensionCategoriesDocument,e)},t.useFetchExtensionCategoriesLazyQuery=function(e){return s.useLazyQuery(t.FetchExtensionCategoriesDocument,e)},t.FetchExtensionOpportunitiesV2Document=a.gql` query FetchExtensionOpportunitiesV2($domain: String!, $brandId: String, $categoryId: String) { fetchExtensionOpportunitiesV2( domain: $domain brandId: $brandId categoryId: $categoryId ) { currentOpportunities { opportunityId brandId categoryId opportunityStatus opportunityType notificationType name brandName brandDescription brandMedia brandUrl brandIndustry categoryName description ludoUrl projectUrl activeFrom activeUntil media reportLink shareLink } similarOpportunities { opportunityId brandId categoryId opportunityStatus opportunityType notificationType name brandName brandDescription brandMedia brandUrl brandIndustry categoryName description ludoUrl projectUrl activeFrom activeUntil media reportLink shareLink } } } `,t.useFetchExtensionOpportunitiesV2Query=function(e){return s.useQuery(t.FetchExtensionOpportunitiesV2Document,e)},t.useFetchExtensionOpportunitiesV2LazyQuery=function(e){return s.useLazyQuery(t.FetchExtensionOpportunitiesV2Document,e)},t.FetchNftDataDocument=a.gql` query FetchNFTData($blockchain: String!, $contractAddress: String, $tokenId: String, $elrondId: String) { fetchNFTData( blockchain: $blockchain contractAddress: $contractAddress tokenId: $tokenId elrondId: $elrondId ) { blockchain contractAddress tokenId elrondId collectionData { collectionId title rank createdAt itemsNum holdersNum floorPrice } assetData { assetId rank } userRank } } `,t.useFetchNftDataQuery=function(e){return s.useQuery(t.FetchNftDataDocument,e)},t.useFetchNftDataLazyQuery=function(e){return s.useLazyQuery(t.FetchNftDataDocument,e)},t.FetchNftRanksDocument=a.gql` query FetchNFTRanks($nftKeys: [NFTKey!]!) { fetchNFTRanks(nftKeys: $nftKeys) { blockchain address tokenId id rank } } `,t.useFetchNftRanksQuery=function(e){return s.useQuery(t.FetchNftRanksDocument,e)},t.useFetchNftRanksLazyQuery=function(e){return s.useLazyQuery(t.FetchNftRanksDocument,e)},t.FetchWalletRanksDocument=a.gql` query FetchWalletRanks($wallets: [String!]!) { fetchWalletRanks(wallets: $wallets) { wallet rank } } `,t.useFetchWalletRanksQuery=function(e){return s.useQuery(t.FetchWalletRanksDocument,e)},t.useFetchWalletRanksLazyQuery=function(e){return s.useLazyQuery(t.FetchWalletRanksDocument,e)},t.FetchWalletRanksV2Document=a.gql` query FetchWalletRanksV2($wallets: [WalletInput!]!) { fetchWalletRanksV2(wallets: $wallets) { blockchain wallet rank } } `,t.useFetchWalletRanksV2Query=function(e){return s.useQuery(t.FetchWalletRanksV2Document,e)},t.useFetchWalletRanksV2LazyQuery=function(e){return s.useLazyQuery(t.FetchWalletRanksV2Document,e)}},56576:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useSubmitUserFeedbackMutation=t.SubmitUserFeedbackDocument=t.useSubmitRegistrationInviteMutation=t.SubmitRegistrationInviteDocument=t.useSubmitPartnershipInquiryMutation=t.SubmitPartnershipInquiryDocument=t.useSubmitOpportunityMutation=t.SubmitOpportunityDocument=t.useSubmitInvestorInquiryMutation=t.SubmitInvestorInquiryDocument=t.useSubmitContentReportMutation=t.SubmitContentReportDocument=t.useSubmitContactSupportMutation=t.SubmitContactSupportDocument=void 0;const a=r(84161),s=o(r(84161));t.SubmitContactSupportDocument=a.gql` mutation SubmitContactSupport($input: ContactSupportInput!) { submitContactSupport(input: $input) } `,t.useSubmitContactSupportMutation=function(e){return s.useMutation(t.SubmitContactSupportDocument,e)},t.SubmitContentReportDocument=a.gql` mutation SubmitContentReport($input: ContentReportInput!) { submitContentReport(input: $input) } `,t.useSubmitContentReportMutation=function(e){return s.useMutation(t.SubmitContentReportDocument,e)},t.SubmitInvestorInquiryDocument=a.gql` mutation SubmitInvestorInquiry($input: InvestorInquiryInput!) { submitInvestorInquiry(input: $input) } `,t.useSubmitInvestorInquiryMutation=function(e){return s.useMutation(t.SubmitInvestorInquiryDocument,e)},t.SubmitOpportunityDocument=a.gql` mutation SubmitOpportunity($input: OpportunityInput!) { submitOpportunity(input: $input) } `,t.useSubmitOpportunityMutation=function(e){return s.useMutation(t.SubmitOpportunityDocument,e)},t.SubmitPartnershipInquiryDocument=a.gql` mutation SubmitPartnershipInquiry($input: PartnershipInquiryInput!) { submitPartnershipInquiry(input: $input) } `,t.useSubmitPartnershipInquiryMutation=function(e){return s.useMutation(t.SubmitPartnershipInquiryDocument,e)},t.SubmitRegistrationInviteDocument=a.gql` mutation SubmitRegistrationInvite($input: RegistrationInviteInput!) { submitRegistrationInvite(input: $input) } `,t.useSubmitRegistrationInviteMutation=function(e){return s.useMutation(t.SubmitRegistrationInviteDocument,e)},t.SubmitUserFeedbackDocument=a.gql` mutation SubmitUserFeedback($input: UserFeedbackInput!) { submitUserFeedback(input: $input) } `,t.useSubmitUserFeedbackMutation=function(e){return s.useMutation(t.SubmitUserFeedbackDocument,e)}},40319:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useFetchUserGalleriesV2LazyQuery=t.useFetchUserGalleriesV2Query=t.FetchUserGalleriesV2Document=t.useFetchUserFavoritesV2LazyQuery=t.useFetchUserFavoritesV2Query=t.FetchUserFavoritesV2Document=t.useFetchMyGalleriesV2LazyQuery=t.useFetchMyGalleriesV2Query=t.FetchMyGalleriesV2Document=t.useFetchMyFavoritesV2LazyQuery=t.useFetchMyFavoritesV2Query=t.FetchMyFavoritesV2Document=t.useFetchGalleryV2LazyQuery=t.useFetchGalleryV2Query=t.FetchGalleryV2Document=t.useRemoveCreationFromGalleryV2Mutation=t.RemoveCreationFromGalleryV2Document=t.useRemoveCollectionFromGalleryV2Mutation=t.RemoveCollectionFromGalleryV2Document=t.useRemoveAssetFromGalleryV2Mutation=t.RemoveAssetFromGalleryV2Document=t.useEditGalleryMutation=t.EditGalleryDocument=t.useDeleteGalleryMutation=t.DeleteGalleryDocument=t.useCreateGalleryV2Mutation=t.CreateGalleryV2Document=t.useCreateFavoriteListV2Mutation=t.CreateFavoriteListV2Document=t.useAddCreationsToGalleryV2Mutation=t.AddCreationsToGalleryV2Document=t.useAddCollectionsToGalleryV2Mutation=t.AddCollectionsToGalleryV2Document=t.useAddAssetsToGalleryV2Mutation=t.AddAssetsToGalleryV2Document=void 0;const a=r(84161),s=o(r(84161));t.AddAssetsToGalleryV2Document=a.gql` mutation AddAssetsToGalleryV2($galleryId: ID!, $assetIds: [String!]!) { addAssetsToGalleryV2(galleryId: $galleryId, assetIds: $assetIds) } `,t.useAddAssetsToGalleryV2Mutation=function(e){return s.useMutation(t.AddAssetsToGalleryV2Document,e)},t.AddCollectionsToGalleryV2Document=a.gql` mutation AddCollectionsToGalleryV2($galleryId: ID!, $collectionIds: [String!]!) { addCollectionsToGalleryV2(galleryId: $galleryId, collectionIds: $collectionIds) } `,t.useAddCollectionsToGalleryV2Mutation=function(e){return s.useMutation(t.AddCollectionsToGalleryV2Document,e)},t.AddCreationsToGalleryV2Document=a.gql` mutation AddCreationsToGalleryV2($galleryId: ID!, $creationIds: [String!]!) { addCreationsToGalleryV2(galleryId: $galleryId, creationIds: $creationIds) } `,t.useAddCreationsToGalleryV2Mutation=function(e){return s.useMutation(t.AddCreationsToGalleryV2Document,e)},t.CreateFavoriteListV2Document=a.gql` mutation CreateFavoriteListV2($name: String!, $description: String, $publicAccessible: Boolean, $creationIds: [String]) { createFavoriteListV2( name: $name description: $description publicAccessible: $publicAccessible creationIds: $creationIds ) } `,t.useCreateFavoriteListV2Mutation=function(e){return s.useMutation(t.CreateFavoriteListV2Document,e)},t.CreateGalleryV2Document=a.gql` mutation CreateGalleryV2($name: String!, $description: String, $publicAccessible: Boolean, $creationIds: [String]) { createGalleryV2( name: $name description: $description publicAccessible: $publicAccessible creationIds: $creationIds ) } `,t.useCreateGalleryV2Mutation=function(e){return s.useMutation(t.CreateGalleryV2Document,e)},t.DeleteGalleryDocument=a.gql` mutation DeleteGallery($galleryId: ID!) { deleteGallery(galleryId: $galleryId) } `,t.useDeleteGalleryMutation=function(e){return s.useMutation(t.DeleteGalleryDocument,e)},t.EditGalleryDocument=a.gql` mutation EditGallery($galleryId: ID!, $name: String, $description: String) { editGallery(galleryId: $galleryId, name: $name, description: $description) } `,t.useEditGalleryMutation=function(e){return s.useMutation(t.EditGalleryDocument,e)},t.RemoveAssetFromGalleryV2Document=a.gql` mutation RemoveAssetFromGalleryV2($galleryId: ID!, $assetId: String!) { removeAssetFromGalleryV2(galleryId: $galleryId, assetId: $assetId) } `,t.useRemoveAssetFromGalleryV2Mutation=function(e){return s.useMutation(t.RemoveAssetFromGalleryV2Document,e)},t.RemoveCollectionFromGalleryV2Document=a.gql` mutation RemoveCollectionFromGalleryV2($galleryId: ID!, $collectionId: String!) { removeCollectionFromGalleryV2( galleryId: $galleryId collectionId: $collectionId ) } `,t.useRemoveCollectionFromGalleryV2Mutation=function(e){return s.useMutation(t.RemoveCollectionFromGalleryV2Document,e)},t.RemoveCreationFromGalleryV2Document=a.gql` mutation RemoveCreationFromGalleryV2($galleryId: ID!, $creationId: String!) { removeCreationFromGalleryV2(galleryId: $galleryId, creationId: $creationId) } `,t.useRemoveCreationFromGalleryV2Mutation=function(e){return s.useMutation(t.RemoveCreationFromGalleryV2Document,e)},t.FetchGalleryV2Document=a.gql` query FetchGalleryV2($galleryId: String!) { fetchGalleryV2(galleryId: $galleryId) { galleryId galleryType name description userId username userpic banner createdAt items views publiclyAccessible nsfw creationIds } } `,t.useFetchGalleryV2Query=function(e){return s.useQuery(t.FetchGalleryV2Document,e)},t.useFetchGalleryV2LazyQuery=function(e){return s.useLazyQuery(t.FetchGalleryV2Document,e)},t.FetchMyFavoritesV2Document=a.gql` query FetchMyFavoritesV2($pageSize: Int!, $pageToken: String) { fetchMyFavoritesV2(pageSize: $pageSize, pageToken: $pageToken) { nextPageToken galleries { galleryId galleryType name description userId username userpic banner createdAt items views publiclyAccessible nsfw creationIds } } } `,t.useFetchMyFavoritesV2Query=function(e){return s.useQuery(t.FetchMyFavoritesV2Document,e)},t.useFetchMyFavoritesV2LazyQuery=function(e){return s.useLazyQuery(t.FetchMyFavoritesV2Document,e)},t.FetchMyGalleriesV2Document=a.gql` query FetchMyGalleriesV2($pageSize: Int!, $pageToken: String) { fetchMyGalleriesV2(pageSize: $pageSize, pageToken: $pageToken) { nextPageToken galleries { galleryId galleryType name description userId username userpic banner createdAt items views publiclyAccessible nsfw creationIds } } } `,t.useFetchMyGalleriesV2Query=function(e){return s.useQuery(t.FetchMyGalleriesV2Document,e)},t.useFetchMyGalleriesV2LazyQuery=function(e){return s.useLazyQuery(t.FetchMyGalleriesV2Document,e)},t.FetchUserFavoritesV2Document=a.gql` query FetchUserFavoritesV2($userId: ID!, $pageSize: Int!, $pageToken: String) { fetchUserFavoritesV2( userId: $userId pageSize: $pageSize pageToken: $pageToken ) { nextPageToken galleries { galleryId galleryType name description userId username userpic userWallets { userId address walletName blockchain chainId } banner createdAt items views publiclyAccessible nsfw creationIds } } } `,t.useFetchUserFavoritesV2Query=function(e){return s.useQuery(t.FetchUserFavoritesV2Document,e)},t.useFetchUserFavoritesV2LazyQuery=function(e){return s.useLazyQuery(t.FetchUserFavoritesV2Document,e)},t.FetchUserGalleriesV2Document=a.gql` query fetchUserGalleriesV2($userId: ID!, $pageSize: Int!, $pageToken: String) { fetchUserGalleriesV2( userId: $userId pageSize: $pageSize pageToken: $pageToken ) { nextPageToken galleries { galleryId galleryType name description userId username userpic userWallets { userId address walletName blockchain chainId } banner createdAt items views publiclyAccessible nsfw creationIds } } } `,t.useFetchUserGalleriesV2Query=function(e){return s.useQuery(t.FetchUserGalleriesV2Document,e)},t.useFetchUserGalleriesV2LazyQuery=function(e){return s.useLazyQuery(t.FetchUserGalleriesV2Document,e)}},6199:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateProfileDocument=t.useSignInTonV2Mutation=t.SignInTonV2Document=t.useSignInTonMutation=t.SignInTonDocument=t.useSignInTezosMutation=t.SignInTezosDocument=t.useSignInSolanaMutation=t.SignInSolanaDocument=t.useSignInMetamaskMutation=t.SignInMetamaskDocument=t.useSignInFlowMutation=t.SignInFlowDocument=t.useSignInElrondMutation=t.SignInElrondDocument=t.useSignInAdminMetamaskMutation=t.SignInAdminMetamaskDocument=t.useSetMainWalletMutation=t.SetMainWalletDocument=t.useSaveEmailOfJoinerMutation=t.SaveEmailOfJoinerDocument=t.useRemoveWalletMutation=t.RemoveWalletDocument=t.useUseInviteCodeMutation=t.UseInviteCodeDocument=t.useGenerateNewInviteCodesMutation=t.GenerateNewInviteCodesDocument=t.useCreateTonNonceMutation=t.CreateTonNonceDocument=t.useCreateNonceMutation=t.CreateNonceDocument=t.useCreateEvmNonceMutation=t.CreateEvmNonceDocument=t.useAddWalletTonMutation=t.AddWalletTonDocument=t.useAddWalletTezosMutation=t.AddWalletTezosDocument=t.useAddWalletSolanaMutation=t.AddWalletSolanaDocument=t.useAddWalletMetamaskMutation=t.AddWalletMetamaskDocument=t.useAddWalletFlowMutation=t.AddWalletFlowDocument=t.useAddWalletElrondMutation=t.AddWalletElrondDocument=t.useSignInEthereumWeb3AuthMutation=t.SignInEthereumWeb3AuthDocument=t.IRole=t.IReftypeColor=t.ILoginType=void 0,t.useFetchUserWalletsLazyQuery=t.useFetchUserWalletsQuery=t.FetchUserWalletsDocument=t.useFetchProfileLazyQuery=t.useFetchProfileQuery=t.FetchProfileDocument=t.useFetchMyProfileV2LazyQuery=t.useFetchMyProfileV2Query=t.FetchMyProfileV2Document=t.useFetchMultiversXAuditLazyQuery=t.useFetchMultiversXAuditQuery=t.FetchMultiversXAuditDocument=t.useFetchAggregatedMultiversxAuditLazyQuery=t.useFetchAggregatedMultiversxAuditQuery=t.FetchAggregatedMultiversxAuditDocument=t.useUpdateProfileMutation=void 0;const a=r(84161),s=o(r(84161));var c,u,l;!function(e){e.Google="GOOGLE",e.X="X",e.Discord="DISCORD",e.Facebook="FACEBOOK",e.Linkedin="LINKEDIN",e.Reddit="REDDIT",e.Email="EMAIL",e.PhoneNumber="PHONE_NUMBER"}(c||(t.ILoginType=c={})),function(e){e.Red="RED",e.Green="GREEN",e.Blue="BLUE",e.Yellow="YELLOW",e.Orange="ORANGE",e.White="WHITE",e.Black="BLACK",e.Grey="GREY",e.Purple="PURPLE",e.Gold="GOLD"}(u||(t.IReftypeColor=u={})),function(e){e.Admin="admin",e.Plain="plain"}(l||(t.IRole=l={})),t.SignInEthereumWeb3AuthDocument=a.gql` mutation signInEthereumWeb3Auth($signInData: EthereumSignInData!, $loginType: LoginType!, $additionalMeta: JSON) { signInEthereumWeb3Auth( signInData: $signInData loginType: $loginType additionalMeta: $additionalMeta ) { userId wallets tokens { portalTokenPair { authToken refreshToken } extensionTokenPair { authToken refreshToken } } newUser inviteCode role reftypeId reftypeName reftypeColor } } `,t.useSignInEthereumWeb3AuthMutation=function(e){return s.useMutation(t.SignInEthereumWeb3AuthDocument,e)},t.AddWalletElrondDocument=a.gql` mutation AddWalletElrond($signature: String!, $address: String!) { addWalletElrond(signature: $signature, address: $address) } `,t.useAddWalletElrondMutation=function(e){return s.useMutation(t.AddWalletElrondDocument,e)},t.AddWalletFlowDocument=a.gql` mutation AddWalletFlow($signature: String!, $address: String!) { addWalletFlow(signature: $signature, address: $address) } `,t.useAddWalletFlowMutation=function(e){return s.useMutation(t.AddWalletFlowDocument,e)},t.AddWalletMetamaskDocument=a.gql` mutation AddWalletMetamask($signature: String!, $address: String!, $chainId: String!) { addWalletMetamask(signature: $signature, address: $address, chainId: $chainId) } `,t.useAddWalletMetamaskMutation=function(e){return s.useMutation(t.AddWalletMetamaskDocument,e)},t.AddWalletSolanaDocument=a.gql` mutation AddWalletSolana($signature: String!, $pubkey: String!) { addWalletSolana(signature: $signature, pubkey: $pubkey) } `,t.useAddWalletSolanaMutation=function(e){return s.useMutation(t.AddWalletSolanaDocument,e)},t.AddWalletTezosDocument=a.gql` mutation AddWalletTezos($signature: String!, $pubkey: String!) { addWalletTezos(signature: $signature, pubkey: $pubkey) } `,t.useAddWalletTezosMutation=function(e){return s.useMutation(t.AddWalletTezosDocument,e)},t.AddWalletTonDocument=a.gql` mutation AddWalletTon($request: CheckTonProofRequest!) { addWalletTon(request: $request) } `,t.useAddWalletTonMutation=function(e){return s.useMutation(t.AddWalletTonDocument,e)},t.CreateEvmNonceDocument=a.gql` mutation CreateEvmNonce { createEvmNonce } `,t.useCreateEvmNonceMutation=function(e){return s.useMutation(t.CreateEvmNonceDocument,e)},t.CreateNonceDocument=a.gql` mutation CreateNonce($address: String!, $blockchain: String!, $chainId: String) { createNonce(address: $address, blockchain: $blockchain, chainId: $chainId) } `,t.useCreateNonceMutation=function(e){return s.useMutation(t.CreateNonceDocument,e)},t.CreateTonNonceDocument=a.gql` mutation CreateTonNonce { createTonNonce } `,t.useCreateTonNonceMutation=function(e){return s.useMutation(t.CreateTonNonceDocument,e)},t.GenerateNewInviteCodesDocument=a.gql` mutation GenerateNewInviteCodes($codesNum: Int!) { generateNewInviteCodes(codesNum: $codesNum) { inviteCode inviteeId isUsed usedAt } } `,t.useGenerateNewInviteCodesMutation=function(e){return s.useMutation(t.GenerateNewInviteCodesDocument,e)},t.UseInviteCodeDocument=a.gql` mutation UseInviteCode($inviteCode: String!) { useInviteCode(inviteCode: $inviteCode) } `,t.useUseInviteCodeMutation=function(e){return s.useMutation(t.UseInviteCodeDocument,e)},t.RemoveWalletDocument=a.gql` mutation RemoveWallet($blockchain: String!, $address: String!, $chainId: String) { removeWallet(blockchain: $blockchain, address: $address, chainId: $chainId) } `,t.useRemoveWalletMutation=function(e){return s.useMutation(t.RemoveWalletDocument,e)},t.SaveEmailOfJoinerDocument=a.gql` mutation SaveEmailOfJoiner($email: String!, $isSubscribed: Boolean!) { saveEmailOfJoiner(email: $email, isSubscribed: $isSubscribed) } `,t.useSaveEmailOfJoinerMutation=function(e){return s.useMutation(t.SaveEmailOfJoinerDocument,e)},t.SetMainWalletDocument=a.gql` mutation SetMainWallet($blockchain: String!, $address: String!, $chainId: String) { setMainWallet(blockchain: $blockchain, address: $address, chainId: $chainId) } `,t.useSetMainWalletMutation=function(e){return s.useMutation(t.SetMainWalletDocument,e)},t.SignInAdminMetamaskDocument=a.gql` mutation SignInAdminMetamask($signature: String!, $address: String!, $chainId: String!) { signInAdminMetamask(signature: $signature, address: $address, chainId: $chainId) { userId wallets tokens { portalTokenPair { authToken refreshToken } extensionTokenPair { authToken refreshToken } } newUser inviteCode role reftypeId reftypeName reftypeColor } } `,t.useSignInAdminMetamaskMutation=function(e){return s.useMutation(t.SignInAdminMetamaskDocument,e)},t.SignInElrondDocument=a.gql` mutation SignInElrond($signature: String!, $address: String!) { signInElrond(signature: $signature, address: $address) { userId wallets tokens { portalTokenPair { authToken refreshToken } extensionTokenPair { authToken refreshToken } } newUser inviteCode role reftypeId reftypeName reftypeColor } } `,t.useSignInElrondMutation=function(e){return s.useMutation(t.SignInElrondDocument,e)},t.SignInFlowDocument=a.gql` mutation SignInFlow($signature: String!, $address: String!) { signInFlow(signature: $signature, address: $address) { userId wallets tokens { portalTokenPair { authToken refreshToken } extensionTokenPair { authToken refreshToken } } newUser inviteCode role reftypeId reftypeName reftypeColor } } `,t.useSignInFlowMutation=function(e){return s.useMutation(t.SignInFlowDocument,e)},t.SignInMetamaskDocument=a.gql` mutation SignInMetamask($signature: String!, $address: String!, $chainId: String!) { signInMetamask(signature: $signature, address: $address, chainId: $chainId) { userId wallets tokens { portalTokenPair { authToken refreshToken } extensionTokenPair { authToken refreshToken } } newUser inviteCode role reftypeId reftypeName reftypeColor } } `,t.useSignInMetamaskMutation=function(e){return s.useMutation(t.SignInMetamaskDocument,e)},t.SignInSolanaDocument=a.gql` mutation SignInSolana($signature: String!, $pubkey: String!) { signInSolana(signature: $signature, pubkey: $pubkey) { userId wallets tokens { portalTokenPair { authToken refreshToken } extensionTokenPair { authToken refreshToken } } newUser inviteCode role reftypeId reftypeName reftypeColor } } `,t.useSignInSolanaMutation=function(e){return s.useMutation(t.SignInSolanaDocument,e)},t.SignInTezosDocument=a.gql` mutation SignInTezos($signature: String!, $pubkey: String!) { signInTezos(signature: $signature, pubkey: $pubkey) { userId wallets tokens { portalTokenPair { authToken refreshToken } extensionTokenPair { authToken refreshToken } } newUser inviteCode role reftypeId reftypeName reftypeColor } } `,t.useSignInTezosMutation=function(e){return s.useMutation(t.SignInTezosDocument,e)},t.SignInTonDocument=a.gql` mutation SignInTon($request: CheckTonProofRequest!, $restore: Boolean) { signInTon(request: $request, restore: $restore) { userId wallets tokens { portalTokenPair { authToken refreshToken } extensionTokenPair { authToken refreshToken } } newUser inviteCode role reftypeId reftypeName reftypeColor } } `,t.useSignInTonMutation=function(e){return s.useMutation(t.SignInTonDocument,e)},t.SignInTonV2Document=a.gql` mutation SignInTonV2($address: String!, $restore: Boolean) { signInTonV2(address: $address, restore: $restore) { userId wallets tokens { portalTokenPair { authToken refreshToken } extensionTokenPair { authToken refreshToken } } newUser inviteCode role reftypeId reftypeName reftypeColor } } `,t.useSignInTonV2Mutation=function(e){return s.useMutation(t.SignInTonV2Document,e)},t.UpdateProfileDocument=a.gql` mutation UpdateProfile($username: String, $about: String, $facebook: String, $twitter: String, $instagram: String, $website: String, $showNsfw: Boolean, $discordNickname: String, $discordServer: String, $telegramLink: String) { updateProfile( profile: {username: $username, about: $about, showNsfw: $showNsfw, social: {facebook: $facebook, twitter: $twitter, instagram: $instagram, website: $website, discordNickname: $discordNickname, discordServer: $discordServer, telegramLink: $telegramLink}} ) } `,t.useUpdateProfileMutation=function(e){return s.useMutation(t.UpdateProfileDocument,e)},t.FetchAggregatedMultiversxAuditDocument=a.gql` query FetchAggregatedMultiversxAudit($userId: ID!) { fetchAggregatedMultiversxAudit(userId: $userId) { delegated interests { name items percentage } nativeBalance nftBalance { nativeValue totalNfts collections { collection type name balance } } tokenValue } } `,t.useFetchAggregatedMultiversxAuditQuery=function(e){return s.useQuery(t.FetchAggregatedMultiversxAuditDocument,e)},t.useFetchAggregatedMultiversxAuditLazyQuery=function(e){return s.useLazyQuery(t.FetchAggregatedMultiversxAuditDocument,e)},t.FetchMultiversXAuditDocument=a.gql` query FetchMultiversXAudit($wallet: String!) { fetchMultiversxAudit(wallet: $wallet) { delegated interests { name items percentage } nativeBalance nftBalance { nativeValue totalNfts collections { collection type name balance } } tokenValue } } `,t.useFetchMultiversXAuditQuery=function(e){return s.useQuery(t.FetchMultiversXAuditDocument,e)},t.useFetchMultiversXAuditLazyQuery=function(e){return s.useLazyQuery(t.FetchMultiversXAuditDocument,e)},t.FetchMyProfileV2Document=a.gql` query FetchMyProfileV2 { fetchMyProfileV2 { userId username about userpic following followings followers social { facebook twitter instagram website discordServer discordNickname telegramLink } views createdAt deletedAt visible active deleted showNsfw rank wallets { userId address walletName blockchain chainId mainWallet } xps level levelMinXps levelMaxXps inviteCodes { inviteCode isUsed maxUsagesLimit codeUsersNum codeUsers { inviteeId usedAt } } referralTypeId referralTypeName referralTypeColor } } `,t.useFetchMyProfileV2Query=function(e){return s.useQuery(t.FetchMyProfileV2Document,e)},t.useFetchMyProfileV2LazyQuery=function(e){return s.useLazyQuery(t.FetchMyProfileV2Document,e)},t.FetchProfileDocument=a.gql` query FetchProfile($userId: ID!) { fetchProfile(userId: $userId) { userId username about userpic following followings followers rank social { facebook twitter instagram website discordNickname discordServer telegramLink } views createdAt deletedAt visible active deleted showNsfw wallets { userId address walletName blockchain chainId mainWallet } referralTypeId referralTypeName referralTypeColor } } `,t.useFetchProfileQuery=function(e){return s.useQuery(t.FetchProfileDocument,e)},t.useFetchProfileLazyQuery=function(e){return s.useLazyQuery(t.FetchProfileDocument,e)},t.FetchUserWalletsDocument=a.gql` query FetchUserWallets($userId: ID!) { fetchUserWallets(userId: $userId) { userId address walletName blockchain chainId mainWallet } } `,t.useFetchUserWalletsQuery=function(e){return s.useQuery(t.FetchUserWalletsDocument,e)},t.useFetchUserWalletsLazyQuery=function(e){return s.useLazyQuery(t.FetchUserWalletsDocument,e)}},80098:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useFetchUserpicLazyQuery=t.useFetchUserpicQuery=t.FetchUserpicDocument=t.useUploadGalleryBannerMutation=t.UploadGalleryBannerDocument=t.useDeleteGalleryBannerMutation=t.DeleteGalleryBannerDocument=void 0;const a=r(84161),s=o(r(84161));t.DeleteGalleryBannerDocument=a.gql` mutation DeleteGalleryBanner($galleryId: ID!) { deleteGalleryBanner(galleryId: $galleryId) } `,t.useDeleteGalleryBannerMutation=function(e){return s.useMutation(t.DeleteGalleryBannerDocument,e)},t.UploadGalleryBannerDocument=a.gql` mutation UploadGalleryBanner($galleryId: ID!, $file: Upload!) { uploadGalleryBanner(galleryId: $galleryId, file: $file) } `,t.useUploadGalleryBannerMutation=function(e){return s.useMutation(t.UploadGalleryBannerDocument,e)},t.FetchUserpicDocument=a.gql` query FetchUserpic($userId: ID!) { fetchUserpic(userId: $userId) } `,t.useFetchUserpicQuery=function(e){return s.useQuery(t.FetchUserpicDocument,e)},t.useFetchUserpicLazyQuery=function(e){return s.useLazyQuery(t.FetchUserpicDocument,e)}},36745:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useFetchMintingInfoLazyQuery=t.useFetchMintingInfoQuery=t.FetchMintingInfoDocument=void 0;const a=r(84161),s=o(r(84161));t.FetchMintingInfoDocument=a.gql` query FetchMintingInfo($input: MintingInput!) { fetchMintingInfo(input: $input) { rank tier { id name description fee } nftPrice } } `,t.useFetchMintingInfoQuery=function(e){return s.useQuery(t.FetchMintingInfoDocument,e)},t.useFetchMintingInfoLazyQuery=function(e){return s.useLazyQuery(t.FetchMintingInfoDocument,e)}},98137:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useOnNotificationSubscription=t.OnNotificationDocument=t.useReadNotificationMutation=t.ReadNotificationDocument=t.INotificationType=t.IEventType=void 0;const a=r(84161),s=o(r(84161));var c,u;!function(e){e.CommonOpportunity="COMMON_OPPORTUNITY",e.UserInvitee="USER_INVITEE",e.UserOpportunity="USER_OPPORTUNITY",e.UserXpIncrement="USER_XP_INCREMENT",e.UserXps="USER_XPS"}(c||(t.IEventType=c={})),function(e){e.RedDot="RED_DOT",e.Push="PUSH"}(u||(t.INotificationType=u={})),t.ReadNotificationDocument=a.gql` mutation ReadNotification($notificationId: ID!) { readNotification(notificationId: $notificationId) } `,t.useReadNotificationMutation=function(e){return s.useMutation(t.ReadNotificationDocument,e)},t.OnNotificationDocument=a.gql` subscription OnNotification($authToken: String!, $notificationTypes: [NotificationType!]!) { onNotification(authToken: $authToken, notificationTypes: $notificationTypes) { notificationId notificationType eventType createdAt name description media link } } `,t.useOnNotificationSubscription=function(e){return s.useSubscription(t.OnNotificationDocument,e)}},6050:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useFetchOpportunitiesLazyQuery=t.useFetchOpportunitiesQuery=t.FetchOpportunitiesDocument=t.useFetchOpportunitiesForProfileLazyQuery=t.useFetchOpportunitiesForProfileQuery=t.FetchOpportunitiesForProfileDocument=t.useFetchOpportunitiesByIdsLazyQuery=t.useFetchOpportunitiesByIdsQuery=t.FetchOpportunitiesByIdsDocument=t.useOpenOpportunityMutation=t.OpenOpportunityDocument=t.useCreateOpportunityMutation=t.CreateOpportunityDocument=t.useLikeOpportunityMutation=t.LikeOpportunityDocument=t.useDislikeOpportunityMutation=t.DislikeOpportunityDocument=void 0;const a=r(84161),s=o(r(84161));t.DislikeOpportunityDocument=a.gql` mutation DislikeOpportunity($opportunityId: String!) { dislikeOpportunity(opportunityId: $opportunityId) } `,t.useDislikeOpportunityMutation=function(e){return s.useMutation(t.DislikeOpportunityDocument,e)},t.LikeOpportunityDocument=a.gql` mutation LikeOpportunity($opportunityId: String!) { likeOpportunity(opportunityId: $opportunityId) } `,t.useLikeOpportunityMutation=function(e){return s.useMutation(t.LikeOpportunityDocument,e)},t.CreateOpportunityDocument=a.gql` mutation CreateOpportunity($input: OpportunityInput!) { createOpportunity(input: $input) } `,t.useCreateOpportunityMutation=function(e){return s.useMutation(t.CreateOpportunityDocument,e)},t.OpenOpportunityDocument=a.gql` mutation OpenOpportunity($opportunityId: ID!) { openOpportunity(opportunityId: $opportunityId) } `,t.useOpenOpportunityMutation=function(e){return s.useMutation(t.OpenOpportunityDocument,e)},t.FetchOpportunitiesByIdsDocument=a.gql` query FetchOpportunitiesByIds($opportunityIds: [ID!]!) { fetchOpportunitiesByIds(opportunityIds: $opportunityIds) { opportunityId brandId categoryId opportunityStatus opportunityType notificationType name description brandName brandDescription brandMedia brandUrl brandIndustry categoryName ludoUrl projectUrl activeFrom activeUntil minXpLevel maxXpLevel minRank maxRank media reportLink clicks views blockchain collection createdAt minWalletValue maxWalletValue shareLink liked } } `,t.useFetchOpportunitiesByIdsQuery=function(e){return s.useQuery(t.FetchOpportunitiesByIdsDocument,e)},t.useFetchOpportunitiesByIdsLazyQuery=function(e){return s.useLazyQuery(t.FetchOpportunitiesByIdsDocument,e)},t.FetchOpportunitiesForProfileDocument=a.gql` query FetchOpportunitiesForProfile { fetchOpportunitiesForProfile { opportunityId brandId categoryId opportunityStatus opportunityType notificationType name description brandName brandDescription brandMedia brandUrl brandIndustry categoryName ludoUrl projectUrl activeFrom activeUntil minXpLevel maxXpLevel minRank maxRank media reportLink clicks views blockchain collection createdAt minWalletValue maxWalletValue shareLink liked } } `,t.useFetchOpportunitiesForProfileQuery=function(e){return s.useQuery(t.FetchOpportunitiesForProfileDocument,e)},t.useFetchOpportunitiesForProfileLazyQuery=function(e){return s.useLazyQuery(t.FetchOpportunitiesForProfileDocument,e)},t.FetchOpportunitiesDocument=a.gql` query FetchOpportunities($domain: String) { fetchOpportunities(domain: $domain) { currentOpportunities { opportunityId name description startedAt endedAt createdAt tags category media links ludoRankRequired ludoRankRequiredMin ludoRankRequiredMax rewardType creatorId creatorWallet status } similarOpportunities { opportunityId name description startedAt endedAt createdAt tags category media links ludoRankRequired ludoRankRequiredMin ludoRankRequiredMax rewardType creatorId creatorWallet status } } } `,t.useFetchOpportunitiesQuery=function(e){return s.useQuery(t.FetchOpportunitiesDocument,e)},t.useFetchOpportunitiesLazyQuery=function(e){return s.useLazyQuery(t.FetchOpportunitiesDocument,e)}},93183:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useFetchSetsSearchResultTypeSelectionsLazyQuery=t.useFetchSetsSearchResultTypeSelectionsQuery=t.FetchSetsSearchResultTypeSelectionsDocument=t.useFetchSearchResultStatusSelectionsLazyQuery=t.useFetchSearchResultStatusSelectionsQuery=t.FetchSearchResultStatusSelectionsDocument=t.useFetchSearchResultCategorySelectionsLazyQuery=t.useFetchSearchResultCategorySelectionsQuery=t.FetchSearchResultCategorySelectionsDocument=t.useFetchSearchResultBlockchainSelectionsLazyQuery=t.useFetchSearchResultBlockchainSelectionsQuery=t.FetchSearchResultBlockchainSelectionsDocument=t.useFetchUserInterestsLazyQuery=t.useFetchUserInterestsQuery=t.FetchUserInterestsDocument=t.useFetchUserExpectationsLazyQuery=t.useFetchUserExpectationsQuery=t.FetchUserExpectationsDocument=t.useFetchSearchResultTimeSelectionsLazyQuery=t.useFetchSearchResultTimeSelectionsQuery=t.FetchSearchResultTimeSelectionsDocument=t.useFetchSearchResultSelectionsLazyQuery=t.useFetchSearchResultSelectionsQuery=t.FetchSearchResultSelectionsDocument=t.useFetchInterestsLazyQuery=t.useFetchInterestsQuery=t.FetchInterestsDocument=t.useFetchExpectationsLazyQuery=t.useFetchExpectationsQuery=t.FetchExpectationsDocument=t.useSaveUserInterestsMutation=t.SaveUserInterestsDocument=t.useSaveUserExpectationsMutation=t.SaveUserExpectationsDocument=void 0;const a=r(84161),s=o(r(84161));t.SaveUserExpectationsDocument=a.gql` mutation SaveUserExpectations($expectations: [String]!) { saveUserExpectations(expectations: $expectations) } `,t.useSaveUserExpectationsMutation=function(e){return s.useMutation(t.SaveUserExpectationsDocument,e)},t.SaveUserInterestsDocument=a.gql` mutation SaveUserInterests($interests: [String]!) { saveUserInterests(interests: $interests) } `,t.useSaveUserInterestsMutation=function(e){return s.useMutation(t.SaveUserInterestsDocument,e)},t.FetchExpectationsDocument=a.gql` query FetchExpectations { fetchExpectations { name imageUrl } } `,t.useFetchExpectationsQuery=function(e){return s.useQuery(t.FetchExpectationsDocument,e)},t.useFetchExpectationsLazyQuery=function(e){return s.useLazyQuery(t.FetchExpectationsDocument,e)},t.FetchInterestsDocument=a.gql` query FetchInterests { fetchInterests { name imageUrl } } `,t.useFetchInterestsQuery=function(e){return s.useQuery(t.FetchInterestsDocument,e)},t.useFetchInterestsLazyQuery=function(e){return s.useLazyQuery(t.FetchInterestsDocument,e)},t.FetchSearchResultSelectionsDocument=a.gql` query FetchSearchResultSelections { fetchSearchResultSelections { typeSelections { id: name label } blockchainSelections { id: name label } categorySelections { id: name label } timeSelections { id: name label } statusSelections { id: name label } } } `,t.useFetchSearchResultSelectionsQuery=function(e){return s.useQuery(t.FetchSearchResultSelectionsDocument,e)},t.useFetchSearchResultSelectionsLazyQuery=function(e){return s.useLazyQuery(t.FetchSearchResultSelectionsDocument,e)},t.FetchSearchResultTimeSelectionsDocument=a.gql` query FetchSearchResultTimeSelections { fetchSearchResultTimeSelections { name label } } `,t.useFetchSearchResultTimeSelectionsQuery=function(e){return s.useQuery(t.FetchSearchResultTimeSelectionsDocument,e)},t.useFetchSearchResultTimeSelectionsLazyQuery=function(e){return s.useLazyQuery(t.FetchSearchResultTimeSelectionsDocument,e)},t.FetchUserExpectationsDocument=a.gql` query FetchUserExpectations { fetchUserExpectations { userId name imageUrl } } `,t.useFetchUserExpectationsQuery=function(e){return s.useQuery(t.FetchUserExpectationsDocument,e)},t.useFetchUserExpectationsLazyQuery=function(e){return s.useLazyQuery(t.FetchUserExpectationsDocument,e)},t.FetchUserInterestsDocument=a.gql` query FetchUserInterests { fetchUserInterests { userId name imageUrl percents } } `,t.useFetchUserInterestsQuery=function(e){return s.useQuery(t.FetchUserInterestsDocument,e)},t.useFetchUserInterestsLazyQuery=function(e){return s.useLazyQuery(t.FetchUserInterestsDocument,e)},t.FetchSearchResultBlockchainSelectionsDocument=a.gql` query FetchSearchResultBlockchainSelections { fetchSearchResultBlockchainSelections { name label } } `,t.useFetchSearchResultBlockchainSelectionsQuery=function(e){return s.useQuery(t.FetchSearchResultBlockchainSelectionsDocument,e)},t.useFetchSearchResultBlockchainSelectionsLazyQuery=function(e){return s.useLazyQuery(t.FetchSearchResultBlockchainSelectionsDocument,e)},t.FetchSearchResultCategorySelectionsDocument=a.gql` query FetchSearchResultCategorySelections { fetchSearchResultCategorySelections { name label } } `,t.useFetchSearchResultCategorySelectionsQuery=function(e){return s.useQuery(t.FetchSearchResultCategorySelectionsDocument,e)},t.useFetchSearchResultCategorySelectionsLazyQuery=function(e){return s.useLazyQuery(t.FetchSearchResultCategorySelectionsDocument,e)},t.FetchSearchResultStatusSelectionsDocument=a.gql` query FetchSearchResultStatusSelections { fetchSearchResultStatusSelections { name label } } `,t.useFetchSearchResultStatusSelectionsQuery=function(e){return s.useQuery(t.FetchSearchResultStatusSelectionsDocument,e)},t.useFetchSearchResultStatusSelectionsLazyQuery=function(e){return s.useLazyQuery(t.FetchSearchResultStatusSelectionsDocument,e)},t.FetchSetsSearchResultTypeSelectionsDocument=a.gql` query FetchSetsSearchResultTypeSelections { fetchSetsSearchResultTypeSelections { name label } } `,t.useFetchSetsSearchResultTypeSelectionsQuery=function(e){return s.useQuery(t.FetchSetsSearchResultTypeSelectionsDocument,e)},t.useFetchSetsSearchResultTypeSelectionsLazyQuery=function(e){return s.useLazyQuery(t.FetchSetsSearchResultTypeSelectionsDocument,e)}},47965:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useFindCreationsLazyQuery=t.useFindCreationsQuery=t.FindCreationsDocument=t.useFetchUserReferralsInfoPageLazyQuery=t.useFetchUserReferralsInfoPageQuery=t.FetchUserReferralsInfoPageDocument=t.useFetchUserReferralsInfoCsvLazyQuery=t.useFetchUserReferralsInfoCsvQuery=t.FetchUserReferralsInfoCsvDocument=t.useFetchUserPortfolioLazyQuery=t.useFetchUserPortfolioQuery=t.FetchUserPortfolioDocument=t.useFindAllTopEntitiesByNameLazyQuery=t.useFindAllTopEntitiesByNameQuery=t.FindAllTopEntitiesByNameDocument=t.useFetchDynamicCollectionsDataLazyQuery=t.useFetchDynamicCollectionsDataQuery=t.FetchDynamicCollectionsDataDocument=t.useFetchDynamicCollectionDataLazyQuery=t.useFetchDynamicCollectionDataQuery=t.FetchDynamicCollectionDataDocument=t.useFetchDynamicAssetsLikesLazyQuery=t.useFetchDynamicAssetsLikesQuery=t.FetchDynamicAssetsLikesDocument=t.useFetchDynamicAssetLikesLazyQuery=t.useFetchDynamicAssetLikesQuery=t.FetchDynamicAssetLikesDocument=t.useFetchCreationsByTypeLazyQuery=t.useFetchCreationsByTypeQuery=t.FetchCreationsByTypeDocument=t.useFetchCollectionsByIdsLazyQuery=t.useFetchCollectionsByIdsQuery=t.FetchCollectionsByIdsDocument=t.useFindCollectionsLazyQuery=t.useFindCollectionsQuery=t.FindCollectionsDocument=t.useFetchCollectionLazyQuery=t.useFetchCollectionQuery=t.FetchCollectionDocument=t.useFetchAssetsLazyQuery=t.useFetchAssetsQuery=t.FetchAssetsDocument=t.useFetchAssetByBlockchainLazyQuery=t.useFetchAssetByBlockchainQuery=t.FetchAssetByBlockchainDocument=t.useFetchAllCreationsLazyQuery=t.useFetchAllCreationsQuery=t.FetchAllCreationsDocument=t.ISortDirection=t.IReftypeColor=void 0,t.useFindUserCreationsLazyQuery=t.useFindUserCreationsQuery=t.FindUserCreationsDocument=t.useFindProfilesByNameLazyQuery=t.useFindProfilesByNameQuery=t.FindProfilesByNameDocument=void 0;const a=r(84161),s=o(r(84161));var c,u;!function(e){e.Red="RED",e.Green="GREEN",e.Blue="BLUE",e.Yellow="YELLOW",e.Orange="ORANGE",e.White="WHITE",e.Black="BLACK",e.Grey="GREY",e.Purple="PURPLE",e.Gold="GOLD"}(c||(t.IReftypeColor=c={})),function(e){e.Asc="asc",e.Desc="desc"}(u||(t.ISortDirection=u={})),t.FetchAllCreationsDocument=a.gql` query FetchAllCreations($page: PageInput) { fetchAllCreations(page: $page) { nextPage { token num size elements } creations { id itemType itemId blockchain rank address liked likes tokenId name creatorsAddresses originalUrls media mediaPreview mimeType } } } `,t.useFetchAllCreationsQuery=function(e){return s.useQuery(t.FetchAllCreationsDocument,e)},t.useFetchAllCreationsLazyQuery=function(e){return s.useLazyQuery(t.FetchAllCreationsDocument,e)},t.FetchAssetByBlockchainDocument=a.gql` query FetchAssetByBlockchain($blockchain: String!, $address: String, $tokenId: String, $elrondId: String) { fetchAssetByBlockchain( blockchain: $blockchain address: $address tokenId: $tokenId elrondId: $elrondId ) { assetId blockchain blockchainLabel address tokenId collection id chainId blockHeight blockTimestamp name description originalUrls medias { originalUrl url previewUrl mimeType sizeRatio fileSize nsfw originalMime hidden cover } ownersAddresses ownersProfiles { userId username about userpic followers followings createdAt deletedAt visible views deleted } creatorsAddresses creatorsProfiles { userId username about userpic followers followings createdAt deletedAt visible views deleted } attributes { name value } likes liked views visible createdAt blurred rank trueRank rankRaw rankMax rankUpdatedAt collectionId collectionTitle collectionOriginalUrls collectionMedias { originalUrl url previewUrl mimeType sizeRatio fileSize nsfw originalMime hidden cover } markets { marketId marketName marketDomain marketUrl } latestPriceBlockHeight latestPriceCurrency latestPriceAmount totalVolumes { currency amount } category categoryLabel } } `,t.useFetchAssetByBlockchainQuery=function(e){return s.useQuery(t.FetchAssetByBlockchainDocument,e)},t.useFetchAssetByBlockchainLazyQuery=function(e){return s.useLazyQuery(t.FetchAssetByBlockchainDocument,e)},t.FetchAssetsDocument=a.gql` query FetchAssets($assetIds: [String!]!) { fetchAssets(assetIds: $assetIds) { latestPriceCurrency latestPriceAmount collectionId collectionOriginalUrls collectionTitle assetId totalVolumes { currency amount } blockchain address tokenId name description rank markets { marketId marketName marketDomain marketUrl } collectionMedias { originalUrl url previewUrl mimeType sizeRatio fileSize } originalUrls medias { originalUrl url mimeType sizeRatio fileSize previewUrl } ownersAddresses ownersProfiles { userId username about userpic followers followings visible } creatorsAddresses creatorsProfiles { userId username about userpic followers followings visible } attributes { name value } views visible blurred medias { originalUrl url previewUrl mimeType } creatorsProfiles { username } } } `,t.useFetchAssetsQuery=function(e){return s.useQuery(t.FetchAssetsDocument,e)},t.useFetchAssetsLazyQuery=function(e){return s.useLazyQuery(t.FetchAssetsDocument,e)},t.FetchCollectionDocument=a.gql` query fetchCollection($collectionId: String!) { fetchCollection(collectionId: $collectionId) { collectionId blockchain identifier contractAddress tokenId blockHeight blockTimestamp collectionTitle collectionUrl items owners totalVolumes { currency amount } likes liked collectionMarkets { marketId marketName marketDomain marketUrl } creatorsAddresses creatorsProfiles { username userpic } verified originalUrls rank nsfw medias { originalUrl url mimeType sizeRatio fileSize } floorPrices { currency amount } } } `,t.useFetchCollectionQuery=function(e){return s.useQuery(t.FetchCollectionDocument,e)},t.useFetchCollectionLazyQuery=function(e){return s.useLazyQuery(t.FetchCollectionDocument,e)},t.FindCollectionsDocument=a.gql` query FindCollections($term: String!, $input: CollectionFilterInput!, $page: PageInput) { findCollections(term: $term, input: $input, page: $page) { collections { collectionId collectionTitle blockchain tokenId likes liked medias { originalUrl url previewUrl mimeType sizeRatio fileSize } rank } nextPage { token num size elements } } } `,t.useFindCollectionsQuery=function(e){return s.useQuery(t.FindCollectionsDocument,e)},t.useFindCollectionsLazyQuery=function(e){return s.useLazyQuery(t.FindCollectionsDocument,e)},t.FetchCollectionsByIdsDocument=a.gql` query FetchCollectionsByIds($collectionIds: [String!]!) { fetchCollectionsByIds(collectionIds: $collectionIds) { collectionId blockchain identifier contractAddress tokenId blockHeight blockTimestamp collectionTitle collectionUrl items owners totalVolumes { currency amount } likes liked collectionMarkets { marketId marketName marketDomain marketUrl } creatorsAddresses creatorsProfiles { username userpic } verified originalUrls rank nsfw medias { originalUrl url mimeType sizeRatio fileSize } floorPrices { currency amount } } } `,t.useFetchCollectionsByIdsQuery=function(e){return s.useQuery(t.FetchCollectionsByIdsDocument,e)},t.useFetchCollectionsByIdsLazyQuery=function(e){return s.useLazyQuery(t.FetchCollectionsByIdsDocument,e)},t.FetchCreationsByTypeDocument=a.gql` query FetchCreationsByType($itemType: String!, $page: PageInput) { fetchCreationsByType(itemType: $itemType, page: $page) { nextPage { token num size elements } creations { id itemType itemId blockchain rank liked likes address tokenId name creatorsAddresses originalUrls media mediaPreview mimeType } } } `,t.useFetchCreationsByTypeQuery=function(e){return s.useQuery(t.FetchCreationsByTypeDocument,e)},t.useFetchCreationsByTypeLazyQuery=function(e){return s.useLazyQuery(t.FetchCreationsByTypeDocument,e)},t.FetchDynamicAssetLikesDocument=a.gql` query FetchDynamicAssetLikes($assetId: String!) { fetchDynamicAssetData(assetId: $assetId) { isLikedByUser likesNum } } `,t.useFetchDynamicAssetLikesQuery=function(e){return s.useQuery(t.FetchDynamicAssetLikesDocument,e)},t.useFetchDynamicAssetLikesLazyQuery=function(e){return s.useLazyQuery(t.FetchDynamicAssetLikesDocument,e)},t.FetchDynamicAssetsLikesDocument=a.gql` query FetchDynamicAssetsLikes($assetIds: [String!]!) { fetchDynamicAssetsData(assetIds: $assetIds) { isLikedByUser likesNum assetId } } `,t.useFetchDynamicAssetsLikesQuery=function(e){return s.useQuery(t.FetchDynamicAssetsLikesDocument,e)},t.useFetchDynamicAssetsLikesLazyQuery=function(e){return s.useLazyQuery(t.FetchDynamicAssetsLikesDocument,e)},t.FetchDynamicCollectionDataDocument=a.gql` query FetchDynamicCollectionData($input: DynamicCollectionDataInput!) { fetchDynamicCollectionData(input: $input) { isLikedByUser likesNum collectionId collectionAssetsPage { nextPage { token num size elements } assets { latestPriceCurrency latestPriceAmount collectionId collectionOriginalUrls collectionTitle assetId totalVolumes { currency amount } blockchain address tokenId name description rank markets { marketId marketName marketDomain marketUrl } collectionMedias { originalUrl url previewUrl mimeType sizeRatio fileSize } originalUrls medias { originalUrl url mimeType sizeRatio fileSize previewUrl } ownersAddresses ownersProfiles { userId username about userpic followers followings visible } creatorsAddresses creatorsProfiles { userId username about userpic followers followings visible } attributes { name value } views visible blurred medias { originalUrl url previewUrl mimeType } creatorsProfiles { username } } } } } `,t.useFetchDynamicCollectionDataQuery=function(e){return s.useQuery(t.FetchDynamicCollectionDataDocument,e)},t.useFetchDynamicCollectionDataLazyQuery=function(e){return s.useLazyQuery(t.FetchDynamicCollectionDataDocument,e)},t.FetchDynamicCollectionsDataDocument=a.gql` query FetchDynamicCollectionsData($input: [DynamicCollectionDataInput!]!) { fetchDynamicCollectionsData(inputs: $input) { isLikedByUser likesNum collectionId collectionAssetsPage { nextPage { token num size elements } assets { latestPriceCurrency latestPriceAmount collectionId collectionOriginalUrls collectionTitle assetId totalVolumes { currency amount } blockchain address tokenId name description rank markets { marketId marketName marketDomain marketUrl } collectionMedias { originalUrl url previewUrl mimeType sizeRatio fileSize } originalUrls medias { originalUrl url mimeType sizeRatio fileSize previewUrl } ownersAddresses ownersProfiles { userId username about userpic followers followings visible } creatorsAddresses creatorsProfiles { userId username about userpic followers followings visible } attributes { name value } views visible blurred medias { originalUrl url previewUrl mimeType } creatorsProfiles { username } } } } } `,t.useFetchDynamicCollectionsDataQuery=function(e){return s.useQuery(t.FetchDynamicCollectionsDataDocument,e)},t.useFetchDynamicCollectionsDataLazyQuery=function(e){return s.useLazyQuery(t.FetchDynamicCollectionsDataDocument,e)},t.FindAllTopEntitiesByNameDocument=a.gql` query FindAllTopEntitiesByName($name: String!, $pageSize: Int!) { findAllTopEntitiesByName(name: $name, pageSize: $pageSize) { assets { assetId address tokenId blockchain chainId blockHeight blockTimestamp name description originalUrls medias { originalUrl url previewUrl mimeType sizeRatio fileSize nsfw } ownersAddresses ownersProfiles { userId username about userpic followers followings createdAt deletedAt visible views deleted } creatorsAddresses creatorsProfiles { userId username about userpic followers followings createdAt deletedAt visible views deleted } attributes { name value } likes views visible blurred rank rankRaw rankMax rankUpdatedAt } collections { collectionId blockchain identifier contractAddress tokenId collectionTitle totalVolumes { currency amount } likes liked verified rank floorPrices { currency amount } } profiles { userId username about userpic followers followings createdAt deletedAt visible views deleted referralTypeName referralTypeColor } } } `,t.useFindAllTopEntitiesByNameQuery=function(e){return s.useQuery(t.FindAllTopEntitiesByNameDocument,e)},t.useFindAllTopEntitiesByNameLazyQuery=function(e){return s.useLazyQuery(t.FindAllTopEntitiesByNameDocument,e)},t.FetchUserPortfolioDocument=a.gql` query FetchUserPortfolio($ownerId: String!) { fetchUserPortfolio(ownerId: $ownerId) { currency amount } } `,t.useFetchUserPortfolioQuery=function(e){return s.useQuery(t.FetchUserPortfolioDocument,e)},t.useFetchUserPortfolioLazyQuery=function(e){return s.useLazyQuery(t.FetchUserPortfolioDocument,e)},t.FetchUserReferralsInfoCsvDocument=a.gql` query FetchUserReferralsInfoCsv { fetchUserReferralsInfoCsv } `,t.useFetchUserReferralsInfoCsvQuery=function(e){return s.useQuery(t.FetchUserReferralsInfoCsvDocument,e)},t.useFetchUserReferralsInfoCsvLazyQuery=function(e){return s.useLazyQuery(t.FetchUserReferralsInfoCsvDocument,e)},t.FetchUserReferralsInfoPageDocument=a.gql` query FetchUserReferralsInfoPage($filter: UserReferralsInfoFilterInput!, $sort: UserReferralsInfoSortInput!, $page: PageInput!) { fetchUserReferralsInfoPage(filter: $filter, sort: $sort, page: $page) { userReferralsInfos { userId opportunityName opportunityRefLink opportunityUrl opportunityStatus activeFrom activeUntil referredUsersNum earnedXpPoints opportunityMedia opportunityDescription } nextPage { token num size elements lastNum } } } `,t.useFetchUserReferralsInfoPageQuery=function(e){return s.useQuery(t.FetchUserReferralsInfoPageDocument,e)},t.useFetchUserReferralsInfoPageLazyQuery=function(e){return s.useLazyQuery(t.FetchUserReferralsInfoPageDocument,e)},t.FindCreationsDocument=a.gql` query FindCreations($term: String!, $input: CreationFilterInput!, $page: PageInput) { findCreations(term: $term, input: $input, page: $page) { nextPage { token num size elements } creations { id itemType address tokenId itemId blockchain name creatorsAddresses originalUrls media mediaPreview mimeType rank likes liked } } } `,t.useFindCreationsQuery=function(e){return s.useQuery(t.FindCreationsDocument,e)},t.useFindCreationsLazyQuery=function(e){return s.useLazyQuery(t.FindCreationsDocument,e)},t.FindProfilesByNameDocument=a.gql` query FindProfilesByName($name: String!, $page: PageInput) { findProfilesByName(name: $name, page: $page) { nextPage { token num size elements } profiles { userId username about userpic followers followings visible referralTypeName referralTypeColor } } } `,t.useFindProfilesByNameQuery=function(e){return s.useQuery(t.FindProfilesByNameDocument,e)},t.useFindProfilesByNameLazyQuery=function(e){return s.useLazyQuery(t.FindProfilesByNameDocument,e)},t.FindUserCreationsDocument=a.gql` query FindUserCreations($ownerId: String!, $input: CreationFilterInput!, $page: PageInput) { findUserCreations(ownerId: $ownerId, input: $input, page: $page) { nextPage { token num size elements } creations { id id itemType tokenId address itemId blockchain rank name creatorsAddresses originalUrls media mediaPreview mimeType likes } } } `,t.useFindUserCreationsQuery=function(e){return s.useQuery(t.FindUserCreationsDocument,e)},t.useFindUserCreationsLazyQuery=function(e){return s.useLazyQuery(t.FindUserCreationsDocument,e)}},82642:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useOnPlayerStateUpdatedSubscription=t.OnPlayerStateUpdatedDocument=t.useFetchPlayerStateLazyQuery=t.useFetchPlayerStateQuery=t.FetchPlayerStateDocument=t.useFetchFrensDataLazyQuery=t.useFetchFrensDataQuery=t.FetchFrensDataDocument=t.useStartFarmingMutation=t.StartFarmingDocument=t.useMarkNotificationAsShownMutation=t.MarkNotificationAsShownDocument=t.useMarkNotificationAsReadMutation=t.MarkNotificationAsReadDocument=t.useMarkNotificationAsNewMutation=t.MarkNotificationAsNewDocument=t.useConfirmStreakNotificationHasBeenReadMutation=t.ConfirmStreakNotificationHasBeenReadDocument=t.useClaimFarmingRewardMutation=t.ClaimFarmingRewardDocument=t.IPlayingStreakType=t.IPlayingStreakStatus=t.INotificationStatus=t.IFarmingStatus=void 0;const a=r(84161),s=o(r(84161));var c,u,l,d;!function(e){e.InProgress="IN_PROGRESS",e.ReadyToBeClaimed="READY_TO_BE_CLAIMED",e.Finished="FINISHED"}(c||(t.IFarmingStatus=c={})),function(e){e.New="NEW",e.Shown="SHOWN",e.Read="READ"}(u||(t.INotificationStatus=u={})),function(e){e.InProgress="IN_PROGRESS",e.OnlyClaimed="ONLY_CLAIMED",e.ClaimedAndNotified="CLAIMED_AND_NOTIFIED",e.Canceled="CANCELED"}(l||(t.IPlayingStreakStatus=l={})),function(e){e.A_3Days="A_3_DAYS",e.A_21Days="A_21_DAYS",e.A_90Days="A_90_DAYS"}(d||(t.IPlayingStreakType=d={})),t.ClaimFarmingRewardDocument=a.gql` mutation ClaimFarmingReward { claimFarmingReward } `,t.useClaimFarmingRewardMutation=function(e){return s.useMutation(t.ClaimFarmingRewardDocument,e)},t.ConfirmStreakNotificationHasBeenReadDocument=a.gql` mutation ConfirmStreakNotificationHasBeenRead($streakId: ID!) { confirmStreakNotificationHasBeenRead(streakId: $streakId) } `,t.useConfirmStreakNotificationHasBeenReadMutation=function(e){return s.useMutation(t.ConfirmStreakNotificationHasBeenReadDocument,e)},t.MarkNotificationAsNewDocument=a.gql` mutation MarkNotificationAsNew($notificationId: ID!) { markNotificationAsNew(notificationId: $notificationId) } `,t.useMarkNotificationAsNewMutation=function(e){return s.useMutation(t.MarkNotificationAsNewDocument,e)},t.MarkNotificationAsReadDocument=a.gql` mutation MarkNotificationAsRead($notificationId: ID!) { markNotificationAsRead(notificationId: $notificationId) } `,t.useMarkNotificationAsReadMutation=function(e){return s.useMutation(t.MarkNotificationAsReadDocument,e)},t.MarkNotificationAsShownDocument=a.gql` mutation MarkNotificationAsShown($notificationId: ID!) { markNotificationAsShown(notificationId: $notificationId) } `,t.useMarkNotificationAsShownMutation=function(e){return s.useMutation(t.MarkNotificationAsShownDocument,e)},t.StartFarmingDocument=a.gql` mutation StartFarming { startFarming } `,t.useStartFarmingMutation=function(e){return s.useMutation(t.StartFarmingDocument,e)},t.FetchFrensDataDocument=a.gql` query FetchFrensData { fetchFrensData { nextFriendJoinReward activeInviteCodes { code usedTimes maxUsagesLimit } joinedFriends { userId ludoUsername isAPlayer coins userpic } } } `,t.useFetchFrensDataQuery=function(e){return s.useQuery(t.FetchFrensDataDocument,e)},t.useFetchFrensDataLazyQuery=function(e){return s.useLazyQuery(t.FetchFrensDataDocument,e)},t.FetchPlayerStateDocument=a.gql` query FetchPlayerState { fetchPlayerState { userId coins farmingTask { taskId status startedAt claimDelayMs rewardCoins } playingStreaks { streakId status type startedAt reward endedAt totalDays } notifications { notificationId status text createdAt } } } `,t.useFetchPlayerStateQuery=function(e){return s.useQuery(t.FetchPlayerStateDocument,e)},t.useFetchPlayerStateLazyQuery=function(e){return s.useLazyQuery(t.FetchPlayerStateDocument,e)},t.OnPlayerStateUpdatedDocument=a.gql` subscription OnPlayerStateUpdated($authToken: String!) { onPlayerStateUpdated(authToken: $authToken) { userId coins farmingTask { taskId status startedAt claimDelayMs rewardCoins } playingStreaks { streakId status type startedAt reward endedAt totalDays } notifications { notificationId status text createdAt } } } `,t.useOnPlayerStateUpdatedSubscription=function(e){return s.useSubscription(t.OnPlayerStateUpdatedDocument,e)}},46821:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nftMinterTonHost=t.watermarksHost=t.telegramHost=t.mintInfoHost=t.tapHostSubscriptions=t.tapHost=t.formsHost=t.serverExperiencesHost=t.experiencesHost=t.extensionHost=t.opportunitiesHost=t.notificationsHost=t.notificationsSubscriptionHost=t.experiencesSubscriptionHost=t.eventsHost=t.serverPreferencesHost=t.searchHostSSR=t.preferencesHostSSR=t.preferencesHost=t.serverSearchHost=t.serverShowCaseHost=t.searchHost=t.serverImagesHost=t.mediasHost=t.serverGalleriesHost=t.galleriesHost=t.serverIdentityHost=t.serverCollectionsHost=t.serverAssetsHost=t.adminHost=t.collectionsHost=t.assetsHost=t.identityHost=t.authHost=void 0,t.authHost="https://auth.ludo.ninja:8080/graphql",t.identityHost="https://identities.ludo.ninja:8090/graphql",t.assetsHost="https://assets.ludo.ninja:8090/graphql",t.collectionsHost="https://collections.ludo.ninja:8090/graphql",t.adminHost="https://admin.ludo.ninja:8090/graphql",t.serverAssetsHost="http://server-assets.istio.svc.k8s.local:8090/graphql",t.serverCollectionsHost="http://server-collections.istio.svc.k8s.local:8090/graphql",t.serverIdentityHost="http://server-identities.istio.svc.k8s.local:8090/graphql",t.galleriesHost="https://galleries.ludo.ninja:8090/graphql",t.serverGalleriesHost="http://server-galleries.istio.svc.k8s.local:8090/graphql",t.mediasHost="https://medias.ludo.ninja:8090/graphql",t.serverImagesHost="http://server-images.istio.svc.k8s.local:8090/graphql",t.searchHost="https://search.ludo.ninja:8090/graphql",t.serverShowCaseHost="http://server-showcase.istio.svc.k8s.local:8090/graphql",t.serverSearchHost="http://server-search.istio.svc.k8s.local:8090/graphql",t.preferencesHost="https://preferences.ludo.ninja:8090/graphql",t.preferencesHostSSR="https://ssr-preferences.ludo.ninja:8091/graphql",t.searchHostSSR="https://ssr-search.ludo.ninja:8091/graphql",t.serverPreferencesHost="http://server-preferences.istio.svc.k8s.local:8090/graphql",t.eventsHost="wss://events.ludo.ninja:8090/subscriptions",t.experiencesSubscriptionHost="wss://experiences.ludo.ninja:8090/subscriptions",t.notificationsSubscriptionHost="wss://notifications.ludo.ninja:8090/subscriptions",t.notificationsHost="https://notifications.ludo.ninja:8090/graphql",t.opportunitiesHost="https://opportunities.ludo.ninja:8090/graphql",t.extensionHost="https://chrome.ludo.ninja:8092/graphql",t.experiencesHost="https://experiences.ludo.ninja:8090/graphql",t.serverExperiencesHost="http://server-experiences.istio.svc.k8s.local:8090/graphql",t.formsHost="https://forms.ludo.ninja:8090/graphql",t.tapHost="https://tap.ludo.ninja:8090/graphql",t.tapHostSubscriptions="wss://tap.ludo.ninja:8090/subscriptions",t.mintInfoHost="https://mint-info.ludo.ninja:8090/graphql",t.telegramHost="https://telegram.ludo.ninja:8060",t.watermarksHost="https://watermarks.ludo.ninja:8090/watermark",t.nftMinterTonHost="https://nftminterton.ludo.ninja:8011"},72001:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.mintInfoSchema=t.notificationsSchema=t.tapsSchema=t.formsSchema=t.searchSchema=t.preferencesSchema=t.opportunitiesSchema=t.mediasSchema=t.identitySchema=t.galleriesSchema=t.extensionSchema=t.experiencesSchema=t.collectionsSchema=t.authSchema=t.assetSchema=t.adminSchema=t.authCookies=t.graphqlConfig=t.schema=t.hosts=void 0;const a=o(r(46821));t.hosts=a;const s=o(r(1340));t.graphqlConfig=s;const c=o(r(53553));t.authCookies=c;const u=o(r(65780));t.adminSchema=u;const l=o(r(72846));t.assetSchema=l;const d=o(r(25199));t.authSchema=d;const f=o(r(2154));t.collectionsSchema=f;const h=o(r(76970));t.experiencesSchema=h;const p=o(r(72370));t.extensionSchema=p;const g=o(r(40319));t.galleriesSchema=g;const m=o(r(6199));t.identitySchema=m;const y=o(r(80098));t.mediasSchema=y;const v=o(r(36745));t.mintInfoSchema=v;const b=o(r(6050));t.opportunitiesSchema=b;const w=o(r(93183));t.preferencesSchema=w;const A=o(r(47965));t.searchSchema=A;const _=o(r(56576));t.formsSchema=_;const E=o(r(82642));t.tapsSchema=E;const S=o(r(98137));t.notificationsSchema=S;const k={...u,...l,...d,...f,...h,...p,...g,...m,...y,...b,...w,...A,..._,...E,...S,...v};t.schema=k},93540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blockChainData=void 0;const n=r(43492);t.blockChainData={[n.BlockChainKeys.no_blockchain]:{blockchainPublicLabel:"No Blockchain",blockchainPrivateLabel:n.BlockChainKeys.no_blockchain,blockchainIconRegular:`${n.BlockChainKeys.no_blockchain}.svg`},[n.BlockChainKeys.ethereum]:{blockchainPublicLabel:"Ethereum",blockchainPrivateLabel:n.BlockChainKeys.ethereum,blockchainIconRegular:`${n.BlockChainKeys.ethereum}.svg`},[n.BlockChainKeys.elrond]:{blockchainPublicLabel:"MultiversX",blockchainPrivateLabel:n.BlockChainKeys.elrond,blockchainIconRegular:`${n.BlockChainKeys.elrond}.svg`},[n.BlockChainKeys.optimism]:{blockchainPublicLabel:"Optimism",blockchainPrivateLabel:n.BlockChainKeys.optimism,blockchainIconRegular:`${n.BlockChainKeys.optimism}.svg`},[n.BlockChainKeys.polygon]:{blockchainPublicLabel:"Polygon",blockchainPrivateLabel:n.BlockChainKeys.polygon,blockchainIconRegular:`${n.BlockChainKeys.polygon}.svg`},[n.BlockChainKeys.polygonzkevm]:{blockchainPublicLabel:"Polygon zkEVM",blockchainPrivateLabel:n.BlockChainKeys.polygonzkevm,blockchainIconRegular:`${n.BlockChainKeys.polygonzkevm}.svg`},[n.BlockChainKeys.avalanche]:{blockchainPublicLabel:"Avalanche",blockchainPrivateLabel:n.BlockChainKeys.avalanche,blockchainIconRegular:`${n.BlockChainKeys.avalanche}.svg`},[n.BlockChainKeys.solana]:{blockchainPublicLabel:"Solana",blockchainPrivateLabel:n.BlockChainKeys.solana,blockchainIconRegular:`${n.BlockChainKeys.solana}.svg`},[n.BlockChainKeys.tezos]:{blockchainPublicLabel:"Tezos",blockchainPrivateLabel:n.BlockChainKeys.tezos,blockchainIconRegular:`${n.BlockChainKeys.tezos}.svg`},[n.BlockChainKeys.flow]:{blockchainPublicLabel:"Flow",blockchainPrivateLabel:n.BlockChainKeys.flow,blockchainIconRegular:`${n.BlockChainKeys.flow}.svg`},[n.BlockChainKeys.binance]:{blockchainPublicLabel:"Binance",blockchainPrivateLabel:n.BlockChainKeys.binance,blockchainIconRegular:`${n.BlockChainKeys.binance}.svg`},[n.BlockChainKeys.arbitrum]:{blockchainPublicLabel:"Arbitrum",blockchainPrivateLabel:n.BlockChainKeys.arbitrum,blockchainIconRegular:`${n.BlockChainKeys.arbitrum}.svg`},[n.BlockChainKeys.arbitrum_nova]:{blockchainPublicLabel:"Arbitrum nova",blockchainPrivateLabel:n.BlockChainKeys.arbitrum_nova,blockchainIconRegular:`${n.BlockChainKeys.arbitrum_nova}.svg`},[n.BlockChainKeys.cronos]:{blockchainPublicLabel:"Cronos",blockchainPrivateLabel:n.BlockChainKeys.cronos,blockchainIconRegular:`${n.BlockChainKeys.cronos}.svg`},[n.BlockChainKeys.near]:{blockchainPublicLabel:"Near",blockchainPrivateLabel:n.BlockChainKeys.near,blockchainIconRegular:`${n.BlockChainKeys.near}.svg`},[n.BlockChainKeys.wax]:{blockchainPublicLabel:"Wax",blockchainPrivateLabel:n.BlockChainKeys.wax,blockchainIconRegular:`${n.BlockChainKeys.wax}.svg`},[n.BlockChainKeys.klaytn]:{blockchainPublicLabel:"Klaytn",blockchainPrivateLabel:n.BlockChainKeys.klaytn,blockchainIconRegular:`${n.BlockChainKeys.klaytn}.svg`},[n.BlockChainKeys.moonbeam]:{blockchainPublicLabel:"Moonbeam",blockchainPrivateLabel:n.BlockChainKeys.moonbeam,blockchainIconRegular:`${n.BlockChainKeys.moonbeam}.svg`},[n.BlockChainKeys.skale]:{blockchainPublicLabel:"Skale",blockchainPrivateLabel:n.BlockChainKeys.skale,blockchainIconRegular:`${n.BlockChainKeys.skale}.svg`},[n.BlockChainKeys.immutablex]:{blockchainPublicLabel:"Immutablex",blockchainPrivateLabel:n.BlockChainKeys.immutablex,blockchainIconRegular:`${n.BlockChainKeys.immutablex}.svg`},[n.BlockChainKeys.base]:{blockchainPublicLabel:"Base",blockchainPrivateLabel:n.BlockChainKeys.base,blockchainIconRegular:`${n.BlockChainKeys.base}.svg`},[n.BlockChainKeys.ton]:{blockchainPublicLabel:"TON",blockchainPrivateLabel:n.BlockChainKeys.ton,blockchainIconRegular:`${n.BlockChainKeys.ton}.svg`}}},95126:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockChainKeys=t.BlockChainEntity=void 0;const n=r(93540),i=r(43492);Object.defineProperty(t,"BlockChainKeys",{enumerable:!0,get:function(){return i.BlockChainKeys}});t.BlockChainEntity=class{constructor(e){this.blockchain=Object.prototype.hasOwnProperty.call(n.blockChainData,e)?n.blockChainData[e]:n.blockChainData[i.BlockChainKeys.no_blockchain]}getBlockChainPublicLabel(){return this.blockchain.blockchainPublicLabel}getBlockChainPrivateLabel(){return this.blockchain.blockchainPrivateLabel}getBlockChainIconRegular(e){let{domain:t}=e;return`${t}/blockchains/regular/${this.blockchain.blockchainIconRegular}`}}},43492:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.BlockChainKeys=void 0,function(e){e.no_blockchain="no-blockchain",e.ethereum="ethereum",e.elrond="elrond",e.optimism="optimism",e.polygon="polygon",e.avalanche="avalanche",e.solana="solana",e.tezos="tezos",e.flow="flow",e.binance="binance",e.arbitrum="arbitrum",e.arbitrum_nova="arbitrum-nova",e.cronos="cronos",e.near="near",e.wax="wax",e.klaytn="klaytn",e.moonbeam="moonbeam",e.skale="skale",e.immutablex="immutablex",e.base="base",e.polygonzkevm="polygonzkevm",e.ton="ton"}(r||(t.BlockChainKeys=r={}))},65428:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVideoDomain=t.getAudioDomain=t.getMediaDomain=t.staticLink=t.getStaticDomain=void 0;t.getStaticDomain=e=>{let{ENV:t}=e;return`https://static.${t}`},t.staticLink="https://static.ludo.com";t.getMediaDomain=e=>{let{ENV:t}=e;return`https://media.${t}`};t.getAudioDomain=e=>{let{ENV:t}=e;return`https://sound.${t}`};t.getVideoDomain=e=>{let{ENV:t}=e;return`https://video.${t}`}},1658:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.basicTabs=t.adminTabs=t.getVideoDomain=t.getAudioDomain=t.getMediaDomain=t.getStaticDomain=t.ProfileEntity=t.isScreenshot=t.isObject=t.isAudio=t.isImage=t.isVideo=t.MarketPlaceKeys=t.MarketPlaceEntity=t.BlockChainEntity=t.BlockChainKeys=void 0;const o=r(16205);Object.defineProperty(t,"isVideo",{enumerable:!0,get:function(){return o.isVideo}}),Object.defineProperty(t,"isImage",{enumerable:!0,get:function(){return o.isImage}}),Object.defineProperty(t,"isAudio",{enumerable:!0,get:function(){return o.isAudio}}),Object.defineProperty(t,"isObject",{enumerable:!0,get:function(){return o.isObject}}),Object.defineProperty(t,"isScreenshot",{enumerable:!0,get:function(){return o.isScreenshot}});const a=r(95126);Object.defineProperty(t,"BlockChainKeys",{enumerable:!0,get:function(){return a.BlockChainKeys}}),Object.defineProperty(t,"BlockChainEntity",{enumerable:!0,get:function(){return a.BlockChainEntity}});const s=r(68083);Object.defineProperty(t,"MarketPlaceEntity",{enumerable:!0,get:function(){return s.MarketPlaceEntity}}),Object.defineProperty(t,"MarketPlaceKeys",{enumerable:!0,get:function(){return s.MarketPlaceKeys}});const c=r(64868);Object.defineProperty(t,"adminTabs",{enumerable:!0,get:function(){return c.adminTabs}}),Object.defineProperty(t,"basicTabs",{enumerable:!0,get:function(){return c.basicTabs}});const u=r(43356);Object.defineProperty(t,"ProfileEntity",{enumerable:!0,get:function(){return u.ProfileEntity}});const l=r(65428);Object.defineProperty(t,"getStaticDomain",{enumerable:!0,get:function(){return l.getStaticDomain}}),Object.defineProperty(t,"getMediaDomain",{enumerable:!0,get:function(){return l.getMediaDomain}}),Object.defineProperty(t,"getAudioDomain",{enumerable:!0,get:function(){return l.getAudioDomain}}),Object.defineProperty(t,"getVideoDomain",{enumerable:!0,get:function(){return l.getVideoDomain}}),i(r(5424),t)},92982:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ludoDomains=void 0,t.ludoDomains={development:{app:"http://localhost:3000",profile:"http://localhost:3333",search:"http://localhost:3010",asset:"http://localhost:3334",welcome:"http://localhost:3002",auth:"http://localhost:3001",admin:"http://localhost:3004",telegramTap:"http://localhost:5555",collections:"http://localhost:3011",account:"http://localhost:3006",mint:"http://localhost:3007"},stage:{app:"https://app.ludo.ninja",profile:"https://profile.ludo.ninja",search:"https://search.ludo.ninja",asset:"https://assets.ludo.ninja",welcome:"https://ludo.ninja",auth:"https://auth.ludo.ninja",admin:"https://admin.ludo.ninja",telegramTap:"https://tap.ludo.ninja",collections:"https://collections.ludo.ninja",account:"https://account.ludo.ninja",mint:"https://mint.ludo.ninja"},prod:{app:"https://app.ludo.com",profile:"https://profile.ludo.com",search:"https://search.ludo.com",asset:"https://assets.ludo.com",welcome:"https://ludo.com",auth:"https://auth.ludo.com",admin:"https://admin.ludo.ninja",telegramTap:"https://tap.ludo.com",collections:"https://collections.ludo.com",account:"https://account.ludo.com",mint:"https://mint.ludo.com"}}},95735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.marketPlaceData=void 0;const n=r(67463);t.marketPlaceData={[n.MarketPlaceKeys.no_marketPlace]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.no_marketPlace}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.no_marketPlace}.svg`},[n.MarketPlaceKeys.solsea]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.solsea}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.solsea}.svg`},[n.MarketPlaceKeys.magiceden]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.magiceden}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.magiceden}.svg`},[n.MarketPlaceKeys.rarible]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.rarible}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.rarible}.svg`},[n.MarketPlaceKeys.opensea]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.opensea}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.opensea}.svg`},[n.MarketPlaceKeys.blur]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.blur}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.blur}.svg`},[n.MarketPlaceKeys.pro_opensea]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.pro_opensea}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.pro_opensea}.svg`},[n.MarketPlaceKeys.looksrare]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.looksrare}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.looksrare}.svg`},[n.MarketPlaceKeys.x2y2]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.x2y2}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.x2y2}.svg`},[n.MarketPlaceKeys.sudoswap]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.sudoswap}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.sudoswap}.svg`},[n.MarketPlaceKeys.nftrade]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.nftrade}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.nftrade}.svg`},[n.MarketPlaceKeys.ghost]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.ghost}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.ghost}.svg`},[n.MarketPlaceKeys.deadrare]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.deadrare}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.deadrare}.svg`},[n.MarketPlaceKeys.okx]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.okx}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.okx}.svg`},[n.MarketPlaceKeys.scvfinance]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.scvfinance}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.scvfinance}.svg`},[n.MarketPlaceKeys.teia]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.teia}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.teia}.svg`},[n.MarketPlaceKeys.decentraland]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.decentraland}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.decentraland}.svg`},[n.MarketPlaceKeys.async]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.async}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.async}.svg`},[n.MarketPlaceKeys.xoxno]:{marketPlaceIconRegular:`${n.MarketPlaceKeys.xoxno}.svg`,marketPlaceIconHover:`${n.MarketPlaceKeys.xoxno}.svg`}}},68083:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarketPlaceKeys=t.MarketPlaceEntity=void 0;const n=r(67463);Object.defineProperty(t,"MarketPlaceKeys",{enumerable:!0,get:function(){return n.MarketPlaceKeys}});const i=r(95735);t.MarketPlaceEntity=class{constructor(e){let{marketId:t,marketName:r,marketUrl:o}=e;const a=Object.prototype.hasOwnProperty.call(i.marketPlaceData,r);this.marketPlaceId=t||"No Marketplace"+Math.random(),this.marketPlaceName=r||"No Marketplace",this.marketPlaceUrl=o||null,this.marketPlaceIconRegular=a?i.marketPlaceData[r].marketPlaceIconRegular:i.marketPlaceData[n.MarketPlaceKeys.no_marketPlace].marketPlaceIconRegular,this.marketPlaceIconHover=a?i.marketPlaceData[r].marketPlaceIconHover:i.marketPlaceData[n.MarketPlaceKeys.no_marketPlace].marketPlaceIconHover}getMarketPlaceId(){return this.marketPlaceId}getMarketPlaceName(){return this.marketPlaceName}getMarketPlaceUrl(){return this.marketPlaceUrl?this.marketPlaceUrl:null}getMarketPlaceIconRegular(e){let{domain:t}=e;return`${t}/marketplaces/regular/${this.marketPlaceIconRegular}`}getMarketPlaceIconHover(e){let{domain:t}=e;return`${t}/marketplaces/hover/${this.marketPlaceIconHover}`}}},67463:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MarketPlaceKeys=void 0,function(e){e.no_marketPlace="no_marketplace",e.solsea="solsea",e.magiceden="magiceden",e.rarible="rarible",e.opensea="opensea",e.pro_opensea="pro.opensea",e.blur="blur",e.looksrare="looksrare",e.x2y2="x2y2",e.sudoswap="sudoswap",e.nftrade="nftrade",e.ghost="ghost",e.deadrare="deadrare",e.okx="okx",e.scvfinance="scvfinance",e.teia="teia",e.decentraland="decentraland",e.async="async",e.xoxno="xoxno"}(r||(t.MarketPlaceKeys=r={}))},11448:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.AUDIO="audio"}(r||(r={})),function(e){e.MP3="mp3",e.FLAC="flac",e.WAV="waw",e.AAC="aac"}(n||(n={}));t.default=e=>{let{media:t,mimeType:i,originalMimeType:o}=e;if(o)return!1;{const e=t&&(t.endsWith(n.MP3)||t.endsWith(n.WAV)||t.endsWith(n.AAC)||t.endsWith(n.FLAC));return i&&(null===i||void 0===i?void 0:i.startsWith(r.AUDIO))||e||!1}}},86439:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.IMAGE="image"}(r||(r={})),function(e){e.PNG="png",e.JPG="jpg",e.JPEG="jpeg",e.SVG="svg",e.SVG_XML="svg+xml",e.GIF="gif",e.WEB_P="webp",e.BASE_64="base64"}(n||(n={}));t.default=e=>{let{media:t,mimeType:i,originalMimeType:o}=e;if(o)return!1;{const e=t&&(t.endsWith(n.PNG)||t.endsWith(n.JPG)||t.endsWith(n.JPEG)||t.endsWith(n.SVG_XML)||t.endsWith(n.SVG)||t.endsWith(n.WEB_P)||t.endsWith(n.GIF)||(null===t||void 0===t?void 0:t.includes(n.BASE_64)));return i&&(null===i||void 0===i?void 0:i.startsWith(r.IMAGE))||e||!1}}},16205:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isScreenshot=t.isObject=t.isAudio=t.isImage=t.isVideo=void 0;const i=n(r(58685));t.isVideo=i.default;const o=n(r(86439));t.isImage=o.default;const a=n(r(11448));t.isAudio=a.default;const s=n(r(99469));t.isObject=s.default;const c=n(r(32630));t.isScreenshot=c.default},99469:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.OBJECT="object"}(r||(r={})),function(e){e.OBJ="obj",e.GLB="glb"}(n||(n={}));t.default=e=>{let{media:t,mimeType:i,originalMimeType:o}=e;if(o)return!1;{const e=t&&t.endsWith(n.OBJ||n.GLB);return i&&(null===i||void 0===i?void 0:i.startsWith(r.OBJECT))||e||!1}}},32630:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.SGML="sgml",e.HTML="html",e.JSON="json"}(r||(r={}));t.default=e=>{let{media:t,mimeType:n,originalMimeType:i}=e;if(i){return i.endsWith(r.SGML)||i.endsWith(r.HTML)||i.endsWith(r.JSON)||!1}return!1}},58685:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=e=>{let{media:t,mimeType:r,originalMimeType:n}=e;if(n)return!1;{const e=t&&(t.endsWith("mov")||t.endsWith("mp4")||t.endsWith("webm"));return r&&(null===r||void 0===r?void 0:r.startsWith("video"))||e||!1}}},43356:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileEntity=void 0;t.ProfileEntity=class{constructor(e){this.profile={userId:(null===e||void 0===e?void 0:e.userId)||"",social:(null===e||void 0===e?void 0:e.social)||{facebook:"",twitter:"",instagram:"",website:"",discordServer:"",discordNickname:""},name:(null===e||void 0===e?void 0:e.username)||null,showNsfw:(null===e||void 0===e?void 0:e.showNsfw)||!1,wallets:(null===e||void 0===e?void 0:e.wallets)||[],followers:(null===e||void 0===e?void 0:e.followers)||0,rank:(null===e||void 0===e?void 0:e.rank)||0,about:(null===e||void 0===e?void 0:e.about)||null,userPic:(null===e||void 0===e?void 0:e.userpic)||null,isFollowing:(null===e||void 0===e?void 0:e.following)||!1,followings:(null===e||void 0===e?void 0:e.followings)||0,deleted:(null===e||void 0===e?void 0:e.deleted)||!1,active:(null===e||void 0===e?void 0:e.active)||!1,referralTypeName:(null===e||void 0===e?void 0:e.referralTypeName)||null,referralTypeColor:(null===e||void 0===e?void 0:e.referralTypeColor)||null}}getUserId(){return this.profile.userId?this.profile.userId:Math.random().toString()}getFollowings(){return this.profile.followings}getWallets(){return this.profile.wallets}getSocial(){return this.profile.social}getUserRank(){return Math.round(this.profile.rank)}getFollowers(){return this.profile.followers}getAbout(){return this.profile.about}getName(){return this.profile.name}getShowNsfw(){return this.profile.showNsfw}getUserPic(e){let{mediaDomain:t}=e;var r;return this.profile.userPic?`${t}/userpics/${null===(r=this.profile)||void 0===r?void 0:r.userPic}`:`${t}/userpics/1.svg`}getIsFollowing(){return this.profile.isFollowing}getDeleted(){return this.profile.deleted}getActive(){return this.profile.active}getReferralTypeName(){return this.profile.referralTypeName}getReferralTypeColor(){return this.profile.referralTypeColor}}},81324:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(95126),i=r(65428),o=[{label:new n.BlockChainEntity(n.BlockChainKeys.ethereum).getBlockChainPublicLabel(),privateLabel:new n.BlockChainEntity(n.BlockChainKeys.ethereum).getBlockChainPrivateLabel(),icon:new n.BlockChainEntity(n.BlockChainKeys.ethereum).getBlockChainIconRegular({domain:`${(0,i.getStaticDomain)({ENV:"ludo.com"})}`})},{label:new n.BlockChainEntity(n.BlockChainKeys.avalanche).getBlockChainPublicLabel(),privateLabel:new n.BlockChainEntity(n.BlockChainKeys.avalanche).getBlockChainPrivateLabel(),icon:new n.BlockChainEntity(n.BlockChainKeys.avalanche).getBlockChainIconRegular({domain:`${(0,i.getStaticDomain)({ENV:"ludo.com"})}`})},{label:new n.BlockChainEntity(n.BlockChainKeys.polygon).getBlockChainPublicLabel(),privateLabel:new n.BlockChainEntity(n.BlockChainKeys.polygon).getBlockChainPrivateLabel(),icon:new n.BlockChainEntity(n.BlockChainKeys.polygon).getBlockChainIconRegular({domain:`${(0,i.getStaticDomain)({ENV:"ludo.com"})}`})},{label:new n.BlockChainEntity(n.BlockChainKeys.binance).getBlockChainPublicLabel(),privateLabel:new n.BlockChainEntity(n.BlockChainKeys.binance).getBlockChainPrivateLabel(),icon:new n.BlockChainEntity(n.BlockChainKeys.binance).getBlockChainIconRegular({domain:`${(0,i.getStaticDomain)({ENV:"ludo.com"})}`})}];t.default=o},58025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(95126),i=r(65428),o=[{label:"EVM",privateLabel:new n.BlockChainEntity(n.BlockChainKeys.ethereum).getBlockChainPrivateLabel(),icon:new n.BlockChainEntity(n.BlockChainKeys.ethereum).getBlockChainIconRegular({domain:`${(0,i.getStaticDomain)({ENV:"ludo.com"})}`})},{label:new n.BlockChainEntity(n.BlockChainKeys.elrond).getBlockChainPublicLabel(),privateLabel:new n.BlockChainEntity(n.BlockChainKeys.elrond).getBlockChainPrivateLabel(),icon:new n.BlockChainEntity(n.BlockChainKeys.elrond).getBlockChainIconRegular({domain:`${(0,i.getStaticDomain)({ENV:"ludo.com"})}`})},{label:new n.BlockChainEntity(n.BlockChainKeys.ton).getBlockChainPublicLabel(),privateLabel:new n.BlockChainEntity(n.BlockChainKeys.ton).getBlockChainPrivateLabel(),icon:new n.BlockChainEntity(n.BlockChainKeys.ton).getBlockChainIconRegular({domain:`${(0,i.getStaticDomain)({ENV:"ludo.com"})}`})},{label:"Web2 Login",privateLabel:"web2_Login",icon:"/mail.svg"},{label:new n.BlockChainEntity(n.BlockChainKeys.solana).getBlockChainPublicLabel(),privateLabel:new n.BlockChainEntity(n.BlockChainKeys.solana).getBlockChainPrivateLabel(),icon:new n.BlockChainEntity(n.BlockChainKeys.solana).getBlockChainIconRegular({domain:`${(0,i.getStaticDomain)({ENV:"ludo.com"})}`})},{label:new n.BlockChainEntity(n.BlockChainKeys.flow).getBlockChainPublicLabel(),privateLabel:new n.BlockChainEntity(n.BlockChainKeys.flow).getBlockChainPrivateLabel(),icon:new n.BlockChainEntity(n.BlockChainKeys.flow).getBlockChainIconRegular({domain:`${(0,i.getStaticDomain)({ENV:"ludo.com"})}`})},{label:new n.BlockChainEntity(n.BlockChainKeys.binance).getBlockChainPublicLabel(),privateLabel:new n.BlockChainEntity(n.BlockChainKeys.binance).getBlockChainPrivateLabel(),icon:new n.BlockChainEntity(n.BlockChainKeys.binance).getBlockChainIconRegular({domain:`${(0,i.getStaticDomain)({ENV:"ludo.com"})}`})},{label:new n.BlockChainEntity(n.BlockChainKeys.tezos).getBlockChainPublicLabel(),privateLabel:new n.BlockChainEntity(n.BlockChainKeys.tezos).getBlockChainPrivateLabel(),icon:new n.BlockChainEntity(n.BlockChainKeys.tezos).getBlockChainIconRegular({domain:`${(0,i.getStaticDomain)({ENV:"ludo.com"})}`})}];t.default=o},64868:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.adminTabs=t.basicTabs=void 0;const i=n(r(58025));t.basicTabs=i.default;const o=n(r(81324));t.adminTabs=o.default},5424:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(52860),t),i(r(14622),t)},14622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},52860:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hello=void 0;t.hello=()=>null},70558:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(44414),o=n(r(19335)),a=r(16011),s=r(72137),c=o.default.div` height: 15px; color: ${a.WhiteColor}; background-color: ${a.ProgressColorMinimum}; position: fixed; top: 0; width: 100%; z-index: 10000; user-select: none; display: flex; align-items: center; justify-content: center; `;t.default=e=>{let{isNeedToShow:t}=e;return t?(0,i.jsx)(c,{children:(0,i.jsx)(s.H3,{children:`Env - ${t.toUpperCase()}`})}):null}},46496:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeEnum=void 0,function(e){e.light="light",e.dark="dark"}(r||(t.ThemeEnum=r={}))},59758:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.poppinsFontVarCss=t.dmsansFontVarCss=void 0,t.dmsansFontVarCss={variable:"--DMSansFont",css:"var(--DMSansFont)"},t.poppinsFontVarCss={variable:"--PoppinsFont",css:"var(--PoppinsFont)"}},56646:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.mediaQuery=t.ScreenWidth=void 0,function(e){e[e.MOBILE=767]="MOBILE",e[e.PHONE=360]="PHONE",e[e.BIG_PHONE=500]="BIG_PHONE",e[e.TABLET=768]="TABLET",e[e.DESKTOP=1200]="DESKTOP",e[e.MAX_WIDTH_TABLET=1199]="MAX_WIDTH_TABLET",e[e.FOUR_K_MIN=2032]="FOUR_K_MIN",e[e.FOUR_K_MAX=4064]="FOUR_K_MAX"}(r||(t.ScreenWidth=r={})),t.mediaQuery={mobile:`@media (max-width: ${r.MOBILE}px)`,tablets:`@media (min-width: ${r.TABLET}px) and (max-width: ${r.DESKTOP}px)`,phone:`@media (max-width: ${r.PHONE}px)`,bigPhone:`@media (max-width: ${r.BIG_PHONE}px)`,tablet:`@media (max-width: ${r.TABLET}px)`,desktop:`@media (max-width: ${r.DESKTOP}px)`,maxWidthTablet:`@media (max-width: ${r.MAX_WIDTH_TABLET}px)`,minWidthTablet:`@media (min-width: ${r.TABLET}px)`,minWidthDesktop:`@media (min-width: ${r.DESKTOP}px)`,minWidthFourK:`@media (min-width: ${r.FOUR_K_MIN}px)`}},16011:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CategoryHoverBg=t.InviteGradientLabelDark=t.InviteGradientLabelLight=t.ExperienceGradientLabelDark=t.ExperienceGradientLabelLight=t.SearchInputBg=t.HeaderBackgroundDark=t.ExpTaskProgressFill=t.ExpUserProgressFill=t.ExpProgressBlankDark=t.TableExperienceColorDark=t.ErrorColor=t.DisabledDangerColor=t.GrayBackgroundColor=t.DisabledLightGrayColor=t.BlueShadowColor=t.DisabledGrayColor=t.DarkBlueColor=t.DangerColorDark=t.DangerColorLight=t.ProgressColorMinimum=t.ProgressColorMedium=t.ProgressColor=t.WhiteColor=t.BackgroundColorDark=t.BackgroundColorLight=t.InactiveButtonColor=t.BorderColorDark=t.BorderColorLight=t.TextDarkGrayColor=t.TextGray2Color=t.TextGrayColor=t.BlackColor=t.AccentColor=void 0;t.BlueShadowColor="#3D48FF";t.AccentColor="#6048ff";t.DarkBlueColor="#4248B2";t.BlackColor="#12183a";t.TextGrayColor="#696f90";t.TextGray2Color="#474B5D";t.GrayBackgroundColor="#696F91";t.TextDarkGrayColor="#b0b2c0";t.BorderColorLight="#cfd5ea";t.BorderColorDark="#5d5d5f5ea";t.DisabledGrayColor="#C1C8DE";t.DisabledLightGrayColor="#ECF0FC";t.InactiveButtonColor="#eaedfc";t.BackgroundColorLight="#f3f4f9";t.BackgroundColorDark="#000";t.WhiteColor="#ffffff";t.ProgressColor="#5FD068";t.ProgressColorMedium="#F3C244";t.ProgressColorMinimum="#F4326D";t.DangerColorLight="#F94C66";t.DangerColorDark="#AB0B3B";t.DisabledDangerColor="#FA8FAF";t.ErrorColor="#F94C66";t.TableExperienceColorDark="#15161E";t.ExpProgressBlankDark="#3C3D51";t.ExpUserProgressFill="#EB49FF";t.ExpTaskProgressFill="#00F470";t.HeaderBackgroundDark="#15161EE5";t.SearchInputBg="#f9fafc";t.CategoryHoverBg="#C8D1FF";t.ExperienceGradientLabelLight="linear-gradient(96deg, rgba(255, 209, 242, 0.70) 6.02%, rgba(172, 184, 247, 0.70) 53.01%, rgba(189, 235, 255, 0.70) 100%)";t.ExperienceGradientLabelDark="linear-gradient(96deg, #A707B5 6.02%, #0D31ED 53.01%, #0091E2 100%)";t.InviteGradientLabelLight="linear-gradient(89deg, rgba(190, 249, 209, 0.60) 6.88%, rgba(98, 218, 255, 0.60) 53.34%, rgba(171, 228, 251, 0.60) 93.43%)";t.InviteGradientLabelDark="linear-gradient(98deg, #00F946 -12.85%, #0C32ED 48.95%, #00A1FA 108.07%)"},86512:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(19335);t.default=()=>n.css` transition: box-shadow 0.25s ease-in-out 0s, transform 0.25s ease 0s; box-shadow: none; &:hover { box-shadow: 0 10px 32px -16px rgba(33, 21, 95, 0.15); transition: box-shadow 0.25s ease-in-out 0s, transform 0.25s ease 0s; } `},22702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zIndexApplyResetBtns=t.zIndexPageLoader=t.zIndexHeaderSearch=t.zIndexAlert=t.zIndexHeaderSearchFocused=t.zIndexSidebar=t.zIndexToTopBtn=t.zIndexOverlay=t.zIndexModal=t.zIndexSearch=void 0,t.zIndexSearch=996,t.zIndexModal=996,t.zIndexOverlay=995,t.zIndexToTopBtn=993,t.zIndexSidebar=996,t.zIndexHeaderSearchFocused=996,t.zIndexAlert=999,t.zIndexHeaderSearch=994,t.zIndexPageLoader=996,t.zIndexApplyResetBtns=996},99013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloseIcon=void 0;const n=r(44414);t.CloseIcon=e=>{let{className:t}=e;return(0,n.jsx)("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("g",{opacity:"0.8",children:(0,n.jsx)("path",{d:"M5.42295 5.34294L10.6673 10.5875M10.6673 5.33341L5.33398 10.6667",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}},19558:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.alertVariantsData=t.alertWarning=t.alertCopied=t.alertSaved=t.alertSuccess=t.alertError=void 0;const n=r(44414),i=r(87754),o=r(34206);t.alertError={type:o.alertVariants.error,caption:o.alertCaptions.error,text:o.alertDefaultText.error,background:o.alertBgColors.error,icon:(0,n.jsx)(i.ErrorIcon,{className:"alertBoxIcon"})},t.alertSuccess={type:o.alertVariants.success,caption:o.alertCaptions.success,text:o.alertDefaultText.success,background:o.alertBgColors.success,icon:(0,n.jsx)(i.SuccessIcon,{className:"alertBoxIcon"})},t.alertSaved={type:o.alertVariants.saved,caption:o.alertCaptions.saved,text:o.alertDefaultText.saved,background:o.alertBgColors.saved,icon:(0,n.jsx)(i.SuccessIcon,{className:"alertBoxIcon"})},t.alertCopied={type:o.alertVariants.copied,caption:o.alertCaptions.copied,text:o.alertDefaultText.copied,background:o.alertBgColors.copied,icon:(0,n.jsx)(i.SuccessIcon,{className:"alertBoxIcon"})},t.alertWarning={type:o.alertVariants.warning,caption:o.alertCaptions.warning,text:o.alertDefaultText.warning,background:o.alertBgColors.warning,icon:(0,n.jsx)(i.WarningIcon,{className:"alertBoxIcon"})},t.alertVariantsData={[o.alertVariants.error]:t.alertError,[o.alertVariants.success]:t.alertSuccess,[o.alertVariants.saved]:t.alertSaved,[o.alertVariants.copied]:t.alertCopied,[o.alertVariants.warning]:t.alertWarning}},87754:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WarningIcon=t.SuccessIcon=t.ErrorIcon=void 0;const n=r(44414);t.ErrorIcon=e=>{let{className:t}=e;return(0,n.jsxs)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"8",stroke:"white",strokeWidth:"2"}),(0,n.jsx)("path",{d:"M9.4748 14.4246L11.9497 11.9497M14.4246 9.47486L11.9497 11.9497M9.47481 9.47486L11.9497 11.9497M14.4246 14.4246L11.9497 11.9497",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})};t.SuccessIcon=e=>{let{className:t}=e;return(0,n.jsxs)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M9.02515 11.5251L11.5 14L13.4446 12.0555L15.3891 10.1109",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("circle",{cx:"12",cy:"12",r:"8",stroke:"white",strokeWidth:"2"})]})};t.WarningIcon=e=>{let{className:t}=e;return(0,n.jsxs)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"8",stroke:"white",strokeWidth:"2"}),(0,n.jsx)("path",{d:"M8.5 15C10.25 13.6667 13.75 13.6667 15.5 15",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M10.75 10.75C10.75 11.1642 10.4142 11.5 10 11.5C9.58579 11.5 9.25 11.1642 9.25 10.75C9.25 10.3358 9.58579 10 10 10C10.4142 10 10.75 10.3358 10.75 10.75Z",fill:"white"}),(0,n.jsx)("path",{d:"M10.75 10.75C10.75 11.1642 10.4142 11.5 10 11.5C9.58579 11.5 9.25 11.1642 9.25 10.75C9.25 10.3358 9.58579 10 10 10C10.4142 10 10.75 10.3358 10.75 10.75Z",fill:"white"}),(0,n.jsx)("path",{d:"M10.75 10.75C10.75 11.1642 10.4142 11.5 10 11.5C9.58579 11.5 9.25 11.1642 9.25 10.75C9.25 10.3358 9.58579 10 10 10C10.4142 10 10.75 10.3358 10.75 10.75Z",fill:"white"}),(0,n.jsx)("path",{d:"M14 11.5C14.4142 11.5 14.75 11.1642 14.75 10.75C14.75 10.3358 14.4142 10 14 10C13.5858 10 13.25 10.3358 13.25 10.75C13.25 11.1642 13.5858 11.5 14 11.5Z",fill:"white"})]})}},25776:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(44414),o=r(9950),a=n(r(19335)),s=r(22702),c=n(r(86512)),u=r(79477),l=r(16011),d=r(56646),f=r(19558),h=r(21297),p=r(99013),g=r(49755),m="cssTransition",y=a.default.div` box-sizing: border-box; position: fixed; right: 32px; bottom: 32px; ${c.default}; border-radius: 6px; width: 356px; min-height: 70px; z-index: ${s.zIndexAlert}; color: ${l.WhiteColor}; padding: 12px; cursor: pointer; ${d.mediaQuery.bigPhone} { left: 50%; right: 50%; bottom: -16px; transform: translate(-50%, -50%); } &.${m}-alert-enter { opacity: 0; transform: scale(0.9); } &.${m}-alert-enter-active { opacity: 1; transform: translateX(0); transition: opacity 300ms, transform 300ms; } .alertBox { position: relative; height: 100%; width: 100%; .alertBoxCloseIcon { position: absolute; right: 0; top: 0; } .alertBoxIcon { position: absolute; left: 0; top: 0; } .alertBoxContent { margin-left: 40px; display: flex; align-items: center; font-size: 14px; overflow: hidden; .caption { text-transform: capitalize; max-width: 270px; overflow: hidden; } } } ${d.mediaQuery.minWidthFourK} { padding: ${(0,g.adaptiveValueCalc)(12)}; width: ${(0,g.adaptiveValueCalc)(356)}; min-height: ${(0,g.adaptiveValueCalc)(70)}; right: ${(0,g.adaptiveValueCalc)(32)}; bottom: ${(0,g.adaptiveValueCalc)(32)}; border-radius: ${(0,g.adaptiveValueCalc)(6)}; .alertBox { .alertBoxCloseIcon { width: ${(0,g.adaptiveValueCalc)(16)}; height: ${(0,g.adaptiveValueCalc)(16)}; } .alertBoxIcon { width: ${(0,g.adaptiveValueCalc)(24)}; height: ${(0,g.adaptiveValueCalc)(24)}; } .alertBoxContent { margin-left: ${(0,g.adaptiveValueCalc)(40)}; font-size: ${(0,g.adaptiveValueCalc)(14)}; .caption { max-width: ${(0,g.adaptiveValueCalc)(270)}; } } } } `;t.default=e=>{let{closeAlert:t,updateData:r}=e;const[n,a]=(0,o.useState)(5),s={...f.alertVariantsData[r.type],...r};return(0,o.useEffect)((()=>{const e=window.setTimeout((()=>{n-1<0?(clearInterval(e),t()):a(n-1)}),1e3);return()=>clearTimeout(e)})),(0,i.jsx)(y,{style:{backgroundColor:s.background},onClick:t,children:(0,i.jsxs)("div",{className:"alertBox",children:[s.icon,(0,i.jsx)(p.CloseIcon,{className:"alertBoxCloseIcon"}),(0,i.jsx)("div",{className:"alertBoxContent",children:(0,i.jsxs)(u.Flex,{flexDirection:"column",children:[(0,i.jsx)(h.H3,{className:"caption",children:s.caption}),(0,i.jsx)(h.H6,{mt:[4],children:s.text})]})})]})})}},34206:(e,t)=>{"use strict";var r,n,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.alertBgColors=t.alertDefaultText=t.alertCaptions=t.alertVariants=void 0,function(e){e.error="error",e.warning="warning",e.success="success",e.saved="saved",e.copied="copied"}(r||(t.alertVariants=r={})),function(e){e.error="Error",e.warning="Oops...",e.success="Success",e.saved="Saved",e.copied="Copied"}(n||(t.alertCaptions=n={})),function(e){e.error="The action cannot be performed",e.warning="Something went wrong",e.success="Your report has been sent successfully",e.saved="All changes have been saved",e.copied="Copied successfully"}(i||(t.alertDefaultText=i={})),function(e){e.error="#F94C66",e.warning="rgba(248, 192, 50, 0.85)",e.success="#5FD068",e.saved="#5FD068",e.copied="#5FD068"}(o||(t.alertBgColors=o={}))},45595:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Box=t.Initial=void 0;const i=r(44414),o=r(9950),a=n(r(19335)),s=r(98011);t.Initial=a.default.div` display: block; ${s.space}; ${s.background}; ${s.layout}; ${s.border}; ${s.color}; ${s.gridArea}; ${s.zIndex}; ${s.flexbox}; `,t.Box=(0,o.forwardRef)(((e,r)=>(0,i.jsx)(t.Initial,{ref:r,...e}))),t.Box.displayName="Box"},99805:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(44414),c=o(r(19335)),u=r(59758),l=a(r(91755)),d=r(56646),f=r(49755),h=c.default.button` font-family: ${u.poppinsFontVarCss.css}; border: ${e=>e.variant.border}; border-radius: ${e=>e.variant.borderRadius}; padding: ${e=>e.variant.padding}; font-weight: ${e=>e.variant.fontWeight}; white-space: nowrap; font-size: ${e=>e.variant.fontSize}; line-height: ${e=>e.variant.lineHeight}; background: ${e=>e.variant.background}; color: ${e=>e.variant.color}; filter: ${e=>e.variant.filter}; box-shadow: ${e=>e.variant.boxShadow}; transition: 0.2s all ease-in; user-select: none; width: ${e=>e.variant.width}; height: ${e=>e.variant.height}; cursor: pointer; @media screen and (max-width: 767px) { padding: ${e=>e.variant.mobile.padding}; font-size: ${e=>e.variant.mobile.fontSize}; border-radius: ${e=>e.variant.mobile.borderRadius}; font-weight: ${e=>e.variant.mobile.fontWeight}; border: ${e=>e.variant.mobile.border}; line-height: ${e=>e.variant.mobile.lineHeight}; } ${d.mediaQuery.minWidthFourK} { padding: ${e=>{if(!e.variant.padding)return;const t=e.variant.padding.replaceAll("px","").split(" ").map((e=>Number(e)));return c.css`${(0,f.adaptiveValueCalc)(t[0])} ${(0,f.adaptiveValueCalc)(t[1])}`}}; border-radius: ${e=>{if(!e.variant.borderRadius)return;const t=e.variant.borderRadius.replaceAll("px","");return(0,f.adaptiveValueCalc)(Number(t))}}; font-size: ${e=>{if(!e.variant.fontSize)return;const t=e.variant.fontSize.replaceAll("px","");return(0,f.adaptiveValueCalc)(Number(t))}}; } &:active { background: ${e=>e.variant.active.background}; color: ${e=>e.variant.active.color||e.variant.color}; border: ${e=>e.variant.active.border}; filter: ${e=>e.variant.active.filter}; box-shadow: ${e=>e.variant.active.boxShadow}; transition: 0.2s all ease-in-out; } @media (hover: hover) { &:hover { background: ${e=>e.variant.hover.background}; color: ${e=>e.variant.hover.color||e.variant.color}; border: ${e=>e.variant.hover.border}; filter: ${e=>e.variant.hover.filter}; box-shadow: ${e=>e.variant.hover.boxShadow}; transition: 0.2s all ease-in-out; } } &:disabled { background: ${e=>e.variant.disabled.background}; color: ${e=>e.variant.disabled.color||e.variant.color}; border: ${e=>e.variant.disabled.border}; filter: ${e=>e.variant.disabled.filter}; box-shadow: ${e=>e.variant.disabled.boxShadow}; transition: 0.2s all ease-in-out; } &:focus-visible { filter: ${e=>e.variant.focus.filter}; background: ${e=>e.variant.focus.background}; color: ${e=>e.variant.focus.color||e.variant.color}; border: ${e=>e.variant.focus.border}; box-shadow: ${e=>e.variant.focus.boxShadow}; transition: 0.2s all ease-in-out; @media screen and (max-width: 767px) { border: ${e=>e.variant.mobile.border}; } } `;t.default=e=>{let{onClick:t,variant:r,text:n,type:i="button",disabled:o}=e;return(0,s.jsx)(h,{onClick:t,variant:l.default[r],type:i,disabled:o,children:n})}},91755:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(16011),i={primaryL:{background:n.AccentColor,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"none",borderRadius:"30px",fontWeight:"600",lineHeight:"1.33",padding:"16px 40px",fontSize:"18px",mobile:{padding:"14px 32px",fontSize:"16px",lineHeight:"1.375"},active:{background:n.DarkBlueColor,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"none"},hover:{background:n.AccentColor,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"0px 6px 15px 0px rgba(0, 0, 0, 0.2)"},disabled:{background:n.DisabledGrayColor,border:"1px solid transparent",filter:"none",boxShadow:"none"},focus:{filter:"none",background:n.DarkBlueColor,border:`1px solid ${n.WhiteColor}`,boxShadow:`0px 0px 15px ${n.BlueShadowColor}`}},primaryM:{background:n.AccentColor,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"none",fontWeight:"500",lineHeight:"1.47",borderRadius:"30px",padding:"9px 24px",fontSize:"15px",mobile:{borderRadius:"25px",padding:"10px 24px",fontSize:"14px",lineHeight:"1.43"},active:{background:n.DarkBlueColor,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"none"},hover:{background:n.AccentColor,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"0px 6px 15px 0px rgba(0, 0, 0, 0.2)"},disabled:{background:n.DisabledGrayColor,border:"1px solid transparent",filter:"none",boxShadow:"none"},focus:{filter:"none",background:n.DarkBlueColor,boxShadow:`0px 0px 15px ${n.BlueShadowColor}`,border:`1px solid ${n.WhiteColor}`,mobile:{border:`0.5px solid ${n.WhiteColor}`}}},primaryXS:{background:n.AccentColor,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"none",borderRadius:"25px",fontWeight:"500",fontSize:"12px",lineHeight:"1.33",width:"100%",padding:"7px 15px",mobile:{padding:"6px 16px",lineHeight:"1.33",fontSize:"12px"},active:{background:n.DarkBlueColor,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"none"},hover:{background:n.AccentColor,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"0px 6px 15px 0px rgba(0, 0, 0, 0.2)"},disabled:{background:n.DisabledGrayColor,border:"1px solid transparent",filter:"none",boxShadow:"none"},focus:{filter:"none",background:n.DarkBlueColor,border:`0.5px solid ${n.WhiteColor}`,boxShadow:`0px 0px 15px ${n.BlueShadowColor}`}},secondary:{background:n.InactiveButtonColor,color:n.TextGrayColor,border:"1px solid transparent",filter:"none",boxShadow:"none",fontWeight:"500",lineHeight:"1.47",borderRadius:"30px",padding:"9px 24px",fontSize:"15px",mobile:{borderRadius:"25px",padding:"10px 24px",fontSize:"14px",lineHeight:"1.43"},active:{background:n.TextGrayColor,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"none"},hover:{background:n.InactiveButtonColor,color:n.TextGrayColor,boxShadow:"0px 6px 15px 0px rgba(0, 0, 0, 0.1)",border:"1px solid transparent",filter:"none"},disabled:{background:n.DisabledLightGrayColor,color:n.DisabledGrayColor,border:"1px solid transparent",filter:"none",boxShadow:"none"},focus:{filter:"none",background:n.GrayBackgroundColor,color:n.WhiteColor,border:"1px solid rgba(255, 255, 255, 1)",boxShadow:"0px 0px 15px 0px rgba(105, 111, 144, 0.6)"}},secondaryXS:{background:n.InactiveButtonColor,color:n.TextGrayColor,border:"1px solid transparent",filter:"none",boxShadow:"none",fontWeight:"500",fontSize:"12px",lineHeight:"1.33",borderRadius:"30px",padding:"7px 16px",mobile:{borderRadius:"25px",padding:"6px 16px",lineHeight:"1.33",fontSize:"12px"},active:{background:n.TextGrayColor,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"none"},hover:{background:n.InactiveButtonColor,color:n.TextGrayColor,boxShadow:"0px 6px 15px 0px rgba(0, 0, 0, 0.1)",border:"1px solid transparent",filter:"none"},disabled:{background:n.DisabledLightGrayColor,color:n.DisabledGrayColor,border:"1px solid transparent",filter:"none",boxShadow:"none"},focus:{filter:"none",background:n.GrayBackgroundColor,color:n.WhiteColor,border:"1px solid rgba(255, 255, 255, 1)",boxShadow:"0px 0px 15px 0px rgba(105, 111, 144, 0.6)"}},danger:{background:n.DangerColorLight,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"none",lineHeight:"1.47",borderRadius:"30px",padding:"9px 24px",fontWeight:"600",fontSize:"15px",mobile:{borderRadius:"25px",padding:"10px 24px",fontWeight:"500",fontSize:"14px",lineHeight:"1.43"},active:{background:n.DangerColorDark,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"none"},hover:{background:n.DangerColorLight,color:n.WhiteColor,border:"1px solid transparent",filter:"none",boxShadow:"0px 6px 15px 0px #00000033"},disabled:{background:n.DisabledDangerColor,border:"1px solid transparent",filter:"none",boxShadow:"none"},focus:{filter:"none",background:n.DangerColorDark,border:`1px solid ${n.WhiteColor}`,boxShadow:"0px 0px 15px rgba(244, 32, 95, 0.7)"}},outline:{background:"transparent",color:n.TextGrayColor,border:`1px solid ${n.BorderColorLight}`,filter:"none",boxShadow:"none",borderRadius:"30px",fontWeight:"500",lineHeight:"1.47",padding:"9px 24px",fontSize:"15px",mobile:{padding:"10px 24px",fontSize:"14px",lineHeight:"1.43"},active:{background:n.BackgroundColorLight,color:n.GrayBackgroundColor,border:`1px solid ${n.GrayBackgroundColor}`,filter:"none",boxShadow:"none"},hover:{background:n.WhiteColor,color:n.GrayBackgroundColor,boxShadow:"0px 6px 15px rgba(0, 0, 0, 0.1)",border:`1px solid ${n.TextGrayColor}`,filter:"none"},disabled:{background:n.BackgroundColorLight,color:n.BorderColorLight,border:`1px solid ${n.BorderColorLight}`,filter:"none",boxShadow:"none"},focus:{filter:"none",background:n.BackgroundColorLight,color:n.GrayBackgroundColor,border:`1px solid ${n.GrayBackgroundColor}`,boxShadow:"0px 0px 15px 0px #696F9099"}},float:{background:n.WhiteColor,color:n.AccentColor,border:"1px solid transparent",filter:"none",boxShadow:"0px 4px 20px 0px #21155F1A",borderRadius:"30px",fontWeight:"500",lineHeight:"1.47",padding:"9px 24px",fontSize:"15px",mobile:{padding:"10px 24px",fontSize:"14px",lineHeight:"1.43"},active:{background:n.InactiveButtonColor,color:n.AccentColor,border:"1px solid transparent",filter:"none",boxShadow:"0px 4px 20px 0px #21155F1A"},hover:{background:n.WhiteColor,color:n.AccentColor,boxShadow:"0px 4px 20px 0px #21155F1A",border:`1px solid ${n.BorderColorLight}`,filter:"none"},disabled:{background:n.InactiveButtonColor,color:n.BorderColorLight,border:"1px solid transparent",filter:"none",boxShadow:"none"},focus:{filter:"none",background:n.WhiteColor,color:n.AccentColor,border:`1px solid ${n.AccentColor}`,boxShadow:"0px 0px 15px 0px rgba(96, 72, 255, 0.6)"}}};t.default=i},79477:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Flex=void 0;const i=r(45595),o=n(r(19335));t.Flex=(0,o.default)(i.Initial)` display: flex; `,t.Flex.displayName="Flex"},72462:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Grid=void 0;const i=r(98011),o=r(45595),a=n(r(19335));t.Grid=(0,a.default)(o.Initial)` display: grid; height: auto; ${i.grid} `,t.Grid.displayName="Grid"},99871:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=void 0;const a=r(44414),s=o(r(19335)),c=r(16011),u=s.keyframes` to { transform: rotate(360deg); } `;t.Spinner=(0,s.default)((e=>{let{className:t}=e;return(0,a.jsx)("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",children:(0,a.jsx)("path",{d:"M14 25C20.0751 25 25 20.0751 25 14H28C28 21.732 21.732 28 14 28C6.26801 28 0 21.732 0 14C0 6.26801 6.26801 0 14 0V3C7.92487 3 3 7.92487 3 14C3 20.0751 7.92487 25 14 25Z",fill:"currentColor"})})}))` width: 20px; height: 20px; color: ${c.WhiteColor}; animation: ${u} 0.75s linear infinite; `},21297:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SmallText=t.H6=t.H5=t.H3=t.H2=t.H1=t.MainText=t.Text=void 0;const a=r(44414),s=r(9950),c=o(r(19335)),u=r(98011),l=r(56646),d=r(59758),f=r(49755),h=c.css` margin: 0; ${u.space}; ${u.color}; ${u.typography}; `,p=c.css` font-family: ${e=>"secondary"===e.customFontFamily?d.dmsansFontVarCss.css:d.poppinsFontVarCss.css}; `,g=c.default.div` ${h}; ${p}; `,m=c.default.span` ${h}; ${p}; `,y=c.default.p` font-size: 15px; font-weight: 400; line-height: 22px; font-family: ${d.dmsansFontVarCss.css}; ${l.mediaQuery.tablet} { font-size: 14px; line-height: 18px; } ${h}; ${l.mediaQuery.minWidthFourK} { font-size: ${(0,f.adaptiveValueCalc)(15)}; line-height: ${(0,f.adaptiveValueCalc)(22)}; } `,v=c.default.p` font-size: 13px; font-weight: 400; line-height: 18px; font-family: ${d.dmsansFontVarCss.css}; ${l.mediaQuery.tablet} { font-size: 12px; line-height: 18px; } ${h}; ${l.mediaQuery.minWidthFourK} { font-size: ${(0,f.adaptiveValueCalc)(13)}; line-height: ${(0,f.adaptiveValueCalc)(18)}; } `,b=c.default.h1` font-size: 24px; font-weight: 600; line-height: 36px; font-family: ${d.poppinsFontVarCss.css}; ${l.mediaQuery.tablet} { font-size: 22px; line-height: 28px; } ${h}; ${l.mediaQuery.minWidthFourK} { font-size: ${(0,f.adaptiveValueCalc)(24)}; line-height: ${(0,f.adaptiveValueCalc)(36)}; } `,w=c.default.h2` font-size: 20px; font-weight: 600; line-height: 28px; font-family: ${d.poppinsFontVarCss.css}; ${l.mediaQuery.tablet} { font-size: 18px; line-height: 24px; } ${h}; ${l.mediaQuery.minWidthFourK} { font-size: ${(0,f.adaptiveValueCalc)(20)}; line-height: ${(0,f.adaptiveValueCalc)(28)}; } `,A=c.default.h3` font-size: 18px; font-weight: 600; line-height: 26px; font-family: ${d.poppinsFontVarCss.css}; ${l.mediaQuery.tablet} { font-size: 16px; line-height: 22px; } ${h}; ${l.mediaQuery.minWidthFourK} { font-size: ${(0,f.adaptiveValueCalc)(18)}; line-height: ${(0,f.adaptiveValueCalc)(26)}; } `,_=c.default.h5` font-size: 15px; font-weight: 500; line-height: 22px; font-family: ${d.poppinsFontVarCss.css}; ${l.mediaQuery.tablet} { font-size: 14px; line-height: 20px; } ${h}; ${l.mediaQuery.minWidthFourK} { font-size: ${(0,f.adaptiveValueCalc)(15)}; line-height: ${(0,f.adaptiveValueCalc)(22)}; } `,E=c.default.h6` font-size: 12px; font-weight: 500; line-height: 16px; font-family: ${d.poppinsFontVarCss.css}; ${h}; ${l.mediaQuery.minWidthFourK} { font-size: ${(0,f.adaptiveValueCalc)(12)}; line-height: ${(0,f.adaptiveValueCalc)(16)}; } `;t.Text=(0,s.forwardRef)(((e,t)=>{let{children:r,inline:n=!1,...i}=e;return n?(0,a.jsx)(m,{ref:t,...i,children:r}):(0,a.jsx)(g,{ref:t,...i,children:r})})),t.Text.displayName="Text",t.MainText=(0,s.forwardRef)(((e,t)=>{let{children:r,...n}=e;return(0,a.jsx)(y,{ref:t,...n,children:r})})),t.MainText.displayName="MainText",t.H1=(0,s.forwardRef)(((e,t)=>{let{children:r,...n}=e;return(0,a.jsx)(b,{ref:t,...n,children:r})})),t.H1.displayName="H1",t.H2=(0,s.forwardRef)(((e,t)=>{let{children:r,...n}=e;return(0,a.jsx)(w,{ref:t,...n,children:r})})),t.H2.displayName="H2",t.H3=(0,s.forwardRef)(((e,t)=>{let{children:r,...n}=e;return(0,a.jsx)(A,{ref:t,...n,children:r})})),t.H3.displayName="H3",t.H5=(0,s.forwardRef)(((e,t)=>{let{children:r,...n}=e;return(0,a.jsx)(_,{ref:t,...n,children:r})})),t.H5.displayName="H5",t.H6=(0,s.forwardRef)(((e,t)=>{let{children:r,...n}=e;return(0,a.jsx)(E,{ref:t,...n,children:r})})),t.H6.displayName="H6",t.SmallText=(0,s.forwardRef)(((e,t)=>{let{children:r,...n}=e;return(0,a.jsx)(v,{ref:t,...n,children:r})})),t.SmallText.displayName="SmallText"},72137:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45595),t),i(r(79477),t),i(r(72462),t),i(r(99871),t),i(r(21297),t),i(r(51480),t)},51480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.darkTheme=t.lightTheme=t.mainTheme=void 0;const n=r(56646),i=r(46496),o=r(16011),a=r(59758),s=[n.ScreenWidth.PHONE,n.ScreenWidth.TABLET,n.ScreenWidth.DESKTOP];t.mainTheme={space:["0px","1px","2px","3px","4px","5px","6px","7px","8px","9px"],breakpoints:s,fontFamily:a.poppinsFontVarCss.css,colors:{naturalWhite:"#fff",naturalBlack:"#000",bg:`${o.BackgroundColorLight}`,font:"#19191B"},shadows:{}},t.lightTheme={...t.mainTheme,type:i.ThemeEnum.light,colors:{...t.mainTheme.colors,secondaryBg:`${o.BackgroundColorLight}`,thirdBg:`${o.SearchInputBg}`,accent:`${o.AccentColor}`,primaryText:`${o.BlackColor}`,secondaryText:`${o.BackgroundColorDark}`,placeholderText:`${o.TextGrayColor}`,grayText:`${o.TextGrayColor}`,scrollBar:`${o.BorderColorLight}`,divider:`${o.BorderColorLight}`,borderColor:`${o.BorderColorLight}`,headerBg:`${o.WhiteColor}`,sidebarBg:`${o.WhiteColor}`,sidebarDisconnect:"#FDAAB6",sidebarSvgPathFill:`${o.TextDarkGrayColor}`,accentHoverBg:`${o.CategoryHoverBg}`,buttonInactive:`${o.InactiveButtonColor}`,toTopBtn:`${o.WhiteColor}`,experienceGradientLabel:{gradient:`${o.ExperienceGradientLabelLight}`,color:"#5748bc"},inviteCodesGradientLabel:{gradient:`${o.InviteGradientLabelLight}`,color:"#5748bc"},bg:`${o.BackgroundColorLight}`,font:""},shadows:{...t.mainTheme.shadows,header:"0 16px 32px -16px rgba(33, 21, 95, 0.2)"}},t.darkTheme={...t.mainTheme,type:i.ThemeEnum.dark,colors:{...t.mainTheme.colors,secondaryBg:`${o.TableExperienceColorDark}`,thirdBg:`${o.BackgroundColorDark}`,grayText:`${o.TextGrayColor}`,primaryText:`${o.WhiteColor}`,secondaryText:`${o.WhiteColor}`,placeholderText:`${o.WhiteColor}`,accent:`${o.AccentColor}`,buttonInactive:`${o.InactiveButtonColor}`,borderColor:`${o.BorderColorDark}`,scrollBar:`${o.BorderColorLight}`,divider:`${o.TableExperienceColorDark}`,blankProgressBar:`${o.ExpProgressBlankDark}`,successTaskProgressBar:`${o.ExpTaskProgressFill}`,successUserProgressBar:`${o.ExpUserProgressFill}`,headerBg:`${o.HeaderBackgroundDark}`,sidebarBg:`${o.BackgroundColorDark}`,sidebarDisconnect:"#7C2633",sidebarSvgPathFill:`${o.TextGray2Color}`,accentHoverBg:`${o.CategoryHoverBg}`,toTopBtn:`${o.BlackColor}`,experienceGradientLabel:{gradient:`${o.ExperienceGradientLabelDark}`,color:`${o.WhiteColor}`},inviteCodesGradientLabel:{gradient:`${o.InviteGradientLabelDark}`,color:`${o.WhiteColor}`},bg:`${o.BackgroundColorDark}`,font:""},shadows:{...t.mainTheme.shadows,header:"0px 16px 32px -16px #0000004D, 0px 1px 0px 0px #FFFFFF1A inset"}}},49755:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAdaptiveValue=t.adaptiveValueCalc=t.adaptiveValue=void 0;const n=r(19335),i=r(56646),o=i.ScreenWidth.FOUR_K_MIN,a=`${i.ScreenWidth.FOUR_K_MIN}px`,s=i.ScreenWidth.FOUR_K_MAX;t.adaptiveValue=e=>{let{cssProperty:t,currentSize:r}=e;const i=r,c=2*r-i,u=t.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`));return n.css` ${u}: calc(${i+"px"} + ${c} * ((100vw - ${a}) / (${s} - ${o}))); `};t.adaptiveValueCalc=e=>{const t=e,r=2*e-t;return n.css`calc(${t+"px"} + ${r} * ((100vw - ${a}) / (${s} - ${o}))) `};t.getAdaptiveValue=e=>{let{currentSize:t,windowWidth:r}=e;return t+(2*t-t)*((r-o)/(s-o))}},23047:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rootRemoveOverflow=t.rootAddOverflow=void 0;t.rootAddOverflow=()=>{const e=document.documentElement;e.style.overflow="hidden",e.style.touchAction="none"};t.rootRemoveOverflow=()=>{const e=document.documentElement;e.style.overflow="visible",e.style.touchAction="auto"}},68699:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isChrome=t.isSafari=t.isFirefox=void 0;t.isFirefox=()=>/Firefox/.test(navigator.userAgent);t.isSafari=()=>/Safari/.test(navigator.userAgent)&&!(0,t.isChrome)();t.isChrome=()=>/Chrome/.test(navigator.userAgent)&&!/Chromium/.test(navigator.userAgent)},67597:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClickAwayListener=void 0;const n=r(44414),i=r(9950),o="undefined"!==typeof window?i.useLayoutEffect:i.useEffect;function a(e){return e&&e.ownerDocument||document}function s(e){return e.substring(2).toLowerCase()}t.ClickAwayListener=function(e){let{children:t,disableReactTree:r=!1,mouseEvent:c="onClick",onClickAway:u,touchEvent:l="onTouchEnd"}=e;const d=(0,i.useRef)(!1),f=(0,i.useRef)(null),h=(0,i.useRef)(!1),p=(0,i.useRef)(!1);(0,i.useEffect)((()=>(setTimeout((()=>{h.current=!0}),0),()=>{h.current=!1})),[]);const g=function(){for(var e=arguments.length,t=new Array(e),r=0;rt.every((e=>null==e))?null:e=>{t.forEach((t=>{!function(e,t){"function"===typeof e?e(t):e&&(e.current=t)}(t,e)}))}),t)}(t.ref,f),m=function(e){const t=(0,i.useRef)(e);return o((()=>{t.current=e})),(0,i.useRef)((function(){return(0,t.current)(...arguments)})).current}((e=>{const t=p.current;p.current=!1;const n=a(f.current);if(!h.current||!f.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth-1:!n.documentElement.contains(e.target)||f.current?.contains(e.target),i||!r&&t||u(e)})),y=e=>r=>{p.current=!0;const n=t.props[e];n&&n(r)},v={ref:g};return!1!==l&&(v[l]=y(l)),(0,i.useEffect)((()=>{if(!1!==l){const e=s(l),t=a(f.current),r=()=>{d.current=!0};return t.addEventListener(e,m),t.addEventListener("touchmove",r),()=>{t.removeEventListener(e,m),t.removeEventListener("touchmove",r)}}}),[m,l]),!1!==c&&(v[c]=y(c)),(0,i.useEffect)((()=>{if(!1!==c){const e=s(c),t=a(f.current);return t.addEventListener(e,m),()=>{t.removeEventListener(e,m)}}}),[m,c]),(0,n.jsx)(n.Fragment,{children:(0,i.cloneElement)(t,v)})}},4185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getImageDimensions=void 0;t.getImageDimensions=async e=>{const t=await(r=e,new Promise((e=>{const t=new FileReader;t.addEventListener("load",(()=>{e(t.result)})),t.readAsDataURL(r)})));var r;return await function(e){return new Promise(((t,r)=>{const n=new Image;n.addEventListener("error",(e=>{r(e)})),n.addEventListener("load",(function(){t({width:this.width,height:this.height})})),n.src=e}))}(t)}},17112:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ASK_MORE_INVITES_GOOGLE_FORM=void 0,t.ASK_MORE_INVITES_GOOGLE_FORM="https://docs.google.com/forms/d/e/1FAIpQLSelsC1Nplw4DSs1phfaGNByZCTORt0jAYeogsj8_QxceQj69Q/viewform?usp=pp_url&entry.224451745="},52808:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(68699),t),i(r(67597),t),i(r(17112),t),i(r(4830),t),i(r(35399),t),i(r(88201),t),i(r(62348),t),i(r(12952),t),i(r(44595),t),i(r(77985),t),i(r(11918),t),i(r(88515),t),i(r(22416),t),i(r(79918),t),i(r(23047),t),i(r(4185),t)},44595:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mobileDetection=void 0;t.mobileDetection=e=>{let{UA:t}=e;return{isMobile:!!t&&Boolean(/android|webos|iphone|ipad|ipod|blackberry|bb|playbook|iemobile|mobile|windows phone|kindle|silk|opera mini/i.test(t))}}},4830:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendEventToExtension=t.eventsTypes=void 0;const n=r(68699);var i;!function(e){e.returnToExtension="return_to_extension",e.pingVersion="ping_ludoX_extension",e.successLogin="success_login",e.openExtension="open_ludoX_extension"}(i||(t.eventsTypes=i={}));t.sendEventToExtension=(e,t)=>new Promise(((r,i)=>{try{!(0,n.isChrome)()||(0,n.isSafari)()||(0,n.isFirefox)()?(console.error("Unsupported browser"),i("Unsupported browser")):chrome.runtime?chrome.runtime.sendMessage("fgcmebogmgdheonhhefnblfodobpmfip",{message:e,payload:t},(function(e){chrome.runtime.lastError?(console.error("Error in sendMessage:",chrome.runtime.lastError),i(chrome.runtime.lastError)):r(e)})):(console.error("chrome.runtime is undefined"),i("chrome.runtime is undefined"))}catch(o){console.error("Caught error in sendEventToExtension:",o),i(o)}}))},35399:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkIsGlt=t.checkGltfUrl=void 0;const r="ipfs://";t.checkGltfUrl=e=>e.includes(r)?`https://ipfs.io/ipfs/${e.slice(7)}`:e;t.checkIsGlt=e=>e.includes(r)},88201:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PortalCreator=void 0;const n=r(9950),i=r(17119);t.PortalCreator=e=>{let{children:t,elementToAppend:r=document.body}=e;const o=(0,n.useRef)(document.createElement("div"));return(0,n.useEffect)((()=>(r.appendChild(o.current),()=>{r.removeChild(o.current)})),[]),(0,i.createPortal)(t,o.current)}},79918:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getRankColor=void 0;const i=n(r(63484)),o=["#A533FF","#43A5FF","#5FD068"];t.getRankColor=e=>(0,i.default)(o)(e/100)},12952:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.redirectAuthUser=void 0;const n=r(72001),i=r(92982);t.redirectAuthUser=e=>{const{ENV_VALUE:t,redirectUrl:r}=e,{userId:o,wallets:a,newUser:s,inviteCode:c,authToken:u,refreshToken:l}=n.authCookies.getCookies();u&&l&&o&&a&&s&&c&&(t&&window.location.replace(`${i.ludoDomains[t].profile}/${o}/nfts`),r&&window.location.replace(r))}},62348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleSetScrollPosition=t.handleScrollPosition=t.useScrollDirection=void 0;const n=r(9950),i=r(88515);t.useScrollDirection=()=>{const[e,t]=(0,n.useState)("up");return(0,n.useEffect)((()=>{let r=window.pageYOffset;const n=()=>{const n=window.pageYOffset,i=n>r?"down":"up";i!==e&&(n-r>5||n-r<-5)&&t(i),r=n>0?n:0};return window.addEventListener("scroll",n),()=>{window.removeEventListener("scroll",n)}}),[e]),e};t.handleScrollPosition=(e,t)=>{const r=(0,i.getSessionKey)(e);r&&(document.documentElement.scrollTo({top:parseInt(r),behavior:"smooth"}),(0,i.deleteSessionKey)(e),(0,i.deleteSessionKey)(t))};t.handleSetScrollPosition=(e,t,r)=>{const n=String(window.pageYOffset);(0,i.setSessionKey)(e,n),(0,i.setSessionKey)(t,r)}},77985:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.searchQueryLetters=void 0;const n=r(44414);t.searchQueryLetters=e=>{let{text:t,searchQuery:r,background:i,color:o,className:a}=e;if(!r||!t)return t;let s=[];const c=t.toLowerCase(),u=r.split(" "),l=[];let d=0;if(u.forEach(((e,t)=>{let r=c.slice(0===t?0:d).indexOf(e.toLowerCase());t>0&&r>0&&(r=-1),r<0?l.push(r):(l.push(d+r),d=d+e.length+1)})),l[0]<0)s=t.split("");else{let e=0;t.split("").forEach(((t,r)=>{const c=u[e],d=l[e];!c||d<0?s.push(t):(r+1>d+c.length&&e++,r>=d&&r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isServer=void 0;const r="undefined"===typeof window;t.isServer=r},88515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteSessionKey=t.getSessionKey=t.setSessionKey=void 0;const n=r(11918);t.setSessionKey=(e,t)=>{sessionStorage.setItem(e,t)};t.getSessionKey=e=>n.isServer?null:sessionStorage.getItem(e);t.deleteSessionKey=e=>{sessionStorage.removeItem(e)}},22416:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isContainChinese=t.getForSearch=t.copyToClipboard=t.shortenedText=void 0;t.shortenedText=e=>e?e.replace(e.substring(4,e.length-4),"..."):"No name";t.copyToClipboard=e=>{if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(e);const t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select(),new Promise(((e,r)=>{document.execCommand("copy")?e():r(),t.remove()}))};t.getForSearch=e=>e.length?`?term=${e}`:"";t.isContainChinese=e=>new RegExp("[\u4e00-\u9fff\u30a0-\u30ff]").test(e)},49757:e=>{"use strict";e.exports=function(){let{mustBeMetaMask:e=!1,silent:t=!1,timeout:r=3e3}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(){if("boolean"!==typeof e)throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if("boolean"!==typeof t)throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if("number"!==typeof r)throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}();let n=!1;return new Promise((i=>{function o(){if(n)return;n=!0,window.removeEventListener("ethereum#initialized",o);const{ethereum:r}=window;if(!r||e&&!r.isMetaMask){const n=e&&r?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum.";!t&&console.error("@metamask/detect-provider:",n),i(null)}else i(r)}window.ethereum?o():(window.addEventListener("ethereum#initialized",o,{once:!0}),setTimeout((()=>{o()}),r))}))}},56945:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeFormula=void 0;t.TypeFormula=class{constructor(e,t,r){this.name=e,this.typeParameters=t,this.metadata=r}toString(){const e=this.typeParameters.length>0?`<${this.typeParameters.map((e=>e.toString())).join(", ")}>`:"",t=`${this.name}${e}`;return void 0!==this.metadata?`${t}*${this.metadata}*`:t}}},41026:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeFormulaParser=void 0;const n=r(56945);class i{parseExpression(e){e=e.trim();const t=this.tokenizeExpression(e).filter((e=>e!==i.COMMA)),r=[];for(const n of t)if(this.isPunctuation(n))if(this.isEndOfTypeParameters(n)){const e=this.acquireTypeWithParameters(r);r.push(e)}else{if(!this.isBeginningOfTypeParameters(n))throw new Error(`Unexpected token (punctuation): ${n}`);r.push(n)}else r.push(n);if(1!==r.length)throw new Error(`Unexpected stack length at end of parsing: ${r.length}`);if(i.PUNCTUATION.includes(r[0]))throw new Error("Unexpected root element.");const o=r[0];if(o instanceof n.TypeFormula)return o;if("string"===typeof o)return new n.TypeFormula(o,[]);throw new Error(`Unexpected item on stack: ${o}`)}tokenizeExpression(e){const t=[];let r="";for(const n of e)this.isPunctuation(n)?(r&&(t.push(r.trim()),r=""),t.push(n)):r+=n;return r&&t.push(r.trim()),t}acquireTypeWithParameters(e){const t=this.acquireTypeParameters(e),r=e.pop();if("ManagedDecimal"===r||"ManagedDecimalSigned"===r){const e=t[0].name;return new n.TypeFormula(r,[],e)}return new n.TypeFormula(r,t.reverse())}acquireTypeParameters(e){const t=[];for(;;){const r=e.pop();if(void 0===r)throw new Error("Badly specified type parameters");if(this.isBeginningOfTypeParameters(r))break;if(r instanceof n.TypeFormula)t.push(r);else{if("string"!==typeof r)throw new Error(`Unexpected type parameter object in stack: ${r}`);t.push(new n.TypeFormula(r,[]))}}return t}isPunctuation(e){return i.PUNCTUATION.includes(e)}isEndOfTypeParameters(e){return e===i.END_TYPE_PARAMETERS}isBeginningOfTypeParameters(e){return e===i.BEGIN_TYPE_PARAMETERS}}t.TypeFormulaParser=i,i.BEGIN_TYPE_PARAMETERS="<",i.END_TYPE_PARAMETERS=">",i.COMMA=",",i.PUNCTUATION=[i.COMMA,i.BEGIN_TYPE_PARAMETERS,i.END_TYPE_PARAMETERS]},5229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Account=void 0;const n=r(70054);t.Account=class{constructor(e){this.address=n.Address.empty(),this.nonce=0,this.balance="0",this.address=e}update(e){this.nonce=e.nonce,this.balance=e.balance}incrementNonce(){this.nonce=this.nonce.valueOf()+1}getNonceThenIncrement(){let e=this.nonce;return this.nonce=this.nonce.valueOf()+1,e}toJSON(){return{address:this.address.bech32(),nonce:this.nonce.valueOf(),balance:this.balance.toString()}}}},94067:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(27478),t)},27478:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryRunnerAdapter=void 0;const n=r(70054),i=r(30449);t.QueryRunnerAdapter=class{constructor(e){this.networkProvider=e.networkProvider}async runQuery(e){const t={address:n.Address.fromBech32(e.contract),caller:e.caller?n.Address.fromBech32(e.caller):void 0,func:e.function,value:e.value,getEncodedArguments:()=>e.arguments.map((e=>Buffer.from(e).toString("hex")))},r=await this.networkProvider.queryContract(t);return new i.SmartContractQueryResponse({function:e.function,returnCode:r.returnCode.toString(),returnMessage:r.returnMessage,returnDataParts:r.getReturnDataParts()})}}},70054:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AddressComputer=t.Address=void 0;const s=o(r(25240)),c=a(r(63160)),u=r(35446),l=r(87679),d=o(r(33939)),f=r(11564),h=r(33858),p="0".repeat(16);class g{constructor(e,t){if(!e)return this.publicKey=Buffer.from([]),void(this.hrp=t||u.LibraryConfig.DefaultAddressHrp);if(ArrayBuffer.isView(e)){if(32!=e.length)throw new d.ErrAddressCannotCreate(e);return this.publicKey=Buffer.from(e),void(this.hrp=t||u.LibraryConfig.DefaultAddressHrp)}if(e instanceof g){if(t)throw new d.ErrInvalidArgument("this variant of the Address constructor does not accept the 'hrp' argument");return this.publicKey=e.publicKey,void(this.hrp=e.hrp)}if("string"===typeof e){if(g.isValidHex(e))return this.publicKey=Buffer.from(e,"hex"),void(this.hrp=t||u.LibraryConfig.DefaultAddressHrp);if(t)throw new d.ErrInvalidArgument("this variant of the Address constructor does not accept the 'hrp' argument");const{hrp:r,pubkey:n}=m({value:e,allowCustomHrp:!1});return this.publicKey=n,void(this.hrp=r)}throw new d.ErrAddressCannotCreate(e)}static newFromBech32(e){const{hrp:t,pubkey:r}=m({value:e,allowCustomHrp:!0});return new g(r,t)}static fromBech32(e){const{hrp:t,pubkey:r}=m({value:e,allowCustomHrp:!1});return new g(r,t)}static newFromHex(e,t){if(!g.isValidHex(e))throw new d.ErrAddressCannotCreate(e);return new g(Buffer.from(e,"hex"),t)}static fromHex(e,t){return g.newFromHex(e,t)}static fromAddress(e){return new g(e)}static fromBuffer(e,t){return new g(e,t)}static fromString(e,t){return new g(e,t)}static isValidHex(e){return 32==Buffer.from(e,"hex").length}static empty(){return new g("")}static isValid(e){const t=s.decodeUnsafe(e),r=t?.prefix,n=t?Buffer.from(s.fromWords(t.words)):void 0;return r===u.LibraryConfig.DefaultAddressHrp&&32===n?.length}hex(){return this.toHex()}toHex(){return this.isEmpty()?"":this.publicKey.toString("hex")}bech32(){return this.toBech32()}toBech32(){if(this.isEmpty())return"";let e=s.toWords(this.pubkey());return s.encode(this.hrp,e)}pubkey(){return this.getPublicKey()}getPublicKey(){return this.publicKey}getHrp(){return this.hrp}isEmpty(){return 0==this.publicKey.length}equals(e){return!!e&&this.publicKey.toString()==e.publicKey.toString()}toString(){return this.toBech32()}toJSON(){return{bech32:this.toBech32(),pubkey:this.toHex()}}static Zero(){return new g("0".repeat(64))}isContractAddress(){return this.isSmartContract()}isSmartContract(){return this.toHex().startsWith(p)}}t.Address=g;function m(e){const t=e.value,r=e.allowCustomHrp;let n,i;try{const e=s.decode(t);n=e.prefix,i=Buffer.from(s.fromWords(e.words))}catch(o){throw new d.ErrAddressCannotCreate(t,o)}if(!r&&n!=u.LibraryConfig.DefaultAddressHrp)throw new d.ErrAddressBadHrp(u.LibraryConfig.DefaultAddressHrp,n);return{hrp:n,pubkey:i}}t.AddressComputer=class{constructor(e){this.numberOfShardsWithoutMeta=e||l.CURRENT_NUMBER_OF_SHARDS_WITHOUT_META}computeContractAddress(e,t){const r=Buffer.alloc(8,0),n=e.getPublicKey(),i=n.slice(30),o=Buffer.alloc(8),a=new c.default(t.toString()),s=f.bigIntToBuffer(a);o.write(s.reverse().toString("hex"),"hex");const u=Buffer.concat([n,o]),d=h("keccak256").update(u).digest(),p=Buffer.from(l.WasmVirtualMachine,"hex"),m=Buffer.concat([r,p,d.slice(10,30),i]);return new g(m)}getShardOfAddress(e){return this.getShardOfPubkey(e.getPublicKey(),this.numberOfShardsWithoutMeta)}getShardOfPubkey(e,t){const r=parseInt("11",2),n=parseInt("01",2),i=e[31];if(this.isPubkeyOfMetachain(e))return l.METACHAIN_ID;let o=i&r;return o>t-1&&(o=i&n),o}isPubkeyOfMetachain(e){const t=Buffer.from([0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),r=Buffer.from(e).slice(0,t.length);if(t.equals(r))return!0;return!!Buffer.alloc(32).equals(Buffer.from(e))}}},84737:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncTimer=void 0;const a=o(r(33939)),s=r(33939),c=r(87052);t.AsyncTimer=class{constructor(e){this.timeoutHandle=null,this.rejectionFunc=null,this.name=e,this.correlationTag=0}start(e){if(this.timeoutHandle)throw new a.ErrAsyncTimerAlreadyRunning;return this.correlationTag++,c.Logger.trace(`AsyncTimer[${this.name}'${this.correlationTag}].start()`),new Promise(((t,r)=>{this.rejectionFunc=r;this.timeoutHandle=setTimeout((()=>{this.rejectionFunc=null,this.stop(),t()}),e)}))}abort(){c.Logger.trace(`AsyncTimer[${this.name}'${this.correlationTag}].abort()`),this.rejectionFunc&&(this.rejectionFunc(new s.ErrAsyncTimerAborted),this.rejectionFunc=null),this.stop()}stop(){this.isStopped()||(c.Logger.trace(`AsyncTimer[${this.name}'${this.correlationTag}].stop()`),this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=null))}isStopped(){return!this.timeoutHandle}}},95326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Compatibility=void 0;const n=r(70054);t.Compatibility=class{static guardAddressIsSetAndNonZero(e,t,r){e&&""!=e.bech32()?e.bech32()==n.Address.Zero().bech32()&&console.warn(`${t}: address should not be the 'zero' address (also known as the 'contracts deployment address'); ${r}. In the future, this will throw an exception instead of emitting a WARN.`):console.warn(`${t}: address should be set; ${r}. In the future, this will throw an exception instead of emitting a WARN.`)}}},35446:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LibraryConfig=void 0;class r{}t.LibraryConfig=r,r.DefaultAddressHrp="erd"},87679:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ESDT_CONTRACT_ADDRESS=t.DELEGATION_MANAGER_SC_ADDRESS=t.CONTRACT_DEPLOY_ADDRESS=t.BECH32_ADDRESS_LENGTH=t.DEFAULT_HRP=t.EGLD_IDENTIFIER_FOR_MULTI_ESDTNFT_TRANSFER=t.UNKNOWN_SIGNER=t.SDK_JS_SIGNER=t.METACHAIN_ID=t.WasmVirtualMachine=t.CURRENT_NUMBER_OF_SHARDS_WITHOUT_META=t.HEX_TRANSACTION_HASH_LENGTH=t.MESSAGE_PREFIX=t.DEFAULT_MESSAGE_VERSION=t.ESDT_CONTRACT_ADDRESS_HEX=t.DELEGATION_MANAGER_SC_ADDRESS_HEX=t.CONTRACT_DEPLOY_ADDRESS_HEX=t.VM_TYPE_WASM_VM=t.ARGUMENTS_SEPARATOR=t.ESDT_TRANSFER_VALUE=t.MULTI_ESDTNFT_TRANSFER_FUNCTION_NAME=t.ESDTNFT_TRANSFER_FUNCTION_NAME=t.ESDT_TRANSFER_FUNCTION_NAME=t.ESDT_TRANSFER_GAS_LIMIT=t.MIN_TRANSACTION_VERSION_THAT_SUPPORTS_OPTIONS=t.TRANSACTION_VERSION_DEFAULT=t.TRANSACTION_OPTIONS_TX_GUARDED=t.TRANSACTION_OPTIONS_TX_HASH_SIGN=t.TRANSACTION_OPTIONS_DEFAULT=t.TRANSACTION_MIN_GAS_PRICE=void 0,t.TRANSACTION_MIN_GAS_PRICE=1e9,t.TRANSACTION_OPTIONS_DEFAULT=0,t.TRANSACTION_OPTIONS_TX_HASH_SIGN=1,t.TRANSACTION_OPTIONS_TX_GUARDED=2,t.TRANSACTION_VERSION_DEFAULT=2,t.MIN_TRANSACTION_VERSION_THAT_SUPPORTS_OPTIONS=2,t.ESDT_TRANSFER_GAS_LIMIT=5e5,t.ESDT_TRANSFER_FUNCTION_NAME="ESDTTransfer",t.ESDTNFT_TRANSFER_FUNCTION_NAME="ESDTNFTTransfer",t.MULTI_ESDTNFT_TRANSFER_FUNCTION_NAME="MultiESDTNFTTransfer",t.ESDT_TRANSFER_VALUE="0",t.ARGUMENTS_SEPARATOR="@",t.VM_TYPE_WASM_VM=new Uint8Array([5,0]),t.CONTRACT_DEPLOY_ADDRESS_HEX="0000000000000000000000000000000000000000000000000000000000000000",t.DELEGATION_MANAGER_SC_ADDRESS_HEX="000000000000000000010000000000000000000000000000000000000004ffff",t.ESDT_CONTRACT_ADDRESS_HEX="000000000000000000010000000000000000000000000000000000000002ffff",t.DEFAULT_MESSAGE_VERSION=1,t.MESSAGE_PREFIX="\x17Elrond Signed Message:\n",t.HEX_TRANSACTION_HASH_LENGTH=64,t.CURRENT_NUMBER_OF_SHARDS_WITHOUT_META=3,t.WasmVirtualMachine="0500",t.METACHAIN_ID=4294967295,t.SDK_JS_SIGNER="sdk-js",t.UNKNOWN_SIGNER="unknown",t.EGLD_IDENTIFIER_FOR_MULTI_ESDTNFT_TRANSFER="EGLD-000000",t.DEFAULT_HRP="erd",t.BECH32_ADDRESS_LENGTH=62,t.CONTRACT_DEPLOY_ADDRESS="erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu",t.DELEGATION_MANAGER_SC_ADDRESS="erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqylllslmq6y6",t.ESDT_CONTRACT_ADDRESS="erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u"},77310:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(78089),t)},78089:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionsConverter=void 0;const n=r(85975),i=r(85330),o=r(5887);t.TransactionsConverter=class{transactionToPlainObject(e){return{nonce:Number(e.nonce),value:e.value.toString(),receiver:e.receiver,sender:e.sender,senderUsername:this.toBase64OrUndefined(e.senderUsername),receiverUsername:this.toBase64OrUndefined(e.receiverUsername),gasPrice:Number(e.gasPrice),gasLimit:Number(e.gasLimit),data:this.toBase64OrUndefined(e.data),chainID:e.chainID.valueOf(),version:e.version,options:0==e.options?void 0:e.options,guardian:e.guardian?e.guardian:void 0,signature:this.toHexOrUndefined(e.signature),guardianSignature:this.toHexOrUndefined(e.guardianSignature),relayer:e.relayer?e.relayer:void 0,innerTransactions:e.innerTransactions.length?e.innerTransactions.map((e=>this.transactionToPlainObject(e))):void 0}}toBase64OrUndefined(e){return e&&e.length?Buffer.from(e).toString("base64"):void 0}toHexOrUndefined(e){return e&&e.length?Buffer.from(e).toString("hex"):void 0}plainObjectToTransaction(e){return new i.Transaction({nonce:BigInt(e.nonce),value:BigInt(e.value||""),receiver:e.receiver,receiverUsername:this.bufferFromBase64(e.receiverUsername).toString(),sender:e.sender,senderUsername:this.bufferFromBase64(e.senderUsername).toString(),guardian:e.guardian,gasPrice:BigInt(e.gasPrice),gasLimit:BigInt(e.gasLimit),data:this.bufferFromBase64(e.data),chainID:String(e.chainID),version:Number(e.version),options:Number(e.options),signature:this.bufferFromHex(e.signature),guardianSignature:this.bufferFromHex(e.guardianSignature),relayer:e.relayer,innerTransactions:e.innerTransactions?e.innerTransactions.map((e=>this.plainObjectToTransaction(e))):void 0})}bufferFromBase64(e){return Buffer.from(e||"","base64")}bufferFromHex(e){return Buffer.from(e||"","hex")}transactionOnNetworkToOutcome(e){const t=(new n.ResultsParser).parseUntypedOutcome(e),r=new o.SmartContractCallOutcome({function:e.function,returnCode:t.returnCode.toString(),returnMessage:t.returnMessage,returnDataParts:t.values}),i=e.contractResults.items.map((e=>this.smartContractResultOnNetworkToSmartContractResult(e))),a=new o.TransactionLogs({address:e.logs.address.bech32(),events:e.logs.events.map((e=>this.eventOnNetworkToEvent(e)))});return new o.TransactionOutcome({logs:a,smartContractResults:i,directSmartContractCallOutcome:r})}smartContractResultOnNetworkToSmartContractResult(e){return new o.SmartContractResult({sender:e.sender.bech32(),receiver:e.receiver.bech32(),data:Buffer.from(e.data),logs:new o.TransactionLogs({address:e.logs.address.bech32(),events:e.logs.events.map((e=>this.eventOnNetworkToEvent(e)))})})}eventOnNetworkToEvent(e){const t=e.dataPayload?.valueOf()||Buffer.from(e.data||""),r=e.additionalData?.map((e=>Buffer.from(e.valueOf())))||[];return 0===r.length&&t.length&&r.push(Buffer.from(t)),new o.TransactionEvent({address:e.address.bech32(),identifier:e.identifier,topics:e.topics.map((e=>Buffer.from(e.hex(),"hex"))),dataItems:r})}}},33939:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrSmartContractQuery=t.ErrParseTransactionOutcome=t.ErrInvalidInnerTransaction=t.ErrBadUsage=t.ErrInvalidTokenIdentifier=t.ErrIsCompletedFieldIsMissingOnTransaction=t.ErrGasLimitShouldBe0ForInnerTransaction=t.ErrInvalidRelayedV2BuilderArguments=t.ErrInvalidRelayedV1BuilderArguments=t.ErrNotImplemented=t.ErrContractInteraction=t.ErrCodec=t.ErrCannotParseTransactionOutcome=t.ErrCannotParseContractResults=t.ErrMissingFieldOnEnum=t.ErrMissingFieldOnStruct=t.ErrTypingSystem=t.ErrMock=t.ErrContractHasNoAddress=t.ErrContract=t.ErrExpectedTransactionEventsNotFound=t.ErrExpectedTransactionStatusNotReached=t.ErrTransactionWatcherTimeout=t.ErrAsyncTimerAborted=t.ErrAsyncTimerAlreadyRunning=t.ErrInvalidFunctionName=t.ErrSignatureCannotCreate=t.ErrTransactionOptionsInvalid=t.ErrTransactionVersionInvalid=t.ErrNonceInvalid=t.ErrNotEnoughGas=t.ErrAddressEmpty=t.ErrAddressBadHrp=t.ErrAddressCannotCreate=t.ErrUnexpectedCondition=t.ErrInvariantFailed=t.ErrBadType=t.ErrUnsupportedOperation=t.ErrInvalidArgument=t.Err=void 0;class r extends Error{constructor(e,t){super(e),this.inner=void 0,this.inner=t}summary(){let e=[];e.push({name:this.name,message:this.message});let t=this.inner;for(;t;)e.push({name:t.name,message:t.message}),t=t.inner;return e}}t.Err=r;t.ErrInvalidArgument=class extends r{constructor(e,t){super(`Invalid argument: ${e}`,t)}};t.ErrUnsupportedOperation=class extends r{constructor(e){super(`Operation "${e}" not supported. Reason: ${arguments.length>1&&void 0!==arguments[1]?arguments[1]:"not specified"}`)}};t.ErrBadType=class extends r{constructor(e,t,r){super(`Bad type of "${e}": ${r}. Expected type: ${t}`)}};t.ErrInvariantFailed=class extends r{constructor(e){super(`Invariant failed: [${e}]`)}};t.ErrUnexpectedCondition=class extends r{constructor(e){super(`Unexpected condition: [${e}]`)}};t.ErrAddressCannotCreate=class extends r{constructor(e,t){super(`Cannot create address from: ${e}`,t)}};t.ErrAddressBadHrp=class extends r{constructor(e,t){super(`Wrong address HRP. Expected: ${e}, got ${t}`)}};t.ErrAddressEmpty=class extends r{constructor(){super("Address is empty")}};t.ErrNotEnoughGas=class extends r{constructor(e){super(`Not enough gas provided: ${e}`)}};t.ErrNonceInvalid=class extends r{constructor(e){super(`Invalid nonce: ${e}`)}};t.ErrTransactionVersionInvalid=class extends r{constructor(e){super(`Invalid transaction version: ${e}`)}};t.ErrTransactionOptionsInvalid=class extends r{constructor(e){super(`Invalid transaction options: ${e}`)}};t.ErrSignatureCannotCreate=class extends r{constructor(e,t){super(`Cannot create signature from: ${e}`,t)}};t.ErrInvalidFunctionName=class extends r{constructor(){super("Invalid function name")}};t.ErrAsyncTimerAlreadyRunning=class extends r{constructor(){super("Async timer already running")}};t.ErrAsyncTimerAborted=class extends r{constructor(){super("Async timer aborted")}};t.ErrTransactionWatcherTimeout=class extends r{constructor(){super("TransactionWatcher has timed out")}};t.ErrExpectedTransactionStatusNotReached=class extends r{constructor(){super("Expected transaction status not reached")}};t.ErrExpectedTransactionEventsNotFound=class extends r{constructor(){super("Expected transaction events not found")}};class n extends r{constructor(e){super(e)}}t.ErrContract=n;t.ErrContractHasNoAddress=class extends n{constructor(){super("\nThe smart contract has no address set. Make sure you provide the address in the constructor, or call setAddress() appropriately.\nIf you need to recompute the address of the contract, make use of SmartContract.computeAddress() (static method). \n")}};t.ErrMock=class extends r{constructor(e){super(e)}};t.ErrTypingSystem=class extends r{constructor(e){super(e)}};t.ErrMissingFieldOnStruct=class extends r{constructor(e,t){super(`field ${e} does not exist on struct ${t}`)}};t.ErrMissingFieldOnEnum=class extends r{constructor(e,t){super(`field ${e} does not exist on enum ${t}`)}};t.ErrCannotParseContractResults=class extends r{constructor(e){super(`cannot parse contract results: ${e}`)}};t.ErrCannotParseTransactionOutcome=class extends r{constructor(e,t){super(`cannot parse outcome of transaction ${e}: ${t}`)}};t.ErrCodec=class extends r{constructor(e){super(e)}};t.ErrContractInteraction=class extends r{constructor(e){super(e)}};t.ErrNotImplemented=class extends r{constructor(){super("Method not yet implemented")}};t.ErrInvalidRelayedV1BuilderArguments=class extends r{constructor(){super("invalid arguments for relayed v1 builder")}};t.ErrInvalidRelayedV2BuilderArguments=class extends r{constructor(){super("invalid arguments for relayed v2 builder")}};t.ErrGasLimitShouldBe0ForInnerTransaction=class extends r{constructor(){super("gas limit must be 0 for the inner transaction for relayed v2")}};t.ErrIsCompletedFieldIsMissingOnTransaction=class extends r{constructor(){super("The transaction watcher requires the `isCompleted` property to be defined on the transaction object. Perhaps you've used the sdk-network-provider's `ProxyNetworkProvider.getTransaction()` and in that case you should also pass `withProcessStatus=true`.")}};t.ErrInvalidTokenIdentifier=class extends r{constructor(e){super(e)}};t.ErrBadUsage=class extends r{constructor(e){super(e)}};t.ErrInvalidInnerTransaction=class extends r{constructor(e){super(e)}};t.ErrParseTransactionOutcome=class extends r{constructor(e){super(e)}};t.ErrSmartContractQuery=class extends r{constructor(e,t){super(t),this.returnCode=e}}},6665:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GasEstimator=t.DefaultGasConfiguration=void 0,t.DefaultGasConfiguration={minGasLimit:5e4,gasPerDataByte:1500,gasCostESDTTransfer:2e5,gasCostESDTNFTTransfer:2e5,gasCostESDTNFTMultiTransfer:2e5};const r=8e5;t.GasEstimator=class{constructor(e){this.gasConfiguration=e||t.DefaultGasConfiguration}forEGLDTransfer(e){return this.gasConfiguration.minGasLimit+this.gasConfiguration.gasPerDataByte*e}forESDTTransfer(e){return this.gasConfiguration.minGasLimit+this.gasConfiguration.gasCostESDTTransfer+this.gasConfiguration.gasPerDataByte*e+1e5}forESDTNFTTransfer(e){return this.gasConfiguration.minGasLimit+this.gasConfiguration.gasCostESDTNFTTransfer+this.gasConfiguration.gasPerDataByte*e+r}forMultiESDTNFTTransfer(e,t){return this.gasConfiguration.minGasLimit+(this.gasConfiguration.gasCostESDTNFTMultiTransfer+r)*t+this.gasConfiguration.gasPerDataByte*e}}},94054:(e,t,r)=>{"use strict";r.g.Buffer||(r.g.Buffer=r(93325).Buffer)},89364:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=void 0;const a=o(r(33939));class s{constructor(e){if(e)if(e instanceof Buffer)this.hash=e;else{if("string"!==typeof e)throw new a.ErrBadType("hash","buffer | string",e);this.hash=Buffer.from(e,"hex")}else this.hash=Buffer.from([])}static empty(){return new s(Buffer.from([]))}isEmpty(){return 0==this.hash.length}toString(){return this.hex()}hex(){return this.hash.toString("hex")}valueOf(){return this.hash}}t.Hash=s},72430:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),r(94054),i(r(5229),t),i(r(94067),t),i(r(70054),t),i(r(84737),t),i(r(35446),t),i(r(77310),t),i(r(33939),t),i(r(6665),t),i(r(93361),t),i(r(18924),t),i(r(87052),t),i(r(84521),t),i(r(89814),t),i(r(57086),t),i(r(82481),t),i(r(16510),t),i(r(5849),t),i(r(85975),t),i(r(1678),t),i(r(84446),t),i(r(85330),t),i(r(73331),t),i(r(96082),t),i(r(6504),t),i(r(7012),t),i(r(23446),t),i(r(66079),t)},93361:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18924:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},87052:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LogLevel=void 0,function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.None=5]="None"}(r=t.LogLevel||(t.LogLevel={}));class n{static setLevel(e){n.logLevel=e}static trace(e){if(!(n.logLevel>=r.Debug)){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o=r.Debug)){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o=r.Info)){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o=r.Warn)){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o=r.Error)){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageComputer=t.Message=void 0;const n=r(87679),i=r(70054),o=r(33858);class a{constructor(e){this.data=e.data,this.signature=e.signature,this.address=e.address,this.version=e.version||n.DEFAULT_MESSAGE_VERSION,this.signer=e.signer||n.SDK_JS_SIGNER}}t.Message=a;t.MessageComputer=class{constructor(){}computeBytesForSigning(e){const t=Buffer.from(e.data.length.toString()),r=Buffer.concat([t,e.data]);let i=Buffer.concat([Buffer.from(n.MESSAGE_PREFIX),r]);return o("keccak256").update(i).digest()}computeBytesForVerifying(e){return this.computeBytesForSigning(e)}packMessage(e){return{message:Buffer.from(e.data).toString("hex"),signature:e.signature?Buffer.from(e.signature).toString("hex"):"",address:e.address?e.address.bech32():"",version:e.version,signer:e.signer}}unpackMessage(e){const t=this.trimHexPrefix(e.message),r=Buffer.from(t,"hex"),o=this.trimHexPrefix(e.signature||""),s=Buffer.from(o,"hex");let c;e.address&&(c=i.Address.fromBech32(e.address));const u=e.version||n.DEFAULT_MESSAGE_VERSION,l=e.signer||n.UNKNOWN_SIGNER;return new a({data:r,signature:s,address:c,version:u,signer:l})}trimHexPrefix(e){return e.startsWith("0x")||e.startsWith("0X")?e.slice(2):e}}},89814:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionOptions=t.TransactionVersion=void 0;const a=r(87679),s=o(r(33939));class c{constructor(e){if((e=Number(e))<1)throw new s.ErrTransactionVersionInvalid(e);this.value=e}static withDefaultVersion(){return new c(a.TRANSACTION_VERSION_DEFAULT)}static withTxOptions(){return new c(a.TRANSACTION_VERSION_DEFAULT)}valueOf(){return this.value}}t.TransactionVersion=c;class u{constructor(e){if((e=Number(e))<0)throw new s.ErrTransactionOptionsInvalid(e);this.value=e}static withDefaultOptions(){return new u(a.TRANSACTION_OPTIONS_DEFAULT)}static withOptions(e){let t=0;return e.hashSign&&(t|=a.TRANSACTION_OPTIONS_TX_HASH_SIGN),e.guarded&&(t|=a.TRANSACTION_OPTIONS_TX_GUARDED),new u(t)}isWithHashSign(){return(this.value&a.TRANSACTION_OPTIONS_TX_HASH_SIGN)==a.TRANSACTION_OPTIONS_TX_HASH_SIGN}isWithGuardian(){return(this.value&a.TRANSACTION_OPTIONS_TX_GUARDED)==a.TRANSACTION_OPTIONS_TX_GUARDED}setWithHashSign(){this.value|=a.TRANSACTION_OPTIONS_TX_HASH_SIGN}setWithGuardian(){this.value|=a.TRANSACTION_OPTIONS_TX_GUARDED}valueOf(){return this.value}}t.TransactionOptions=u},59716:function(e,t,r){"use strict";var n,i,o;i=[r(44740)],void 0===(o="function"===typeof(n=function(e){var t=e.Reader,r=e.Writer,n=e.util,i=e.roots.default||(e.roots.default={});return i.proto=function(){var o={};return o.Transaction=function(){function o(e){if(this.InnerTransactions=[],e)for(var t=Object.keys(e),r=0;r>>3){case 1:o.Nonce=e.uint64();break;case 2:o.Value=e.bytes();break;case 3:o.RcvAddr=e.bytes();break;case 4:o.RcvUserName=e.bytes();break;case 5:o.SndAddr=e.bytes();break;case 6:o.SndUserName=e.bytes();break;case 7:o.GasPrice=e.uint64();break;case 8:o.GasLimit=e.uint64();break;case 9:o.Data=e.bytes();break;case 10:o.ChainID=e.bytes();break;case 11:o.Version=e.uint32();break;case 12:o.Signature=e.bytes();break;case 13:o.Options=e.uint32();break;case 14:o.GuardianAddr=e.bytes();break;case 15:o.GuardianSignature=e.bytes();break;case 16:o.Relayer=e.bytes();break;case 17:o.InnerTransactions&&o.InnerTransactions.length||(o.InnerTransactions=[]),o.InnerTransactions.push(i.proto.Transaction.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){if("object"!==typeof e||null===e)return"object expected";if(null!=e.Nonce&&e.hasOwnProperty("Nonce")&&!n.isInteger(e.Nonce)&&!(e.Nonce&&n.isInteger(e.Nonce.low)&&n.isInteger(e.Nonce.high)))return"Nonce: integer|Long expected";if(null!=e.Value&&e.hasOwnProperty("Value")&&!(e.Value&&"number"===typeof e.Value.length||n.isString(e.Value)))return"Value: buffer expected";if(null!=e.RcvAddr&&e.hasOwnProperty("RcvAddr")&&!(e.RcvAddr&&"number"===typeof e.RcvAddr.length||n.isString(e.RcvAddr)))return"RcvAddr: buffer expected";if(null!=e.RcvUserName&&e.hasOwnProperty("RcvUserName")&&!(e.RcvUserName&&"number"===typeof e.RcvUserName.length||n.isString(e.RcvUserName)))return"RcvUserName: buffer expected";if(null!=e.SndAddr&&e.hasOwnProperty("SndAddr")&&!(e.SndAddr&&"number"===typeof e.SndAddr.length||n.isString(e.SndAddr)))return"SndAddr: buffer expected";if(null!=e.SndUserName&&e.hasOwnProperty("SndUserName")&&!(e.SndUserName&&"number"===typeof e.SndUserName.length||n.isString(e.SndUserName)))return"SndUserName: buffer expected";if(null!=e.GasPrice&&e.hasOwnProperty("GasPrice")&&!n.isInteger(e.GasPrice)&&!(e.GasPrice&&n.isInteger(e.GasPrice.low)&&n.isInteger(e.GasPrice.high)))return"GasPrice: integer|Long expected";if(null!=e.GasLimit&&e.hasOwnProperty("GasLimit")&&!n.isInteger(e.GasLimit)&&!(e.GasLimit&&n.isInteger(e.GasLimit.low)&&n.isInteger(e.GasLimit.high)))return"GasLimit: integer|Long expected";if(null!=e.Data&&e.hasOwnProperty("Data")&&!(e.Data&&"number"===typeof e.Data.length||n.isString(e.Data)))return"Data: buffer expected";if(null!=e.ChainID&&e.hasOwnProperty("ChainID")&&!(e.ChainID&&"number"===typeof e.ChainID.length||n.isString(e.ChainID)))return"ChainID: buffer expected";if(null!=e.Version&&e.hasOwnProperty("Version")&&!n.isInteger(e.Version))return"Version: integer expected";if(null!=e.Signature&&e.hasOwnProperty("Signature")&&!(e.Signature&&"number"===typeof e.Signature.length||n.isString(e.Signature)))return"Signature: buffer expected";if(null!=e.Options&&e.hasOwnProperty("Options")&&!n.isInteger(e.Options))return"Options: integer expected";if(null!=e.GuardianAddr&&e.hasOwnProperty("GuardianAddr")&&!(e.GuardianAddr&&"number"===typeof e.GuardianAddr.length||n.isString(e.GuardianAddr)))return"GuardianAddr: buffer expected";if(null!=e.GuardianSignature&&e.hasOwnProperty("GuardianSignature")&&!(e.GuardianSignature&&"number"===typeof e.GuardianSignature.length||n.isString(e.GuardianSignature)))return"GuardianSignature: buffer expected";if(null!=e.Relayer&&e.hasOwnProperty("Relayer")&&!(e.Relayer&&"number"===typeof e.Relayer.length||n.isString(e.Relayer)))return"Relayer: buffer expected";if(null!=e.InnerTransactions&&e.hasOwnProperty("InnerTransactions")){if(!Array.isArray(e.InnerTransactions))return"InnerTransactions: array expected";for(var t=0;t>>0,e.Nonce.high>>>0).toNumber(!0))),null!=e.Value&&("string"===typeof e.Value?n.base64.decode(e.Value,t.Value=n.newBuffer(n.base64.length(e.Value)),0):e.Value.length>=0&&(t.Value=e.Value)),null!=e.RcvAddr&&("string"===typeof e.RcvAddr?n.base64.decode(e.RcvAddr,t.RcvAddr=n.newBuffer(n.base64.length(e.RcvAddr)),0):e.RcvAddr.length>=0&&(t.RcvAddr=e.RcvAddr)),null!=e.RcvUserName&&("string"===typeof e.RcvUserName?n.base64.decode(e.RcvUserName,t.RcvUserName=n.newBuffer(n.base64.length(e.RcvUserName)),0):e.RcvUserName.length>=0&&(t.RcvUserName=e.RcvUserName)),null!=e.SndAddr&&("string"===typeof e.SndAddr?n.base64.decode(e.SndAddr,t.SndAddr=n.newBuffer(n.base64.length(e.SndAddr)),0):e.SndAddr.length>=0&&(t.SndAddr=e.SndAddr)),null!=e.SndUserName&&("string"===typeof e.SndUserName?n.base64.decode(e.SndUserName,t.SndUserName=n.newBuffer(n.base64.length(e.SndUserName)),0):e.SndUserName.length>=0&&(t.SndUserName=e.SndUserName)),null!=e.GasPrice&&(n.Long?(t.GasPrice=n.Long.fromValue(e.GasPrice)).unsigned=!0:"string"===typeof e.GasPrice?t.GasPrice=parseInt(e.GasPrice,10):"number"===typeof e.GasPrice?t.GasPrice=e.GasPrice:"object"===typeof e.GasPrice&&(t.GasPrice=new n.LongBits(e.GasPrice.low>>>0,e.GasPrice.high>>>0).toNumber(!0))),null!=e.GasLimit&&(n.Long?(t.GasLimit=n.Long.fromValue(e.GasLimit)).unsigned=!0:"string"===typeof e.GasLimit?t.GasLimit=parseInt(e.GasLimit,10):"number"===typeof e.GasLimit?t.GasLimit=e.GasLimit:"object"===typeof e.GasLimit&&(t.GasLimit=new n.LongBits(e.GasLimit.low>>>0,e.GasLimit.high>>>0).toNumber(!0))),null!=e.Data&&("string"===typeof e.Data?n.base64.decode(e.Data,t.Data=n.newBuffer(n.base64.length(e.Data)),0):e.Data.length>=0&&(t.Data=e.Data)),null!=e.ChainID&&("string"===typeof e.ChainID?n.base64.decode(e.ChainID,t.ChainID=n.newBuffer(n.base64.length(e.ChainID)),0):e.ChainID.length>=0&&(t.ChainID=e.ChainID)),null!=e.Version&&(t.Version=e.Version>>>0),null!=e.Signature&&("string"===typeof e.Signature?n.base64.decode(e.Signature,t.Signature=n.newBuffer(n.base64.length(e.Signature)),0):e.Signature.length>=0&&(t.Signature=e.Signature)),null!=e.Options&&(t.Options=e.Options>>>0),null!=e.GuardianAddr&&("string"===typeof e.GuardianAddr?n.base64.decode(e.GuardianAddr,t.GuardianAddr=n.newBuffer(n.base64.length(e.GuardianAddr)),0):e.GuardianAddr.length>=0&&(t.GuardianAddr=e.GuardianAddr)),null!=e.GuardianSignature&&("string"===typeof e.GuardianSignature?n.base64.decode(e.GuardianSignature,t.GuardianSignature=n.newBuffer(n.base64.length(e.GuardianSignature)),0):e.GuardianSignature.length>=0&&(t.GuardianSignature=e.GuardianSignature)),null!=e.Relayer&&("string"===typeof e.Relayer?n.base64.decode(e.Relayer,t.Relayer=n.newBuffer(n.base64.length(e.Relayer)),0):e.Relayer.length>=0&&(t.Relayer=e.Relayer)),e.InnerTransactions){if(!Array.isArray(e.InnerTransactions))throw TypeError(".proto.Transaction.InnerTransactions: array expected");t.InnerTransactions=[];for(var r=0;r>>0,e.Nonce.high>>>0).toNumber(!0):e.Nonce),null!=e.Value&&e.hasOwnProperty("Value")&&(r.Value=t.bytes===String?n.base64.encode(e.Value,0,e.Value.length):t.bytes===Array?Array.prototype.slice.call(e.Value):e.Value),null!=e.RcvAddr&&e.hasOwnProperty("RcvAddr")&&(r.RcvAddr=t.bytes===String?n.base64.encode(e.RcvAddr,0,e.RcvAddr.length):t.bytes===Array?Array.prototype.slice.call(e.RcvAddr):e.RcvAddr),null!=e.RcvUserName&&e.hasOwnProperty("RcvUserName")&&(r.RcvUserName=t.bytes===String?n.base64.encode(e.RcvUserName,0,e.RcvUserName.length):t.bytes===Array?Array.prototype.slice.call(e.RcvUserName):e.RcvUserName),null!=e.SndAddr&&e.hasOwnProperty("SndAddr")&&(r.SndAddr=t.bytes===String?n.base64.encode(e.SndAddr,0,e.SndAddr.length):t.bytes===Array?Array.prototype.slice.call(e.SndAddr):e.SndAddr),null!=e.SndUserName&&e.hasOwnProperty("SndUserName")&&(r.SndUserName=t.bytes===String?n.base64.encode(e.SndUserName,0,e.SndUserName.length):t.bytes===Array?Array.prototype.slice.call(e.SndUserName):e.SndUserName),null!=e.GasPrice&&e.hasOwnProperty("GasPrice")&&("number"===typeof e.GasPrice?r.GasPrice=t.longs===String?String(e.GasPrice):e.GasPrice:r.GasPrice=t.longs===String?n.Long.prototype.toString.call(e.GasPrice):t.longs===Number?new n.LongBits(e.GasPrice.low>>>0,e.GasPrice.high>>>0).toNumber(!0):e.GasPrice),null!=e.GasLimit&&e.hasOwnProperty("GasLimit")&&("number"===typeof e.GasLimit?r.GasLimit=t.longs===String?String(e.GasLimit):e.GasLimit:r.GasLimit=t.longs===String?n.Long.prototype.toString.call(e.GasLimit):t.longs===Number?new n.LongBits(e.GasLimit.low>>>0,e.GasLimit.high>>>0).toNumber(!0):e.GasLimit),null!=e.Data&&e.hasOwnProperty("Data")&&(r.Data=t.bytes===String?n.base64.encode(e.Data,0,e.Data.length):t.bytes===Array?Array.prototype.slice.call(e.Data):e.Data),null!=e.ChainID&&e.hasOwnProperty("ChainID")&&(r.ChainID=t.bytes===String?n.base64.encode(e.ChainID,0,e.ChainID.length):t.bytes===Array?Array.prototype.slice.call(e.ChainID):e.ChainID),null!=e.Version&&e.hasOwnProperty("Version")&&(r.Version=e.Version),null!=e.Signature&&e.hasOwnProperty("Signature")&&(r.Signature=t.bytes===String?n.base64.encode(e.Signature,0,e.Signature.length):t.bytes===Array?Array.prototype.slice.call(e.Signature):e.Signature),null!=e.Options&&e.hasOwnProperty("Options")&&(r.Options=e.Options),null!=e.GuardianAddr&&e.hasOwnProperty("GuardianAddr")&&(r.GuardianAddr=t.bytes===String?n.base64.encode(e.GuardianAddr,0,e.GuardianAddr.length):t.bytes===Array?Array.prototype.slice.call(e.GuardianAddr):e.GuardianAddr),null!=e.GuardianSignature&&e.hasOwnProperty("GuardianSignature")&&(r.GuardianSignature=t.bytes===String?n.base64.encode(e.GuardianSignature,0,e.GuardianSignature.length):t.bytes===Array?Array.prototype.slice.call(e.GuardianSignature):e.GuardianSignature),null!=e.Relayer&&e.hasOwnProperty("Relayer")&&(r.Relayer=t.bytes===String?n.base64.encode(e.Relayer,0,e.Relayer.length):t.bytes===Array?Array.prototype.slice.call(e.Relayer):e.Relayer),e.InnerTransactions&&e.InnerTransactions.length){r.InnerTransactions=[];for(var a=0;athis.convertToProtoMessage(e))),o}serializeTransactionValue(e){let t=new s.default(e.toString());if(t.isZero())return Buffer.from([0,0]);let r=d.bigIntToBuffer(t);return r=Buffer.concat([Buffer.from([0]),r]),r}isGuardedTransaction(e){const t=e.guardian.length>0,r=e.guardianSignature.length>0;return this.isWithGuardian(e)&&t&&r}isWithGuardian(e){return(e.options&u.TRANSACTION_OPTIONS_TX_GUARDED)==u.TRANSACTION_OPTIONS_TX_GUARDED}deserializeTransaction(e){throw new l.ErrUnsupportedOperation("deserializeTransaction")}}},39901:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJavascriptPrototypesInHierarchy=void 0,t.getJavascriptPrototypesInHierarchy=function(e,t){let r=[],n=Object.getPrototypeOf(e);for(;n&&t(n);)r.push(n),n=Object.getPrototypeOf(n);return r}},57086:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelayedTransactionV1Builder=void 0;const n=r(70054),i=r(33939),o=r(85330),a=r(96082),s=r(8531);t.RelayedTransactionV1Builder=class{setInnerTransaction(e){return this.innerTransaction=e,this}setNetworkConfig(e){return this.netConfig=e,this}setRelayerAddress(e){return this.relayerAddress=e,this}setRelayerNonce(e){return this.relayerNonce=e,this}setRelayedTransactionVersion(e){return this.relayedTransactionVersion=e,this}setRelayedTransactionOptions(e){return this.relayedTransactionOptions=e,this}setRelayedTransactionGuardian(e){return this.relayedTransactionGuardian=e,this}build(){if(!this.innerTransaction||!this.netConfig||!this.relayerAddress||!this.innerTransaction.getSignature())throw new i.ErrInvalidRelayedV1BuilderArguments;const e=this.prepareInnerTransaction(),t=`relayedTx@${Buffer.from(e).toString("hex")}`,r=new a.TransactionPayload(t),n=this.netConfig.MinGasLimit+this.netConfig.GasPerDataByte*r.length()+this.innerTransaction.getGasLimit().valueOf();let s=new o.Transaction({nonce:this.relayerNonce,sender:this.relayerAddress,receiver:this.innerTransaction.getSender(),value:0,gasLimit:n,data:r,chainID:this.netConfig.ChainID,version:this.relayedTransactionVersion,options:this.relayedTransactionOptions,guardian:this.relayedTransactionGuardian});return this.relayerNonce&&s.setNonce(this.relayerNonce),s}prepareInnerTransaction(){if(!this.innerTransaction)return"";const e={nonce:this.innerTransaction.getNonce().valueOf(),sender:new n.Address(this.innerTransaction.getSender().bech32()).pubkey().toString("base64"),receiver:new n.Address(this.innerTransaction.getReceiver().bech32()).pubkey().toString("base64"),value:BigInt(this.innerTransaction.getValue().toString()),gasPrice:this.innerTransaction.getGasPrice().valueOf(),gasLimit:this.innerTransaction.getGasLimit().valueOf(),data:this.innerTransaction.getData().valueOf().toString("base64"),signature:this.innerTransaction.getSignature().toString("base64"),chainID:Buffer.from(this.innerTransaction.getChainID().valueOf()).toString("base64"),version:this.innerTransaction.getVersion().valueOf(),options:0==this.innerTransaction.getOptions().valueOf()?void 0:this.innerTransaction.getOptions().valueOf(),guardian:this.innerTransaction.getGuardian().bech32()?new n.Address(this.innerTransaction.getGuardian().bech32()).pubkey().toString("base64"):void 0,guardianSignature:this.innerTransaction.getGuardianSignature().toString("hex")?this.innerTransaction.getGuardianSignature().toString("base64"):void 0,sndUserName:this.innerTransaction.getSenderUsername()?Buffer.from(this.innerTransaction.getSenderUsername()).toString("base64"):void 0,rcvUserName:this.innerTransaction.getReceiverUsername()?Buffer.from(this.innerTransaction.getReceiverUsername()).toString("base64"):void 0};return s.stringify(e)}}},82481:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelayedTransactionV2Builder=void 0;const n=r(33939),i=r(85975),o=r(85330),a=r(96082);t.RelayedTransactionV2Builder=class{setInnerTransaction(e){return this.innerTransaction=e,this}setInnerTransactionGasLimit(e){return this.innerTransactionGasLimit=e,this}setNetworkConfig(e){return this.netConfig=e,this}setRelayerAddress(e){return this.relayerAddress=e,this}setRelayerNonce(e){return this.relayerNonce=e,this}build(){if(!this.innerTransaction||!this.innerTransactionGasLimit||!this.relayerAddress||!this.netConfig||!this.innerTransaction.getSignature())throw new n.ErrInvalidRelayedV2BuilderArguments;if(0!=this.innerTransaction.getGasLimit())throw new n.ErrGasLimitShouldBe0ForInnerTransaction;const{argumentsString:e}=(new i.ArgSerializer).valuesToString([new i.AddressValue(this.innerTransaction.getReceiver()),new i.U64Value(this.innerTransaction.getNonce().valueOf()),new i.BytesValue(this.innerTransaction.getData().valueOf()),new i.BytesValue(this.innerTransaction.getSignature())]),t=`relayedTxV2@${e}`,r=new a.TransactionPayload(t);let s=new o.Transaction({sender:this.relayerAddress,receiver:this.innerTransaction.getSender(),value:0,gasLimit:this.innerTransactionGasLimit.valueOf()+this.netConfig.MinGasLimit+this.netConfig.GasPerDataByte*r.length(),data:r,chainID:this.netConfig.ChainID,version:this.innerTransaction.getVersion(),options:this.innerTransaction.getOptions()});return this.relayerNonce&&s.setNonce(this.relayerNonce),s}}},16510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignableMessage=void 0;const n=r(70054),i=r(11712),o=r(87679),a=r(33858);t.SignableMessage=class{constructor(e){this.message=Buffer.from([]),this.signature=Buffer.from([]),this.version=1,this.signer="ErdJS",this.address=n.Address.empty(),Object.assign(this,e)}serializeForSigning(){const e=Buffer.from(this.message.length.toString()),t=Buffer.concat([e,this.message]);let r=Buffer.concat([Buffer.from(o.MESSAGE_PREFIX),t]);return a("keccak256").update(r).digest()}serializeForSigningRaw(){return Buffer.concat([this.getMessageSize(),this.message])}getSignature(){return this.signature}applySignature(e){this.signature=i.interpretSignatureAsBuffer(e)}getMessageSize(){const e=Buffer.alloc(4);return e.writeUInt32BE(this.message.length,0),e}toJSON(){return{address:this.address.bech32(),message:"0x"+this.message.toString("hex"),signature:"0x"+this.signature.toString("hex"),version:this.version,signer:this.signer}}}},11712:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.interpretSignatureAsBuffer=t.Signature=void 0;const a=o(r(33939));class s{constructor(e){if(this.valueHex="",e)return"string"===typeof e?s.fromHex(e):e instanceof Buffer?s.fromBuffer(e):void 0}static empty(){return new s}static fromHex(e){if(e.startsWith("0x")&&(e=e.slice(2)),!s.isValidHex(e))throw new a.ErrSignatureCannotCreate(e);return s.fromValidHex(e)}static isValidHex(e){return 64==Buffer.from(e,"hex").length}static fromValidHex(e){let t=new s;return t.valueHex=e,t}static fromBuffer(e){if(64!=e.length)throw new a.ErrSignatureCannotCreate(e);return s.fromValidHex(e.toString("hex"))}hex(){return this.valueHex}}t.Signature=s,t.interpretSignatureAsBuffer=function(e){if(ArrayBuffer.isView(e))return Buffer.from(e);if(null!=e.hex)return Buffer.from(e.hex(),"hex");throw new Error(`Object cannot be interpreted as a signature: ${e}`)}},5849:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SmartContractQueriesController=void 0;const n=r(33939),i=r(30449),o=r(85975),a=r(41077);t.SmartContractQueriesController=class{constructor(e){this.abi=e.abi,this.queryRunner=e.queryRunner,this.legacyResultsParser=new o.ResultsParser}async query(e){const t=this.createQuery(e),r=await this.runQuery(t);return this.raiseForStatus(r),this.parseQueryResponse(r)}raiseForStatus(e){if(!("ok"===e.returnCode))throw new n.ErrSmartContractQuery(e.returnCode,e.returnMessage)}createQuery(e){const t=this.encodeArguments(e.function,e.arguments);return new i.SmartContractQuery({contract:e.contract,caller:e.caller,function:e.function,arguments:t,value:e.value})}encodeArguments(e,t){const r=this.abi?.getEndpoint(e);if(r){const e=o.NativeSerializer.nativeToTypedValues(t,r);return(new o.ArgSerializer).valuesToBuffers(e)}if(this.areArgsOfTypedValue(t))return(new o.ArgSerializer).valuesToBuffers(t);if(this.areArgsBuffers(t))return t.map((e=>Buffer.from(e)));throw new n.Err("cannot encode arguments: when ABI is not available, they must be either typed values or buffers")}areArgsOfTypedValue(e){return e.every((e=>a.isTyped(e)))}areArgsBuffers(e){for(const t of e)if(!ArrayBuffer.isView(t))return!1;return!0}async runQuery(e){return await this.queryRunner.runQuery(e)}parseQueryResponse(e){if(!this.abi)return e.returnDataParts;const t={returnCode:e.returnCode,returnMessage:e.returnMessage,getReturnDataParts:()=>e.returnDataParts.map((e=>Buffer.from(e)))},r=e.function,n=this.abi.getEndpoint(r);return this.legacyResultsParser.parseQueryResponse(t,n).values.map((e=>e.valueOf()))}}},30449:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SmartContractQueryResponse=t.SmartContractQuery=void 0;t.SmartContractQuery=class{constructor(e){this.contract=e.contract,this.caller=e.caller,this.value=e.value,this.function=e.function,this.arguments=e.arguments}};t.SmartContractQueryResponse=class{constructor(e){this.function=e.function,this.returnCode=e.returnCode,this.returnMessage=e.returnMessage,this.returnDataParts=e.returnDataParts}}},20531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgSerializer=void 0;const n=r(87679),i=r(2002),o=r(41077),a=r(78181),s=r(15142),c=r(29988),u={codec:new i.BinaryCodec};t.ArgSerializer=class{constructor(e){e={...u,...e},this.codec=e.codec}stringToValues(e,t){let r=this.stringToBuffers(e);return this.buffersToValues(r,t)}stringToBuffers(e){return e.split(n.ARGUMENTS_SEPARATOR).map((e=>Buffer.from(e,"hex")))}buffersToValues(e,t){const r=this;let n=[],i=0,u=(e=e||[]).length;for(let o=0;o=u}return n}valuesToString(e){let t=this.valuesToStrings(e);return{argumentsString:t.join(n.ARGUMENTS_SEPARATOR),count:t.length}}valuesToStrings(e){return this.valuesToBuffers(e).map((e=>e.toString("hex")))}valuesToBuffers(e){const t=this,r=[];for(const i of e)n(i);function n(e){if(e.hasExactClass(a.OptionalValue.ClassName)){const t=e;return void(t.isSet()&&n(t.getTypedValue()))}if(e.hasExactClass(c.VariadicValue.ClassName))return void function(e){const i=e.getType();if(i.isCounted){const n=new o.U32Value(e.getItems().length);r.push(t.codec.encodeTopLevel(n))}for(const t of e.getItems())n(t)}(e);if(e.hasExactClass(s.CompositeValue.ClassName)){const t=e;for(const e of t.getItems())n(e);return}const i=t.codec.encodeTopLevel(e);r.push(i)}return r}}},77061:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentErrorContext=void 0;const n=r(33939);t.ArgumentErrorContext=class{constructor(e,t,r){this.endpointName=e,this.argumentIndex=t,this.parameterDefinition=r}throwError(e){throw new n.ErrInvalidArgument(`Error when converting arguments for endpoint (endpoint name: ${this.endpointName}, argument index: ${this.argumentIndex}, name: ${this.parameterDefinition.name}, type: ${this.parameterDefinition.type})\nNested error: ${e}`)}convertError(e,t){this.throwError(`Can't convert argument (argument: ${e}, type ${typeof e}), wanted type: ${t})`)}unhandledType(e,t){this.throwError(`Unhandled type (function: ${e}, type: ${t})`)}guardSameLength(e,t){(e=e||[]).length!=t.length&&this.throwError(`Incorrect composite type length: have ${e.length}, expected ${t.length} (argument: ${e})`)}guardHasField(e,t){t in(e=e||{})||this.throwError(`Struct argument does not contain a field named "${t}" (argument: ${JSON.stringify(e)})`)}}},81242:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Code=void 0;const n=r(37616);class i{constructor(e){this.hex=e}static fromBuffer(e){return new i(e.toString("hex"))}static fromHex(e){return new i(e)}toString(){return this.hex}valueOf(){return Buffer.from(this.hex,"hex")}computeHash(){const e=n(32).update(this.valueOf()).digest();return Buffer.from(e)}}t.Code=i},53683:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeMetadata=void 0;class r{constructor(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.upgradeable=e,this.readable=t,this.payable=r,this.payableBySc=n}static fromBytes(e){return r.fromBuffer(Buffer.from(e))}static fromBuffer(e){if(e.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressBinaryCodec=void 0;const n=r(70054),i=r(41077);t.AddressBinaryCodec=class{decodeNested(e){let t=e.slice(0,32),r=new n.Address(t);return[new i.AddressValue(r),32]}decodeTopLevel(e){let[t,r]=this.decodeNested(e);return t}encodeNested(e){return e.valueOf().pubkey()}encodeTopLevel(e){return e.valueOf().pubkey()}}},92701:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayVecBinaryCodec=void 0;const n=r(41077);t.ArrayVecBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){let r=t.length,i=t.getFirstTypeParameter(),o=[],a=0;for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:null;this.constraints=e||new v,this.optionCodec=new u.OptionValueBinaryCodec(this),this.listCodec=new d.ListBinaryCodec(this),this.arrayCodec=new g.ArrayVecBinaryCodec(this),this.primitiveCodec=new l.PrimitiveBinaryCodec(this),this.structCodec=new f.StructBinaryCodec(this),this.tupleCodec=new p.TupleBinaryCodec(this),this.enumCodec=new h.EnumBinaryCodec(this),this.managedDecimalCodec=new m.ManagedDecimalCodec(this),this.managedDecimalSignedCodec=new y.ManagedDecimalSignedCodec(this)}decodeTopLevel(e,t){return this.constraints.checkBufferLength(e),s.onTypeSelect(t,{onOption:()=>this.optionCodec.decodeTopLevel(e,t.getFirstTypeParameter()),onList:()=>this.listCodec.decodeTopLevel(e,t),onArray:()=>this.arrayCodec.decodeTopLevel(e,t),onPrimitive:()=>this.primitiveCodec.decodeTopLevel(e,t),onStruct:()=>this.structCodec.decodeTopLevel(e,t),onTuple:()=>this.tupleCodec.decodeTopLevel(e,t),onEnum:()=>this.enumCodec.decodeTopLevel(e,t),onManagedDecimal:()=>this.managedDecimalCodec.decodeTopLevel(e,t),onManagedDecimalSigned:()=>this.managedDecimalSignedCodec.decodeTopLevel(e,t)})}decodeNested(e,t){this.constraints.checkBufferLength(e);let[r,n]=s.onTypeSelect(t,{onOption:()=>this.optionCodec.decodeNested(e,t.getFirstTypeParameter()),onList:()=>this.listCodec.decodeNested(e,t),onArray:()=>this.arrayCodec.decodeNested(e,t),onPrimitive:()=>this.primitiveCodec.decodeNested(e,t),onStruct:()=>this.structCodec.decodeNested(e,t),onTuple:()=>this.tupleCodec.decodeNested(e,t),onEnum:()=>this.enumCodec.decodeNested(e,t),onManagedDecimal:()=>this.managedDecimalCodec.decodeNested(e,t),onManagedDecimalSigned:()=>this.managedDecimalSignedCodec.decodeNested(e,t)});return[r,n]}encodeNested(e){return c.guardTrue(e.getType().getCardinality().isSingular(),"singular cardinality, thus encodable type"),s.onTypedValueSelect(e,{onPrimitive:()=>this.primitiveCodec.encodeNested(e),onOption:()=>this.optionCodec.encodeNested(e),onList:()=>this.listCodec.encodeNested(e),onArray:()=>this.arrayCodec.encodeNested(e),onStruct:()=>this.structCodec.encodeNested(e),onTuple:()=>this.tupleCodec.encodeNested(e),onEnum:()=>this.enumCodec.encodeNested(e),onManagedDecimal:()=>this.managedDecimalCodec.encodeNested(e),onManagedDecimalSigned:()=>this.managedDecimalSignedCodec.encodeNested(e)})}encodeTopLevel(e){return c.guardTrue(e.getType().getCardinality().isSingular(),"singular cardinality, thus encodable type"),s.onTypedValueSelect(e,{onPrimitive:()=>this.primitiveCodec.encodeTopLevel(e),onOption:()=>this.optionCodec.encodeTopLevel(e),onList:()=>this.listCodec.encodeTopLevel(e),onArray:()=>this.arrayCodec.encodeTopLevel(e),onStruct:()=>this.structCodec.encodeTopLevel(e),onTuple:()=>this.tupleCodec.encodeTopLevel(e),onEnum:()=>this.enumCodec.encodeTopLevel(e),onManagedDecimal:()=>this.managedDecimalCodec.encodeTopLevel(e),onManagedDecimalSigned:()=>this.managedDecimalSignedCodec.encodeTopLevel(e)})}};class v{constructor(e){this.maxBufferLength=e?.maxBufferLength||256e3,this.maxListLength=e?.maxListLength||128e3}checkBufferLength(e){if(e.length>this.maxBufferLength)throw new a.ErrCodec(`Buffer too large: ${e.length} > ${this.maxBufferLength}`)}checkListLength(e){if(e>this.maxListLength)throw new a.ErrCodec(`List too large: ${e} > ${this.maxListLength}`)}}t.BinaryCodecConstraints=v},32342:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBigNumber=t.decodeString=t.decodeBool=t.decodeUnsignedNumber=void 0;const i=n(r(63160)),o=r(41077),a=new(r(37665).BinaryCodec);t.decodeUnsignedNumber=function(e){let t=a.decodeTopLevel(e,new o.BigUIntType);return Number(t.valueOf())},t.decodeBool=function(e){let t=a.decodeTopLevel(e,new o.BooleanType);return Boolean(t.valueOf())},t.decodeString=function(e){let t=a.decodeTopLevel(e,new o.BytesType);return String(t.valueOf())},t.decodeBigNumber=function(e){let t=a.decodeTopLevel(e,new o.BigUIntType);return new i.default(t.valueOf())}},25962:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanBinaryCodec=void 0;const a=o(r(33939)),s=r(41077);class c{decodeNested(e){let t=e.readUInt8(0);return[new s.BooleanValue(t==c.TRUE),1]}decodeTopLevel(e){if(e.length>1)throw new a.ErrInvalidArgument("buffer should be of size <= 1");let t=e[0];return new s.BooleanValue(t==c.TRUE)}encodeNested(e){return e.isTrue()?Buffer.from([c.TRUE]):Buffer.from([c.FALSE])}encodeTopLevel(e){return e.isTrue()?Buffer.from([c.TRUE]):Buffer.from([])}}t.BooleanBinaryCodec=c,c.TRUE=1,c.FALSE=0},13529:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesBinaryCodec=void 0;const n=r(70638),i=r(3587);t.BytesBinaryCodec=class{decodeNested(e){let t=e.readUInt32BE(0),r=e.slice(i.SizeOfU32,i.SizeOfU32+t);return[new n.BytesValue(r),i.SizeOfU32+t]}decodeTopLevel(e){return new n.BytesValue(e)}encodeNested(e){let t=Buffer.alloc(i.SizeOfU32);return t.writeUInt32BE(e.getLength()),Buffer.concat([t,e.valueOf()])}encodeTopLevel(e){return e.valueOf()}}},11932:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeMetadataCodec=void 0;const n=r(53683),i=r(39273);t.CodeMetadataCodec=class{decodeNested(e){const t=n.CodeMetadata.fromBuffer(e);return[new i.CodeMetadataValue(t),length]}decodeTopLevel(e){const t=n.CodeMetadata.fromBuffer(e);return new i.CodeMetadataValue(t)}encodeNested(e){return e.valueOf().toBuffer()}encodeTopLevel(e){return e.valueOf().toBuffer()}}},3587:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeOfU32=void 0,t.SizeOfU32=4},48797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnumBinaryCodec=void 0;const n=r(41077),i=r(88429);t.EnumBinaryCodec=class{constructor(e){this.binaryCodec=e,this.fieldsCodec=new i.FieldsBinaryCodec(e)}decodeTopLevel(e,t){let[r]=this.decodeNested(e,t);return r}decodeNested(e,t){let[r,i]=this.readDiscriminant(e);e=e.slice(i);let o=t.getVariantByDiscriminant(r),a=o.getFieldsDefinitions(),[s,c]=this.fieldsCodec.decodeNested(e,a);return[new n.EnumValue(t,o,s),i+c]}readDiscriminant(e){let[t,r]=this.binaryCodec.decodeNested(e,new n.U8Type);return[t.valueOf(),r]}encodeNested(e){let t=new n.U8Value(e.discriminant),r=this.binaryCodec.encodeNested(t),i=e.getFields(),o=this.fieldsCodec.encodeNested(i);return Buffer.concat([r,o])}encodeTopLevel(e){let t=e.getFields(),r=t.length>0,i=this.fieldsCodec.encodeNested(t),o=new n.U8Value(e.discriminant),a=r?this.binaryCodec.encodeNested(o):this.binaryCodec.encodeTopLevel(o);return Buffer.concat([a,i])}}},88429:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldsBinaryCodec=void 0;const n=r(41077);t.FieldsBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){let r=[],i=0;for(const o of t){let[t,a]=this.binaryCodec.decodeNested(e,o.type);e=e.slice(a),i+=a;let s=new n.Field(t,o.name);r.push(s)}return[r,i]}encodeNested(e){let t=[];for(const r of e){let e=this.binaryCodec.encodeNested(r.value);t.push(e)}return Buffer.concat(t)}}},30593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.H256BinaryCodec=void 0;const n=r(3376);t.H256BinaryCodec=class{decodeNested(e){let t=e.slice(0,32);return[new n.H256Value(t),32]}decodeTopLevel(e){let[t,r]=this.decodeNested(e);return t}encodeNested(e){return e.valueOf()}encodeTopLevel(e){return e.valueOf()}}},2002:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37665),t),i(r(32342),t)},60560:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListBinaryCodec=void 0;const n=r(41077),i=r(3587);t.ListBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){let r=t.getFirstTypeParameter(),o=[],a=e.readUInt32BE(0);this.binaryCodec.constraints.checkListLength(a);let s=e,c=i.SizeOfU32;e=s.slice(c);for(let n=0;n0;){let[t,n]=this.binaryCodec.decodeNested(e,r);i.push(t),a+=n,e=o.slice(a),this.binaryCodec.constraints.checkListLength(i.length)}return new n.List(t,i)}encodeNested(e){this.binaryCodec.constraints.checkListLength(e.getLength());let t=Buffer.alloc(i.SizeOfU32);t.writeUInt32BE(e.getLength());let r=[];for(const n of e.getItems()){let e=this.binaryCodec.encodeNested(n);r.push(e)}return Buffer.concat([t,...r])}encodeTopLevel(e){this.binaryCodec.constraints.checkListLength(e.getLength());let t=[];for(const r of e.getItems()){let e=this.binaryCodec.encodeNested(r);t.push(e)}return Buffer.concat(t)}}},71132:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagedDecimalCodec=void 0;const i=n(r(63160)),o=r(41077),a=r(64083),s=r(3587);t.ManagedDecimalCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){const r=e.readUInt32BE(0),n=e.slice(0,r);return[this.decodeTopLevel(n,t),r]}decodeTopLevel(e,t){if(0===e.length)return new o.ManagedDecimalValue(new i.default(0),0);if(t.isVariable()){const t=e.length-s.SizeOfU32,[r]=this.binaryCodec.decodeNested(e.slice(0,t),new o.BigUIntType),n=e.readUInt32BE(t);return new o.ManagedDecimalValue(r.valueOf().shiftedBy(-n),n)}const r=a.bufferToBigInt(e),n=t.getMetadata(),c="usize"!==n?parseInt(n.toString()):0;return new o.ManagedDecimalValue(r.shiftedBy(-c),c)}encodeNested(e){let t=[];const r=new o.BigUIntValue(e.valueOf().shiftedBy(e.getScale()));return e.isVariable()?(t.push(Buffer.from(this.binaryCodec.encodeNested(r))),t.push(Buffer.from(this.binaryCodec.encodeNested(new o.U32Value(e.getScale()))))):t.push(this.binaryCodec.encodeTopLevel(r)),Buffer.concat(t)}encodeTopLevel(e){return this.encodeNested(e)}}},21264:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagedDecimalSignedCodec=void 0;const i=n(r(63160)),o=r(41077),a=r(64083),s=r(3587);t.ManagedDecimalSignedCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){const r=e.readUInt32BE(0),n=e.slice(0,r);return[this.decodeTopLevel(n,t),r]}decodeTopLevel(e,t){if(0===e.length)return new o.ManagedDecimalSignedValue(new i.default(0),0);if(t.isVariable()){const t=e.length-s.SizeOfU32,[r]=this.binaryCodec.decodeNested(e.slice(0,t),new o.BigIntType),n=e.readUInt32BE(t);return new o.ManagedDecimalSignedValue(r.valueOf().shiftedBy(-n),n)}const r=a.bufferToBigInt(e),n=t.getMetadata(),c="usize"!==n?parseInt(n.toString()):0;return new o.ManagedDecimalSignedValue(r.shiftedBy(-c),c)}encodeNested(e){let t=[];const r=new o.BigIntValue(e.valueOf().shiftedBy(e.getScale()));return e.isVariable()?(t.push(Buffer.from(this.binaryCodec.encodeNested(r))),t.push(Buffer.from(this.binaryCodec.encodeNested(new o.U32Value(e.getScale()))))):t.push(Buffer.from(this.binaryCodec.encodeTopLevel(r))),Buffer.concat(t)}encodeTopLevel(e){return this.encodeNested(e)}}},86395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NothingCodec=void 0;const n=r(41077);t.NothingCodec=class{decodeNested(){return[new n.NothingValue,0]}decodeTopLevel(){return new n.NothingValue}encodeNested(){return Buffer.from([])}encodeTopLevel(){return Buffer.from([])}}},52712:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NumericalBinaryCodec=void 0;const i=n(r(63160)),o=r(41077),a=r(3587),s=r(64083);t.NumericalBinaryCodec=class{decodeNested(e,t){let r=0,n=t.sizeInBytes;n||(r=a.SizeOfU32,n=e.readUInt32BE(0));let i=e.slice(r,r+n);return[this.decodeTopLevel(i,t),n+r]}decodeTopLevel(e,t){let r=s.cloneBuffer(e);if(0==e.length)return new o.NumericalValue(t,new i.default(0));if(!t.withSign||s.isMsbZero(r)){let e=s.bufferToBigInt(r);return new o.NumericalValue(t,e)}s.flipBufferBitsInPlace(r);let n=s.bufferToBigInt(r).multipliedBy(new i.default(-1)).minus(new i.default(1));return new o.NumericalValue(t,n)}encodeNested(e){if(e.sizeInBytes)return this.encodeNestedFixedSize(e,e.sizeInBytes);let t=this.encodeTopLevel(e),r=Buffer.alloc(a.SizeOfU32);return r.writeUInt32BE(t.length),Buffer.concat([r,t])}encodeNestedFixedSize(e,t){if(e.value.isZero())return Buffer.alloc(t,0);if(!e.withSign){const r=s.bigIntToBuffer(e.value),n=Buffer.alloc(t-r.length,0);return Buffer.concat([n,r])}if(e.value.isPositive()){let r=s.bigIntToBuffer(e.value);s.isMsbOne(r)&&(r=s.prependByteToBuffer(r,0));const n=Buffer.alloc(t-r.length,0);return Buffer.concat([n,r])}let r=e.value.plus(new i.default(1)),n=s.bigIntToBuffer(r);s.flipBufferBitsInPlace(n),s.isMsbZero(n)&&(n=s.prependByteToBuffer(n,255));const o=Buffer.alloc(t-n.length,255);return Buffer.concat([o,n])}encodeTopLevel(e){let t=e.withSign;return e.value.isZero()?Buffer.alloc(0):t?this.encodePrimitive(e):s.bigIntToBuffer(e.value)}encodePrimitive(e){if(e.value.isPositive()){let t=s.bigIntToBuffer(e.value);return s.isMsbOne(t)&&(t=s.prependByteToBuffer(t,0)),t}let t=e.value.plus(new i.default(1)),r=s.bigIntToBuffer(t);return s.flipBufferBitsInPlace(r),s.isMsbZero(r)&&(r=s.prependByteToBuffer(r,255)),r}}},8377:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionValueBinaryCodec=void 0;const a=o(r(33939)),s=r(41077);t.OptionValueBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){if(0==e[0])return[s.OptionValue.newMissingTyped(t),1];if(1!=e[0])throw new a.ErrCodec("invalid buffer for optional value");let[r,n]=this.binaryCodec.decodeNested(e.slice(1),t);return[s.OptionValue.newProvided(r),n+1]}decodeTopLevel(e,t){if(0==e.length)return new s.OptionValue(t);if(1!=e[0])throw new a.ErrCodec("invalid buffer for optional value");let[r,n]=this.binaryCodec.decodeNested(e.slice(1),t);return new s.OptionValue(t,r)}encodeNested(e){return e.isSet()?Buffer.concat([Buffer.from([1]),this.binaryCodec.encodeNested(e.getTypedValue())]):Buffer.from([0])}encodeTopLevel(e){return e.isSet()?Buffer.concat([Buffer.from([1]),this.binaryCodec.encodeNested(e.getTypedValue())]):Buffer.from([])}}},519:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrimitiveBinaryCodec=void 0;const n=r(41077),i=r(79050),o=r(25962),a=r(52712),s=r(30593),c=r(13529),u=r(42544),l=r(11932),d=r(86395),f=r(51001);t.PrimitiveBinaryCodec=class{constructor(e){this.binaryCodec=e,this.booleanCodec=new o.BooleanBinaryCodec,this.numericalCodec=new a.NumericalBinaryCodec,this.addressCodec=new i.AddressBinaryCodec,this.h256Codec=new s.H256BinaryCodec,this.bytesCodec=new c.BytesBinaryCodec,this.stringCodec=new f.StringBinaryCodec,this.tokenIdentifierCodec=new u.TokenIdentifierCodec,this.codeMetadataCodec=new l.CodeMetadataCodec,this.nothingCodec=new d.NothingCodec}decodeNested(e,t){return n.onPrimitiveTypeSelect(t,{onBoolean:()=>this.booleanCodec.decodeNested(e),onNumerical:()=>this.numericalCodec.decodeNested(e,t),onAddress:()=>this.addressCodec.decodeNested(e),onBytes:()=>this.bytesCodec.decodeNested(e),onString:()=>this.stringCodec.decodeNested(e),onH256:()=>this.h256Codec.decodeNested(e),onTokenIndetifier:()=>this.tokenIdentifierCodec.decodeNested(e),onCodeMetadata:()=>this.codeMetadataCodec.decodeNested(e),onNothing:()=>this.nothingCodec.decodeNested()})}decodeTopLevel(e,t){return n.onPrimitiveTypeSelect(t,{onBoolean:()=>this.booleanCodec.decodeTopLevel(e),onNumerical:()=>this.numericalCodec.decodeTopLevel(e,t),onAddress:()=>this.addressCodec.decodeTopLevel(e),onBytes:()=>this.bytesCodec.decodeTopLevel(e),onString:()=>this.stringCodec.decodeTopLevel(e),onH256:()=>this.h256Codec.decodeTopLevel(e),onTokenIndetifier:()=>this.tokenIdentifierCodec.decodeTopLevel(e),onCodeMetadata:()=>this.codeMetadataCodec.decodeTopLevel(e),onNothing:()=>this.nothingCodec.decodeTopLevel()})}encodeNested(e){return n.onPrimitiveValueSelect(e,{onBoolean:()=>this.booleanCodec.encodeNested(e),onNumerical:()=>this.numericalCodec.encodeNested(e),onAddress:()=>this.addressCodec.encodeNested(e),onBytes:()=>this.bytesCodec.encodeNested(e),onString:()=>this.stringCodec.encodeNested(e),onH256:()=>this.h256Codec.encodeNested(e),onTypeIdentifier:()=>this.tokenIdentifierCodec.encodeNested(e),onCodeMetadata:()=>this.codeMetadataCodec.encodeNested(e),onNothing:()=>this.nothingCodec.encodeNested()})}encodeTopLevel(e){return n.onPrimitiveValueSelect(e,{onBoolean:()=>this.booleanCodec.encodeTopLevel(e),onNumerical:()=>this.numericalCodec.encodeTopLevel(e),onAddress:()=>this.addressCodec.encodeTopLevel(e),onBytes:()=>this.bytesCodec.encodeTopLevel(e),onString:()=>this.stringCodec.encodeTopLevel(e),onH256:()=>this.h256Codec.encodeTopLevel(e),onTypeIdentifier:()=>this.tokenIdentifierCodec.encodeTopLevel(e),onCodeMetadata:()=>this.codeMetadataCodec.encodeTopLevel(e),onNothing:()=>this.nothingCodec.encodeTopLevel()})}}},51001:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringBinaryCodec=void 0;const n=r(41077),i=r(70638),o=r(13529);t.StringBinaryCodec=class{constructor(){this.bytesBinaryCodec=new o.BytesBinaryCodec}decodeNested(e){let[t,r]=this.bytesBinaryCodec.decodeNested(e);return[new n.StringValue(t.valueOf().toString()),r]}decodeTopLevel(e){return new n.StringValue(e.toString())}encodeNested(e){let t=i.BytesValue.fromUTF8(e.valueOf());return this.bytesBinaryCodec.encodeNested(t)}encodeTopLevel(e){return Buffer.from(e.valueOf())}}},66229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructBinaryCodec=void 0;const n=r(41077),i=r(88429);t.StructBinaryCodec=class{constructor(e){this.fieldsCodec=new i.FieldsBinaryCodec(e)}decodeTopLevel(e,t){let[r]=this.decodeNested(e,t);return r}decodeNested(e,t){let r=t.getFieldsDefinitions(),[i,o]=this.fieldsCodec.decodeNested(e,r);return[new n.Struct(t,i),o]}encodeNested(e){let t=e.getFields();return this.fieldsCodec.encodeNested(t)}encodeTopLevel(e){return this.encodeNested(e)}}},42544:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenIdentifierCodec=void 0;const n=r(70638),i=r(29399),o=r(13529);t.TokenIdentifierCodec=class{constructor(){this.bytesCodec=new o.BytesBinaryCodec}decodeNested(e){let[t,r]=this.bytesCodec.decodeNested(e);return[new i.TokenIdentifierValue(t.toString()),r]}decodeTopLevel(e){let t=this.bytesCodec.decodeTopLevel(e);return new i.TokenIdentifierValue(t.toString())}encodeNested(e){let t=n.BytesValue.fromUTF8(e.valueOf());return this.bytesCodec.encodeNested(t)}encodeTopLevel(e){return Buffer.from(e.valueOf())}}},8e4:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TupleBinaryCodec=void 0;const n=r(66229);t.TupleBinaryCodec=class{constructor(e){this.structCodec=new n.StructBinaryCodec(e)}decodeTopLevel(e,t){return this.structCodec.decodeTopLevel(e,t)}decodeNested(e,t){return this.structCodec.decodeNested(e,t)}encodeNested(e){return this.structCodec.encodeNested(e)}encodeTopLevel(e){return this.structCodec.encodeTopLevel(e)}}},64083:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.prependByteToBuffer=t.flipBufferBitsInPlace=t.getHexMagnitudeOfBigInt=t.bigIntToBuffer=t.bufferToBigInt=t.cloneBuffer=t.isMsbZero=t.isMsbOne=void 0;const i=n(r(63160)),o=r(96227);function a(e){return 1==e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0]>>7}function s(e){return(e=new i.default(e))?(e.isNegative()&&(e=e.multipliedBy(new i.default(-1))),o.numberToPaddedHex(e)):""}t.isMsbOne=a,t.isMsbZero=function(e){return!a(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)},t.cloneBuffer=function(e){let t=Buffer.alloc(e.length);return e.copy(t),t},t.bufferToBigInt=function(e){let t=e.toString("hex");return new i.default(`0x${t}`,16)},t.bigIntToBuffer=function(e){let t=s(e);return Buffer.from(t,"hex")},t.getHexMagnitudeOfBigInt=s,t.flipBufferBitsInPlace=function(e){for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Interaction=void 0;const n=r(70054),i=r(95326),o=r(87679),a=r(84446),s=r(7012),c=r(76680),u=r(17503);t.Interaction=class{constructor(e,t,r){this.nonce=0,this.value="0",this.gasLimit=0,this.gasPrice=void 0,this.chainID="",this.querent=n.Address.empty(),this.sender=n.Address.empty(),this.version=o.TRANSACTION_VERSION_DEFAULT,this.contract=e,this.function=t,this.args=r,this.tokenTransfers=[]}getContractAddress(){return this.contract.getAddress()}getFunction(){return this.function}getEndpoint(){return this.contract.getEndpoint(this.function)}getArguments(){return this.args}getValue(){return this.value}getTokenTransfers(){return this.tokenTransfers}getGasLimit(){return this.gasLimit}getExplicitReceiver(){return this.explicitReceiver}buildTransaction(){i.Compatibility.guardAddressIsSetAndNonZero(this.sender,"'sender' of interaction","use interaction.withSender()");const e=new s.TransactionsFactoryConfig({chainID:this.chainID.valueOf()}),t=new s.SmartContractTransactionsFactory({config:e}).createTransactionForExecute({sender:this.sender,contract:this.contract.getAddress(),function:this.function.valueOf(),gasLimit:BigInt(this.gasLimit.valueOf()),arguments:this.args,nativeTransferAmount:BigInt(this.value.toString()),tokenTransfers:this.tokenTransfers});return t.chainID=this.chainID.valueOf(),t.nonce=BigInt(this.nonce.valueOf()),t.version=this.version,this.gasPrice&&(t.gasPrice=BigInt(this.gasPrice.valueOf())),t}buildQuery(){return new u.Query({address:this.contract.getAddress(),func:this.function,args:this.args,value:this.value,caller:this.querent})}withValue(e){return this.value=e,this}withSingleESDTTransfer(e){return this.tokenTransfers=[e].map((e=>new a.TokenTransfer(e))),this}withSingleESDTNFTTransfer(e){return this.tokenTransfers=[e].map((e=>new a.TokenTransfer(e))),this}withMultiESDTNFTTransfer(e){return this.tokenTransfers=e.map((e=>new a.TokenTransfer(e))),this}withGasLimit(e){return this.gasLimit=e,this}withGasPrice(e){return this.gasPrice=e,this}withNonce(e){return this.nonce=e,this}useThenIncrementNonceOf(e){return this.withNonce(e.getNonceThenIncrement())}withChainID(e){return this.chainID=e,this}withSender(e){return this.sender=e,this}withVersion(e){return this.version=e,this}withQuerent(e){return this.querent=e,this}withExplicitReceiver(e){return this.explicitReceiver=e,this}check(){return(new c.InteractionChecker).checkInteraction(this,this.getEndpoint()),this}}},76680:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.InteractionChecker=void 0;const s=o(r(33939)),c=a(r(63160));t.InteractionChecker=class{checkInteraction(e,t){this.checkPayable(e,t),this.checkArguments(e,t)}checkPayable(e,t){let r=!new c.default(e.getValue().toString()).isZero(),n=t.modifiers.isPayableInEGLD();if(r&&!n)throw new s.ErrContractInteraction("cannot send EGLD value to non-payable")}checkArguments(e,t){let r=t.input,n=e.getArguments(),i=r.length,o=n.length;if(i!=o)throw new s.ErrContractInteraction(`bad arguments, expected: ${i}, got: ${o}`);for(let a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35696:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NativeSerializer=void 0;const i=n(r(63160)),o=r(70054),a=r(33939),s=r(96227),c=r(77061),u=r(41077);!function(e){function t(e){let t=[...e].reverse(),r=e.length,n=e.length,i=!1;t.length>0&&t[0].type.getCardinality().isComposite()&&(n=1/0,i=!0);for(let o of t){if(o.type.getCardinality().isSingular())break;r-=1}return{min:r,max:n,variadic:i}}function r(e,t,o){return e&&u.isTyped(e)?e:t instanceof u.OptionType?function(e,t,n){if(null==e)return u.OptionValue.newMissing();let i=r(e,t.getFirstTypeParameter(),n);return u.OptionValue.newProvided(i)}(e,t,o):t instanceof u.OptionalType?function(e,t,n){if(null==e)return new u.OptionalValue(t);let i=r(e,t.getFirstTypeParameter(),n);return new u.OptionalValue(t,i)}(e,t,o):t instanceof u.VariadicType?function(e,t,n){if(t.isCounted)throw new a.ErrInvalidArgument('Counted variadic arguments must be explicitly typed. E.g. use "VariadicValue.fromItemsCounted()" or "new VariadicValue()"');null==e&&(e=[]);void 0===e.map&&n.convertError(e,"Variadic");let i=e.map((function(e){return r(e,t.getFirstTypeParameter(),n)}));return new u.VariadicValue(t,i)}(e,t,o):t instanceof u.CompositeType?function(e,t,n){let i=[],o=t.getTypeParameters();n.guardSameLength(e,o);for(let a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Query=void 0;const n=r(70054),i=r(20531);t.Query=class{constructor(e){this.caller=e.caller||n.Address.empty(),this.address=e.address,this.func=e.func,this.args=e.args||[],this.value=e.value||0}getEncodedArguments(){return(new i.ArgSerializer).valuesToStrings(this.args)}}},23094:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResultsParser=void 0;const n=r(59492),i=r(70054),o=r(33939),a=r(87052),s=r(20531),c=r(35364);var u,l;!function(e){e.OnTransactionCompleted="completedTxEvent",e.OnSignalError="signalError",e.OnWriteLog="writeLog"}(u||(u={})),function(e){e.TooMuchGas="@too much gas provided for processing"}(l||(l={}));const d={argsSerializer:new s.ArgSerializer};t.ResultsParser=class{constructor(e){e={...d,...e},this.argsSerializer=e.argsSerializer}parseQueryResponse(e,t){let r=e.getReturnDataParts(),n=this.argsSerializer.buffersToValues(r,t.output);return{returnCode:new c.ReturnCode(e.returnCode.toString()),returnMessage:e.returnMessage,values:n,firstValue:n[0],secondValue:n[1],thirdValue:n[2],lastValue:n[n.length-1]}}parseUntypedQueryResponse(e){return{returnCode:new c.ReturnCode(e.returnCode.toString()),returnMessage:e.returnMessage,values:e.getReturnDataParts()}}parseOutcome(e,t){const r=this.parseUntypedOutcome(e);return this.parseOutcomeFromUntypedBundle(r,t)}parseOutcomeFromUntypedBundle(e,t){const r=this.argsSerializer.buffersToValues(e.values,t.output);return{returnCode:e.returnCode,returnMessage:e.returnMessage,values:r,firstValue:r[0],secondValue:r[1],thirdValue:r[2],lastValue:r[r.length-1]}}parseUntypedOutcome(e){let t,r=this.parseTransactionMetadata(e);if(t=this.createBundleOnSimpleMoveBalance(e),t)return a.Logger.trace("parseUntypedOutcome(): on simple move balance"),t;if(t=this.createBundleOnInvalidTransaction(e),t)return a.Logger.trace("parseUntypedOutcome(): on invalid transaction"),t;if(t=this.createBundleOnEasilyFoundResultWithReturnData(e.contractResults),t)return a.Logger.trace("parseUntypedOutcome(): on easily found result with return data"),t;if(t=this.createBundleOnSignalError(e.logs),t)return a.Logger.trace("parseUntypedOutcome(): on signal error"),t;if(t=this.createBundleOnTooMuchGasWarning(e.logs),t)return a.Logger.trace("parseUntypedOutcome(): on 'too much gas' warning"),t;if(t=this.createBundleOnWriteLogWhereFirstTopicEqualsAddress(e.logs,e.sender),t)return a.Logger.trace("parseUntypedOutcome(): on writelog with topics[0] == tx.sender"),t;if(t=this.createBundleWithCustomHeuristics(e,r),t)return a.Logger.trace("parseUntypedOutcome(): with custom heuristics"),t;if(t=this.createBundleWithFallbackHeuristics(e,r),t)return a.Logger.trace("parseUntypedOutcome(): with fallback heuristics"),t;throw new o.ErrCannotParseContractResults(`transaction ${e.hash.toString()}`)}parseTransactionMetadata(e){return(new n.TransactionDecoder).getTransactionMetadata({sender:e.sender.bech32(),receiver:e.receiver.bech32(),data:e.data.toString("base64"),value:e.value.toString()})}createBundleOnSimpleMoveBalance(e){let t=0==e.contractResults.items.length,r=0==e.logs.events.length;return t&&r?{returnCode:c.ReturnCode.None,returnMessage:c.ReturnCode.None.toString(),values:[]}:null}createBundleOnInvalidTransaction(e){return e.status.isInvalid()&&e.receipt.data?{returnCode:c.ReturnCode.OutOfFunds,returnMessage:e.receipt.data,values:[]}:null}createBundleOnEasilyFoundResultWithReturnData(e){let t=e.items.find((e=>0!=e.nonce.valueOf()&&e.data.startsWith("@")));if(!t)return null;let{returnCode:r,returnDataParts:n}=this.sliceDataFieldInParts(t.data),i=t.returnMessage||r.toString();return{returnCode:r,returnMessage:i,values:n}}createBundleOnSignalError(e){let t=e.findSingleOrNoneEvent(u.OnSignalError);if(!t)return null;let{returnCode:r,returnDataParts:n}=this.sliceDataFieldInParts(t.data),i=t.getLastTopic(),o=i?.toString()||r.toString();return{returnCode:r,returnMessage:o,values:n}}createBundleOnTooMuchGasWarning(e){let t=e.findSingleOrNoneEvent(u.OnWriteLog,(e=>void 0!=e.findFirstOrNoneTopic((e=>e.toString().startsWith(l.TooMuchGas)))));if(!t)return null;let{returnCode:r,returnDataParts:n}=this.sliceDataFieldInParts(t.data),i=t.getLastTopic(),o=i?.toString()||r.toString();return{returnCode:r,returnMessage:o,values:n}}createBundleOnWriteLogWhereFirstTopicEqualsAddress(e,t){let r=new i.Address(t.bech32()).hex(),n=e.findSingleOrNoneEvent(u.OnWriteLog,(e=>void 0!=e.findFirstOrNoneTopic((e=>e.hex()==r))));if(!n)return null;let{returnCode:o,returnDataParts:a}=this.sliceDataFieldInParts(n.data),s=o.toString();return{returnCode:o,returnMessage:s,values:a}}createBundleWithCustomHeuristics(e,t){return null}createBundleWithFallbackHeuristics(e,t){let r=new i.Address(t.receiver);for(const n of e.contractResults.items){let t=n.logs.findSingleOrNoneEvent(u.OnWriteLog,(t=>{let n=t.address.bech32()==e.sender.bech32(),i=t.topics[0]?.hex()==r.hex();return n&&i}));if(t){let{returnCode:e,returnDataParts:r}=this.sliceDataFieldInParts(t.data),n=e.toString();return{returnCode:e,returnMessage:n,values:r}}}return null}sliceDataFieldInParts(e){let t=1;e.startsWith("ESDTTransfer")&&(t=3);let r=this.argsSerializer.stringToBuffers(e),n=r[t]||Buffer.from([]),i=r.slice(t+1);if(0==n.length)throw new o.ErrCannotParseContractResults("no return code");return{returnCode:c.ReturnCode.fromBuffer(n),returnDataParts:i}}parseEvent(e,t){const r=e.topics.map((e=>Buffer.from(e.valueOf()))).slice(1),n=e.dataPayload?.valueOf()||Buffer.from([]),i=e.additionalData?.map((e=>Buffer.from(e.valueOf())))||[];return 0===i.length&&n.length&&i.push(Buffer.from(n)),this.doParseEvent({topics:r,dataItems:i,eventDefinition:t})}doParseEvent(e){const t={},r=e.eventDefinition.inputs.filter((e=>e.indexed)),n=this.argsSerializer.buffersToValues(e.topics,r);for(let a=0;a!e.indexed)),o=this.argsSerializer.buffersToValues(e.dataItems,i);for(let a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReturnCode=void 0;class r{constructor(e){this.text=e}static fromBuffer(e){let t=e.toString();return new r(t)}toString(){return this.text}valueOf(){return this.text}equals(e){return!!e&&this.text==e.text}isSuccess(){return this.equals(r.Ok)||this.equals(r.None)}}t.ReturnCode=r,r.None=new r(""),r.Ok=new r("ok"),r.FunctionNotFound=new r("function not found"),r.FunctionWrongSignature=new r("wrong signature for function"),r.ContractNotFound=new r("contract not found"),r.UserError=new r("user error"),r.OutOfGas=new r("out of gas"),r.AccountCollision=new r("account collision"),r.OutOfFunds=new r("out of funds"),r.CallStackOverFlow=new r("call stack overflow"),r.ContractInvalid=new r("contract invalid"),r.ExecutionFailed=new r("execution failed"),r.Unknown=new r("unknown")},52576:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SmartContract=void 0;const n=r(70054),i=r(95326),o=r(87679),a=r(33939),s=r(58006),c=r(56891),u=r(66079),l=r(53683),d=r(44907),f=r(79147),h=r(35696),p=r(17503);t.SmartContract=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.address=n.Address.empty(),this.methodsExplicit={},this.methods={},this.address=e.address||n.Address.empty(),this.abi=e.abi,this.abi&&this.setupMethods()}setupMethods(){let e=this,t=this.getAbi();for(const r of t.getEndpoints()){let t=r.name;this.methodsExplicit[t]=function(r){let n=new d.ContractFunction(t);return new f.Interaction(e,n,r||[])},this.methods[t]=function(n){let i=new d.ContractFunction(t),o=h.NativeSerializer.nativeToTypedValues(n||[],r);return new f.Interaction(e,i,o||[])}}}setAddress(e){this.address=e}getAddress(){return this.address}getAbi(){return u.guardValueIsSet("abi",this.abi),this.abi}getEndpoint(e){return this.getAbi().getEndpoint(e)}deploy(e){let{deployer:t,code:r,codeMetadata:n,initArguments:a,value:u,gasLimit:l,gasPrice:d,chainID:f}=e;i.Compatibility.guardAddressIsSetAndNonZero(t,"'deployer' of SmartContract.deploy()","pass the actual address to deploy()");const h=new c.TransactionsFactoryConfig({chainID:f.valueOf()}),p=new s.SmartContractTransactionsFactory({config:h,abi:this.abi}),g=Buffer.from(r.toString(),"hex"),m=this.getMetadataPropertiesAsObject(n),y=p.createTransactionForDeploy({sender:t,bytecode:g,gasLimit:BigInt(l.valueOf()),arguments:a,isUpgradeable:m.upgradeable,isReadable:m.readable,isPayable:m.payable,isPayableBySmartContract:m.payableBySc});return y.setChainID(f),y.setValue(u??0),y.setGasPrice(d??o.TRANSACTION_MIN_GAS_PRICE),y}getMetadataPropertiesAsObject(e){let t;t=e?l.CodeMetadata.fromBytes(Buffer.from(e.toString(),"hex")):new l.CodeMetadata;return t.toJSON()}upgrade(e){let{caller:t,code:r,codeMetadata:n,initArguments:a,value:u,gasLimit:l,gasPrice:d,chainID:f}=e;i.Compatibility.guardAddressIsSetAndNonZero(t,"'caller' of SmartContract.upgrade()","pass the actual address to upgrade()"),this.ensureHasAddress();const h=new c.TransactionsFactoryConfig({chainID:f.valueOf()}),p=new s.SmartContractTransactionsFactory({config:h,abi:this.abi}),g=Uint8Array.from(Buffer.from(r.toString(),"hex")),m=this.getMetadataPropertiesAsObject(n),y=p.createTransactionForUpgrade({sender:t,contract:this.getAddress(),bytecode:g,gasLimit:BigInt(l.valueOf()),arguments:a,isUpgradeable:m.upgradeable,isReadable:m.readable,isPayable:m.payable,isPayableBySmartContract:m.payableBySc});return y.setChainID(f),y.setValue(u??0),y.setGasPrice(d??o.TRANSACTION_MIN_GAS_PRICE),y}call(e){let{func:t,args:r,value:n,gasLimit:a,receiver:u,gasPrice:l,chainID:d,caller:f}=e;i.Compatibility.guardAddressIsSetAndNonZero(f,"'caller' of SmartContract.call()","pass the actual address to call()"),this.ensureHasAddress();const h=new c.TransactionsFactoryConfig({chainID:d.valueOf()});r=r||[],n=n||0;const p=new s.SmartContractTransactionsFactory({config:h,abi:this.abi}).createTransactionForExecute({sender:f,contract:u||this.getAddress(),function:t.toString(),gasLimit:BigInt(a.valueOf()),arguments:r});return p.setChainID(d),p.setValue(n),p.setGasPrice(l??o.TRANSACTION_MIN_GAS_PRICE),p}createQuery(e){let{func:t,args:r,value:n,caller:i}=e;return this.ensureHasAddress(),new p.Query({address:this.getAddress(),func:t,args:r,value:n,caller:i})}ensureHasAddress(){if(!this.getAddress().bech32())throw new a.ErrContractHasNoAddress}static computeAddress(e,t){const r=n.Address.fromBech32(e.bech32());return(new n.AddressComputer).computeContractAddress(r,BigInt(t.valueOf()))}}},9277:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractCallPayloadBuilder=t.ContractUpgradePayloadBuilder=t.ContractDeployPayloadBuilder=void 0;const n=r(87679),i=r(96082),o=r(66079),a=r(20531);t.ContractDeployPayloadBuilder=class{constructor(){this.code=null,this.codeMetadata="",this.arguments=[]}setCode(e){return this.code=e,this}setCodeMetadata(e){return this.codeMetadata=e,this}addInitArg(e){return this.arguments.push(e),this}setInitArgs(e){return this.arguments=e,this}build(){o.guardValueIsSet("code",this.code);let e=this.code.toString(),t=this.codeMetadata.toString(),r=`${e}@${n.WasmVirtualMachine}@${t}`;return r=s(r,this.arguments),new i.TransactionPayload(r)}};t.ContractUpgradePayloadBuilder=class{constructor(){this.code=null,this.codeMetadata="",this.arguments=[]}setCode(e){return this.code=e,this}setCodeMetadata(e){return this.codeMetadata=e,this}addInitArg(e){return this.arguments.push(e),this}setInitArgs(e){return this.arguments=e,this}build(){o.guardValueIsSet("code",this.code);let e=`upgradeContract@${this.code.toString()}@${this.codeMetadata.toString()}`;return e=s(e,this.arguments),new i.TransactionPayload(e)}};function s(e,t){let{argumentsString:r,count:n}=(new a.ArgSerializer).valuesToString(t);return 0==n?e:`${e}@${r}`}t.ContractCallPayloadBuilder=class{constructor(){this.contractFunction=null,this.arguments=[]}setFunction(e){return this.contractFunction=e,this}addArg(e){return this.arguments.push(e),this}setArgs(e){return this.arguments=e,this}build(){o.guardValueIsSet("calledFunction",this.contractFunction);let e=this.contractFunction.toString();return e=s(e,this.arguments),new i.TransactionPayload(e)}}},24560:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AbiRegistry=void 0;const a=o(r(33939)),s=r(66079),c=r(49400),u=r(22940),l=r(28509),d=r(45464),f=r(59996);class h{constructor(e){this.endpoints=[],this.customTypes=[],this.events=[],this.name=e.name,this.constructorDefinition=e.constructorDefinition,this.upgradeConstructorDefinition=e.upgradeConstructorDefinition,this.endpoints=e.endpoints,this.customTypes=e.customTypes,this.events=e.events||[]}static create(e){const t=e.name||"?",r=e.constructor||{},n=e.upgradeConstructor||{},i=e.endpoints||[],o=e.types||{},s=e.events||[],f=c.EndpointDefinition.fromJSON({name:"constructor",...r}),p=c.EndpointDefinition.fromJSON({name:"upgradeConstructor",...n}),g=i.map((e=>c.EndpointDefinition.fromJSON(e))),m=[];for(const c in o){const e=o[c];if("struct"==e.type)m.push(d.StructType.fromJSON({name:c,fields:e.fields}));else{if("enum"!=e.type&&"explicit-enum"!=e.type)throw new a.ErrTypingSystem(`Cannot handle custom type: ${c}`);m.push(u.EnumType.fromJSON({name:c,variants:e.variants}))}}const y=s.map((e=>l.EventDefinition.fromJSON(e)));return new h({name:t,constructorDefinition:f,upgradeConstructorDefinition:p,endpoints:g,customTypes:m,events:y}).remapToKnownTypes()}getCustomType(e){const t=this.customTypes.find((t=>t.getName()==e));return s.guardValueIsSetWithMessage(`custom type [${e}] not found`,t),t}getStruct(e){const t=this.customTypes.find((t=>t.getName()==e&&t.hasExactClass(d.StructType.ClassName)));return s.guardValueIsSetWithMessage(`struct [${e}] not found`,t),t}getStructs(e){return e.map((e=>this.getStruct(e)))}getEnum(e){const t=this.customTypes.find((t=>t.getName()==e&&t.hasExactClass(u.EnumType.ClassName)));return s.guardValueIsSetWithMessage(`enum [${e}] not found`,t),t}getEnums(e){return e.map((e=>this.getEnum(e)))}getEndpoints(){return this.endpoints}getEndpoint(e){const t=this.endpoints.find((t=>t.name==e));return s.guardValueIsSetWithMessage(`endpoint [${e}] not found`,t),t}getEvent(e){const t=this.events.find((t=>t.identifier==e));return s.guardValueIsSetWithMessage(`event [${e}] not found`,t),t}remapToKnownTypes(){const e=new f.TypeMapper([]),t=[];for(const a of this.customTypes)this.mapCustomTypeDepthFirst(a,this.customTypes,e,t);if(this.customTypes.length!=t.length)throw new a.ErrTypingSystem("Did not re-map all custom types");const r=p(this.constructorDefinition,e),n=this.upgradeConstructorDefinition?p(this.upgradeConstructorDefinition,e):void 0,i=[];for(const a of this.endpoints)i.push(p(a,e));const o=this.events.map((t=>function(e,t){const r=e.inputs.map((e=>new l.EventTopicDefinition({name:e.name,type:t.mapType(e.type),indexed:e.indexed})));return new l.EventDefinition(e.identifier,r)}(t,e)));return new h({name:this.name,constructorDefinition:r,upgradeConstructorDefinition:n,endpoints:i,customTypes:t,events:o})}mapCustomTypeDepthFirst(e,t,r,n){if(n.findIndex((t=>t.getName()==e.getName()))>=0)return;for(const o of e.getNamesOfDependencies()){const e=t.find((e=>e.getName()==o));e&&this.mapCustomTypeDepthFirst(e,t,r,n)}const i=r.mapType(e);n.push(i)}}function p(e,t){const r=e.input.map((e=>new c.EndpointParameterDefinition(e.name,e.description,t.mapType(e.type)))),n=e.output.map((e=>new c.EndpointParameterDefinition(e.name,e.description,t.mapType(e.type))));return new c.EndpointDefinition(e.name,r,n,e.modifiers)}t.AbiRegistry=h},60049:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressValue=t.AddressType=void 0;const n=r(70054),i=r(7836);class o extends i.PrimitiveType{constructor(){super("Address")}getClassName(){return o.ClassName}}t.AddressType=o,o.ClassName="AddressType";class a extends i.PrimitiveValue{constructor(e){super(new o),this.value=n.Address.newFromBech32(e.bech32())}getClassName(){return a.ClassName}equals(e){return this.value.equals(e.value)}valueOf(){return this.value}}t.AddressValue=a,a.ClassName="AddressValue"},78181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalValue=t.OptionalType=void 0;const n=r(66079),i=r(7836);class o extends i.Type{constructor(e){super("Optional",[e],i.TypeCardinality.variable(1))}getClassName(){return o.ClassName}isAssignableFrom(e){if(!e.hasExactClass(o.ClassName))return!1;let t=this.getFirstTypeParameter().equals(e.getFirstTypeParameter()),r=e.getFirstTypeParameter().hasExactClass(i.NullType.ClassName);return t||r}}t.OptionalType=o,o.ClassName="OptionalType";class a extends i.TypedValue{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(e),this.value=t}getClassName(){return a.ClassName}static newMissing(){let e=new o(new i.NullType);return new a(e)}isSet(){return!!this.value}getTypedValue(){return n.guardValueIsSet("value",this.value),this.value}valueOf(){return this.value?this.value.valueOf():null}equals(e){return this.value?.equals(e.value)||!1}}t.OptionalValue=a,a.ClassName="OptionalValue"},48545:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanValue=t.BooleanType=void 0;const n=r(7836);class i extends n.PrimitiveType{constructor(){super("bool")}getClassName(){return i.ClassName}}t.BooleanType=i,i.ClassName="BooleanType";class o extends n.PrimitiveValue{constructor(e){super(new i),this.value=e}getClassName(){return o.ClassName}equals(e){return this.value===e.value}isTrue(){return!0===this.value}isFalse(){return!this.isTrue()}valueOf(){return this.value}}t.BooleanValue=o,o.ClassName="BooleanValue"},70638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesValue=t.BytesType=void 0;const n=r(7836);class i extends n.PrimitiveType{constructor(){super("bytes")}getClassName(){return i.ClassName}}t.BytesType=i,i.ClassName="BytesType";class o extends n.PrimitiveValue{constructor(e){super(new i),this.value=e}getClassName(){return o.ClassName}static fromUTF8(e){let t=Buffer.from(e,"utf-8");return new o(t)}static fromHex(e){let t=Buffer.from(e,"hex");return new o(t)}getLength(){return this.value.length}equals(e){return this.getLength()==e.getLength()&&this.value.equals(e.value)}valueOf(){return this.value}toString(){return this.value.toString()}}t.BytesValue=o,o.ClassName="BytesValue"},39273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeMetadataValue=t.CodeMetadataType=void 0;const n=r(7836);class i extends n.PrimitiveType{constructor(){super("CodeMetadata")}}t.CodeMetadataType=i;class o extends n.PrimitiveValue{constructor(e){super(new i),this.value=e}equals(e){return this.value.equals(e.value)}valueOf(){return this.value}}t.CodeMetadataValue=o},90188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionOfTypedValues=void 0;t.CollectionOfTypedValues=class{constructor(e){this.items=e}getLength(){return this.items.length}getItems(){return this.items}valueOf(){return this.items.map((e=>e.valueOf()))}equals(e){if(this.getLength()!=e.getLength())return!1;for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeValue=t.CompositeType=void 0;const n=r(66079),i=r(7836);class o extends i.Type{constructor(){for(var e=arguments.length,t=new Array(e),r=0;re.getType())),i=new o(...n);return new a(i,t)}getItems(){return this.items}valueOf(){return this.items.map((e=>e?.valueOf()))}equals(e){if(this.getType().differs(e.getType()))return!1;for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EndpointParameterDefinition=t.EndpointModifiers=t.EndpointDefinition=void 0;const n=r(32232);class i{constructor(e,t,r,n){this.input=[],this.output=[],this.name=e,this.input=t||[],this.output=r||[],this.modifiers=n}isConstructor(){return"constructor"==this.name}static fromJSON(e){e.name=null==e.name?"?":e.name,e.onlyOwner=e.onlyOwner||!1,e.payableInTokens=e.payableInTokens||[],e.inputs=e.inputs||[],e.outputs=e.outputs||[];let t=e.inputs.map((e=>a.fromJSON(e))),r=e.outputs.map((e=>a.fromJSON(e))),n=new o(e.mutability,e.payableInTokens,e.onlyOwner);return new i(e.name,t,r,n)}}t.EndpointDefinition=i;class o{constructor(e,t,r){this.mutability=e||"",this.payableInTokens=t||[],this.onlyOwner=r||!1}isPayableInEGLD(){return this.isPayableInToken("EGLD")}isPayableInToken(e){return!!this.payableInTokens.includes(e)||!this.payableInTokens.includes(`!${e}`)&&!!this.payableInTokens.includes("*")}isPayable(){return 0!=this.payableInTokens.length}isReadonly(){return"readonly"==this.mutability}isOnlyOwner(){return this.onlyOwner}}t.EndpointModifiers=o;class a{constructor(e,t,r){this.name=e,this.description=t,this.type=r}static fromJSON(e){let t=(new n.TypeExpressionParser).parse(e.type);return new a(e.name||"?",e.description||"N / A",t)}}t.EndpointParameterDefinition=a},22940:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnumValue=t.EnumVariantDefinition=t.EnumType=void 0;const n=r(33939),i=r(66079),o=r(12672),a=r(7836);class s extends a.CustomType{constructor(e,t){super(e),this.variants=[],this.variants=t}getClassName(){return s.ClassName}static fromJSON(e){const t=s.assignMissingDiscriminants(e.variants||[]).map((e=>c.fromJSON(e)));return new s(e.name,t)}static assignMissingDiscriminants(e){return e.every((e=>void 0==e.discriminant))?e.map(((e,t)=>({...e,discriminant:t}))):e}getVariantByDiscriminant(e){let t=this.variants.find((t=>t.discriminant==e));return i.guardValueIsSet(`variant by discriminant (${e})`,t),t}getVariantByName(e){let t=this.variants.find((t=>t.name==e));return i.guardValueIsSet(`variant by name (${e})`,t),t}getNamesOfDependencies(){const e=[];for(const t of this.variants)e.push(...t.getNamesOfDependencies());return[...new Set(e)]}}t.EnumType=s,s.ClassName="EnumType";class c{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.fieldsDefinitions=[],i.guardTrue(t<256,"discriminant for simple enum should be less than 256"),this.name=e,this.discriminant=t,this.fieldsDefinitions=r}static fromJSON(e){let t=(e.fields||[]).map((e=>o.FieldDefinition.fromJSON(e)));return new c(e.name,e.discriminant,t)}getFieldsDefinitions(){return this.fieldsDefinitions}getFieldDefinition(e){return this.fieldsDefinitions.find((t=>t.name==e))}getNamesOfDependencies(){return o.Fields.getNamesOfTypeDependencies(this.fieldsDefinitions)}}t.EnumVariantDefinition=c;class u extends a.TypedValue{constructor(e,t,r){super(e),this.fields=[],this.name=t.name,this.discriminant=t.discriminant,this.fields=r,this.fieldsByName=new Map(r.map((e=>[e.name,e])));let n=t.getFieldsDefinitions();o.Fields.checkTyping(this.fields,n)}getClassName(){return u.ClassName}static fromName(e,t){let r=e.getVariantByName(t);return new u(e,r,[])}static fromDiscriminant(e,t){let r=e.getVariantByDiscriminant(t);return new u(e,r,[])}equals(e){if(!this.getType().equals(e.getType()))return!1;let t=this.getFields(),r=e.getFields();const n=this.name==e.name,i=this.discriminant==e.discriminant,a=o.Fields.equals(t,r);return n&&i&&a}getFields(){return this.fields}getFieldValue(e){let t=this.fieldsByName.get(e);if(t)return t.value.valueOf();throw new n.ErrMissingFieldOnEnum(e,this.getType().getName())}valueOf(){let e={name:this.name,fields:[]};return this.fields.forEach(((t,r)=>e.fields[r]=t.value.valueOf())),e}}t.EnumValue=u,u.ClassName="EnumValue"},28509:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventTopicDefinition=t.EventDefinition=void 0;const n=r(32232);class i{constructor(e,t){this.inputs=[],this.identifier=e,this.inputs=t||[]}static fromJSON(e){e.identifier=null==e.identifier?"?":e.identifier,e.inputs=e.inputs||[];const t=e.inputs.map((e=>o.fromJSON(e)));return new i(e.identifier,t)}}t.EventDefinition=i;class o{constructor(e){this.name=e.name,this.type=e.type,this.indexed=e.indexed}static fromJSON(e){const t=(new n.TypeExpressionParser).parse(e.type);return new o({name:e.name||"?",type:t,indexed:e.indexed})}}t.EventTopicDefinition=o},23935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createListOfTokenIdentifiers=t.createListOfAddresses=void 0;const n=r(60049),i=r(45652),o=r(29399);t.createListOfAddresses=function(e){let t=e.map((e=>new n.AddressValue(e)));return i.List.fromItems(t)},t.createListOfTokenIdentifiers=function(e){let t=e.map((e=>new o.TokenIdentifierValue(e)));return i.List.fromItems(t)}},12672:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Fields=t.Field=t.FieldDefinition=void 0;const a=o(r(33939)),s=r(32232);class c{constructor(e,t,r){this.name=e,this.description=t,this.type=r}static fromJSON(e){let t=(new s.TypeExpressionParser).parse(e.type);return new c(e.name,e.description,t)}}t.FieldDefinition=c;t.Field=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.value=e,this.name=t}checkTyping(e){const t=this.value.getType();if(!t.equals(e.type))throw new a.ErrTypingSystem(`check type of field "${e.name}; expected: ${e.type}, actual: ${t}"`);if(this.name!=e.name)throw new a.ErrTypingSystem(`check name of field "${e.name}"`)}equals(e){return this.name==e.name&&this.value.equals(e.value)}};t.Fields=class{static checkTyping(e,t){if(e.length!=t.length)throw new a.ErrTypingSystem("fields length vs. field definitions length");for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.List=t.OptionValue=t.ListType=t.OptionType=void 0;const n=r(66079),i=r(90188),o=r(7836);class a extends o.Type{constructor(e){super("Option",[e])}getClassName(){return a.ClassName}isAssignableFrom(e){if(!e.hasExactClass(a.ClassName))return!1;let t=this.getFirstTypeParameter().equals(e.getFirstTypeParameter()),r=e.getFirstTypeParameter().hasExactClass(o.NullType.ClassName);return t||r}}t.OptionType=a,a.ClassName="OptionType";class s extends o.Type{constructor(e){super("List",[e])}getClassName(){return s.ClassName}}t.ListType=s,s.ClassName="ListType";class c extends o.TypedValue{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(e),this.value=t}getClassName(){return c.ClassName}static newMissing(){let e=new a(new o.NullType);return new c(e)}static newMissingTyped(e){return new c(new a(e))}static newProvided(e){let t=new a(e.getType());return new c(t,e)}isSet(){return!!this.value}getTypedValue(){return n.guardValueIsSet("value",this.value),this.value}valueOf(){return this.value?this.value.valueOf():null}equals(e){return this.value?.equals(e.value)||!1}}t.OptionValue=c,c.ClassName="OptionValue";class u extends o.TypedValue{constructor(e,t){super(e),this.backingCollection=new i.CollectionOfTypedValues(t)}getClassName(){return u.ClassName}static fromItems(e){if(0==e.length)return new u(new o.TypePlaceholder,[]);let t=e[0].getType(),r=new s(t);return new u(r,e)}getLength(){return this.backingCollection.getLength()}getItems(){return this.backingCollection.getItems()}valueOf(){return this.backingCollection.valueOf()}equals(e){return this.backingCollection.equals(e.backingCollection)}}t.List=u,u.ClassName="List"},3779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayVec=t.ArrayVecType=void 0;const n=r(66079),i=r(90188),o=r(7836);class a extends o.Type{constructor(e,t){super("Array",[t]),n.guardTrue(e>0,"array length > 0"),this.length=e}getClassName(){return a.ClassName}}t.ArrayVecType=a,a.ClassName="ArrayVecType";class s extends o.TypedValue{constructor(e,t){super(e),n.guardLength(t,e.length),this.backingCollection=new i.CollectionOfTypedValues(t)}getClassName(){return s.ClassName}getLength(){return this.backingCollection.getLength()}getItems(){return this.backingCollection.getItems()}valueOf(){return this.backingCollection.valueOf()}equals(e){return this.backingCollection.equals(e.backingCollection)}}t.ArrayVec=s,s.ClassName="ArrayVec"},3376:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.H256Value=t.H256Type=void 0;const n=r(7836);class i extends n.PrimitiveType{constructor(){super("H256")}getClassName(){return i.ClassName}}t.H256Type=i,i.ClassName="H256Type";class o extends n.PrimitiveValue{constructor(e){super(new i),this.value=e}getClassName(){return o.ClassName}equals(e){return this.value.equals(e.value)}valueOf(){return this.value}}t.H256Value=o,o.ClassName="H256Value"},41077:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(24560),t),i(r(60049),t),i(r(78181),t),i(r(48545),t),i(r(70638),t),i(r(39273),t),i(r(15142),t),i(r(49400),t),i(r(22940),t),i(r(23935),t),i(r(12672),t),i(r(45652),t),i(r(3779),t),i(r(3376),t),i(r(3862),t),i(r(65332),t),i(r(43499),t),i(r(9988),t),i(r(45464),t),i(r(29399),t),i(r(80159),t),i(r(32232),t),i(r(59996),t),i(r(7836),t),i(r(29988),t),i(r(97789),t),i(r(33633),t)},97789:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagedDecimalValue=t.ManagedDecimalType=void 0;const i=n(r(63160)),o=r(7836);class a extends o.Type{constructor(e){super("ManagedDecimal",void 0,void 0,e)}getClassName(){return a.ClassName}getMetadata(){return this.metadata}isVariable(){return"usize"==this.metadata}}t.ManagedDecimalType=a,a.ClassName="ManagedDecimalType";class s extends o.TypedValue{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];super(new a(r?"usize":t)),this.value=new i.default(e),this.scale=t,this.variable=r}getClassName(){return s.ClassName}getScale(){return this.scale}getPrecision(){return this.value.toFixed(this.scale).replace(".","").length}equals(e){return this.getPrecision()==e.getPrecision()&&new i.default(this.value).eq(e.value)}valueOf(){return this.value}toString(){return this.value.toFixed(this.scale)}isVariable(){return this.variable}}t.ManagedDecimalValue=s,s.ClassName="ManagedDecimalValue"},33633:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ManagedDecimalSignedValue=t.ManagedDecimalSignedType=void 0;const i=n(r(63160)),o=r(7836);class a extends o.Type{constructor(e){super("ManagedDecimalSigned",void 0,void 0,e)}getClassName(){return a.ClassName}getMetadata(){return this.metadata}isVariable(){return"usize"==this.metadata}}t.ManagedDecimalSignedType=a,a.ClassName="ManagedDecimalSignedType";class s extends o.TypedValue{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];super(new a(r?"usize":t)),this.value=new i.default(e),this.scale=t,this.variable=r}getClassName(){return s.ClassName}getPrecision(){return this.value.toFixed(this.scale).replace(".","").length}getScale(){return this.scale}equals(e){return this.getPrecision()==e.getPrecision()&&new i.default(this.value).eq(e.value)}valueOf(){return this.value}toString(){return this.value.toFixed(this.scale)}isVariable(){return this.variable}}t.ManagedDecimalSignedValue=s,s.ClassName="ManagedDecimalSignedValue"},3862:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.onPrimitiveTypeSelect=t.onPrimitiveValueSelect=t.onTypedValueSelect=t.onTypeSelect=void 0;const a=o(r(33939)),s=r(60049),c=r(48545),u=r(70638),l=r(39273),d=r(22940),f=r(45652),h=r(3376),p=r(43499),g=r(65332),m=r(45464),y=r(29399),v=r(80159),b=r(7836),w=r(3779),A=r(9988),_=r(97789),E=r(33633);t.onTypeSelect=function(e,t){if(e.hasExactClass(f.OptionType.ClassName))return t.onOption();if(e.hasExactClass(f.ListType.ClassName))return t.onList();if(e.hasExactClass(w.ArrayVecType.ClassName))return t.onArray();if(e.hasClassOrSuperclass(b.PrimitiveType.ClassName))return t.onPrimitive();if(e.hasExactClass(m.StructType.ClassName))return t.onStruct();if(e.hasExactClass(v.TupleType.ClassName))return t.onTuple();if(e.hasExactClass(d.EnumType.ClassName))return t.onEnum();if(e.hasExactClass(_.ManagedDecimalType.ClassName))return t.onManagedDecimal();if(e.hasExactClass(E.ManagedDecimalSignedType.ClassName))return t.onManagedDecimalSigned();if(t.onOther)return t.onOther();throw new a.ErrTypingSystem(`type isn't known: ${e}`)},t.onTypedValueSelect=function(e,t){if(e.hasClassOrSuperclass(b.PrimitiveValue.ClassName))return t.onPrimitive();if(e.hasExactClass(f.OptionValue.ClassName))return t.onOption();if(e.hasExactClass(f.List.ClassName))return t.onList();if(e.hasExactClass(w.ArrayVec.ClassName))return t.onArray();if(e.hasExactClass(m.Struct.ClassName))return t.onStruct();if(e.hasExactClass(v.Tuple.ClassName))return t.onTuple();if(e.hasExactClass(d.EnumValue.ClassName))return t.onEnum();if(e.hasExactClass(_.ManagedDecimalValue.ClassName))return t.onManagedDecimal();if(e.hasExactClass(E.ManagedDecimalSignedValue.ClassName))return t.onManagedDecimalSigned();if(t.onOther)return t.onOther();throw new a.ErrTypingSystem(`value isn't typed: ${e}`)},t.onPrimitiveValueSelect=function(e,t){if(e.hasExactClass(c.BooleanValue.ClassName))return t.onBoolean();if(e.hasClassOrSuperclass(p.NumericalValue.ClassName))return t.onNumerical();if(e.hasExactClass(s.AddressValue.ClassName))return t.onAddress();if(e.hasExactClass(u.BytesValue.ClassName))return t.onBytes();if(e.hasExactClass(A.StringValue.ClassName))return t.onString();if(e.hasExactClass(h.H256Value.ClassName))return t.onH256();if(e.hasExactClass(y.TokenIdentifierValue.ClassName))return t.onTypeIdentifier();if(e.hasExactClass(l.CodeMetadataValue.ClassName))return t.onCodeMetadata();if(e.hasExactClass(g.NothingValue.ClassName))return t.onNothing();if(t.onOther)return t.onOther();throw new a.ErrTypingSystem(`value isn't a primitive: ${e.getType()}`)},t.onPrimitiveTypeSelect=function(e,t){if(e.hasExactClass(c.BooleanType.ClassName))return t.onBoolean();if(e.hasClassOrSuperclass(p.NumericalType.ClassName))return t.onNumerical();if(e.hasExactClass(s.AddressType.ClassName))return t.onAddress();if(e.hasExactClass(u.BytesType.ClassName))return t.onBytes();if(e.hasExactClass(A.StringType.ClassName))return t.onString();if(e.hasExactClass(h.H256Type.ClassName))return t.onH256();if(e.hasExactClass(y.TokenIdentifierType.ClassName))return t.onTokenIndetifier();if(e.hasExactClass(l.CodeMetadataType.ClassName))return t.onCodeMetadata();if(e.hasExactClass(g.NothingType.ClassName))return t.onNothing();if(t.onOther)return t.onOther();throw new a.ErrTypingSystem(`type isn't a known primitive: ${e}`)}},65332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NothingValue=t.NothingType=void 0;const n=r(7836);class i extends n.PrimitiveType{constructor(){super("nothing")}getClassName(){return i.ClassName}}t.NothingType=i,i.ClassName="NothingType";class o extends n.PrimitiveValue{constructor(){super(new i)}getClassName(){return o.ClassName}equals(e){return!1}valueOf(){return{}}}t.NothingValue=o,o.ClassName="NothingValue"},43499:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BigIntValue=t.BigUIntValue=t.I64Value=t.U64Value=t.I32Value=t.U32Value=t.I16Value=t.U16Value=t.I8Value=t.U8Value=t.NumericalValue=t.BigIntType=t.BigUIntType=t.I64Type=t.U64Type=t.I32Type=t.U32Type=t.I16Type=t.U16Type=t.I8Type=t.U8Type=t.NumericalType=void 0;const s=a(r(63160)),c=o(r(33939)),u=r(7836);class l extends u.PrimitiveType{constructor(e,t,r){super(e),this.sizeInBytes=t,this.withSign=r}getClassName(){return l.ClassName}hasFixedSize(){return!!this.sizeInBytes}hasArbitrarySize(){return!this.hasFixedSize()}}t.NumericalType=l,l.ClassName="NumericalType";class d extends l{constructor(){super("u8",1,!1)}getClassName(){return d.ClassName}}t.U8Type=d,d.ClassName="U8Type";class f extends l{constructor(){super("i8",1,!0)}getClassName(){return f.ClassName}}t.I8Type=f,f.ClassName="I8Type";class h extends l{constructor(){super("u16",2,!1)}getClassName(){return h.ClassName}}t.U16Type=h,h.ClassName="U16Type";class p extends l{constructor(){super("i16",2,!0)}getClassName(){return p.ClassName}}t.I16Type=p,p.ClassName="I16Type";class g extends l{constructor(){super("u32",4,!1)}getClassName(){return g.ClassName}}t.U32Type=g,g.ClassName="U32Type";class m extends l{constructor(){super("i32",4,!0)}getClassName(){return m.ClassName}}t.I32Type=m,m.ClassName="I32Type";class y extends l{constructor(){super("u64",8,!1)}getClassName(){return y.ClassName}}t.U64Type=y,y.ClassName="U64Type";class v extends l{constructor(){super("i64",8,!0)}getClassName(){return v.ClassName}}t.I64Type=v,v.ClassName="I64Type";class b extends l{constructor(){super("BigUint",0,!1)}getClassName(){return b.ClassName}}t.BigUIntType=b,b.ClassName="BigUIntType";class w extends l{constructor(){super("Bigint",0,!0)}getClassName(){return w.ClassName}}t.BigIntType=w,w.ClassName="BigIntType";class A extends u.PrimitiveValue{constructor(e,t){if(super(e),"bigint"===typeof t&&(t=t.toString()),this.value=new s.default(t),this.sizeInBytes=e.sizeInBytes,this.withSign=e.withSign,this.value.isNaN())throw new c.ErrInvalidArgument(`not a number: ${t}`);if(!this.withSign&&this.value.isNegative())throw new c.ErrInvalidArgument(`negative, but type is unsigned: ${t}`)}getClassName(){return A.ClassName}equals(e){return this.value.isEqualTo(e.value)}valueOf(){return this.value}toString(){return this.value.toString()}}t.NumericalValue=A,A.ClassName="NumericalValue";class _ extends A{constructor(e){super(new d,e)}getClassName(){return _.ClassName}}t.U8Value=_,_.ClassName="U8Value";class E extends A{constructor(e){super(new f,e)}getClassName(){return E.ClassName}}t.I8Value=E,E.ClassName="I8Value";class S extends A{constructor(e){super(new h,e)}getClassName(){return S.ClassName}}t.U16Value=S,S.ClassName="U16Value";class k extends A{constructor(e){super(new p,e)}getClassName(){return k.ClassName}}t.I16Value=k,k.ClassName="I16Value";class x extends A{constructor(e){super(new g,e)}getClassName(){return x.ClassName}}t.U32Value=x,x.ClassName="U32Value";class C extends A{constructor(e){super(new m,e)}getClassName(){return C.ClassName}}t.I32Value=C,C.ClassName="I32Value";class I extends A{constructor(e){super(new y,e)}getClassName(){return I.ClassName}}t.U64Value=I,I.ClassName="U64Value";class T extends A{constructor(e){super(new v,e)}getClassName(){return T.ClassName}}t.I64Value=T,T.ClassName="I64Value";class O extends A{constructor(e){super(new b,e)}getClassName(){return O.ClassName}}t.BigUIntValue=O,O.ClassName="BigUIntValue";class P extends A{constructor(e){super(new w,e)}getClassName(){return P.ClassName}}t.BigIntValue=P,P.ClassName="BigIntValue"},9988:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringValue=t.StringType=void 0;const n=r(7836);class i extends n.PrimitiveType{constructor(){super("utf-8 string")}getClassName(){return i.ClassName}}t.StringType=i,i.ClassName="StringType";class o extends n.PrimitiveValue{constructor(e){super(new i),this.value=e}getClassName(){return o.ClassName}static fromUTF8(e){return new o(e)}static fromHex(e){let t=Buffer.from(e,"hex").toString();return new o(t)}getLength(){return this.value.length}equals(e){return this.value===e.value}valueOf(){return this.value}}t.StringValue=o,o.ClassName="StringValue"},45464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Struct=t.StructType=void 0;const n=r(33939),i=r(12672),o=r(7836);class a extends o.CustomType{constructor(e,t){super(e),this.fieldsDefinitions=[],this.fieldsDefinitions=t}getClassName(){return a.ClassName}static fromJSON(e){let t=(e.fields||[]).map((e=>i.FieldDefinition.fromJSON(e)));return new a(e.name,t)}getFieldsDefinitions(){return this.fieldsDefinitions}getFieldDefinition(e){return this.fieldsDefinitions.find((t=>t.name==e))}getNamesOfDependencies(){return i.Fields.getNamesOfTypeDependencies(this.fieldsDefinitions)}}t.StructType=a,a.ClassName="StructType";class s extends o.TypedValue{constructor(e,t){super(e),this.fields=t,this.fieldsByName=new Map(t.map((e=>[e.name,e]))),this.checkTyping()}getClassName(){return s.ClassName}checkTyping(){let e=this.getType().getFieldsDefinitions();i.Fields.checkTyping(this.fields,e)}getFields(){return this.fields}getFieldValue(e){let t=this.fieldsByName.get(e);if(t)return t.value.valueOf();throw new n.ErrMissingFieldOnStruct(e,this.getType().getName())}valueOf(){let e={};for(const t of this.fields)e[t.name]=t.value.valueOf();return e}equals(e){if(!this.getType().equals(e.getType()))return!1;let t=this.getFields(),r=e.getFields();return i.Fields.equals(t,r)}}t.Struct=s,s.ClassName="Struct"},29399:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenIdentifierValue=t.TokenIdentifierType=void 0;const n=r(7836);class i extends n.PrimitiveType{constructor(){super("TokenIdentifier")}getClassName(){return i.ClassName}}t.TokenIdentifierType=i,i.ClassName="TokenIdentifierType";class o extends n.PrimitiveValue{constructor(e){super(new i),this.value=e}static egld(){return new o("EGLD")}static esdtTokenIdentifier(e){return new o(e)}getClassName(){return o.ClassName}getLength(){return this.value.length}equals(e){return this.getLength()==e.getLength()&&this.value==e.value}valueOf(){return this.value}toString(){return this.value.toString()}}t.TokenIdentifierValue=o,o.ClassName="TokenIdentifierValue"},80159:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Tuple=t.TupleType=void 0;const a=o(r(33939)),s=r(12672),c=r(45464);class u extends c.StructType{constructor(){for(var e=arguments.length,t=new Array(e),r=0;re.toString())).join(", ")}>`}static prepareFieldDefinitions(e){return e.map(((e,t)=>new s.FieldDefinition(l(t),"anonymous tuple field",e)))}}function l(e){return`field${e}`}t.TupleType=u,u.ClassName="TupleType";class d extends c.Struct{constructor(e,t){super(e,t)}getClassName(){return d.ClassName}static fromItems(e){if(e.length<1)throw new a.ErrTypingSystem("bad tuple items");let t=e.map((e=>e.getType())),r=new u(...t),n=e.map(((e,t)=>new s.Field(e,l(t))));return new d(r,n)}}t.Tuple=d,d.ClassName="Tuple"},32232:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeExpressionParser=void 0;const n=r(41026),i=r(33939),o=r(7836);t.TypeExpressionParser=class{constructor(){this.backingTypeFormulaParser=new n.TypeFormulaParser}parse(e){try{return this.doParse(e)}catch(t){throw new i.ErrTypingSystem(`Failed to parse type expression: ${e}. Error: ${t}`)}}doParse(e){const t=this.backingTypeFormulaParser.parseExpression(e);return this.typeFormulaToType(t)}typeFormulaToType(e){const t=e.typeParameters.map((e=>this.typeFormulaToType(e)));return new o.Type(e.name,t,void 0,e.metadata)}}},59996:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TypeMapper=void 0;const a=o(r(33939)),s=r(60049),c=r(78181),u=r(48545),l=r(70638),d=r(39273),f=r(15142),h=r(22940),p=r(12672),g=r(45652),m=r(3779),y=r(3376),v=r(97789),b=r(33633),w=r(65332),A=r(43499),_=r(9988),E=r(45464),S=r(29399),k=r(80159),x=r(29988);t.TypeMapper=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.openTypesFactories=new Map([["Option",function(){return new g.OptionType(arguments.length<=0?void 0:arguments[0])}],["List",function(){return new g.ListType(arguments.length<=0?void 0:arguments[0])}],["VarArgs",function(){return new x.VariadicType(arguments.length<=0?void 0:arguments[0])}],["MultiResultVec",function(){return new x.VariadicType(arguments.length<=0?void 0:arguments[0])}],["variadic",function(){return new x.VariadicType(arguments.length<=0?void 0:arguments[0])}],["counted-variadic",function(){return new x.VariadicType(arguments.length<=0?void 0:arguments[0],!0)}],["OptionalArg",function(){return new c.OptionalType(arguments.length<=0?void 0:arguments[0])}],["optional",function(){return new c.OptionalType(arguments.length<=0?void 0:arguments[0])}],["OptionalResult",function(){return new c.OptionalType(arguments.length<=0?void 0:arguments[0])}],["multi",function(){for(var e=arguments.length,t=new Array(e),r=0;rnew h.EnumVariantDefinition(e.name,e.discriminant,this.mappedFields(e.getFieldsDefinitions()))));return new h.EnumType(e.getName(),t)}mappedFields(e){return e.map((e=>new p.FieldDefinition(e.name,e.description,this.mapType(e.type))))}mapGenericType(e){let t=e.getTypeParameters().map((e=>this.mapType(e))),r=this.openTypesFactories.get(e.getName());if(!r)throw new a.ErrTypingSystem(`Cannot map the generic type "${e.getName()}" to a known type`);return e.hasMetadata()?r(e.getMetadata()):r(...t)}}},7836:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullType=t.TypePlaceholder=t.isTyped=t.PrimitiveValue=t.TypedValue=t.CustomType=t.PrimitiveType=t.TypeCardinality=t.Type=void 0;const n=r(39901),i=r(66079);class o{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.fixed(1),n=arguments.length>3?arguments[3]:void 0;i.guardValueIsSet("name",e),this.name=e,this.typeParameters=t,this.cardinality=r,this.metadata=n}getName(){return this.name}getClassName(){return o.ClassName}getClassHierarchy(){return n.getJavascriptPrototypesInHierarchy(this,(e=>e.belongsToTypesystem)).map((e=>e.getClassName())).reverse()}getFullyQualifiedName(){return this.isGenericType()||this.hasMetadata()?this.getFullNameForGeneric():`multiversx:types:${this.getName()}`}getFullNameForGeneric(){const e=this.getTypeParameters().length>0,t=e?`${this.getTypeParameters().map((e=>e.getFullyQualifiedName())).join(", ")}`:"";let r=`multiversx:types:${this.getName()}`;return e&&(r=`${r}<${t}>`),void 0!==this.metadata&&(r=`${r}*${this.metadata}*`),r}hasExactClass(e){return this.getClassName()==e}hasClassOrSuperclass(e){return this.getClassHierarchy().includes(e)}getTypeParameters(){return this.typeParameters}getMetadata(){return this.metadata}isGenericType(){return this.typeParameters.length>0}hasMetadata(){return!!this.metadata}getFirstTypeParameter(){return i.guardTrue(this.typeParameters.length>0,"type parameters length > 0"),this.typeParameters[0]}toString(){let e=this.getTypeParameters().map((e=>e.toString())).join(", "),t=e?`<${e}>`:"";return`${this.name}${t}`}equals(e){return o.equals(this,e)}static equals(e,t){return e.getFullyQualifiedName()==t.getFullyQualifiedName()}static equalsMany(e,t){return e.every(((e,r)=>e.equals(t[r])))}static isAssignableFromMany(e,t){return e.every(((e,r)=>e.isAssignableFrom(t[r])))}differs(e){return!this.equals(e)}valueOf(){return this.name}isAssignableFrom(e){if(!o.equalsMany(this.getTypeParameters(),e.getTypeParameters()))return!1;let t=this.getFullyQualifiedName();return!!o.getFullyQualifiedNamesInHierarchy(e).includes(t)||e.hasClassOrSuperclass(this.getClassName())}static getFullyQualifiedNamesInHierarchy(e){return n.getJavascriptPrototypesInHierarchy(e,(e=>e.belongsToTypesystem)).map((t=>t.getFullyQualifiedName.call(e)))}getNamesOfDependencies(){const e=[];for(const t of this.typeParameters)e.push(t.getName()),e.push(...t.getNamesOfDependencies());return[...new Set(e)]}toJSON(){return{name:this.name,typeParameters:this.typeParameters.map((e=>e.toJSON()))}}getCardinality(){return this.cardinality}belongsToTypesystem(){}}t.Type=o,o.ClassName="Type";class a{constructor(e,t){this.lowerBound=e,this.upperBound=t}static fixed(e){return new a(e,e)}static variable(e){return new a(0,e)}isSingular(){return 1==this.lowerBound&&1==this.upperBound}isSingularOrNone(){return 0==this.lowerBound&&1==this.upperBound}isComposite(){return 1!=this.upperBound}isFixed(){return this.lowerBound==this.upperBound}getLowerBound(){return this.lowerBound}getUpperBound(){return this.upperBound||a.MaxCardinality}}t.TypeCardinality=a,a.MaxCardinality=4096;class s extends o{constructor(e){super(e)}getClassName(){return s.ClassName}}t.PrimitiveType=s,s.ClassName="PrimitiveType";class c extends o{getClassName(){return c.ClassName}}t.CustomType=c,c.ClassName="CustomType";class u{constructor(e){this.type=e}getClassName(){return u.ClassName}getClassHierarchy(){return n.getJavascriptPrototypesInHierarchy(this,(e=>e.belongsToTypesystem)).map((e=>e.getClassName())).reverse()}getType(){return this.type}hasExactClass(e){return this.getClassName()==e}hasClassOrSuperclass(e){return this.getClassHierarchy().includes(e)}belongsToTypesystem(){}}t.TypedValue=u,u.ClassName="TypedValue";class l extends u{constructor(e){super(e)}getClassName(){return l.ClassName}}t.PrimitiveValue=l,l.ClassName="PrimitiveValue",t.isTyped=function(e){return void 0!==e.belongsToTypesystem};class d extends o{constructor(){super("...")}getClassName(){return d.ClassName}}t.TypePlaceholder=d,d.ClassName="TypePlaceholder";class f extends o{constructor(){super("?")}getClassName(){return f.ClassName}}t.NullType=f,f.ClassName="NullType"},29988:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariadicValue=t.CountedVariadicType=t.VariadicType=void 0;const n=r(7836);class i extends n.Type{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super("Variadic",[e],n.TypeCardinality.variable()),this.isCounted=t}getClassName(){return i.ClassName}}t.VariadicType=i,i.ClassName="VariadicType";class o extends n.Type{constructor(e){super("Variadic",[e],n.TypeCardinality.variable())}getClassName(){return i.ClassName}}t.CountedVariadicType=o,o.ClassName="VariadicType";class a extends n.TypedValue{constructor(e,t){super(e),this.items=t}getClassName(){return a.ClassName}static fromItems(){for(var e=arguments.length,t=new Array(e),r=0;re.valueOf()))}equals(e){if(this.getType().differs(e.getType()))return!1;for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenOperationsFactory=void 0;const n=r(87679),i=r(87052),o=r(89814),a=r(85330),s=r(96082),c=r(11564);t.TokenOperationsFactory=class{constructor(e){this.config=e,this.trueAsHex=c.utf8ToHex("true"),this.falseAsHex=c.utf8ToHex("false")}issueFungible(e){this.notifyAboutUnsettingBurnRoleGlobally();const t=["issue",c.utf8ToHex(e.tokenName),c.utf8ToHex(e.tokenTicker),c.bigIntToHex(e.initialSupply),c.bigIntToHex(e.numDecimals),c.utf8ToHex("canFreeze"),e.canFreeze?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canWipe"),e.canWipe?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canPause"),e.canPause?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canChangeOwner"),e.canChangeOwner?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canUpgrade"),e.canUpgrade?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canAddSpecialRoles"),e.canAddSpecialRoles?this.trueAsHex:this.falseAsHex];return this.createTransaction({sender:e.issuer,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,value:this.config.issueCost,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitIssue,dataParts:t})}notifyAboutUnsettingBurnRoleGlobally(){i.Logger.info('\n==========\nIMPORTANT!\n==========\nYou are about to issue (register) a new token. This will set the role "ESDTRoleBurnForAll" (globally).\nOnce the token is registered, you can unset this role by calling "unsetBurnRoleGlobally" (in a separate transaction).')}issueSemiFungible(e){this.notifyAboutUnsettingBurnRoleGlobally();const t=["issueSemiFungible",c.utf8ToHex(e.tokenName),c.utf8ToHex(e.tokenTicker),c.utf8ToHex("canFreeze"),e.canFreeze?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canWipe"),e.canWipe?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canPause"),e.canPause?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canTransferNFTCreateRole"),e.canTransferNFTCreateRole?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canChangeOwner"),e.canChangeOwner?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canUpgrade"),e.canUpgrade?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canAddSpecialRoles"),e.canAddSpecialRoles?this.trueAsHex:this.falseAsHex];return this.createTransaction({sender:e.issuer,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,value:this.config.issueCost,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitIssue,dataParts:t})}issueNonFungible(e){this.notifyAboutUnsettingBurnRoleGlobally();const t=["issueNonFungible",c.utf8ToHex(e.tokenName),c.utf8ToHex(e.tokenTicker),c.utf8ToHex("canFreeze"),e.canFreeze?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canWipe"),e.canWipe?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canPause"),e.canPause?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canTransferNFTCreateRole"),e.canTransferNFTCreateRole?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canChangeOwner"),e.canChangeOwner?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canUpgrade"),e.canUpgrade?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canAddSpecialRoles"),e.canAddSpecialRoles?this.trueAsHex:this.falseAsHex];return this.createTransaction({sender:e.issuer,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,value:this.config.issueCost,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitIssue,dataParts:t})}registerMetaESDT(e){this.notifyAboutUnsettingBurnRoleGlobally();const t=["registerMetaESDT",c.utf8ToHex(e.tokenName),c.utf8ToHex(e.tokenTicker),c.bigIntToHex(e.numDecimals),c.utf8ToHex("canFreeze"),e.canFreeze?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canWipe"),e.canWipe?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canPause"),e.canPause?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canTransferNFTCreateRole"),e.canTransferNFTCreateRole?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canChangeOwner"),e.canChangeOwner?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canUpgrade"),e.canUpgrade?this.trueAsHex:this.falseAsHex,c.utf8ToHex("canAddSpecialRoles"),e.canAddSpecialRoles?this.trueAsHex:this.falseAsHex];return this.createTransaction({sender:e.issuer,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,value:this.config.issueCost,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitIssue,dataParts:t})}registerAndSetAllRoles(e){this.notifyAboutUnsettingBurnRoleGlobally();const t=["registerAndSetAllRoles",c.utf8ToHex(e.tokenName),c.utf8ToHex(e.tokenTicker),c.utf8ToHex(e.tokenType),c.bigIntToHex(e.numDecimals)];return this.createTransaction({sender:e.issuer,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,value:this.config.issueCost,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitIssue,dataParts:t})}setBurnRoleGlobally(e){const t=["setBurnRoleGlobally",c.utf8ToHex(e.tokenIdentifier)];return this.createTransaction({sender:e.manager,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitToggleBurnRoleGlobally,dataParts:t})}unsetBurnRoleGlobally(e){const t=["unsetBurnRoleGlobally",c.utf8ToHex(e.tokenIdentifier)];return this.createTransaction({sender:e.manager,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitToggleBurnRoleGlobally,dataParts:t})}setSpecialRoleOnFungible(e){const t=["setSpecialRole",c.utf8ToHex(e.tokenIdentifier),c.addressToHex(e.user),...e.addRoleLocalMint?[c.utf8ToHex("ESDTRoleLocalMint")]:[],...e.addRoleLocalBurn?[c.utf8ToHex("ESDTRoleLocalBurn")]:[]];return this.createTransaction({sender:e.manager,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitSetSpecialRole,dataParts:t})}setSpecialRoleOnSemiFungible(e){const t=["setSpecialRole",c.utf8ToHex(e.tokenIdentifier),c.addressToHex(e.user),...e.addRoleNFTCreate?[c.utf8ToHex("ESDTRoleNFTCreate")]:[],...e.addRoleNFTBurn?[c.utf8ToHex("ESDTRoleNFTBurn")]:[],...e.addRoleNFTAddQuantity?[c.utf8ToHex("ESDTRoleNFTAddQuantity")]:[],...e.addRoleESDTTransferRole?[c.utf8ToHex("ESDTTransferRole")]:[]];return this.createTransaction({sender:e.manager,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitSetSpecialRole,dataParts:t})}setSpecialRoleOnMetaESDT(e){return this.setSpecialRoleOnSemiFungible(e)}setSpecialRoleOnNonFungible(e){const t=["setSpecialRole",c.utf8ToHex(e.tokenIdentifier),c.addressToHex(e.user),...e.addRoleNFTCreate?[c.utf8ToHex("ESDTRoleNFTCreate")]:[],...e.addRoleNFTBurn?[c.utf8ToHex("ESDTRoleNFTBurn")]:[],...e.addRoleNFTUpdateAttributes?[c.utf8ToHex("ESDTRoleNFTUpdateAttributes")]:[],...e.addRoleNFTAddURI?[c.utf8ToHex("ESDTRoleNFTAddURI")]:[],...e.addRoleESDTTransferRole?[c.utf8ToHex("ESDTTransferRole")]:[]];return this.createTransaction({sender:e.manager,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitSetSpecialRole,dataParts:t})}nftCreate(e){const t=["ESDTNFTCreate",c.utf8ToHex(e.tokenIdentifier),c.bigIntToHex(e.initialQuantity),c.utf8ToHex(e.name),c.bigIntToHex(e.royalties),c.utf8ToHex(e.hash),c.bufferToHex(e.attributes),...e.uris.map(c.utf8ToHex)],r=(e.name+e.hash+e.attributes+e.uris.join("")).length*this.config.gasLimitStorePerByte.valueOf();return this.createTransaction({sender:e.creator,receiver:e.creator,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitESDTNFTCreate.valueOf()+r.valueOf(),dataParts:t})}pause(e){const t=["pause",c.utf8ToHex(e.tokenIdentifier)];return this.createTransaction({sender:e.manager,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitPausing,dataParts:t})}unpause(e){const t=["unPause",c.utf8ToHex(e.tokenIdentifier)];return this.createTransaction({sender:e.manager,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitPausing,dataParts:t})}freeze(e){const t=["freeze",c.utf8ToHex(e.tokenIdentifier),c.addressToHex(e.user)];return this.createTransaction({sender:e.manager,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitFreezing,dataParts:t})}unfreeze(e){const t=["unFreeze",c.utf8ToHex(e.tokenIdentifier),c.addressToHex(e.user)];return this.createTransaction({sender:e.manager,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitFreezing,dataParts:t})}wipe(e){const t=["wipe",c.utf8ToHex(e.tokenIdentifier),c.addressToHex(e.user)];return this.createTransaction({sender:e.manager,receiver:this.config.esdtContractAddress,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitWiping,dataParts:t})}localMint(e){const t=["ESDTLocalMint",c.utf8ToHex(e.tokenIdentifier),c.bigIntToHex(e.supplyToMint)];return this.createTransaction({sender:e.manager,receiver:e.manager,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitESDTLocalMint,dataParts:t})}localBurn(e){const t=["ESDTLocalBurn",c.utf8ToHex(e.tokenIdentifier),c.bigIntToHex(e.supplyToBurn)];return this.createTransaction({sender:e.manager,receiver:e.manager,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitESDTLocalBurn,dataParts:t})}updateAttributes(e){const t=["ESDTNFTUpdateAttributes",c.utf8ToHex(e.tokenIdentifier),c.bigIntToHex(e.tokenNonce),c.bufferToHex(e.attributes)];return this.createTransaction({sender:e.manager,receiver:e.manager,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitESDTNFTUpdateAttributes,dataParts:t})}addQuantity(e){const t=["ESDTNFTAddQuantity",c.utf8ToHex(e.tokenIdentifier),c.bigIntToHex(e.tokenNonce),c.bigIntToHex(e.quantityToAdd)];return this.createTransaction({sender:e.manager,receiver:e.manager,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitESDTNFTAddQuantity,dataParts:t})}burnQuantity(e){const t=["ESDTNFTBurn",c.utf8ToHex(e.tokenIdentifier),c.bigIntToHex(e.tokenNonce),c.bigIntToHex(e.quantityToBurn)];return this.createTransaction({sender:e.manager,receiver:e.manager,nonce:e.transactionNonce,gasPrice:e.gasPrice,gasLimitHint:e.gasLimit,executionGasLimit:this.config.gasLimitESDTNFTBurn,dataParts:t})}createTransaction(e){let{sender:t,receiver:r,nonce:i,value:s,gasPrice:c,gasLimitHint:u,executionGasLimit:l,dataParts:d}=e;const f=this.buildTransactionPayload(d),h=u||this.computeGasLimit(f,l),p=new o.TransactionVersion(n.TRANSACTION_VERSION_DEFAULT),g=new o.TransactionOptions(n.TRANSACTION_OPTIONS_DEFAULT);return new a.Transaction({chainID:this.config.chainID,sender:t,receiver:r,gasLimit:h,gasPrice:c,nonce:i||0,value:s||0,data:f,version:p,options:g})}buildTransactionPayload(e){const t=e.join(n.ARGUMENTS_SEPARATOR);return new s.TransactionPayload(t)}computeGasLimit(e,t){return this.config.minGasLimit.valueOf()+this.config.gasLimitPerByte.valueOf()*e.length()+t.valueOf()}}},8437:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenOperationsFactoryConfig=void 0;const n=r(70054);t.TokenOperationsFactoryConfig=class{constructor(e){this.minGasPrice=1e9,this.minGasLimit=5e4,this.gasLimitPerByte=1500,this.gasLimitIssue=6e7,this.gasLimitToggleBurnRoleGlobally=6e7,this.gasLimitESDTLocalMint=3e5,this.gasLimitESDTLocalBurn=3e5,this.gasLimitSetSpecialRole=6e7,this.gasLimitPausing=6e7,this.gasLimitFreezing=6e7,this.gasLimitWiping=6e7,this.gasLimitESDTNFTCreate=3e6,this.gasLimitESDTNFTUpdateAttributes=1e6,this.gasLimitESDTNFTAddQuantity=1e6,this.gasLimitESDTNFTBurn=1e6,this.gasLimitStorePerByte=5e4,this.issueCost="50000000000000000",this.esdtContractAddress=n.Address.fromBech32("erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u"),this.chainID=e}}},20970:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenOperationsOutcomeParser=void 0;const n=r(70054),i=r(33939),o=r(11564);t.TokenOperationsOutcomeParser=class{parseIssueFungible(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"issue");return{tokenIdentifier:this.extractTokenIdentifier(t)}}parseIssueNonFungible(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"issueNonFungible");return{tokenIdentifier:this.extractTokenIdentifier(t)}}parseIssueSemiFungible(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"issueSemiFungible");return{tokenIdentifier:this.extractTokenIdentifier(t)}}parseRegisterMetaESDT(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"registerMetaESDT");return{tokenIdentifier:this.extractTokenIdentifier(t)}}parseRegisterAndSetAllRoles(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"registerAndSetAllRoles");return{tokenIdentifier:this.extractTokenIdentifier(t),roles:this.findSingleEventByIdentifier(e,"ESDTSetRole").topics.slice(3).map((e=>e.valueOf().toString()))}}parseSetBurnRoleGlobally(e){return this.ensureNoError(e),{}}parseUnsetBurnRoleGlobally(e){return this.ensureNoError(e),{}}parseSetSpecialRole(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"ESDTSetRole");return{userAddress:t.address.toString(),tokenIdentifier:this.extractTokenIdentifier(t),roles:t.topics.slice(3).map((e=>e.valueOf().toString()))}}parseNFTCreate(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"ESDTNFTCreate");return{tokenIdentifier:this.extractTokenIdentifier(t),nonce:this.extractNonce(t),initialQuantity:this.extractAmount(t)}}parseLocalMint(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"ESDTLocalMint");return{userAddress:t.address.toString(),tokenIdentifier:this.extractTokenIdentifier(t),nonce:this.extractNonce(t),mintedSupply:this.extractAmount(t)}}parseLocalBurn(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"ESDTLocalBurn");return{userAddress:t.address.toString(),tokenIdentifier:this.extractTokenIdentifier(t),nonce:this.extractNonce(t),burntSupply:this.extractAmount(t)}}parsePause(e){this.ensureNoError(e);this.findSingleEventByIdentifier(e,"ESDTPause");return{}}parseUnpause(e){this.ensureNoError(e);this.findSingleEventByIdentifier(e,"ESDTUnPause");return{}}parseFreeze(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"ESDTFreeze"),r=this.extractTokenIdentifier(t),n=this.extractNonce(t),i=this.extractAmount(t);return{userAddress:this.extractAddress(t),tokenIdentifier:r,nonce:n,balance:i}}parseUnfreeze(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"ESDTUnFreeze"),r=this.extractTokenIdentifier(t),n=this.extractNonce(t),i=this.extractAmount(t);return{userAddress:this.extractAddress(t),tokenIdentifier:r,nonce:n,balance:i}}parseWipe(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"ESDTWipe"),r=this.extractTokenIdentifier(t),n=this.extractNonce(t),i=this.extractAmount(t);return{userAddress:this.extractAddress(t),tokenIdentifier:r,nonce:n,balance:i}}parseUpdateAttributes(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"ESDTNFTUpdateAttributes"),r=this.extractTokenIdentifier(t),n=this.extractNonce(t),i=t.topics[3]?.valueOf();return{tokenIdentifier:r,nonce:n,attributes:i}}parseAddQuantity(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"ESDTNFTAddQuantity");return{tokenIdentifier:this.extractTokenIdentifier(t),nonce:this.extractNonce(t),addedQuantity:this.extractAmount(t)}}parseBurnQuantity(e){this.ensureNoError(e);const t=this.findSingleEventByIdentifier(e,"ESDTNFTBurn");return{tokenIdentifier:this.extractTokenIdentifier(t),nonce:this.extractNonce(t),burntQuantity:this.extractAmount(t)}}ensureNoError(e){for(const t of e.logs.events)if("signalError"==t.identifier){const r=Buffer.from(t.data.substring(1),"hex").toString(),n=t.topics[1]?.valueOf().toString();throw new i.ErrCannotParseTransactionOutcome(e.hash,`encountered signalError: ${n} (${r})`)}}findSingleEventByIdentifier(e,t){const r=this.gatherAllEvents(e).filter((e=>e.identifier==t));if(0==r.length)throw new i.ErrCannotParseTransactionOutcome(e.hash,`cannot find event of type ${t}`);if(r.length>1)throw new i.ErrCannotParseTransactionOutcome(e.hash,`more than one event of type ${t}`);return r[0]}gatherAllEvents(e){const t=[];t.push(...e.logs.events);for(const r of e.contractResults.items)t.push(...r.logs.events);return t}extractTokenIdentifier(e){return e.topics[0]?.valueOf().toString()}extractNonce(e){return o.bufferToBigInt(e.topics[1]?.valueOf()).toFixed(0)}extractAmount(e){return o.bufferToBigInt(e.topics[2]?.valueOf()).toFixed(0)}extractAddress(e){return n.Address.fromBuffer(e.topics[3]?.valueOf()).toString()}}},84446:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TokenPayment=t.TokenComputer=t.TokenTransfer=t.Token=void 0;const i=n(r(63160)),o=r(33939),a=r(87679),s="EGLD";i.default.set({ROUNDING_MODE:1});class c{constructor(e){this.identifier=e.identifier,this.nonce=e.nonce||0n}}t.Token=c;class u{constructor(e){if(this.isLegacyTokenTransferOptions(e)){const t=new i.default(e.amountAsBigInteger);if(!t.isInteger()||t.isNegative())throw new o.ErrInvalidArgument(`bad amountAsBigInteger: ${e.amountAsBigInteger}`);this.tokenIdentifier=e.tokenIdentifier,this.nonce=e.nonce,this.amountAsBigInteger=t,this.numDecimals=e.numDecimals||0,this.token=new c({identifier:e.tokenIdentifier,nonce:BigInt(e.nonce)}),this.amount=BigInt(this.amountAsBigInteger.toFixed(0))}else this.token=e.token,this.amount=e.amount,this.tokenIdentifier=e.token.identifier,this.nonce=Number(e.token.nonce),this.amountAsBigInteger=new i.default(this.amount.toString()),this.numDecimals=0}static newFromEgldAmount(e){const t=new c({identifier:a.EGLD_IDENTIFIER_FOR_MULTI_ESDTNFT_TRANSFER});return new u({token:t,amount:e})}isLegacyTokenTransferOptions(e){return void 0!==e.tokenIdentifier}static egldFromAmount(e){const t=new i.default(e).shiftedBy(18).decimalPlaces(0);return this.egldFromBigInteger(t)}static egldFromBigInteger(e){return new u({tokenIdentifier:s,nonce:0,amountAsBigInteger:e,numDecimals:18})}static fungibleFromAmount(e,t,r){const n=new i.default(t).shiftedBy(r).decimalPlaces(0);return this.fungibleFromBigInteger(e,n,r)}static fungibleFromBigInteger(e,t){return new u({tokenIdentifier:e,nonce:0,amountAsBigInteger:t,numDecimals:arguments.length>2&&void 0!==arguments[2]?arguments[2]:0})}static nonFungible(e,t){return new u({tokenIdentifier:e,nonce:t,amountAsBigInteger:1,numDecimals:0})}static semiFungible(e,t,r){return new u({tokenIdentifier:e,nonce:t,amountAsBigInteger:r,numDecimals:0})}static metaEsdtFromAmount(e,t,r,n){const o=new i.default(r).shiftedBy(n).decimalPlaces(0);return this.metaEsdtFromBigInteger(e,t,o,n)}static metaEsdtFromBigInteger(e,t,r){return new u({tokenIdentifier:e,nonce:t,amountAsBigInteger:r,numDecimals:arguments.length>3&&void 0!==arguments[3]?arguments[3]:0})}toString(){return this.amount.toString()}valueOf(){return new i.default(this.amount.toString())}toPrettyString(){return`${this.toAmount()} ${this.tokenIdentifier}`}toAmount(){return this.amountAsBigInteger.shiftedBy(-this.numDecimals).toFixed(this.numDecimals)}isEgld(){return this.token.identifier==s}isFungible(){return 0n==this.token.nonce}}t.TokenTransfer=u;t.TokenComputer=class{constructor(){}isFungible(e){return 0n===e.nonce}extractNonceFromExtendedIdentifier(e){const t=e.split("-");if(this.checkIfExtendedIdentifierWasProvided(t),this.checkLengthOfRandomSequence(t[1]),2==t.length)return 0;const r=Buffer.from(t[2],"hex");return(n=r).readUIntBE(0,n.length);var n}extractIdentifierFromExtendedIdentifier(e){const t=e.split("-");return this.checkIfExtendedIdentifierWasProvided(t),this.ensureTokenTickerValidity(t[0]),this.checkLengthOfRandomSequence(t[1]),t[0]+"-"+t[1]}checkIfExtendedIdentifierWasProvided(e){if(e.length<2||e.length>3)throw new o.ErrInvalidTokenIdentifier("Invalid extended token identifier provided")}checkLengthOfRandomSequence(e){if(6!==e.length)throw new o.ErrInvalidTokenIdentifier("The identifier is not valid. The random sequence does not have the right length")}ensureTokenTickerValidity(e){if(e.length<3||e.length>10)throw new o.ErrInvalidTokenIdentifier("The token ticker should be between 3 and 10 characters");if(!e.match(/^[a-zA-Z0-9]+$/))throw new o.ErrInvalidTokenIdentifier("The token ticker should only contain alphanumeric characters");if(e!=e.toUpperCase())throw new o.ErrInvalidTokenIdentifier("The token ticker should be upper case")}};t.TokenPayment=class extends u{constructor(e,t,r,n){super({tokenIdentifier:e,nonce:t,amountAsBigInteger:r,numDecimals:n})}}},85330:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionHash=t.Transaction=void 0;const n=r(63160),i=r(70054),o=r(87679),a=r(78089),s=r(89364),c=r(89814),u=r(11712),l=r(96082),d=r(73331);t.Transaction=class{constructor(e){this.nonce=BigInt(e.nonce?.valueOf()||0n),this.value=e.value?BigInt(new n.BigNumber(e.value.toString()).toFixed(0)):0n,this.sender=this.addressAsBech32(e.sender),this.receiver=this.addressAsBech32(e.receiver),this.senderUsername=e.senderUsername||"",this.receiverUsername=e.receiverUsername||"",this.gasPrice=BigInt(e.gasPrice?.valueOf()||o.TRANSACTION_MIN_GAS_PRICE),this.gasLimit=BigInt(e.gasLimit.valueOf()),this.data=e.data?.valueOf()||new Uint8Array,this.chainID=e.chainID.valueOf(),this.version=Number(e.version?.valueOf()||o.TRANSACTION_VERSION_DEFAULT),this.options=Number(e.options?.valueOf()||o.TRANSACTION_OPTIONS_DEFAULT),this.guardian=e.guardian?this.addressAsBech32(e.guardian):"",this.signature=e.signature||Buffer.from([]),this.guardianSignature=e.guardianSignature||Buffer.from([]),this.relayer=e.relayer||"",this.innerTransactions=e.innerTransactions||[]}addressAsBech32(e){return"string"===typeof e?e:e.bech32()}getNonce(){return Number(this.nonce)}setNonce(e){this.nonce=BigInt(e.valueOf())}getValue(){return this.value}setValue(e){this.value=BigInt(e.toString())}getSender(){return i.Address.fromBech32(this.sender)}setSender(e){this.sender="string"===typeof e?e:e.bech32()}getReceiver(){return i.Address.fromBech32(this.receiver)}getSenderUsername(){return this.senderUsername}setSenderUsername(e){this.senderUsername=e}getReceiverUsername(){return this.receiverUsername}setReceiverUsername(e){this.receiverUsername=e}getGuardian(){return new i.Address(this.guardian)}getGasPrice(){return Number(this.gasPrice)}setGasPrice(e){this.gasPrice=BigInt(e.valueOf())}getGasLimit(){return Number(this.gasLimit)}setGasLimit(e){this.gasLimit=BigInt(e.valueOf())}getData(){return new l.TransactionPayload(Buffer.from(this.data))}getChainID(){return this.chainID}setChainID(e){this.chainID=e.valueOf()}getVersion(){return new c.TransactionVersion(this.version)}setVersion(e){this.version=e.valueOf()}getOptions(){return new c.TransactionOptions(this.options.valueOf())}setOptions(e){this.options=e.valueOf()}getSignature(){return Buffer.from(this.signature)}getGuardianSignature(){return Buffer.from(this.guardianSignature)}setGuardian(e){this.guardian="string"===typeof e?e:e.bech32()}getHash(){return f.compute(this)}serializeForSigning(){const e=(new d.TransactionComputer).computeBytesForSigning(this);return Buffer.from(e)}isGuardedTransaction(){const e=this.guardian.length>0,t=this.guardianSignature.length>0;return this.getOptions().isWithGuardian()&&e&&t}toPlainObject(){return(new a.TransactionsConverter).transactionToPlainObject(this)}static fromPlainObject(e){return(new a.TransactionsConverter).plainObjectToTransaction(e)}applySignature(e){this.signature=u.interpretSignatureAsBuffer(e)}applyGuardianSignature(e){this.guardianSignature=u.interpretSignatureAsBuffer(e)}toSendable(){return this.toPlainObject()}computeFee(e){const t=(new d.TransactionComputer).computeTransactionFee(this,e);return new n.BigNumber(t.toString())}};class f extends s.Hash{constructor(e){super(e)}static compute(e){const t=(new d.TransactionComputer).computeTransactionHash(e);return new f(Buffer.from(t).toString("hex"))}}t.TransactionHash=f},73331:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionComputer=void 0;const s=a(r(63160)),c=r(87679),u=o(r(33939)),l=r(67359),d=r(85330),f=r(37616),h=r(33858);t.TransactionComputer=class{constructor(){}computeTransactionFee(e,t){const r=BigInt(t.MinGasLimit+e.data.length*t.GasPerDataByte);if(r>e.gasLimit)throw new u.ErrNotEnoughGas(parseInt(e.gasLimit.toString(),10));const n=e.gasPrice,i=r*n;if(r===e.gasLimit)return i;return i+(e.gasLimit-r)*BigInt(new s.default(n.toString()).multipliedBy(new s.default(t.GasPriceModifier)).toFixed(0))}computeBytesForSigning(e){this.ensureValidTransactionFields(e);const t=this.toPlainObject(e),r=JSON.stringify(t);return new Uint8Array(Buffer.from(r))}computeBytesForVerifying(e){return this.hasOptionsSetForHashSigning(e)?this.computeHashForSigning(e):this.computeBytesForSigning(e)}computeHashForSigning(e){const t=this.toPlainObject(e),r=Buffer.from(JSON.stringify(t));return h("keccak256").update(r).digest()}computeTransactionHash(e){const t=(new l.ProtoSerializer).serializeTransaction(new d.Transaction(e)),r=f(32).update(t).digest("hex");return Buffer.from(r,"hex")}hasOptionsSetForGuardedTransaction(e){return(e.options&c.TRANSACTION_OPTIONS_TX_GUARDED)==c.TRANSACTION_OPTIONS_TX_GUARDED}hasOptionsSetForHashSigning(e){return(e.options&c.TRANSACTION_OPTIONS_TX_HASH_SIGN)==c.TRANSACTION_OPTIONS_TX_HASH_SIGN}applyGuardian(e,t){e.versionthis.toPlainObject(e,!0))):void 0,r}toHexOrUndefined(e){return e&&e.length?Buffer.from(e).toString("hex"):void 0}toBase64OrUndefined(e){return e&&e.length?Buffer.from(e).toString("base64"):void 0}ensureValidTransactionFields(e){if(!e.chainID.length)throw new u.ErrBadUsage("The `chainID` field is not set");if(e.version= ${c.MIN_TRANSACTION_VERSION_THAT_SUPPORTS_OPTIONS}`)}}},96082:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionPayload=void 0;class r{constructor(e){this.data=Buffer.from(e||[])}static fromEncoded(e){if(!e)return new r("");let t=Buffer.from(e,"base64").toString();return new r(t)}isEmpty(){return 0==this.data.length}encoded(){return this.data.toString("base64")}valueOf(){return this.data}toString(){return this.data.toString()}getEncodedArguments(){return this.toString().split("@")}getRawArguments(){return this.getEncodedArguments().map((e=>Buffer.from(e,"hex")))}length(){return Buffer.from(this.data).length}}t.TransactionPayload=r},6504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionWatcher=void 0;const n=r(84737),i=r(87679),o=r(33939),a=r(87052);class s{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.fetcher=new c(e),this.pollingIntervalMilliseconds=t.pollingIntervalMilliseconds||s.DefaultPollingInterval,this.timeoutMilliseconds=t.timeoutMilliseconds||s.DefaultTimeout,this.patienceMilliseconds=t.patienceMilliseconds||s.DefaultPatience}async awaitPending(e){return this.awaitConditionally((e=>e.status.isPending()),(async()=>{const t=this.transactionOrTxHashToTxHash(e);return await this.fetcher.getTransaction(t)}),(()=>new o.ErrExpectedTransactionStatusNotReached))}async awaitCompleted(e){return this.awaitConditionally((e=>{if(void 0===e.isCompleted)throw new o.ErrIsCompletedFieldIsMissingOnTransaction;return e.isCompleted}),(async()=>{const t=this.transactionOrTxHashToTxHash(e);return await this.fetcher.getTransaction(t)}),(()=>new o.ErrExpectedTransactionStatusNotReached))}async awaitAllEvents(e,t){return this.awaitConditionally((e=>{const r=this.getAllTransactionEvents(e).map((e=>e.identifier));return t.every((e=>r.includes(e)))}),(async()=>{const t=this.transactionOrTxHashToTxHash(e);return await this.fetcher.getTransaction(t)}),(()=>new o.ErrExpectedTransactionEventsNotFound))}async awaitAnyEvent(e,t){return this.awaitConditionally((e=>{const r=this.getAllTransactionEvents(e).map((e=>e.identifier));return void 0!=t.find((e=>r.includes(e)))}),(async()=>{const t=this.transactionOrTxHashToTxHash(e);return await this.fetcher.getTransaction(t)}),(()=>new o.ErrExpectedTransactionEventsNotFound))}async awaitOnCondition(e,t){return this.awaitConditionally(t,(async()=>{const t=this.transactionOrTxHashToTxHash(e);return await this.fetcher.getTransaction(t)}),(()=>new o.ErrExpectedTransactionStatusNotReached))}transactionOrTxHashToTxHash(e){const t="string"===typeof e?e:e.getHash().hex();if(t.length!==i.HEX_TRANSACTION_HASH_LENGTH)throw new o.Err(`Invalid transaction hash length. The length of a hex encoded hash should be ${i.HEX_TRANSACTION_HASH_LENGTH}.`);return t}async awaitConditionally(e,t,r){const i=new n.AsyncTimer("watcher:periodic"),s=new n.AsyncTimer("watcher:patience"),c=new n.AsyncTimer("watcher:timeout");let u,l=!1,d=!1;for(c.start(this.timeoutMilliseconds).finally((()=>{c.stop(),l=!0}));!l;){await i.start(this.pollingIntervalMilliseconds);try{if(u=await t(),d=e(u),d||l)break}catch(f){if(a.Logger.debug("TransactionWatcher.awaitConditionally(): cannot (yet) fetch data."),f instanceof o.ErrIsCompletedFieldIsMissingOnTransaction)throw f;if(!(f instanceof o.Err))throw f}}if(d&&await s.start(this.patienceMilliseconds),c.isStopped()||c.stop(),!u||!d)throw r();return u}getAllTransactionEvents(e){const t=[...e.logs.events];for(const r of e.contractResults.items)t.push(...r.logs.events);return t}}t.TransactionWatcher=s,s.DefaultPollingInterval=6e3,s.DefaultTimeout=15*s.DefaultPollingInterval,s.DefaultPatience=0,s.NoopOnStatusReceived=e=>{};class c{constructor(e){this.fetcher=e}async getTransaction(e){return a.Logger.debug(`transactionWatcher, getTransaction(${e})`),await this.fetcher.getTransaction(e)}}},69266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountTransactionsFactory=void 0;const n=r(70054),i=r(55817);t.AccountTransactionsFactory=class{constructor(e){this.config=e.config}createTransactionForSavingKeyValue(e){const t=["SaveKeyValue",...this.computeDataPartsForSavingKeyValue(e.keyValuePairs)],r=this.computeExtraGasForSavingKeyValue(e.keyValuePairs);return new i.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:r,addDataMovementGas:!0}).build()}computeExtraGasForSavingKeyValue(e){let t=0n;return e.forEach(((e,r)=>{t+=this.config.gasLimitPersistPerByte*BigInt(r.length+e.length)+this.config.gasLimitStorePerByte*BigInt(e.length)})),t+this.config.gasLimitSaveKeyValue}computeDataPartsForSavingKeyValue(e){const t=[];return e.forEach(((e,r)=>{t.push(Buffer.from(r).toString("hex"),Buffer.from(e).toString("hex"))})),t}createTransactionForSettingGuardian(e){const t=["SetGuardian",n.Address.fromBech32(e.guardianAddress.bech32()).toHex(),Buffer.from(e.serviceID).toString("hex")];return new i.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitSetGuardian,addDataMovementGas:!0}).build()}createTransactionForGuardingAccount(e){return new i.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:["GuardAccount"],gasLimit:this.config.gasLimitGuardAccount,addDataMovementGas:!0}).build()}createTransactionForUnguardingAccount(e){return new i.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:["UnGuardAccount"],gasLimit:this.config.gasLimitUnguardAccount,addDataMovementGas:!0}).build()}}},74059:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DelegationTransactionsFactory=void 0;const n=r(70054),i=r(87679),o=r(33939),a=r(85975),s=r(55817);t.DelegationTransactionsFactory=class{constructor(e){this.config=e.config,this.argSerializer=new a.ArgSerializer,this.delegationManagerAddress=n.Address.fromHex(i.DELEGATION_MANAGER_SC_ADDRESS_HEX,this.config.addressHrp)}createTransactionForNewDelegationContract(e){const t=["createNewDelegationContract",...this.argSerializer.valuesToStrings([new a.BigUIntValue(e.totalDelegationCap),new a.BigUIntValue(e.serviceFee)])],r=this.config.gasLimitCreateDelegationContract+this.config.additionalGasLimitForDelegationOperations;return new s.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.delegationManagerAddress,dataParts:t,gasLimit:r,addDataMovementGas:!0,amount:e.amount}).build()}createTransactionForAddingNodes(e){if(e.publicKeys.length!==e.signedMessages.length)throw new o.Err("The number of public keys should match the number of signed messages");const t=e.signedMessages.map((e=>new a.BytesValue(Buffer.from(e)))),r=this.argSerializer.valuesToStrings(t),n=e.publicKeys.length,i=["addNodes"];for(let o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SmartContractTransactionsFactory=void 0;const n=r(70054),i=r(87679),o=r(33939),a=r(87052),s=r(85975),c=r(35696),u=r(41077),l=r(84446),d=r(96227),f=r(62270),h=r(55817);t.SmartContractTransactionsFactory=class{constructor(e){this.config=e.config,this.abi=e.abi,this.tokenComputer=new l.TokenComputer,this.dataArgsBuilder=new f.TokenTransfersDataBuilder,this.contractDeployAddress=n.Address.fromHex(i.CONTRACT_DEPLOY_ADDRESS_HEX,this.config.addressHrp)}createTransactionForDeploy(e){const t=e.nativeTransferAmount??0n,r=e.isUpgradeable??!0,n=e.isReadable??!0,o=e.isPayable??!1,a=e.isPayableBySmartContract??!0,c=e.arguments||[],u=new s.CodeMetadata(r,n,o,a),l=[d.byteArrayToHex(e.bytecode),d.byteArrayToHex(i.VM_TYPE_WASM_VM),u.toString()],f=this.abi?.constructorDefinition,p=this.argsToDataParts(c,f);return l.push(...p),new h.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.contractDeployAddress,dataParts:l,gasLimit:e.gasLimit,addDataMovementGas:!1,amount:t}).build()}createTransactionForExecute(e){const t=e.arguments||[];let r=e.tokenTransfers?[...e.tokenTransfers]:[],n=e.nativeTransferAmount??0n,i=r.length;n&&i&&(r.push(l.TokenTransfer.newFromEgldAmount(n)),n=0n,i++);let o=e.contract,a=[];if(1===i){const t=r[0];this.tokenComputer.isFungible(t.token)?a=this.dataArgsBuilder.buildDataPartsForESDTTransfer(t):(a=this.dataArgsBuilder.buildDataPartsForSingleESDTNFTTransfer(t,o),o=e.sender)}else i>1&&(a=this.dataArgsBuilder.buildDataPartsForMultiESDTNFTTransfer(o,r),o=e.sender);a.push(a.length?d.utf8ToHex(e.function):e.function);const s=this.abi?.getEndpoint(e.function),c=this.argsToDataParts(t,s);return a.push(...c),new h.TransactionBuilder({config:this.config,sender:e.sender,receiver:o,dataParts:a,gasLimit:e.gasLimit,addDataMovementGas:!1,amount:n}).build()}createTransactionForUpgrade(e){const t=e.nativeTransferAmount??0n,r=e.isUpgradeable??!0,n=e.isReadable??!0,i=e.isPayable??!1,o=e.isPayableBySmartContract??!0,a=e.arguments||[],c=new s.CodeMetadata(r,n,i,o),u=["upgradeContract",d.byteArrayToHex(e.bytecode),c.toString()],l=this.getEndpointForUpgrade(),f=this.argsToDataParts(a,l);return u.push(...f),new h.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.contract,dataParts:u,gasLimit:e.gasLimit,addDataMovementGas:!1,amount:t}).build()}getEndpointForUpgrade(){if(this.abi){if(this.abi.upgradeConstructorDefinition)return this.abi.upgradeConstructorDefinition;try{return this.abi.getEndpoint("upgrade")}catch(e){return a.Logger.warn("In the ABI, cannot find the 'upgrade' endpoint definition. Will use the constructor definition (fallback)."),this.abi.constructorDefinition}}}createTransactionForClaimingDeveloperRewards(e){return new h.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.contract,dataParts:["ClaimDeveloperRewards"],gasLimit:this.config.gasLimitClaimDeveloperRewards,addDataMovementGas:!1}).build()}createTransactionForChangingOwnerAddress(e){const t=["ChangeOwnerAddress",n.Address.fromBech32(e.newOwner.bech32()).toHex()];return new h.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.contract,dataParts:t,gasLimit:this.config.gasLimitChangeOwnerAddress,addDataMovementGas:!1}).build()}argsToDataParts(e,t){if(t){const r=c.NativeSerializer.nativeToTypedValues(e,t);return(new s.ArgSerializer).valuesToStrings(r)}if(this.areArgsOfTypedValue(e))return(new s.ArgSerializer).valuesToStrings(e);throw new o.Err("Can't convert args to TypedValues")}areArgsOfTypedValue(e){return e.every((e=>u.isTyped(e)))}}},12977:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenManagementTransactionsFactory=void 0;const n=r(70054),i=r(87679),o=r(33939),a=r(87052),s=r(85975),c=r(55817);t.TokenManagementTransactionsFactory=class{constructor(e){this.config=e.config,this.argSerializer=new s.ArgSerializer,this.trueAsString="true",this.falseAsString="false",this.esdtContractAddress=n.Address.fromHex(i.ESDT_CONTRACT_ADDRESS_HEX,this.config.addressHrp)}createTransactionForIssuingFungible(e){this.notifyAboutUnsettingBurnRoleGlobally();const t=[new s.StringValue(e.tokenName),new s.StringValue(e.tokenTicker),new s.BigUIntValue(e.initialSupply),new s.BigUIntValue(e.numDecimals),new s.StringValue("canFreeze"),new s.StringValue(this.boolToString(e.canFreeze)),new s.StringValue("canWipe"),new s.StringValue(this.boolToString(e.canWipe)),new s.StringValue("canPause"),new s.StringValue(this.boolToString(e.canPause)),new s.StringValue("canChangeOwner"),new s.StringValue(this.boolToString(e.canChangeOwner)),new s.StringValue("canUpgrade"),new s.StringValue(this.boolToString(e.canUpgrade)),new s.StringValue("canAddSpecialRoles"),new s.StringValue(this.boolToString(e.canAddSpecialRoles))],r=["issue",...this.argSerializer.valuesToStrings(t)];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:r,gasLimit:this.config.gasLimitIssue,addDataMovementGas:!0,amount:this.config.issueCost}).build()}createTransactionForIssuingSemiFungible(e){this.notifyAboutUnsettingBurnRoleGlobally();const t=[new s.StringValue(e.tokenName),new s.StringValue(e.tokenTicker),new s.StringValue("canFreeze"),new s.StringValue(this.boolToString(e.canFreeze)),new s.StringValue("canWipe"),new s.StringValue(this.boolToString(e.canWipe)),new s.StringValue("canPause"),new s.StringValue(this.boolToString(e.canPause)),new s.StringValue("canTransferNFTCreateRole"),new s.StringValue(this.boolToString(e.canTransferNFTCreateRole)),new s.StringValue("canChangeOwner"),new s.StringValue(this.boolToString(e.canChangeOwner)),new s.StringValue("canUpgrade"),new s.StringValue(this.boolToString(e.canUpgrade)),new s.StringValue("canAddSpecialRoles"),new s.StringValue(this.boolToString(e.canAddSpecialRoles))],r=["issueSemiFungible",...this.argSerializer.valuesToStrings(t)];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:r,gasLimit:this.config.gasLimitIssue,addDataMovementGas:!0,amount:this.config.issueCost}).build()}createTransactionForIssuingNonFungible(e){this.notifyAboutUnsettingBurnRoleGlobally();const t=[new s.StringValue(e.tokenName),new s.StringValue(e.tokenTicker),new s.StringValue("canFreeze"),new s.StringValue(this.boolToString(e.canFreeze)),new s.StringValue("canWipe"),new s.StringValue(this.boolToString(e.canWipe)),new s.StringValue("canPause"),new s.StringValue(this.boolToString(e.canPause)),new s.StringValue("canTransferNFTCreateRole"),new s.StringValue(this.boolToString(e.canTransferNFTCreateRole)),new s.StringValue("canChangeOwner"),new s.StringValue(this.boolToString(e.canChangeOwner)),new s.StringValue("canUpgrade"),new s.StringValue(this.boolToString(e.canUpgrade)),new s.StringValue("canAddSpecialRoles"),new s.StringValue(this.boolToString(e.canAddSpecialRoles))],r=["issueNonFungible",...this.argSerializer.valuesToStrings(t)];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:r,gasLimit:this.config.gasLimitIssue,addDataMovementGas:!0,amount:this.config.issueCost}).build()}createTransactionForRegisteringMetaESDT(e){this.notifyAboutUnsettingBurnRoleGlobally();const t=[new s.StringValue(e.tokenName),new s.StringValue(e.tokenTicker),new s.BigUIntValue(e.numDecimals),new s.StringValue("canFreeze"),new s.StringValue(this.boolToString(e.canFreeze)),new s.StringValue("canWipe"),new s.StringValue(this.boolToString(e.canWipe)),new s.StringValue("canPause"),new s.StringValue(this.boolToString(e.canPause)),new s.StringValue("canTransferNFTCreateRole"),new s.StringValue(this.boolToString(e.canTransferNFTCreateRole)),new s.StringValue("canChangeOwner"),new s.StringValue(this.boolToString(e.canChangeOwner)),new s.StringValue("canUpgrade"),new s.StringValue(this.boolToString(e.canUpgrade)),new s.StringValue("canAddSpecialRoles"),new s.StringValue(this.boolToString(e.canAddSpecialRoles))],r=["registerMetaESDT",...this.argSerializer.valuesToStrings(t)];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:r,gasLimit:this.config.gasLimitIssue,addDataMovementGas:!0,amount:this.config.issueCost}).build()}createTransactionForRegisteringAndSettingRoles(e){this.notifyAboutUnsettingBurnRoleGlobally();const t=["registerAndSetAllRoles",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenName),new s.StringValue(e.tokenTicker),new s.StringValue(e.tokenType),new s.BigUIntValue(e.numDecimals)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:t,gasLimit:this.config.gasLimitIssue,addDataMovementGas:!0,amount:this.config.issueCost}).build()}createTransactionForSettingBurnRoleGlobally(e){const t=["setBurnRoleGlobally",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:t,gasLimit:this.config.gasLimitToggleBurnRoleGlobally,addDataMovementGas:!0}).build()}createTransactionForUnsettingBurnRoleGlobally(e){const t=["unsetBurnRoleGlobally",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:t,gasLimit:this.config.gasLimitToggleBurnRoleGlobally,addDataMovementGas:!0}).build()}createTransactionForSettingSpecialRoleOnFungibleToken(e){const t=[new s.StringValue(e.tokenIdentifier),new s.AddressValue(e.user)];e.addRoleLocalMint&&t.push(new s.StringValue("ESDTRoleLocalMint")),e.addRoleLocalBurn&&t.push(new s.StringValue("ESDTRoleLocalBurn")),e.addRoleESDTTransferRole&&t.push(new s.StringValue("ESDTTransferRole"));const r=["setSpecialRole",...this.argSerializer.valuesToStrings(t)];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:r,gasLimit:this.config.gasLimitSetSpecialRole,addDataMovementGas:!0}).build()}createTransactionForSettingSpecialRoleOnSemiFungibleToken(e){const t=[new s.StringValue(e.tokenIdentifier),new s.AddressValue(e.user)];e.addRoleNFTCreate&&t.push(new s.StringValue("ESDTRoleNFTCreate")),e.addRoleNFTBurn&&t.push(new s.StringValue("ESDTRoleNFTBurn")),e.addRoleNFTAddQuantity&&t.push(new s.StringValue("ESDTRoleNFTAddQuantity")),e.addRoleESDTTransferRole&&t.push(new s.StringValue("ESDTTransferRole")),e.addRoleESDTModifyCreator&&t.push(new s.StringValue("ESDTRoleModifyCreator"));const r=["setSpecialRole",...this.argSerializer.valuesToStrings(t)];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:r,gasLimit:this.config.gasLimitSetSpecialRole,addDataMovementGas:!0}).build()}createTransactionForSettingSpecialRoleOnMetaESDT(e){return this.createTransactionForSettingSpecialRoleOnSemiFungibleToken(e)}createTransactionForSettingSpecialRoleOnNonFungibleToken(e){const t=[new s.StringValue(e.tokenIdentifier),new s.AddressValue(e.user)];e.addRoleNFTCreate&&t.push(new s.StringValue("ESDTRoleNFTCreate")),e.addRoleNFTBurn&&t.push(new s.StringValue("ESDTRoleNFTBurn")),e.addRoleNFTUpdateAttributes&&t.push(new s.StringValue("ESDTRoleNFTUpdateAttributes")),e.addRoleNFTAddURI&&t.push(new s.StringValue("ESDTRoleNFTAddURI")),e.addRoleESDTTransferRole&&t.push(new s.StringValue("ESDTTransferRole")),e.addRoleESDTModifyCreator&&t.push(new s.StringValue("ESDTRoleModifyCreator")),e.addRoleNFTRecreate&&t.push(new s.StringValue("ESDTRoleNFTRecreate")),e.addRoleESDTSetNewURI&&t.push(new s.StringValue("ESDTRoleSetNewURI")),e.addRoleESDTModifyRoyalties&&t.push(new s.StringValue("ESDTRoleModifyRoyalties"));const r=["setSpecialRole",...this.argSerializer.valuesToStrings(t)];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:r,gasLimit:this.config.gasLimitSetSpecialRole,addDataMovementGas:!0}).build()}createTransactionForCreatingNFT(e){const t=["ESDTNFTCreate",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.BigUIntValue(e.initialQuantity),new s.StringValue(e.name),new s.BigUIntValue(e.royalties),new s.StringValue(e.hash),new s.BytesValue(Buffer.from(e.attributes)),...e.uris.map((e=>new s.StringValue(e)))])],r=e.name+e.hash+e.attributes+e.uris.join(""),n=this.config.gasLimitStorePerByte+BigInt(r.length);return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitEsdtNftCreate+n,addDataMovementGas:!0}).build()}createTransactionForPausing(e){const t=["pause",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitPausing,addDataMovementGas:!0}).build()}createTransactionForUnpausing(e){const t=["unPause",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitPausing,addDataMovementGas:!0}).build()}createTransactionForFreezing(e){const t=["freeze",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.AddressValue(e.user)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitFreezing,addDataMovementGas:!0}).build()}createTransactionForUnfreezing(e){const t=["UnFreeze",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.AddressValue(e.user)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitFreezing,addDataMovementGas:!0}).build()}createTransactionForWiping(e){const t=["wipe",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.AddressValue(e.user)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitWiping,addDataMovementGas:!0}).build()}createTransactionForLocalMint(e){const t=["ESDTLocalMint",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.BigUIntValue(e.supplyToMint)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitEsdtLocalMint,addDataMovementGas:!0}).build()}createTransactionForLocalBurning(e){const t=["ESDTLocalBurn",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.BigUIntValue(e.supplyToBurn)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitEsdtLocalBurn,addDataMovementGas:!0}).build()}createTransactionForUpdatingAttributes(e){const t=["ESDTNFTUpdateAttributes",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.BigUIntValue(e.tokenNonce),new s.BytesValue(Buffer.from(e.attributes))])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitEsdtNftUpdateAttributes,addDataMovementGas:!0}).build()}createTransactionForAddingQuantity(e){const t=["ESDTNFTAddQuantity",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.BigUIntValue(e.tokenNonce),new s.BigUIntValue(e.quantityToAdd)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitEsdtNftAddQuantity,addDataMovementGas:!0}).build()}createTransactionForBurningQuantity(e){const t=["ESDTNFTBurn",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.BigUIntValue(e.tokenNonce),new s.BigUIntValue(e.quantityToBurn)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitEsdtNftBurn,addDataMovementGas:!0}).build()}createTransactionForModifyingRoyalties(e){const t=["ESDTModifyRoyalties",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.BigUIntValue(e.tokenNonce),new s.BigUIntValue(e.newRoyalties)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitEsdtModifyRoyalties,addDataMovementGas:!0}).build()}createTransactionForSettingNewUris(e){if(!e.newUris.length)throw new o.ErrBadUsage("No URIs provided");const t=["ESDTSetNewURIs",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.BigUIntValue(e.tokenNonce),...e.newUris.map((e=>new s.StringValue(e)))])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitSetNewUris,addDataMovementGas:!0}).build()}createTransactionForModifyingCreator(e){const t=["ESDTModifyCreator",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.BigUIntValue(e.tokenNonce)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitEsdtModifyCreator,addDataMovementGas:!0}).build()}createTransactionForUpdatingMetadata(e){const t=["ESDTMetaDataUpdate",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.BigUIntValue(e.tokenNonce),...e.newTokenName?[new s.StringValue(e.newTokenName)]:[],...e.newRoyalties?[new s.BigUIntValue(e.newRoyalties)]:[],...e.newHash?[new s.StringValue(e.newHash)]:[],...e.newAttributes?[new s.BytesValue(Buffer.from(e.newAttributes))]:[],...e.newUris?e.newUris.map((e=>new s.StringValue(e))):[]])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitEsdtMetadataUpdate,addDataMovementGas:!0}).build()}createTransactionForMetadataRecreate(e){const t=["ESDTMetaDataRecreate",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier),new s.BigUIntValue(e.tokenNonce),...e.newTokenName?[new s.StringValue(e.newTokenName)]:[],...e.newRoyalties?[new s.BigUIntValue(e.newRoyalties)]:[],...e.newHash?[new s.StringValue(e.newHash)]:[],...e.newAttributes?[new s.BytesValue(Buffer.from(e.newAttributes))]:[],...e.newUris?e.newUris.map((e=>new s.StringValue(e))):[]])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:t,gasLimit:this.config.gasLimitNftMetadataRecreate,addDataMovementGas:!0}).build()}createTransactionForChangingTokenToDynamic(e){const t=["changeToDynamic",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:t,gasLimit:this.config.gasLimitNftChangeToDynamic,addDataMovementGas:!0}).build()}createTransactionForUpdatingTokenId(e){const t=["updateTokenID",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenIdentifier)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:t,gasLimit:this.config.gasLimitUpdateTokenId,addDataMovementGas:!0}).build()}createTransactionForRegisteringDynamicToken(e){const t=["registerDynamic",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenName),new s.StringValue(e.tokenTicker),new s.StringValue(e.tokenType)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:t,gasLimit:this.config.gasLimitRegisterDynamic,addDataMovementGas:!0,amount:this.config.issueCost}).build()}createTransactionForRegisteringDynamicAndSettingRoles(e){const t=["registerAndSetAllRolesDynamic",...this.argSerializer.valuesToStrings([new s.StringValue(e.tokenName),new s.StringValue(e.tokenTicker),new s.StringValue(e.tokenType)])];return new c.TransactionBuilder({config:this.config,sender:e.sender,receiver:this.esdtContractAddress,dataParts:t,gasLimit:this.config.gasLimitRegisterDynamic,addDataMovementGas:!0,amount:this.config.issueCost}).build()}notifyAboutUnsettingBurnRoleGlobally(){a.Logger.info('\n==========\nIMPORTANT!\n==========\nYou are about to issue (register) a new token. This will set the role "ESDTRoleBurnForAll" (globally).\nOnce the token is registered, you can unset this role by calling "unsetBurnRoleGlobally" (in a separate transaction).')}boolToString(e){return e?this.trueAsString:this.falseAsString}}},62270:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenTransfersDataBuilder=void 0;const n=r(20531),i=r(41077),o=r(84446);t.TokenTransfersDataBuilder=class{constructor(){this.tokenComputer=new o.TokenComputer,this.argsSerializer=new n.ArgSerializer}buildDataPartsForESDTTransfer(e){return["ESDTTransfer",...this.argsSerializer.valuesToStrings([new i.TokenIdentifierValue(e.token.identifier),new i.BigUIntValue(e.amount)])]}buildDataPartsForSingleESDTNFTTransfer(e,t){const r=e.token,n=this.tokenComputer.extractIdentifierFromExtendedIdentifier(r.identifier);return["ESDTNFTTransfer",...this.argsSerializer.valuesToStrings([new i.TokenIdentifierValue(n),new i.BigUIntValue(r.nonce),new i.BigUIntValue(e.amount),new i.AddressValue(t)])]}buildDataPartsForMultiESDTNFTTransfer(e,t){const r=[new i.AddressValue(e),new i.U32Value(t.length)];for(const n of t){const e=this.tokenComputer.extractIdentifierFromExtendedIdentifier(n.token.identifier);r.push(new i.TokenIdentifierValue(e),new i.BigUIntValue(n.token.nonce),new i.BigUIntValue(n.amount))}return["MultiESDTNFTTransfer",...this.argsSerializer.valuesToStrings(r)]}}},55817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionBuilder=void 0;const n=r(87679),i=r(85330),o=r(96082);t.TransactionBuilder=class{constructor(e){this.config=e.config,this.sender=e.sender,this.receiver=e.receiver,this.dataParts=e.dataParts,this.providedGasLimit=e.gasLimit,this.addDataMovementGas=e.addDataMovementGas,this.amount=e.amount}computeGasLimit(e){if(!this.addDataMovementGas)return this.providedGasLimit;return this.config.minGasLimit+this.config.gasLimitPerByte*BigInt(e.length())+this.providedGasLimit}buildTransactionPayload(){const e=this.dataParts.join(n.ARGUMENTS_SEPARATOR);return new o.TransactionPayload(e)}build(){const e=this.buildTransactionPayload(),t=this.computeGasLimit(e);return new i.Transaction({sender:this.sender.bech32(),receiver:this.receiver.bech32(),gasLimit:t,value:this.amount||0n,data:e.valueOf(),chainID:this.config.chainID})}}},56891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionsFactoryConfig=void 0;const n=r(35446);t.TransactionsFactoryConfig=class{constructor(e){this.chainID=e.chainID,this.addressHrp=n.LibraryConfig.DefaultAddressHrp,this.minGasLimit=50000n,this.gasLimitPerByte=1500n,this.gasLimitIssue=60000000n,this.gasLimitToggleBurnRoleGlobally=60000000n,this.gasLimitEsdtLocalMint=300000n,this.gasLimitEsdtLocalBurn=300000n,this.gasLimitSetSpecialRole=60000000n,this.gasLimitPausing=60000000n,this.gasLimitFreezing=60000000n,this.gasLimitWiping=60000000n,this.gasLimitEsdtNftCreate=3000000n,this.gasLimitEsdtNftUpdateAttributes=1000000n,this.gasLimitEsdtNftAddQuantity=1000000n,this.gasLimitEsdtNftBurn=1000000n,this.gasLimitStorePerByte=10000n,this.issueCost=50000000000000000n,this.gasLimitEsdtModifyRoyalties=60000000n,this.gasLimitEsdtModifyCreator=60000000n,this.gasLimitEsdtMetadataUpdate=60000000n,this.gasLimitSetNewUris=60000000n,this.gasLimitNftMetadataRecreate=60000000n,this.gasLimitNftChangeToDynamic=60000000n,this.gasLimitUpdateTokenId=60000000n,this.gasLimitRegisterDynamic=60000000n,this.gasLimitStake=5000000n,this.gasLimitUnstake=5000000n,this.gasLimitUnbond=5000000n,this.gasLimitCreateDelegationContract=50000000n,this.gasLimitDelegationOperations=1000000n,this.additionalGasLimitPerValidatorNode=6000000n,this.additionalGasLimitForDelegationOperations=10000000n,this.gasLimitSaveKeyValue=100000n,this.gasLimitPersistPerByte=1000n,this.gasLimitSetGuardian=250000n,this.gasLimitGuardAccount=250000n,this.gasLimitUnguardAccount=250000n,this.gasLimitESDTTransfer=200000n,this.gasLimitESDTNFTTransfer=200000n,this.gasLimitMultiESDTNFTTransfer=200000n,this.gasLimitClaimDeveloperRewards=6000000n,this.gasLimitChangeOwnerAddress=6000000n}}},560:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransferTransactionsFactory=void 0;const n=r(33939),i=r(85975),o=r(84446),a=r(85330),s=r(96082),c=r(62270),u=r(55817),l=8e5;t.TransferTransactionsFactory=class{constructor(e){this.isGasEstimator(e)?this.gasEstimator=e:(this.config=e.config,this.tokenComputer=new o.TokenComputer,this.tokenTransfersDataBuilder=new c.TokenTransfersDataBuilder)}isGasEstimator(e){return"object"===typeof e&&"function"===typeof e.forEGLDTransfer&&"function"===typeof e.forESDTTransfer&&"function"===typeof e.forESDTNFTTransfer&&"function"===typeof e.forMultiESDTNFTTransfer}isGasEstimatorDefined(){return void 0!==this.gasEstimator}ensureConfigIsDefined(){if(void 0===this.config)throw new n.Err("'config' is not defined")}createTransactionForNativeTokenTransfer(e){this.ensureConfigIsDefined();const t=e.data||new Uint8Array;return new a.Transaction({sender:e.sender.bech32(),receiver:e.receiver.bech32(),chainID:this.config.chainID,gasLimit:this.computeGasForMoveBalance(this.config,t),data:t,value:e.nativeAmount})}createTransactionForESDTTokenTransfer(e){this.ensureConfigIsDefined();const t=e.tokenTransfers.length;if(0===t)throw new n.ErrBadUsage("No token transfer has been provided");if(1===t)return this.createSingleESDTTransferTransaction(e);const r=this.tokenTransfersDataBuilder.buildDataPartsForMultiESDTNFTTransfer(e.receiver,e.tokenTransfers),i=this.config.gasLimitMultiESDTNFTTransfer*BigInt(t)+BigInt(l);return new u.TransactionBuilder({config:this.config,sender:e.sender,receiver:e.sender,dataParts:r,gasLimit:i,addDataMovementGas:!0}).build()}createTransactionForTransfer(e){const t=e.nativeAmount??0n;let r=e.tokenTransfers?[...e.tokenTransfers]:[];const i=r.length;if(i&&e.data?.length)throw new n.ErrBadUsage("Can't set data field when sending esdt tokens");if(t&&0===i||e.data)return this.createTransactionForNativeTokenTransfer({sender:e.sender,receiver:e.receiver,nativeAmount:t,data:e.data});const a=t?o.TokenTransfer.newFromEgldAmount(t):void 0;return a&&r.push(a),this.createTransactionForESDTTokenTransfer({sender:e.sender,receiver:e.receiver,tokenTransfers:r})}createEGLDTransfer(e){if(!this.isGasEstimatorDefined())throw new n.Err("You are calling a legacy function to create an EGLD transfer transaction. If this is your intent, then instantiate the class using a `GasEstimator`. Or, instead, use the new, recommended `createTransactionForNativeTokenTransfer` method.");const t=e.data?.length()||0,r=this.gasEstimator.forEGLDTransfer(t);return new a.Transaction({nonce:e.nonce,value:e.value,receiver:e.receiver,sender:e.sender,gasPrice:e.gasPrice,gasLimit:e.gasLimit||r,data:e.data,chainID:e.chainID})}createESDTTransfer(e){if(!this.isGasEstimatorDefined())throw new n.Err("You are calling a legacy function to create an ESDT transfer transaction. If this is your intent, then instantiate the class using a `GasEstimator`. Or, instead, use the new, recommended `createTransactionForESDTTokenTransfer` method.");const{argumentsString:t}=(new i.ArgSerializer).valuesToString([i.BytesValue.fromUTF8(e.tokenTransfer.tokenIdentifier),new i.BigUIntValue(e.tokenTransfer.valueOf())]),r=`ESDTTransfer@${t}`,o=new s.TransactionPayload(r),c=o.length()||0,u=this.gasEstimator.forESDTTransfer(c);return new a.Transaction({nonce:e.nonce,receiver:e.receiver,sender:e.sender,gasPrice:e.gasPrice,gasLimit:e.gasLimit||u,data:o,chainID:e.chainID})}createESDTNFTTransfer(e){if(!this.isGasEstimatorDefined())throw new n.Err("You are calling a legacy function to create an ESDTNFT transfer transaction. If this is your intent, then instantiate the class using a `GasEstimator`. Or, instead, use the new, recommended `createTransactionForESDTTokenTransfer` method.");const{argumentsString:t}=(new i.ArgSerializer).valuesToString([i.BytesValue.fromUTF8(e.tokenTransfer.tokenIdentifier),new i.U64Value(e.tokenTransfer.nonce),new i.BigUIntValue(e.tokenTransfer.valueOf()),new i.AddressValue(e.destination)]),r=`ESDTNFTTransfer@${t}`,o=new s.TransactionPayload(r),c=o.length()||0,u=this.gasEstimator.forESDTNFTTransfer(c);return new a.Transaction({nonce:e.nonce,receiver:e.sender,sender:e.sender,gasPrice:e.gasPrice,gasLimit:e.gasLimit||u,data:o,chainID:e.chainID})}createMultiESDTNFTTransfer(e){if(!this.isGasEstimatorDefined())throw new n.Err("You are calling a legacy function to create a MultiESDTNFT transfer transaction. If this is your intent, then instantiate the class using a `GasEstimator`. Or, instead, use the new, recommended `createTransactionForESDTTokenTransfer` method.");const t=[new i.AddressValue(e.destination),new i.U16Value(e.tokenTransfers.length)];for(const n of e.tokenTransfers)t.push(i.BytesValue.fromUTF8(n.tokenIdentifier),new i.U64Value(n.nonce),new i.BigUIntValue(n.valueOf()));const{argumentsString:r}=(new i.ArgSerializer).valuesToString(t),o=`MultiESDTNFTTransfer@${r}`,c=new s.TransactionPayload(o),u=c.length()||0,l=this.gasEstimator.forMultiESDTNFTTransfer(u,e.tokenTransfers.length);return new a.Transaction({nonce:e.nonce,receiver:e.sender,sender:e.sender,gasPrice:e.gasPrice,gasLimit:e.gasLimit||l,data:c,chainID:e.chainID})}createSingleESDTTransferTransaction(e){this.ensureConfigIsDefined();let t=[];const r=e.tokenTransfers[0];let n=0n,i=e.receiver;return this.tokenComputer.isFungible(r.token)?(t=this.tokenTransfersDataBuilder.buildDataPartsForESDTTransfer(r),n=this.config.gasLimitESDTTransfer+BigInt(1e5)):(t=this.tokenTransfersDataBuilder.buildDataPartsForSingleESDTNFTTransfer(r,i),n=this.config.gasLimitESDTNFTTransfer+BigInt(l),i=e.sender),new u.TransactionBuilder({config:this.config,sender:e.sender,receiver:i,dataParts:t,gasLimit:n,addDataMovementGas:!0}).build()}computeGasForMoveBalance(e,t){return e.minGasLimit+e.gasLimitPerByte*BigInt(t.length)}}},64320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DelegationTransactionsOutcomeParser=void 0;const n=r(70054),i=r(33939),o=r(5887);t.DelegationTransactionsOutcomeParser=class{constructor(){}parseCreateNewDelegationContract(e){this.ensureNoError(e.logs.events);return o.findEventsByIdentifier(e,"SCDeploy").map((e=>({contractAddress:this.extractContractAddress(e)})))}ensureNoError(e){for(const t of e)if("signalError"==t.identifier){const e=Buffer.from(t.dataItems[0]?.toString().slice(1)).toString()||"",r=this.decodeTopicAsString(t.topics[1]);throw new i.ErrParseTransactionOutcome(`encountered signalError: ${r} (${Buffer.from(e,"hex").toString()})`)}}extractContractAddress(e){if(!e.topics[0]?.length)return"";const t=Buffer.from(e.topics[0]);return n.Address.fromBuffer(t).bech32()}decodeTopicAsString(e){return Buffer.from(e).toString()}}},23446:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(64320),t),i(r(5887),t),i(r(94197),t),i(r(96166),t),i(r(67276),t)},5887:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gatherAllEvents=t.findEventsByFirstTopic=t.findEventsByIdentifier=t.findEventsByPredicate=t.SmartContractCallOutcome=t.TransactionOutcome=t.SmartContractResult=t.TransactionLogs=t.TransactionEvent=void 0;t.TransactionEvent=class{constructor(e){this.address="",this.identifier="",this.topics=[],this.dataItems=[],Object.assign(this,e)}};class r{constructor(e){this.address="",this.events=[],Object.assign(this,e)}}t.TransactionLogs=r;t.SmartContractResult=class{constructor(e){this.sender="",this.receiver="",this.data=new Uint8Array,this.logs=new r({}),Object.assign(this,e)}};t.TransactionOutcome=class{constructor(e){this.directSmartContractCallOutcome=new n({}),this.smartContractResults=[],this.logs=new r({}),Object.assign(this,e)}};class n{constructor(e){this.function="",this.returnDataParts=[],this.returnMessage="",this.returnCode="",Object.assign(this,e)}}function i(e,t){return o(e).filter(t)}function o(e){const t=[];t.push(...e.logs.events);for(const r of e.smartContractResults)t.push(...r.logs.events);return t}t.SmartContractCallOutcome=n,t.findEventsByPredicate=i,t.findEventsByIdentifier=function(e,t){return i(e,(e=>e.identifier==t))},t.findEventsByFirstTopic=function(e,t){return i(e,(e=>e.topics[0]?.toString()==t))},t.gatherAllEvents=o},94197:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SmartContractTransactionsOutcomeParser=void 0;const n=r(70054),i=r(33939),o=r(85975),a=r(5887);t.SmartContractTransactionsOutcomeParser=class{constructor(e){this.abi=e?.abi,this.legacyResultsParser=e?.legacyResultsParser||new o.ResultsParser}parseDeploy(e){const t=e.transactionOutcome.directSmartContractCallOutcome,r=a.findEventsByIdentifier(e.transactionOutcome,"SCDeploy").map((e=>this.parseScDeployEvent(e)));return{returnCode:t.returnCode,returnMessage:t.returnMessage,contracts:r}}parseScDeployEvent(e){const t=e.topics[0],r=e.topics[1],i=e.topics[2];return{address:t?.length?new n.Address(t).toBech32():"",ownerAddress:r?.length?new n.Address(r).toBech32():"",codeHash:i}}parseExecute(e){const t=e.transactionOutcome.directSmartContractCallOutcome;if(!this.abi)return{values:t.returnDataParts,returnCode:t.returnCode,returnMessage:t.returnMessage};const r=e.function||t.function;if(!r)throw new i.Err('Function name is not available in the transaction outcome, thus endpoint definition (ABI) cannot be picked (for parsing). Maybe provide the "function" parameter explicitly?');const n=this.abi.getEndpoint(r),a={returnCode:new o.ReturnCode(t.returnCode),returnMessage:t.returnMessage,values:t.returnDataParts.map((e=>Buffer.from(e)))},s=this.legacyResultsParser.parseOutcomeFromUntypedBundle(a,n);return{values:s.values.map((e=>e.valueOf())),returnCode:s.returnCode.toString(),returnMessage:s.returnMessage}}}},96166:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenManagementTransactionsOutcomeParser=void 0;const n=r(70054),i=r(33939),o=r(64083),a=r(5887);t.TokenManagementTransactionsOutcomeParser=class{constructor(){}parseIssueFungible(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"issue").map((e=>({tokenIdentifier:this.extractTokenIdentifier(e)})))}parseIssueNonFungible(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"issueNonFungible").map((e=>({tokenIdentifier:this.extractTokenIdentifier(e)})))}parseIssueSemiFungible(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"issueSemiFungible").map((e=>({tokenIdentifier:this.extractTokenIdentifier(e)})))}parseRegisterMetaEsdt(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"registerMetaESDT").map((e=>({tokenIdentifier:this.extractTokenIdentifier(e)})))}parseRegisterAndSetAllRoles(e){this.ensureNoError(e.logs.events);const t=a.findEventsByIdentifier(e,"registerAndSetAllRoles"),r=a.findEventsByIdentifier(e,"ESDTSetRole");if(t.length!==r.length)throw new i.ErrParseTransactionOutcome("Register Events and Set Role events mismatch. Should have the same number of events.");return t.map(((e,t)=>({tokenIdentifier:this.extractTokenIdentifier(e),roles:r[t].topics.slice(3).map((e=>this.decodeTopicAsString(e)))})))}parseSetBurnRoleGlobally(e){this.ensureNoError(e.logs.events)}parseUnsetBurnRoleGlobally(e){this.ensureNoError(e.logs.events)}parseSetSpecialRole(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"ESDTSetRole").map((e=>this.getOutputForSetSpecialRoleEvent(e)))}getOutputForSetSpecialRoleEvent(e){return{userAddress:e.address,tokenIdentifier:this.extractTokenIdentifier(e),roles:e.topics.slice(3).map((e=>this.decodeTopicAsString(e)))}}parseNftCreate(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"ESDTNFTCreate").map((e=>this.getOutputForNftCreateEvent(e)))}getOutputForNftCreateEvent(e){return{tokenIdentifier:this.extractTokenIdentifier(e),nonce:this.extractNonce(e),initialQuantity:this.extractAmount(e)}}parseLocalMint(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"ESDTLocalMint").map((e=>this.getOutputForLocalMintEvent(e)))}getOutputForLocalMintEvent(e){return{userAddress:e.address,tokenIdentifier:this.extractTokenIdentifier(e),nonce:this.extractNonce(e),mintedSupply:this.extractAmount(e)}}parseLocalBurn(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"ESDTLocalBurn").map((e=>this.getOutputForLocalBurnEvent(e)))}getOutputForLocalBurnEvent(e){return{userAddress:e.address,tokenIdentifier:this.extractTokenIdentifier(e),nonce:this.extractNonce(e),burntSupply:this.extractAmount(e)}}parsePause(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"ESDTPause").map((e=>({tokenIdentifier:this.extractTokenIdentifier(e)})))}parseUnpause(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"ESDTUnPause").map((e=>({tokenIdentifier:this.extractTokenIdentifier(e)})))}parseFreeze(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"ESDTFreeze").map((e=>this.getOutputForFreezeEvent(e)))}getOutputForFreezeEvent(e){return{userAddress:this.extractAddress(e),tokenIdentifier:this.extractTokenIdentifier(e),nonce:this.extractNonce(e),balance:this.extractAmount(e)}}parseUnfreeze(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"ESDTUnFreeze").map((e=>this.getOutputForUnfreezeEvent(e)))}getOutputForUnfreezeEvent(e){return{userAddress:this.extractAddress(e),tokenIdentifier:this.extractTokenIdentifier(e),nonce:this.extractNonce(e),balance:this.extractAmount(e)}}parseWipe(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"ESDTWipe").map((e=>this.getOutputForWipeEvent(e)))}getOutputForWipeEvent(e){return{userAddress:this.extractAddress(e),tokenIdentifier:this.extractTokenIdentifier(e),nonce:this.extractNonce(e),balance:this.extractAmount(e)}}parseUpdateAttributes(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"ESDTNFTUpdateAttributes").map((e=>this.getOutputForUpdateAttributesEvent(e)))}getOutputForUpdateAttributesEvent(e){return{tokenIdentifier:this.extractTokenIdentifier(e),nonce:this.extractNonce(e),attributes:e.topics[3]?e.topics[3]:new Uint8Array}}parseAddQuantity(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"ESDTNFTAddQuantity").map((e=>this.getOutputForAddQuantityEvent(e)))}getOutputForAddQuantityEvent(e){return{tokenIdentifier:this.extractTokenIdentifier(e),nonce:this.extractNonce(e),addedQuantity:this.extractAmount(e)}}parseBurnQuantity(e){this.ensureNoError(e.logs.events);return a.findEventsByIdentifier(e,"ESDTNFTBurn").map((e=>this.getOutputForBurnQuantityEvent(e)))}getOutputForBurnQuantityEvent(e){return{tokenIdentifier:this.extractTokenIdentifier(e),nonce:this.extractNonce(e),burntQuantity:this.extractAmount(e)}}ensureNoError(e){for(const t of e)if("signalError"==t.identifier){const e=Buffer.from(t.dataItems[0]?.toString().slice(1)).toString()||"",r=this.decodeTopicAsString(t.topics[1]);throw new i.ErrParseTransactionOutcome(`encountered signalError: ${r} (${Buffer.from(e,"hex").toString()})`)}}extractTokenIdentifier(e){return e.topics[0]?.length?this.decodeTopicAsString(e.topics[0]):""}extractNonce(e){if(!e.topics[1]?.length)return BigInt(0);const t=Buffer.from(e.topics[1]);return BigInt(o.bufferToBigInt(t).toFixed(0))}extractAmount(e){if(!e.topics[2]?.length)return BigInt(0);const t=Buffer.from(e.topics[2]);return BigInt(o.bufferToBigInt(t).toFixed(0))}extractAddress(e){if(!e.topics[3]?.length)return"";const t=Buffer.from(e.topics[3]);return n.Address.fromBuffer(t).bech32()}decodeTopicAsString(e){return Buffer.from(e).toString()}}},67276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionEventsParser=void 0;const n=r(85975);t.TransactionEventsParser=class{constructor(e){this.legacyResultsParser=new n.ResultsParser,this.abi=e.abi,this.firstTopicIsIdentifier=e.firstTopicIsIdentifier??!0}parseEvents(e){const t=[];for(const r of e.events){const e=this.parseEvent({event:r});t.push(e)}return t}parseEvent(e){const t=e.event.topics.map((e=>Buffer.from(e))),r=this.firstTopicIsIdentifier?t[0]?.toString():e.event.identifier;this.firstTopicIsIdentifier&&t.shift();const n=e.event.dataItems.map((e=>Buffer.from(e))),i=this.abi.getEvent(r);return this.legacyResultsParser.doParseEvent({topics:t,dataItems:n,eventDefinition:i})}}},96227:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.addressToHex=t.bigIntToHex=t.byteArrayToHex=t.boolToHex=t.utf8ToHex=t.zeroPadStringIfOddLength=t.isPaddedHex=t.numberToPaddedHex=void 0;const s=a(r(63160)),c=r(70054),u=o(r(64083));function l(e){return(e=e||"").length%2==1?"0"+e:e}function d(e){return l(Buffer.from(e).toString("hex"))}t.numberToPaddedHex=function(e){let t;return t="bigint"===typeof e||"number"===typeof e?e:new s.default(e),l(t.toString(16))},t.isPaddedHex=function(e){e=e||"";let t=Buffer.from(e,"hex").toString("hex");return e.toUpperCase()==t.toUpperCase()},t.zeroPadStringIfOddLength=l,t.utf8ToHex=d,t.boolToHex=function(e){return d(e.toString())},t.byteArrayToHex=function(e){return l(Buffer.from(e).toString("hex"))},t.bigIntToHex=function(e){return 0==e?"":u.getHexMagnitudeOfBigInt(e)},t.addressToHex=function(e){return c.Address.fromBech32(e.toString()).pubkey().toString("hex")}},66079:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=t.guardEmpty=t.guardNotEmpty=t.guardLength=t.guardSameLength=t.guardValueIsSetWithMessage=t.guardValueIsSet=t.guardTrue=void 0;const a=o(r(33939));function s(e,t){if(null==t||void 0===t)throw new a.ErrInvariantFailed(e)}function c(e){return e.isEmpty?e.isEmpty():0===e.length}t.guardTrue=function(e,t){if(!e)throw new a.ErrInvariantFailed(`[<${t}>] isn't true`)},t.guardValueIsSet=function(e,t){s(`${e} isn't set (null or undefined)`,t)},t.guardValueIsSetWithMessage=s,t.guardSameLength=function(e,t){if(t=t||[],(e=e||[]).length!=t.length)throw new a.ErrInvariantFailed("arrays do not have the same length")},t.guardLength=function(e,t){let r=e.length||0;if(r!=t)throw new a.ErrInvariantFailed(`wrong length, expected: ${t}, actual: ${r}`)},t.guardNotEmpty=function(e,t){if(c(e))throw new a.ErrInvariantFailed(`${t} is empty`)},t.guardEmpty=function(e,t){if(!c(e))throw new a.ErrInvariantFailed(`${t} is not empty`)},t.isEmpty=c},66805:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrAccountNotConnected=t.ErrCannotSignSingleTransaction=t.Err=void 0;class r extends Error{constructor(e,t){super(e),this.inner=void 0,this.inner=t}}t.Err=r;t.ErrCannotSignSingleTransaction=class extends r{constructor(){super("Cannot sign single transaction.")}};t.ErrAccountNotConnected=class extends r{constructor(){super("Account is not connected.")}}},96968:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionProvider=void 0;const i=r(72430),o=r(85330),a=r(66805),s=r(61909);class c{constructor(){if(this.account={address:""},this.initialized=!1,c._instance)throw new Error("Error: Instantiation failed: Use ExtensionProvider.getInstance() instead of new.");c._instance=this}static getInstance(){return c._instance}setAddress(e){return this.account.address=e,c._instance}init(){return n(this,void 0,void 0,(function*(){return window&&window.elrondWallet&&(this.initialized=!0),this.initialized}))}login(){return n(this,arguments,void 0,(function(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){if(!e.initialized)throw new Error("Extension provider is not initialised, call init() first");const{token:r}=t,n=r||"";return yield e.startBgrMsgChannel(s.Operation.Connect,n),e.account}()}))}logout(){return n(this,void 0,void 0,(function*(){if(!this.initialized)throw new Error("Extension provider is not initialised, call init() first");try{yield this.startBgrMsgChannel(s.Operation.Logout,this.account.address),this.disconnect()}catch(e){console.warn("Extension origin url is already cleared!",e)}return!0}))}disconnect(){this.account={address:""}}getAddress(){return n(this,void 0,void 0,(function*(){if(!this.initialized)throw new Error("Extension provider is not initialised, call init() first");return this.account?this.account.address:""}))}isInitialized(){return this.initialized}isConnected(){return Boolean(this.account.address)}getAccount(){return this.account}setAccount(e){this.account=e}signTransaction(e){return n(this,void 0,void 0,(function*(){this.ensureConnected();const t=yield this.signTransactions([e]);if(1!=t.length)throw new a.ErrCannotSignSingleTransaction;return t[0]}))}ensureConnected(){if(!this.account.address)throw new a.ErrAccountNotConnected}signTransactions(e){return n(this,void 0,void 0,(function*(){this.ensureConnected();const t=yield this.startBgrMsgChannel(s.Operation.SignTransactions,{from:this.account.address,transactions:e.map((e=>e.toPlainObject()))});try{return t.map((e=>o.Transaction.fromPlainObject(e)))}catch(r){throw new Error(`Transaction canceled: ${r.message}.`)}}))}signMessage(e){return n(this,void 0,void 0,(function*(){var t;this.ensureConnected();const r={account:this.account.address,message:Buffer.from(e.data).toString()},n=(yield this.startBgrMsgChannel(s.Operation.SignMessage,r)).signature,o=Buffer.from(n,"hex");return new i.Message({data:Buffer.from(e.data),address:null!==(t=e.address)&&void 0!==t?t:i.Address.fromBech32(this.account.address),signer:"extension",version:e.version,signature:o})}))}cancelAction(){return this.startBgrMsgChannel(s.Operation.CancelAction,{})}startBgrMsgChannel(e,t){return new Promise((r=>{window.postMessage({target:"erdw-inpage",type:e,data:t},window.origin);const n=e=>{e.isTrusted&&"erdw-contentScript"===e.data.target&&("connectResponse"===e.data.type?(e.data.data&&Boolean(e.data.data.address)&&(this.account=e.data.data),window.removeEventListener("message",n),r(e.data.data)):(window.removeEventListener("message",n),r(e.data.data)))};window.addEventListener("message",n,!1)}))}}t.ExtensionProvider=c,c._instance=new c},61909:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=void 0,function(e){e.Connect="connect",e.Logout="logout",e.SignTransactions="signTransactions",e.SignMessage="signMessage",e.CancelAction="cancelAction"}(r||(t.Operation=r={}))},59492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenTransferProperties=t.TransactionMetadataTransfer=t.TransactionMetadata=t.TransactionToDecode=t.TransactionDecoder=void 0;const n=r(26137);t.TransactionDecoder=class{getTransactionMetadata(e){const t=this.getNormalTransactionMetadata(e),r=this.getEsdtTransactionMetadata(t);if(r)return r;const n=this.getNftTransferMetadata(t);if(n)return n;const i=this.getMultiTransferMetadata(t);return i||t}getNormalTransactionMetadata(e){const t=new o;if(t.sender=e.sender,t.receiver=e.receiver,t.value=BigInt(e.value),e.data){const n=this.base64Decode(e.data).split("@"),o=n.slice(1);if(o.every((e=>this.isSmartContractArgument(e)))&&(t.functionName=n[0],t.functionArgs=o),"relayedTx"===t.functionName&&t.functionArgs&&1===t.functionArgs.length)try{const e=JSON.parse(this.hexToString(t.functionArgs[0]));return e.value=e.value.toString(),e.sender=this.bech32Encode(this.base64ToHex(e.sender)),e.receiver=this.bech32Encode(this.base64ToHex(e.receiver)),this.getNormalTransactionMetadata(e)}catch(r){}if("relayedTxV2"===t.functionName&&t.functionArgs&&4===t.functionArgs.length)try{const r=new i;return r.sender=e.receiver,r.receiver=this.bech32Encode(t.functionArgs[0]),r.data=this.base64Encode(this.hexToString(t.functionArgs[2])),r.value="0",this.getNormalTransactionMetadata(r)}catch(r){}}return t}getMultiTransferMetadata(e){if(e.sender!==e.receiver)return;if("MultiESDTNFTTransfer"!==e.functionName)return;const t=e.functionArgs;if(!t)return;if(t.length<3)return;if(!this.isAddressValid(t[0]))return;const r=this.bech32Encode(t[0]),n=this.hexToNumber(t[1]),i=new o;i.transfers||(i.transfers=[]);let a=2;for(let o=0;oa&&(i.functionName=this.hexToString(t[a++]),i.functionArgs=t.slice(a++)),i}getNftTransferMetadata(e){if(e.sender!==e.receiver)return;if("ESDTNFTTransfer"!==e.functionName)return;const t=e.functionArgs;if(!t)return;if(t.length<4)return;if(!this.isAddressValid(t[3]))return;const r=this.hexToString(t[0]),n=t[1],i=this.hexToBigInt(t[2]),a=this.bech32Encode(t[3]),s=new o;return s.sender=e.sender,s.receiver=a,s.value=i,t.length>4&&(s.functionName=this.hexToString(t[4]),s.functionArgs=t.slice(5)),s.transfers=[{value:i,properties:{collection:r,identifier:`${r}-${n}`}}],s}base64Encode(e){return Buffer.from(e).toString("base64")}base64Decode(e){return Buffer.from(e,"base64").toString("binary")}hexToNumber(e){return parseInt(e,16)}getEsdtTransactionMetadata(e){if("ESDTTransfer"!==e.functionName)return;const t=e.functionArgs;if(!t)return;if(t.length<2)return;const r=this.hexToString(t[0]),n=this.hexToBigInt(t[1]),i=new o;return i.sender=e.sender,i.receiver=e.receiver,t.length>2&&(i.functionName=this.hexToString(t[2]),i.functionArgs=t.slice(3)),i.transfers=[{value:n,properties:{identifier:r}}],i.value=n,i}bech32Encode(e){const t=Buffer.from(e,"hex"),r=n.bech32.toWords(t);return n.bech32.encode("erd",r)}isAddressValid(e){return 32==Buffer.from(e,"hex").length}isSmartContractArgument(e){return!!this.isHex(e)&&e.length%2===0}isHex(e){return!1===new RegExp(/[^a-f0-9]/gi).test(e)}base64ToHex(e){return Buffer.from(e,"base64").toString("hex")}hexToString(e){return Buffer.from(e,"hex").toString("ascii")}hexToBigInt(e){return e?BigInt("0x"+e):BigInt(0)}};class i{constructor(){this.sender="",this.receiver="",this.data="",this.value="0"}}t.TransactionToDecode=i;class o{constructor(){this.sender="",this.receiver="",this.value=BigInt(0)}}t.TransactionMetadata=o;t.TransactionMetadataTransfer=class{constructor(){this.value=BigInt(0)}};t.TokenTransferProperties=class{}},26137:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bech32m=t.bech32=void 0;const r="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n={};for(let d=0;d<32;d++){const e=r.charAt(d);n[e]=d}function i(e){const t=e>>25;return(33554431&e)<<5^996825010&-(1&t)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function o(e){let t=1;for(let r=0;r126)return"Invalid prefix ("+e+")";t=i(t)^n>>5}t=i(t);for(let r=0;r=r;)o-=r,s.push(i>>o&a);if(n)o>0&&s.push(i<=t)return"Excess padding";if(i<r)return"Exceeds length limit";const a=e.toLowerCase(),s=e.toUpperCase();if(e!==a&&e!==s)return"Mixed-case string "+e;const c=(e=a).lastIndexOf("1");if(-1===c)return"No separator character for "+e;if(0===c)return"Missing prefix for "+e;const u=e.slice(0,c),l=e.slice(c+1);if(l.length<6)return"Data too short";let d=o(u);if("string"===typeof d)return d;const f=[];for(let t=0;t=l.length||f.push(r)}return d!==t?"Invalid checksum for "+e:{prefix:u,words:f}}return t="bech32"===e?1:734539939,{decodeUnsafe:function(e,t){const r=a(e,t);if("object"===typeof r)return r},decode:function(e,t){const r=a(e,t);if("object"===typeof r)return r;throw new Error(r)},encode:function(e,n,a){if(a=a||90,e.length+7+n.length>a)throw new TypeError("Exceeds length limit");let s=o(e=e.toLowerCase());if("string"===typeof s)throw new Error(s);let c=e+"1";for(let t=0;t>5!==0)throw new Error("Non 5-bit word");s=i(s)^e,c+=r.charAt(e)}for(let t=0;t<6;++t)s=i(s);s^=t;for(let t=0;t<6;++t){c+=r.charAt(s>>5*(5-t)&31)}return c},toWords:s,fromWordsUnsafe:c,fromWords:u}}t.bech32=l("bech32"),t.bech32m=l("bech32m")},46876:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WALLETCONNECT_SIGN_LOGIN_DELAY=t.WALLETCONNECT_MULTIVERSX_OPTIONAL_METHODS=t.WALLETCONNECT_MULTIVERSX_METHODS=t.WALLETCONNECT_MULTIVERSX_NAMESPACE=void 0;const n=r(76664);t.WALLETCONNECT_MULTIVERSX_NAMESPACE="mvx",t.WALLETCONNECT_MULTIVERSX_METHODS=Object.values(n.Operation),t.WALLETCONNECT_MULTIVERSX_OPTIONAL_METHODS=Object.values(n.OptionalOperation),t.WALLETCONNECT_SIGN_LOGIN_DELAY=500},13098:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletConnectV2ProviderErrorMessagesEnum=t.ErrBadAddress=t.ErrNotImplemented=t.Err=void 0;class r extends Error{constructor(e,t){super(e),this.inner=void 0,this.inner=t}}t.Err=r;t.ErrNotImplemented=class extends r{constructor(){super("Method not yet implemented")}};t.ErrBadAddress=class extends r{constructor(e,t){super(`Bad address: ${e}`,t)}},function(e){e.unableToInit="WalletConnect is unable to init",e.notInitialized="WalletConnect is not initialized",e.unableToConnect="WalletConnect is unable to connect",e.unableToConnectExisting="WalletConnect is unable to connect to existing pairing",e.unableToSignLoginToken="WalletConnect could not sign login token",e.unableToSign="WalletConnect could not sign the message",e.unableToLogin="WalletConnect is unable to login",e.unableToHandleTopic="WalletConnect: Unable to handle topic update",e.unableToHandleEvent="WalletConnect: Unable to handle events",e.unableToHandleCleanup="WalletConnect: Unable to handle cleanup",e.sessionNotConnected="WalletConnect Session is not connected",e.sessionDeleted="WalletConnect Session Deleted",e.sessionExpired="WalletConnect Session Expired",e.alreadyLoggedOut="WalletConnect: Already logged out",e.pingFailed="WalletConnect Ping Failed",e.invalidAddress="WalletConnect: Invalid address",e.requestDifferentChain="WalletConnect: Request Chain Id different than Connection Chain Id",e.invalidMessageResponse="WalletConnect could not sign the message",e.invalidMessageSignature="WalletConnect: Invalid message signature",e.invalidTransactionResponse="WalletConnect could not sign the transactions. Invalid signatures",e.invalidCustomRequestResponse="WalletConnect could not send the custom request",e.transactionError="Transaction canceled",e.connectionError="WalletConnect could not establish a connection",e.invalidGuardian="WalletConnect: Invalid Guardian"}(t.WalletConnectV2ProviderErrorMessagesEnum||(t.WalletConnectV2ProviderErrorMessagesEnum={}))},73701:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(70433),t)},157:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;t.Logger=class{static error(e){console.error(e)}static trace(e){console.trace(e)}}},76664:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalOperation=t.Operation=void 0,function(e){e.SIGN_TRANSACTION="mvx_signTransaction",e.SIGN_TRANSACTIONS="mvx_signTransactions",e.SIGN_MESSAGE="mvx_signMessage"}(t.Operation||(t.Operation={})),function(e){e.SIGN_LOGIN_TOKEN="mvx_signLoginToken",e.SIGN_NATIVE_AUTH_TOKEN="mvx_signNativeAuthToken",e.CANCEL_ACTION="mvx_cancelAction"}(t.OptionalOperation||(t.OptionalOperation={}))},64288:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=t.getMetadata=t.applyTransactionSignature=t.getAddressFromSession=t.addressIsValid=t.getConnectionParams=t.getCurrentTopic=t.getCurrentSession=void 0;const i=r(72430),o=r(11712),a=r(57107),s=r(46876),c=r(13098),u=r(157),l=r(76664);function d(e,t){if(!t)throw new Error(c.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);const r=t.find(f(e)).filter((e=>e.acknowledged));if(r.length>0){return r[r.length-1]}if(t.session.length>0){const e=t.session.keys.length-1;return t.session.get(t.session.keys[e])}throw u.Logger.error(c.WalletConnectV2ProviderErrorMessagesEnum.sessionNotConnected),new Error(c.WalletConnectV2ProviderErrorMessagesEnum.sessionNotConnected)}function f(e,t){var r,n,i;const o=[...s.WALLETCONNECT_MULTIVERSX_METHODS,...null!==(r=null===t||void 0===t?void 0:t.methods)&&void 0!==r?r:[]];(null===(n=null===t||void 0===t?void 0:t.methods)||void 0===n?void 0:n.includes(l.OptionalOperation.SIGN_LOGIN_TOKEN))||o.push(l.OptionalOperation.SIGN_LOGIN_TOKEN);const a=[`${s.WALLETCONNECT_MULTIVERSX_NAMESPACE}:${e}`],c=null!==(i=null===t||void 0===t?void 0:t.events)&&void 0!==i?i:[];return{requiredNamespaces:{[s.WALLETCONNECT_MULTIVERSX_NAMESPACE]:{methods:o,chains:a,events:c}}}}t.getCurrentSession=d,t.getCurrentTopic=function(e,t){if(!t)throw new Error(c.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);const r=d(e,t);if(!(null===r||void 0===r?void 0:r.topic))throw new Error(c.WalletConnectV2ProviderErrorMessagesEnum.sessionNotConnected);return r.topic},t.getConnectionParams=f,t.addressIsValid=function(e){try{return!i.Address.fromBech32(e).isEmpty()}catch(t){return!1}},t.getAddressFromSession=function(e){const t=e.namespaces[s.WALLETCONNECT_MULTIVERSX_NAMESPACE];if(t&&t.accounts){const e=t.accounts[0],[r,n,i]=e.split(":");return i}return""},t.applyTransactionSignature=function(e){let{transaction:t,response:r}=e;if(!r)throw u.Logger.error(c.WalletConnectV2ProviderErrorMessagesEnum.invalidTransactionResponse),new Error(c.WalletConnectV2ProviderErrorMessagesEnum.invalidTransactionResponse);const{signature:n,guardianSignature:a,version:s,options:l,guardian:d}=r,f=t.getGuardian().bech32();if(f&&f!==d)throw u.Logger.error(c.WalletConnectV2ProviderErrorMessagesEnum.invalidGuardian),new Error(c.WalletConnectV2ProviderErrorMessagesEnum.invalidGuardian);return d&&t.setGuardian(i.Address.fromBech32(d)),s&&t.setVersion(s),null!=l&&t.setOptions(l),t.applySignature(new o.Signature(n)),a&&t.applyGuardianSignature(new o.Signature(a)),t},t.getMetadata=function(e){if(e)return Object.assign(Object.assign({},e),{url:a.getAppMetadata().url})},t.sleep=function(e){return n(this,void 0,void 0,(function*(){return yield new Promise((t=>setTimeout((()=>{t()}),e)))}))}},70433:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletConnectV2Provider=t.OptionalOperation=t.Operation=t.WalletConnectV2ProviderErrorMessagesEnum=void 0;const o=r(11712),a=i(r(82824)),s=r(57107),c=r(46876),u=r(13098);Object.defineProperty(t,"WalletConnectV2ProviderErrorMessagesEnum",{enumerable:!0,get:function(){return u.WalletConnectV2ProviderErrorMessagesEnum}});const l=r(157),d=r(76664);Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return d.Operation}}),Object.defineProperty(t,"OptionalOperation",{enumerable:!0,get:function(){return d.OptionalOperation}});const f=r(64288);t.WalletConnectV2Provider=class{constructor(e,t,r,n,i){this.chainId="",this.address="",this.signature="",this.isInitializing=!1,this.processingTopic="",this.options={},this.onClientConnect=e,this.chainId=t,this.walletConnectV2Relay=r,this.walletConnectV2ProjectId=n,this.options=i}reset(){this.address="",this.signature="",this.walletConnector=void 0,this.session=void 0,this.pairings=void 0}init(){var e,t;return n(this,void 0,void 0,(function*(){if(this.isInitialized())return this.isInitialized();try{if(!this.isInitializing){this.isInitializing=!0,this.reset();const r=(null===(e=this.options)||void 0===e?void 0:e.metadata)?{metadata:f.getMetadata(null===(t=this.options)||void 0===t?void 0:t.metadata)}:{},n=yield a.default.init(Object.assign(Object.assign(Object.assign({},this.options),{relayUrl:this.walletConnectV2Relay,projectId:this.walletConnectV2ProjectId}),r));this.walletConnector=n,this.isInitializing=!1,yield this.subscribeToEvents(n),yield this.checkPersistedState(n)}}catch(r){throw new Error(u.WalletConnectV2ProviderErrorMessagesEnum.unableToInit)}finally{return this.isInitializing=!1,this.isInitialized()}}))}isInitialized(){return!!this.walletConnector&&!this.isInitializing}isConnected(){return new Promise(((e,t)=>e(Boolean(this.isInitialized()&&"undefined"!==typeof this.session))))}connect(e){var t,r;return n(this,void 0,void 0,(function*(){if("undefined"===typeof this.walletConnector)throw new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);const n=f.getConnectionParams(this.chainId,e);try{return yield this.walletConnector.connect(Object.assign({pairingTopic:null===e||void 0===e?void 0:e.topic},n))}catch(i){if(null===e||void 0===e?void 0:e.topic)try{null===(r=null===(t=this.walletConnector.core)||void 0===t?void 0:t.expirer)||void 0===r||r.set(e.topic,0)}catch(i){l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.unableToHandleCleanup)}throw this.reset(),l.Logger.error((null===e||void 0===e?void 0:e.topic)?u.WalletConnectV2ProviderErrorMessagesEnum.unableToConnectExisting:u.WalletConnectV2ProviderErrorMessagesEnum.unableToConnect),new Error((null===e||void 0===e?void 0:e.topic)?u.WalletConnectV2ProviderErrorMessagesEnum.unableToConnectExisting:u.WalletConnectV2ProviderErrorMessagesEnum.unableToConnect)}}))}login(e){var t;return n(this,void 0,void 0,(function*(){if(this.isInitializing=!0,"undefined"===typeof this.walletConnector&&(yield this.connect()),"undefined"===typeof this.walletConnector)throw new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);"undefined"!==typeof this.session&&(yield this.logout({topic:null===(t=this.session)||void 0===t?void 0:t.topic}));try{if(e&&e.approval){const t=yield e.approval();if(e.token){yield f.sleep(c.WALLETCONNECT_SIGN_LOGIN_DELAY);const r=f.getAddressFromSession(t),n=t.namespaces[c.WALLETCONNECT_MULTIVERSX_NAMESPACE].methods.includes(d.OptionalOperation.SIGN_NATIVE_AUTH_TOKEN)?d.OptionalOperation.SIGN_NATIVE_AUTH_TOKEN:d.OptionalOperation.SIGN_LOGIN_TOKEN,{signature:i}=yield this.walletConnector.request({chainId:`${c.WALLETCONNECT_MULTIVERSX_NAMESPACE}:${this.chainId}`,topic:t.topic,request:{method:n,params:{token:e.token,address:r}}});if(!i)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.unableToSignLoginToken),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.unableToSignLoginToken);return yield this.onSessionConnected({session:t,signature:i})}return yield this.onSessionConnected({session:t,signature:""})}}catch(r){throw this.reset(),l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.unableToLogin),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.unableToLogin)}finally{this.isInitializing=!1}return""}))}logout(e){return n(this,void 0,void 0,(function*(){if("undefined"===typeof this.walletConnector)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);try{if(this.processingTopic===((null===e||void 0===e?void 0:e.topic)||f.getCurrentTopic(this.chainId,this.walletConnector)))return!0;if(null===e||void 0===e?void 0:e.topic)this.processingTopic=e.topic,yield this.walletConnector.disconnect({topic:e.topic,reason:s.getSdkError("USER_DISCONNECTED")});else{const e=f.getCurrentTopic(this.chainId,this.walletConnector);this.processingTopic=e,yield this.walletConnector.disconnect({topic:e,reason:s.getSdkError("USER_DISCONNECTED")}),this.reset(),yield this.cleanupPendingPairings({deletePairings:!0})}}catch(t){l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.alreadyLoggedOut)}finally{this.processingTopic=""}return!0}))}getAddress(){return n(this,void 0,void 0,(function*(){if("undefined"===typeof this.walletConnector)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);return this.address}))}getSignature(){return n(this,void 0,void 0,(function*(){if("undefined"===typeof this.walletConnector)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);return this.signature}))}getPairings(){var e,t,r,i,o;return n(this,void 0,void 0,(function*(){if("undefined"===typeof this.walletConnector)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);return null!==(o=null===(i=null===(r=null===(t=null===(e=this.walletConnector)||void 0===e?void 0:e.core)||void 0===t?void 0:t.pairing)||void 0===r?void 0:r.pairings)||void 0===i?void 0:i.getAll({active:!0}))&&void 0!==o?o:[]}))}signMessage(e){return n(this,void 0,void 0,(function*(){if("undefined"===typeof this.walletConnector)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);if("undefined"===typeof this.session)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.sessionNotConnected),this.onClientConnect.onClientLogout(),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.sessionNotConnected);try{const r=yield this.getAddress(),{signature:n}=yield this.walletConnector.request({chainId:`${c.WALLETCONNECT_MULTIVERSX_NAMESPACE}:${this.chainId}`,topic:f.getCurrentTopic(this.chainId,this.walletConnector),request:{method:d.Operation.SIGN_MESSAGE,params:{address:r,message:e.message.toString()}}});if(!n)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.invalidMessageResponse),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.invalidMessageResponse);try{e.applySignature(new o.Signature(n))}catch(t){throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.invalidMessageSignature),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.invalidMessageSignature)}}catch(t){throw new Error(u.WalletConnectV2ProviderErrorMessagesEnum.unableToSign)}return e}))}signTransaction(e){return n(this,void 0,void 0,(function*(){if("undefined"===typeof this.walletConnector)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);if("undefined"===typeof this.session)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.sessionNotConnected),this.onClientConnect.onClientLogout(),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.sessionNotConnected);const t=e.toPlainObject();if(this.chainId!==e.getChainID().valueOf())throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.requestDifferentChain),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.requestDifferentChain);try{const r=yield this.walletConnector.request({chainId:`${c.WALLETCONNECT_MULTIVERSX_NAMESPACE}:${this.chainId}`,topic:f.getCurrentTopic(this.chainId,this.walletConnector),request:{method:d.Operation.SIGN_TRANSACTION,params:{transaction:t}}});return f.applyTransactionSignature({transaction:e,response:r})}catch(r){throw new Error(u.WalletConnectV2ProviderErrorMessagesEnum.transactionError)}}))}signTransactions(e){return n(this,void 0,void 0,(function*(){if("undefined"===typeof this.walletConnector)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);if("undefined"===typeof this.session)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.sessionNotConnected),this.onClientConnect.onClientLogout(),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.sessionNotConnected);const t=e.map((e=>{if(this.chainId!==e.getChainID().valueOf())throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.requestDifferentChain),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.requestDifferentChain);return e.toPlainObject()}));try{const{signatures:r}=yield this.walletConnector.request({chainId:`${c.WALLETCONNECT_MULTIVERSX_NAMESPACE}:${this.chainId}`,topic:f.getCurrentTopic(this.chainId,this.walletConnector),request:{method:d.Operation.SIGN_TRANSACTIONS,params:{transactions:t}}});if(!r)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.invalidTransactionResponse),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.invalidTransactionResponse);if(!Array.isArray(r)||e.length!==r.length)throw new Error(u.WalletConnectV2ProviderErrorMessagesEnum.invalidTransactionResponse);for(const[t,n]of e.entries()){const e=r[t];f.applyTransactionSignature({transaction:n,response:e})}return e}catch(r){throw new Error(u.WalletConnectV2ProviderErrorMessagesEnum.transactionError)}}))}sendCustomRequest(e){var t;return n(this,void 0,void 0,(function*(){if("undefined"===typeof this.walletConnector)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);if("undefined"===typeof this.session)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.sessionNotConnected),this.onClientConnect.onClientLogout(),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.sessionNotConnected);if(null===(t=null===e||void 0===e?void 0:e.request)||void 0===t?void 0:t.method)try{const t=Object.assign({},e.request);let{method:r}=t;const{response:n}=yield this.walletConnector.request({chainId:`${c.WALLETCONNECT_MULTIVERSX_NAMESPACE}:${this.chainId}`,topic:f.getCurrentTopic(this.chainId,this.walletConnector),request:Object.assign(Object.assign({},t),{method:r})});n||l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.invalidCustomRequestResponse)}catch(r){l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.invalidCustomRequestResponse)}else;}))}ping(){return n(this,void 0,void 0,(function*(){if("undefined"===typeof this.walletConnector)throw l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized),new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);"undefined"===typeof this.session&&l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.sessionNotConnected);try{const e=f.getCurrentTopic(this.chainId,this.walletConnector);return yield this.walletConnector.ping({topic:e}),!0}catch(e){return l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.pingFailed),!1}}))}loginAccount(e){return n(this,void 0,void 0,(function*(){return e?f.addressIsValid(e.address)?(this.address=e.address,e.signature&&(this.signature=e.signature),this.onClientConnect.onClientLogin(),this.address):(l.Logger.error(`${u.WalletConnectV2ProviderErrorMessagesEnum.invalidAddress} ${e.address}`),this.walletConnector&&(yield this.logout()),""):""}))}onSessionConnected(e){return n(this,void 0,void 0,(function*(){if(!e)return"";this.session=e.session;const t=f.getAddressFromSession(e.session);return t?(yield this.loginAccount({address:t,signature:e.signature}),t):""}))}handleTopicUpdateEvent(e){let{topic:t}=e;return n(this,void 0,void 0,(function*(){if("undefined"!==typeof this.walletConnector)try{const e=yield this.getPairings();if(this.address&&!this.isInitializing&&e)if(0===(null===e||void 0===e?void 0:e.length))this.onClientConnect.onClientLogout();else{const r=e[e.length-1];(null===r||void 0===r?void 0:r.topic)===t&&this.onClientConnect.onClientLogout()}}catch(e){l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.unableToHandleTopic)}finally{this.pairings=yield this.getPairings()}else l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized)}))}handleSessionEvents(e){let{topic:t,params:r}=e;var i;return n(this,void 0,void 0,(function*(){if("undefined"===typeof this.walletConnector)throw new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);if(this.session&&(null===(i=this.session)||void 0===i?void 0:i.topic)!==t)return;const{event:e}=r;if((null===e||void 0===e?void 0:e.name)&&f.getCurrentTopic(this.chainId,this.walletConnector)===t){const t=e.data;this.onClientConnect.onClientEvent(t)}}))}subscribeToEvents(e){var t,r,i,o;return n(this,void 0,void 0,(function*(){if("undefined"===typeof e)throw new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);try{e.on("session_update",(t=>{let{topic:r,params:n}=t;var i;if(!this.session||(null===(i=this.session)||void 0===i?void 0:i.topic)!==r)return;const{namespaces:o}=n,a=e.session.get(r),s=Object.assign(Object.assign({},a),{namespaces:o});this.onSessionConnected({session:s})})),e.on("session_event",this.handleSessionEvents.bind(this)),e.on("session_delete",(e=>{let{topic:t}=e;return n(this,void 0,void 0,(function*(){var e;this.isInitializing&&(this.onClientConnect.onClientLogout(),this.reset()),this.session&&(null===(e=this.session)||void 0===e?void 0:e.topic)===t&&(l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.sessionDeleted),this.onClientConnect.onClientLogout(),this.reset(),yield this.cleanupPendingPairings({deletePairings:!0}))}))})),e.on("session_expire",(e=>{let{topic:t}=e;return n(this,void 0,void 0,(function*(){var e;this.session&&(null===(e=this.session)||void 0===e?void 0:e.topic)===t&&(l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.sessionExpired),this.onClientConnect.onClientLogout(),this.reset(),yield this.cleanupPendingPairings({deletePairings:!0}))}))})),null===(r=null===(t=e.core)||void 0===t?void 0:t.pairing)||void 0===r||r.events.on("pairing_delete",this.handleTopicUpdateEvent.bind(this)),null===(o=null===(i=e.core)||void 0===i?void 0:i.pairing)||void 0===o||o.events.on("pairing_expire",this.handleTopicUpdateEvent.bind(this))}catch(a){l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.unableToHandleEvent)}}))}checkPersistedState(e){return n(this,void 0,void 0,(function*(){if("undefined"===typeof e)throw new Error(u.WalletConnectV2ProviderErrorMessagesEnum.notInitialized);if(this.pairings=yield this.getPairings(),"undefined"===typeof this.session&&e.session.length&&!this.address&&!this.isInitializing){const t=f.getCurrentSession(this.chainId,e);if(t)return yield this.onSessionConnected({session:t}),t}}))}cleanupPendingPairings(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,r,i,o,a,c,d,f;return n(this,void 0,void 0,(function*(){if("undefined"!==typeof this.walletConnector)try{const h=null===(i=null===(r=null===(t=this.walletConnector.core)||void 0===t?void 0:t.pairing)||void 0===r?void 0:r.pairings)||void 0===i?void 0:i.getAll({active:!1});if(!s.isValidArray(h))return;for(const t of h)if(e.deletePairings)null===(a=null===(o=this.walletConnector.core)||void 0===o?void 0:o.expirer)||void 0===a||a.set(t.topic,0);else try{yield null===(f=null===(d=null===(c=this.walletConnector.core)||void 0===c?void 0:c.relayer)||void 0===d?void 0:d.subscriber)||void 0===f?void 0:f.unsubscribe(t.topic)}catch(n){l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.unableToHandleCleanup)}}catch(n){l.Logger.error(u.WalletConnectV2ProviderErrorMessagesEnum.unableToHandleCleanup)}}))}}},88156:function(e,t){var r="undefined"!==typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!==typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=p(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,r=p(t);return t.readAsText(e),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function A(e){var t=new f;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t}function _(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},y.call(b.prototype),y.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];_.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(k){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(n,o){var a=new b(e,r);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:A(s.getAllResponseHeaders()||"")};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var t="response"in s?s.response:s.responseText;n(new _(t,e))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send("undefined"===typeof a._bodyInit?null:a._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=f,e.Request=b,e.Response=_),t.Headers=f,t.Request=b,t.Response=_,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},75433:function(e,t){var r="undefined"!==typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!==typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=p(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,r=p(t);return t.readAsText(e),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function A(e){var t=new f;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t}function _(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},y.call(b.prototype),y.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];_.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(k){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(n,o){var a=new b(e,r);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:A(s.getAllResponseHeaders()||"")};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var t="response"in s?s.response:s.responseText;n(new _(t,e))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send("undefined"===typeof a._bodyInit?null:a._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=f,e.Request=b,e.Response=_),t.Headers=f,t.Request=b,t.Response=_,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},23159:e=>{"use strict";e.exports=function(e,t){var r=new Array(arguments.length-1),n=0,i=2,o=!0;for(;i{"use strict";var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=new Array(64),i=new Array(123),o=0;o<64;)i[n[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;r.encode=function(e,t,r){for(var i,o=null,a=[],s=0,c=0;t>2],i=(3&u)<<4,c=1;break;case 1:a[s++]=n[i|u>>4],i=(15&u)<<2,c=2;break;case 2:a[s++]=n[i|u>>6],a[s++]=n[63&u],c=0}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),s=0)}return c&&(a[s++]=n[i],a[s++]=61,1===c&&(a[s++]=61)),o?(s&&o.push(String.fromCharCode.apply(String,a.slice(0,s))),o.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var a="invalid encoding";r.decode=function(e,t,r){for(var n,o=r,s=0,c=0;c1)break;if(void 0===(u=i[u]))throw Error(a);switch(s){case 0:n=u,s=1;break;case 1:t[r++]=n<<2|(48&u)>>4,n=u,s=2;break;case 2:t[r++]=(15&n)<<4|(60&u)>>2,n=u,s=3;break;case 3:t[r++]=(3&n)<<6|u,s=0}}if(1===s)throw Error(a);return r-o},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},73456:e=>{"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n{"use strict";function t(e){return"undefined"!==typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3]}function o(e,n,i){t[0]=e,n[i]=r[3],n[i+1]=r[2],n[i+2]=r[1],n[i+3]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function s(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?i:o,e.writeFloatBE=n?o:i,e.readFloatLE=n?a:s,e.readFloatBE=n?s:a}():function(){function t(e,t,r,n){var i=t<0?1:0;if(i&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(t)/Math.LN2);e((i<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,n)}}function a(e,t,r){var n=e(t,r),i=2*(n>>31)+1,o=n>>>23&255,a=8388607&n;return 255===o?a?NaN:i*(1/0):0===o?1401298464324817e-60*i*a:i*Math.pow(2,o-150)*(a+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=a.bind(null,i),e.readFloatBE=a.bind(null,o)}(),"undefined"!==typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?i:o,e.writeDoubleBE=n?o:i,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,i,o){var a=n<0?1:0;if(a&&(n=-n),0===n)e(0,i,o+t),e(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))e(0,i,o+t),e(2146959360,i,o+r);else if(n>17976931348623157e292)e(0,i,o+t),e((a<<31|2146435072)>>>0,i,o+r);else{var s;if(n<22250738585072014e-324)e((s=n/5e-324)>>>0,i,o+t),e((a<<31|s/4294967296)>>>0,i,o+r);else{var c=Math.floor(Math.log(n)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(s=n*Math.pow(2,-c))>>>0,i,o+t),e((a<<31|c+1023<<20|1048576*s&1048575)>>>0,i,o+r)}}}function a(e,t,r,n,i){var o=e(n,i+t),a=e(n,i+r),s=2*(a>>31)+1,c=a>>>20&2047,u=4294967296*(1048575&a)+o;return 2047===c?u?NaN:s*(1/0):0===c?5e-324*s*u:s*Math.pow(2,c-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=a.bind(null,i,0,4),e.readDoubleBE=a.bind(null,o,4,0)}(),e}function r(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function n(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},52867:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},52940:e=>{"use strict";e.exports=function(e,t,r){var n=r||8192,i=n>>>1,o=null,a=n;return function(r){if(r<1||r>i)return e(r);a+r>n&&(o=e(n),a=0);var s=t.call(o,a,a+=r);return 7&a&&(a=1+(7|a)),s}}},17817:(e,t)=>{"use strict";var r=t;r.length=function(e){for(var t=0,r=0,n=0;n191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0);return i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))},r.write=function(e,t,r){for(var n,i,o=r,a=0;a>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&i),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-o}},13310:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(17594);function i(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}function o(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}function a(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function s(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function c(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function u(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function l(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}function d(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}function f(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),l(e/4294967296>>>0,t,r),l(e>>>0,t,r+4),t}function h(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),d(e>>>0,t,r),d(e/4294967296>>>0,t,r+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=i,t.writeInt16BE=i,t.writeUint16LE=o,t.writeInt16LE=o,t.readInt32BE=a,t.readUint32BE=s,t.readInt32LE=c,t.readUint32LE=u,t.writeUint32BE=l,t.writeInt32BE=l,t.writeUint32LE=d,t.writeInt32LE=d,t.readInt64BE=function(e,t){void 0===t&&(t=0);var r=a(e,t),n=a(e,t+4);return 4294967296*r+n-4294967296*(n>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*s(e,t)+s(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var r=c(e,t);return 4294967296*c(e,t+4)+r-4294967296*(r>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var r=u(e,t);return 4294967296*u(e,t+4)+r},t.writeUint64BE=f,t.writeInt64BE=f,t.writeUint64LE=h,t.writeInt64LE=h,t.readUintBE=function(e,t,r){if(void 0===r&&(r=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,o=e/8+r-1;o>=r;o--)n+=t[o]*i,i*=256;return n},t.readUintLE=function(e,t,r){if(void 0===r&&(r=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,o=r;o=i;a--)r[a]=t/o&255,o*=256;return r},t.writeUintLE=function(e,t,r,i){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,a=i;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(13310),i=r(95070);t.BLOCK_SIZE=128,t.DIGEST_LENGTH=64,t.KEY_LENGTH=64,t.PERSONALIZATION_LENGTH=16,t.SALT_LENGTH=16,t.MAX_LEAF_SIZE=Math.pow(2,32)-1,t.MAX_FANOUT=255,t.MAX_MAX_DEPTH=255;var o=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),a=[[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30],[28,20,8,16,18,30,26,12,2,24,0,4,22,14,10,6],[22,16,24,0,10,4,30,26,20,28,6,12,14,2,18,8],[14,18,6,2,26,24,22,28,4,12,10,20,8,0,30,16],[18,0,10,14,4,8,20,30,28,2,22,24,12,16,6,26],[4,24,12,20,0,22,16,6,8,26,14,10,30,28,2,18],[24,10,2,30,28,26,8,20,0,14,12,6,18,4,16,22],[26,22,14,28,24,2,6,18,10,0,30,8,16,12,4,20],[12,30,28,18,22,6,0,16,24,4,26,14,2,8,20,10],[20,4,16,8,14,12,2,10,30,22,18,28,6,24,26,0],[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30],[28,20,8,16,18,30,26,12,2,24,0,4,22,14,10,6]],s=function(){function e(e,r){if(void 0===e&&(e=64),this.digestLength=e,this.blockSize=t.BLOCK_SIZE,this._state=new Int32Array(o),this._buffer=new Uint8Array(t.BLOCK_SIZE),this._bufferLength=0,this._ctr=new Uint32Array(4),this._flag=new Uint32Array(4),this._lastNode=!1,this._finished=!1,this._vtmp=new Uint32Array(32),this._mtmp=new Uint32Array(32),e<1||e>t.DIGEST_LENGTH)throw new Error("blake2b: wrong digest length");r&&this.validateConfig(r);var i=0;r&&r.key&&(i=r.key.length);var a=1,s=1;r&&r.tree&&(a=r.tree.fanout,s=r.tree.maxDepth),this._state[0]^=e|i<<8|a<<16|s<<24,r&&r.tree&&(this._state[1]^=r.tree.leafSize,this._state[2]^=r.tree.nodeOffsetLowBits,this._state[3]^=r.tree.nodeOffsetHighBits,this._state[4]^=r.tree.nodeDepth|r.tree.innerDigestLength<<8,this._lastNode=r.tree.lastNode),r&&r.salt&&(this._state[8]^=n.readUint32LE(r.salt,0),this._state[9]^=n.readUint32LE(r.salt,4),this._state[10]^=n.readUint32LE(r.salt,8),this._state[11]^=n.readUint32LE(r.salt,12)),r&&r.personalization&&(this._state[12]^=n.readUint32LE(r.personalization,0),this._state[13]^=n.readUint32LE(r.personalization,4),this._state[14]^=n.readUint32LE(r.personalization,8),this._state[15]^=n.readUint32LE(r.personalization,12)),this._initialState=new Uint32Array(this._state),r&&r.key&&i>0&&(this._paddedKey=new Uint8Array(t.BLOCK_SIZE),this._paddedKey.set(r.key),this._buffer.set(this._paddedKey),this._bufferLength=t.BLOCK_SIZE)}return e.prototype.reset=function(){return this._state.set(this._initialState),this._paddedKey?(this._buffer.set(this._paddedKey),this._bufferLength=t.BLOCK_SIZE):this._bufferLength=0,i.wipe(this._ctr),i.wipe(this._flag),this._finished=!1,this},e.prototype.validateConfig=function(e){if(e.key&&e.key.length>t.KEY_LENGTH)throw new Error("blake2b: wrong key length");if(e.salt&&e.salt.length!==t.SALT_LENGTH)throw new Error("blake2b: wrong salt length");if(e.personalization&&e.personalization.length!==t.PERSONALIZATION_LENGTH)throw new Error("blake2b: wrong personalization length");if(e.tree){if(e.tree.fanout<0||e.tree.fanout>t.MAX_FANOUT)throw new Error("blake2b: wrong tree fanout");if(e.tree.maxDepth<0||e.tree.maxDepth>t.MAX_MAX_DEPTH)throw new Error("blake2b: wrong tree depth");if(e.tree.leafSize<0||e.tree.leafSize>t.MAX_LEAF_SIZE)throw new Error("blake2b: wrong leaf size");if(e.tree.innerDigestLength<0||e.tree.innerDigestLength>t.DIGEST_LENGTH)throw new Error("blake2b: wrong tree inner digest length")}},e.prototype.update=function(e,r){if(void 0===r&&(r=e.length),this._finished)throw new Error("blake2b: can't update because hash was finished.");var n=t.BLOCK_SIZE-this._bufferLength,i=0;if(0===r)return this;if(r>n){for(var o=0;ot.BLOCK_SIZE;){for(o=0;o>>16,E=65535&p,S=p>>>16;_+=g>>>16,E+=65535&m,S+=m>>>16,E+=(_+=(A+=65535&g)>>>16)>>>16,A=65535&(h=65535&A|_<<16),_=h>>>16,E=65535&(p=65535&E|(S+=E>>>16)<<16),S=p>>>16,_+=u>>>16,E+=65535&l,S+=l>>>16,h=65535&(A+=65535&u)|(_+=A>>>16)<<16,A=w^=p=65535&(E+=_>>>16)|(S+=E>>>16)<<16,w=b^=h,b=A,A=65535&y,_=y>>>16,E=65535&v,S=v>>>16,_+=b>>>16,E+=65535&w,S+=w>>>16,A=(g^=y=65535&(A+=65535&b)|(_+=A>>>16)<<16)<<8|(m^=v=65535&(E+=_>>>16)|(S+=E>>>16)<<16)>>>24,g=m<<8|g>>>24,m=A,A=65535&h,_=h>>>16,E=65535&p,S=p>>>16,_+=g>>>16,E+=65535&m,S+=m>>>16,E+=(_+=(A+=65535&g)>>>16)>>>16,A=65535&(h=65535&A|_<<16),_=h>>>16,E=65535&(p=65535&E|(S+=E>>>16)<<16),S=p>>>16,_+=d>>>16,E+=65535&f,S+=f>>>16,A=(b^=h=65535&(A+=65535&d)|(_+=A>>>16)<<16)<<16|(w^=p=65535&(E+=_>>>16)|(S+=E>>>16)<<16)>>>16,b=w<<16|b>>>16,w=A,A=65535&y,_=y>>>16,E=65535&v,S=v>>>16,_+=b>>>16,E+=65535&w,S+=w>>>16,A=(m^=v=65535&(E+=(_+=(A+=65535&b)>>>16)>>>16)|(S+=E>>>16)<<16)<<1|(g^=y=65535&A|_<<16)>>>31,g=g<<1|m>>>31,m=A,e[t]=h,e[o]=p,e[r]=g,e[a]=m,e[n]=y,e[s]=v,e[i]=b,e[c]=w},e.prototype._incrementCounter=function(e){for(var t=0;t<3;t++){var r=this._ctr[t]+e;if(this._ctr[t]=r>>>0,this._ctr[t]===r)return;e=1}},e.prototype._processBlock=function(e){this._incrementCounter(e);var t=this._vtmp;t.set(this._state),t.set(o,16),t[24]^=this._ctr[0],t[25]^=this._ctr[1],t[26]^=this._ctr[2],t[27]^=this._ctr[3],t[28]^=this._flag[0],t[29]^=this._flag[1],t[30]^=this._flag[2],t[31]^=this._flag[3];for(var r=this._mtmp,i=0;i<32;i++)r[i]=n.readUint32LE(this._buffer,4*i);for(var s=0;s<12;s++)this._G(t,0,8,16,24,1,9,17,25,r[a[s][0]],r[a[s][0]+1],r[a[s][1]],r[a[s][1]+1]),this._G(t,2,10,18,26,3,11,19,27,r[a[s][2]],r[a[s][2]+1],r[a[s][3]],r[a[s][3]+1]),this._G(t,4,12,20,28,5,13,21,29,r[a[s][4]],r[a[s][4]+1],r[a[s][5]],r[a[s][5]+1]),this._G(t,6,14,22,30,7,15,23,31,r[a[s][6]],r[a[s][6]+1],r[a[s][7]],r[a[s][7]+1]),this._G(t,0,10,20,30,1,11,21,31,r[a[s][8]],r[a[s][8]+1],r[a[s][9]],r[a[s][9]+1]),this._G(t,2,12,22,24,3,13,23,25,r[a[s][10]],r[a[s][10]+1],r[a[s][11]],r[a[s][11]+1]),this._G(t,4,14,16,26,5,15,17,27,r[a[s][12]],r[a[s][12]+1],r[a[s][13]],r[a[s][13]+1]),this._G(t,6,8,18,28,7,9,19,29,r[a[s][14]],r[a[s][14]+1],r[a[s][15]],r[a[s][15]+1]);for(i=0;i<16;i++)this._state[i]^=t[i]^t[i+16]},e}();t.BLAKE2b=s,t.hash=function(e,r,n){void 0===r&&(r=t.DIGEST_LENGTH);var i=new s(r,n);i.update(e);var o=i.digest();return i.clean(),o}},79630:(e,t)=>{"use strict";t.x=function(){for(var e=0,t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(13310),i=r(95070),o=20;function a(e,t,r){for(var i=1634760805,a=857760878,s=2036477234,c=1797285236,u=r[3]<<24|r[2]<<16|r[1]<<8|r[0],l=r[7]<<24|r[6]<<16|r[5]<<8|r[4],d=r[11]<<24|r[10]<<16|r[9]<<8|r[8],f=r[15]<<24|r[14]<<16|r[13]<<8|r[12],h=r[19]<<24|r[18]<<16|r[17]<<8|r[16],p=r[23]<<24|r[22]<<16|r[21]<<8|r[20],g=r[27]<<24|r[26]<<16|r[25]<<8|r[24],m=r[31]<<24|r[30]<<16|r[29]<<8|r[28],y=t[3]<<24|t[2]<<16|t[1]<<8|t[0],v=t[7]<<24|t[6]<<16|t[5]<<8|t[4],b=t[11]<<24|t[10]<<16|t[9]<<8|t[8],w=t[15]<<24|t[14]<<16|t[13]<<8|t[12],A=i,_=a,E=s,S=c,k=u,x=l,C=d,I=f,T=h,O=p,P=g,M=m,R=y,N=v,L=b,B=w,D=0;D>>16|R<<16)|0)>>>20|k<<12,x=(x^=O=O+(N=(N^=_=_+x|0)>>>16|N<<16)|0)>>>20|x<<12,C=(C^=P=P+(L=(L^=E=E+C|0)>>>16|L<<16)|0)>>>20|C<<12,I=(I^=M=M+(B=(B^=S=S+I|0)>>>16|B<<16)|0)>>>20|I<<12,C=(C^=P=P+(L=(L^=E=E+C|0)>>>24|L<<8)|0)>>>25|C<<7,I=(I^=M=M+(B=(B^=S=S+I|0)>>>24|B<<8)|0)>>>25|I<<7,x=(x^=O=O+(N=(N^=_=_+x|0)>>>24|N<<8)|0)>>>25|x<<7,k=(k^=T=T+(R=(R^=A=A+k|0)>>>24|R<<8)|0)>>>25|k<<7,x=(x^=P=P+(B=(B^=A=A+x|0)>>>16|B<<16)|0)>>>20|x<<12,C=(C^=M=M+(R=(R^=_=_+C|0)>>>16|R<<16)|0)>>>20|C<<12,I=(I^=T=T+(N=(N^=E=E+I|0)>>>16|N<<16)|0)>>>20|I<<12,k=(k^=O=O+(L=(L^=S=S+k|0)>>>16|L<<16)|0)>>>20|k<<12,I=(I^=T=T+(N=(N^=E=E+I|0)>>>24|N<<8)|0)>>>25|I<<7,k=(k^=O=O+(L=(L^=S=S+k|0)>>>24|L<<8)|0)>>>25|k<<7,C=(C^=M=M+(R=(R^=_=_+C|0)>>>24|R<<8)|0)>>>25|C<<7,x=(x^=P=P+(B=(B^=A=A+x|0)>>>24|B<<8)|0)>>>25|x<<7;n.writeUint32LE(A+i|0,e,0),n.writeUint32LE(_+a|0,e,4),n.writeUint32LE(E+s|0,e,8),n.writeUint32LE(S+c|0,e,12),n.writeUint32LE(k+u|0,e,16),n.writeUint32LE(x+l|0,e,20),n.writeUint32LE(C+d|0,e,24),n.writeUint32LE(I+f|0,e,28),n.writeUint32LE(T+h|0,e,32),n.writeUint32LE(O+p|0,e,36),n.writeUint32LE(P+g|0,e,40),n.writeUint32LE(M+m|0,e,44),n.writeUint32LE(R+y|0,e,48),n.writeUint32LE(N+v|0,e,52),n.writeUint32LE(L+b|0,e,56),n.writeUint32LE(B+w|0,e,60)}function s(e,t,r,n,o){if(void 0===o&&(o=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=s,t.stream=function(e,t,r,n){return void 0===n&&(n=0),i.wipe(r),s(e,t,r,r,n)}},462:(e,t,r)=>{"use strict";var n=r(21208),i=r(36042),o=r(95070),a=r(13310),s=r(46566);t.J4=32,t.PX=12,t.iW=16;var c=new Uint8Array(16),u=function(){function e(e){if(this.nonceLength=t.PX,this.tagLength=t.iW,e.length!==t.J4)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var a=new Uint8Array(16);a.set(e,a.length-e.length);var s=new Uint8Array(32);n.stream(this._key,a,s,4);var c,u=t.length+this.tagLength;if(i){if(i.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=i}else c=new Uint8Array(u);return n.streamXOR(this._key,a,t,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),s,c.subarray(0,c.length-this.tagLength),r),o.wipe(a),c},e.prototype.open=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length0&&s.update(c.subarray(n.length%16))),s.update(r),r.length%16>0&&s.update(c.subarray(r.length%16));var u=new Uint8Array(8);n&&a.writeUint64LE(n.length,u),s.update(u),a.writeUint64LE(r.length,u),s.update(u);for(var l=s.digest(),d=0;d{"use strict";function r(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,r){return~(e-1)&t|e-1&r},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=r,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==r(e,t)}},4914:(e,t,r)=>{"use strict";t.a_=t.J$=t._S=t.K=t.TP=t.wE=t.Ee=void 0;const n=r(86022),i=r(9816),o=r(95070);function a(e){const t=new Float64Array(16);if(e)for(let r=0;r>16&1),r[t-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const e=r[15]>>16&1;r[14]&=65535,m(n,r,1-e)}for(let i=0;i<16;i++)e[2*i]=255&n[i],e[2*i+1]=n[i]>>8}function v(e,t){let r=0;for(let n=0;n<32;n++)r|=e[n]^t[n];return(1&r-1>>>8)-1}function b(e,t){const r=new Uint8Array(32),n=new Uint8Array(32);return y(r,e),y(n,t),v(r,n)}function w(e){const t=new Uint8Array(32);return y(t,e),1&t[0]}function A(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function _(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function E(e,t,r){let n,i,o=0,a=0,s=0,c=0,u=0,l=0,d=0,f=0,h=0,p=0,g=0,m=0,y=0,v=0,b=0,w=0,A=0,_=0,E=0,S=0,k=0,x=0,C=0,I=0,T=0,O=0,P=0,M=0,R=0,N=0,L=0,B=r[0],D=r[1],U=r[2],j=r[3],F=r[4],z=r[5],q=r[6],H=r[7],V=r[8],$=r[9],K=r[10],W=r[11],G=r[12],Q=r[13],Y=r[14],Z=r[15];n=t[0],o+=n*B,a+=n*D,s+=n*U,c+=n*j,u+=n*F,l+=n*z,d+=n*q,f+=n*H,h+=n*V,p+=n*$,g+=n*K,m+=n*W,y+=n*G,v+=n*Q,b+=n*Y,w+=n*Z,n=t[1],a+=n*B,s+=n*D,c+=n*U,u+=n*j,l+=n*F,d+=n*z,f+=n*q,h+=n*H,p+=n*V,g+=n*$,m+=n*K,y+=n*W,v+=n*G,b+=n*Q,w+=n*Y,A+=n*Z,n=t[2],s+=n*B,c+=n*D,u+=n*U,l+=n*j,d+=n*F,f+=n*z,h+=n*q,p+=n*H,g+=n*V,m+=n*$,y+=n*K,v+=n*W,b+=n*G,w+=n*Q,A+=n*Y,_+=n*Z,n=t[3],c+=n*B,u+=n*D,l+=n*U,d+=n*j,f+=n*F,h+=n*z,p+=n*q,g+=n*H,m+=n*V,y+=n*$,v+=n*K,b+=n*W,w+=n*G,A+=n*Q,_+=n*Y,E+=n*Z,n=t[4],u+=n*B,l+=n*D,d+=n*U,f+=n*j,h+=n*F,p+=n*z,g+=n*q,m+=n*H,y+=n*V,v+=n*$,b+=n*K,w+=n*W,A+=n*G,_+=n*Q,E+=n*Y,S+=n*Z,n=t[5],l+=n*B,d+=n*D,f+=n*U,h+=n*j,p+=n*F,g+=n*z,m+=n*q,y+=n*H,v+=n*V,b+=n*$,w+=n*K,A+=n*W,_+=n*G,E+=n*Q,S+=n*Y,k+=n*Z,n=t[6],d+=n*B,f+=n*D,h+=n*U,p+=n*j,g+=n*F,m+=n*z,y+=n*q,v+=n*H,b+=n*V,w+=n*$,A+=n*K,_+=n*W,E+=n*G,S+=n*Q,k+=n*Y,x+=n*Z,n=t[7],f+=n*B,h+=n*D,p+=n*U,g+=n*j,m+=n*F,y+=n*z,v+=n*q,b+=n*H,w+=n*V,A+=n*$,_+=n*K,E+=n*W,S+=n*G,k+=n*Q,x+=n*Y,C+=n*Z,n=t[8],h+=n*B,p+=n*D,g+=n*U,m+=n*j,y+=n*F,v+=n*z,b+=n*q,w+=n*H,A+=n*V,_+=n*$,E+=n*K,S+=n*W,k+=n*G,x+=n*Q,C+=n*Y,I+=n*Z,n=t[9],p+=n*B,g+=n*D,m+=n*U,y+=n*j,v+=n*F,b+=n*z,w+=n*q,A+=n*H,_+=n*V,E+=n*$,S+=n*K,k+=n*W,x+=n*G,C+=n*Q,I+=n*Y,T+=n*Z,n=t[10],g+=n*B,m+=n*D,y+=n*U,v+=n*j,b+=n*F,w+=n*z,A+=n*q,_+=n*H,E+=n*V,S+=n*$,k+=n*K,x+=n*W,C+=n*G,I+=n*Q,T+=n*Y,O+=n*Z,n=t[11],m+=n*B,y+=n*D,v+=n*U,b+=n*j,w+=n*F,A+=n*z,_+=n*q,E+=n*H,S+=n*V,k+=n*$,x+=n*K,C+=n*W,I+=n*G,T+=n*Q,O+=n*Y,P+=n*Z,n=t[12],y+=n*B,v+=n*D,b+=n*U,w+=n*j,A+=n*F,_+=n*z,E+=n*q,S+=n*H,k+=n*V,x+=n*$,C+=n*K,I+=n*W,T+=n*G,O+=n*Q,P+=n*Y,M+=n*Z,n=t[13],v+=n*B,b+=n*D,w+=n*U,A+=n*j,_+=n*F,E+=n*z,S+=n*q,k+=n*H,x+=n*V,C+=n*$,I+=n*K,T+=n*W,O+=n*G,P+=n*Q,M+=n*Y,R+=n*Z,n=t[14],b+=n*B,w+=n*D,A+=n*U,_+=n*j,E+=n*F,S+=n*z,k+=n*q,x+=n*H,C+=n*V,I+=n*$,T+=n*K,O+=n*W,P+=n*G,M+=n*Q,R+=n*Y,N+=n*Z,n=t[15],w+=n*B,A+=n*D,_+=n*U,E+=n*j,S+=n*F,k+=n*z,x+=n*q,C+=n*H,I+=n*V,T+=n*$,O+=n*K,P+=n*W,M+=n*G,R+=n*Q,N+=n*Y,L+=n*Z,o+=38*A,a+=38*_,s+=38*E,c+=38*S,u+=38*k,l+=38*x,d+=38*C,f+=38*I,h+=38*T,p+=38*O,g+=38*P,m+=38*M,y+=38*R,v+=38*N,b+=38*L,i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,o+=i-1+37*(i-1),i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=d,e[7]=f,e[8]=h,e[9]=p,e[10]=g,e[11]=m,e[12]=y,e[13]=v,e[14]=b,e[15]=w}function S(e,t){E(e,t,t)}function k(e,t){const r=a();let n;for(n=0;n<16;n++)r[n]=t[n];for(n=253;n>=0;n--)S(r,r),2!==n&&4!==n&&E(r,r,t);for(n=0;n<16;n++)e[n]=r[n]}function x(e,t){const r=a(),n=a(),i=a(),o=a(),s=a(),c=a(),u=a(),d=a(),f=a();_(r,e[1],e[0]),_(f,t[1],t[0]),E(r,r,f),A(n,e[0],e[1]),A(f,t[0],t[1]),E(n,n,f),E(i,e[3],t[3]),E(i,i,l),E(o,e[2],t[2]),A(o,o,o),_(s,n,r),_(c,o,i),A(u,o,i),A(d,n,r),E(e[0],s,c),E(e[1],d,u),E(e[2],u,c),E(e[3],s,d)}function C(e,t,r){for(let n=0;n<4;n++)m(e[n],t[n],r)}function I(e,t){const r=a(),n=a(),i=a();k(i,t[2]),E(r,t[0],i),E(n,t[1],i),y(e,n),e[31]^=w(r)<<7}function T(e,t,r){p(e[0],s),p(e[1],c),p(e[2],c),p(e[3],s);for(let n=255;n>=0;--n){const i=r[n/8|0]>>(7&n)&1;C(e,t,i),x(t,e),x(e,e),C(e,t,i)}}function O(e,t){const r=[a(),a(),a(),a()];p(r[0],d),p(r[1],f),p(r[2],c),E(r[3],d,f),T(e,r,t)}function P(e){if(e.length!==t.TP)throw new Error(`ed25519: seed must be ${t.TP} bytes`);const r=(0,i.hash)(e);r[0]&=248,r[31]&=127,r[31]|=64;const n=new Uint8Array(32),o=[a(),a(),a(),a()];O(o,r),I(n,o);const s=new Uint8Array(64);return s.set(e),s.set(n,32),{publicKey:n,secretKey:s}}t.K=P;const M=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function R(e,t){let r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>4)*M[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*M[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function N(e){const t=new Float64Array(64);for(let r=0;r<64;r++)t[r]=e[r];for(let r=0;r<64;r++)e[r]=0;R(e,t)}function L(e,t){const r=a(),n=a(),i=a(),o=a(),l=a(),d=a(),f=a();return p(e[2],c),function(e,t){for(let r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(e[1],t),S(i,e[1]),E(o,i,u),_(i,i,e[2]),A(o,e[2],o),S(l,o),S(d,l),E(f,d,l),E(r,f,i),E(r,r,o),function(e,t){const r=a();let n;for(n=0;n<16;n++)r[n]=t[n];for(n=250;n>=0;n--)S(r,r),1!==n&&E(r,r,t);for(n=0;n<16;n++)e[n]=r[n]}(r,r),E(r,r,i),E(r,r,o),E(r,r,o),E(e[0],r,o),S(n,e[0]),E(n,n,o),b(n,i)&&E(e[0],e[0],h),S(n,e[0]),E(n,n,o),b(n,i)?-1:(w(e[0])===t[31]>>7&&_(e[0],s,e[0]),E(e[3],e[0],e[1]),0)}t._S=function(e,t){const r=new Float64Array(64),n=[a(),a(),a(),a()],o=(0,i.hash)(e.subarray(0,32));o[0]&=248,o[31]&=127,o[31]|=64;const s=new Uint8Array(64);s.set(o.subarray(32),32);const c=new i.SHA512;c.update(s.subarray(32)),c.update(t);const u=c.digest();c.clean(),N(u),O(n,u),I(s,n),c.reset(),c.update(s.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const l=c.digest();N(l);for(let i=0;i<32;i++)r[i]=u[i];for(let i=0;i<32;i++)for(let e=0;e<32;e++)r[i+e]+=l[i]*o[e];return R(s.subarray(32),r),s},t.J$=function(e){let t=[a(),a(),a(),a()];if(L(t,e))throw new Error("Ed25519: invalid public key");let r=a(),n=a(),i=t[1];A(r,c,i),_(n,c,i),k(n,n),E(r,r,n);let o=new Uint8Array(32);return y(o,r),o},t.a_=function(e){const t=(0,i.hash)(e.subarray(0,32));t[0]&=248,t[31]&=127,t[31]|=64;const r=new Uint8Array(t.subarray(0,32));return(0,o.wipe)(t),r}},26104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return"undefined"!==typeof e.saveState&&"undefined"!==typeof e.restoreState&&"undefined"!==typeof e.cleanSavedState}},48438:(e,t,r)=>{"use strict";var n=r(91470),i=r(95070),o=function(){function e(e,t,r,i){void 0===r&&(r=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var o=n.hmac(this._hash,r,t);this._hmac=new n.HMAC(e,o),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(26104),i=r(46566),o=r(95070),a=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var r=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(r).clean():r.set(t);for(var i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var r=65535&e,n=65535&t;return r*n+((e>>>16&65535)*n+r*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},83589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openBox=t.box=t.precomputeSharedKey=t.generateKeyPair=void 0;const n=r(34520),i=r(57320),o=r(85089),a=r(95070);var s=r(34520);Object.defineProperty(t,"generateKeyPair",{enumerable:!0,get:function(){return s.generateKeyPair}});const c=new Uint8Array(16);function u(e,t){const r=(0,n.scalarMult)(t,e);return(0,i.hsalsa)(r,c,r),r}t.precomputeSharedKey=u,t.box=function(e,t,r,n){const i=u(e,t),s=(0,o.secretBox)(i,r,n);return(0,a.wipe)(i),s},t.openBox=function(e,t,r,n){const i=u(e,t),s=(0,o.openSecretBox)(i,r,n);return(0,a.wipe)(i),s}},28092:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(83589),t),i(r(85089),t)},85089:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateKey=t.openSecretBox=t.secretBox=void 0;const n=r(57320),i=r(36042),o=r(95070),a=r(86022);t.secretBox=function(e,t,r){if(24!==t.length)throw new Error("secretBox nonce must be 24 bytes");const a=new Uint8Array(64),s=new Uint8Array(32);s.set(t),(0,n.stream)(e,s,a,8);const c=new Uint8Array(16+r.length);for(let n=0;n<32&&n32&&(0,n.streamXOR)(e,s,r.subarray(32),c.subarray(48),8);const u=(0,i.oneTimeAuth)(a.subarray(0,32),c.subarray(16));for(let n=0;n32&&(0,n.streamXOR)(e,s,u.subarray(32),l.subarray(32),8),(0,o.wipe)(c),(0,o.wipe)(a),(0,o.wipe)(s),l},t.generateKey=function(e){return(0,a.randomBytes)(32,e)}},36042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(46566),i=r(95070);t.DIGEST_LENGTH=16;var o=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=e[0]|e[1]<<8;this._r[0]=8191&r;var n=e[2]|e[3]<<8;this._r[1]=8191&(r>>>13|n<<3);var i=e[4]|e[5]<<8;this._r[2]=7939&(n>>>10|i<<6);var o=e[6]|e[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var a=e[8]|e[9]<<8;this._r[4]=255&(o>>>4|a<<12),this._r[5]=a>>>1&8190;var s=e[10]|e[11]<<8;this._r[6]=8191&(a>>>14|s<<2);var c=e[12]|e[13]<<8;this._r[7]=8065&(s>>>11|c<<5);var u=e[14]|e[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,r){for(var n=this._fin?0:2048,i=this._h[0],o=this._h[1],a=this._h[2],s=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],d=this._h[7],f=this._h[8],h=this._h[9],p=this._r[0],g=this._r[1],m=this._r[2],y=this._r[3],v=this._r[4],b=this._r[5],w=this._r[6],A=this._r[7],_=this._r[8],E=this._r[9];r>=16;){var S=e[t+0]|e[t+1]<<8;i+=8191&S;var k=e[t+2]|e[t+3]<<8;o+=8191&(S>>>13|k<<3);var x=e[t+4]|e[t+5]<<8;a+=8191&(k>>>10|x<<6);var C=e[t+6]|e[t+7]<<8;s+=8191&(x>>>7|C<<9);var I=e[t+8]|e[t+9]<<8;c+=8191&(C>>>4|I<<12),u+=I>>>1&8191;var T=e[t+10]|e[t+11]<<8;l+=8191&(I>>>14|T<<2);var O=e[t+12]|e[t+13]<<8;d+=8191&(T>>>11|O<<5);var P=e[t+14]|e[t+15]<<8,M=0,R=M;R+=i*p,R+=o*(5*E),R+=a*(5*_),R+=s*(5*A),M=(R+=c*(5*w))>>>13,R&=8191,R+=u*(5*b),R+=l*(5*v),R+=d*(5*y),R+=(f+=8191&(O>>>8|P<<8))*(5*m);var N=M+=(R+=(h+=P>>>5|n)*(5*g))>>>13;N+=i*g,N+=o*p,N+=a*(5*E),N+=s*(5*_),M=(N+=c*(5*A))>>>13,N&=8191,N+=u*(5*w),N+=l*(5*b),N+=d*(5*v),N+=f*(5*y),M+=(N+=h*(5*m))>>>13,N&=8191;var L=M;L+=i*m,L+=o*g,L+=a*p,L+=s*(5*E),M=(L+=c*(5*_))>>>13,L&=8191,L+=u*(5*A),L+=l*(5*w),L+=d*(5*b),L+=f*(5*v);var B=M+=(L+=h*(5*y))>>>13;B+=i*y,B+=o*m,B+=a*g,B+=s*p,M=(B+=c*(5*E))>>>13,B&=8191,B+=u*(5*_),B+=l*(5*A),B+=d*(5*w),B+=f*(5*b);var D=M+=(B+=h*(5*v))>>>13;D+=i*v,D+=o*y,D+=a*m,D+=s*g,M=(D+=c*p)>>>13,D&=8191,D+=u*(5*E),D+=l*(5*_),D+=d*(5*A),D+=f*(5*w);var U=M+=(D+=h*(5*b))>>>13;U+=i*b,U+=o*v,U+=a*y,U+=s*m,M=(U+=c*g)>>>13,U&=8191,U+=u*p,U+=l*(5*E),U+=d*(5*_),U+=f*(5*A);var j=M+=(U+=h*(5*w))>>>13;j+=i*w,j+=o*b,j+=a*v,j+=s*y,M=(j+=c*m)>>>13,j&=8191,j+=u*g,j+=l*p,j+=d*(5*E),j+=f*(5*_);var F=M+=(j+=h*(5*A))>>>13;F+=i*A,F+=o*w,F+=a*b,F+=s*v,M=(F+=c*y)>>>13,F&=8191,F+=u*m,F+=l*g,F+=d*p,F+=f*(5*E);var z=M+=(F+=h*(5*_))>>>13;z+=i*_,z+=o*A,z+=a*w,z+=s*b,M=(z+=c*v)>>>13,z&=8191,z+=u*y,z+=l*m,z+=d*g,z+=f*p;var q=M+=(z+=h*(5*E))>>>13;q+=i*E,q+=o*_,q+=a*A,q+=s*w,M=(q+=c*b)>>>13,q&=8191,q+=u*v,q+=l*y,q+=d*m,q+=f*g,i=R=8191&(M=(M=((M+=(q+=h*p)>>>13)<<2)+M|0)+(R&=8191)|0),o=N+=M>>>=13,a=L&=8191,s=B&=8191,c=D&=8191,u=U&=8191,l=j&=8191,d=F&=8191,f=z&=8191,h=q&=8191,t+=16,r-=16}this._h[0]=i,this._h[1]=o,this._h[2]=a,this._h[3]=s,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=d,this._h[8]=f,this._h[9]=h},e.prototype.finish=function(e,t){void 0===t&&(t=0);var r,n,i,o,a=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(r=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=r,r=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*r,r=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=r,r=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=r,a[0]=this._h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this._h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(n=~n,o=0;o<10;o++)this._h[o]=this._h[o]&n|a[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,r=0,n=e.length;if(this._leftover){(t=16-this._leftover)>n&&(t=n);for(var i=0;i=16&&(t=n-n%16,this._blocks(e,r,t),r+=t,n-=t),n){for(i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const n=r(53074),i=r(13310),o=r(95070);function a(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.defaultRandomSource).randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=a,t.randomUint32=function(){const e=a(4,arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.defaultRandomSource),r=(0,i.readUint32LE)(e);return(0,o.wipe)(e),r};const s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function c(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.defaultRandomSource;if(r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");let i="";const c=r.length,u=256-256%c;for(;e>0;){const t=a(Math.ceil(256*e/u),n);for(let n=0;n0;n++){const o=t[n];o1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.defaultRandomSource;return c(Math.ceil(e/(Math.log(r.length)/Math.LN2)),r,n)}},35815:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0;t.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!==typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;const n=r(95070);t.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=r(99432);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const r=new Uint8Array(e);for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;const n=r(35815),i=r(46851);t.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new i.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}},70478:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(13310),i=r(95070),o=20;function a(e,t,r){for(var i,a=1634760805,s=r[3]<<24|r[2]<<16|r[1]<<8|r[0],c=r[7]<<24|r[6]<<16|r[5]<<8|r[4],u=r[11]<<24|r[10]<<16|r[9]<<8|r[8],l=r[15]<<24|r[14]<<16|r[13]<<8|r[12],d=857760878,f=t[3]<<24|t[2]<<16|t[1]<<8|t[0],h=t[7]<<24|t[6]<<16|t[5]<<8|t[4],p=t[11]<<24|t[10]<<16|t[9]<<8|t[8],g=t[15]<<24|t[14]<<16|t[13]<<8|t[12],m=2036477234,y=r[19]<<24|r[18]<<16|r[17]<<8|r[16],v=r[23]<<24|r[22]<<16|r[21]<<8|r[20],b=r[27]<<24|r[26]<<16|r[25]<<8|r[24],w=r[31]<<24|r[30]<<16|r[29]<<8|r[28],A=1797285236,_=a,E=s,S=c,k=u,x=l,C=d,I=f,T=h,O=p,P=g,M=m,R=y,N=v,L=b,B=w,D=A,U=0;U>>25)+_|0)<<9|i>>>23)+x|0)<<13|i>>>19)+O|0)<<18|i>>>14,C^=(i=(E^=(i=(L^=(i=(P^=(i=C+E|0)<<7|i>>>25)+C|0)<<9|i>>>23)+P|0)<<13|i>>>19)+L|0)<<18|i>>>14,M^=(i=(I^=(i=(S^=(i=(B^=(i=M+I|0)<<7|i>>>25)+M|0)<<9|i>>>23)+B|0)<<13|i>>>19)+S|0)<<18|i>>>14,D^=(i=(R^=(i=(T^=(i=(k^=(i=D+R|0)<<7|i>>>25)+D|0)<<9|i>>>23)+k|0)<<13|i>>>19)+T|0)<<18|i>>>14,_^=(i=(k^=(i=(S^=(i=(E^=(i=_+k|0)<<7|i>>>25)+_|0)<<9|i>>>23)+E|0)<<13|i>>>19)+S|0)<<18|i>>>14,C^=(i=(x^=(i=(T^=(i=(I^=(i=C+x|0)<<7|i>>>25)+C|0)<<9|i>>>23)+I|0)<<13|i>>>19)+T|0)<<18|i>>>14,M^=(i=(P^=(i=(O^=(i=(R^=(i=M+P|0)<<7|i>>>25)+M|0)<<9|i>>>23)+R|0)<<13|i>>>19)+O|0)<<18|i>>>14,D^=(i=(B^=(i=(L^=(i=(N^=(i=D+B|0)<<7|i>>>25)+D|0)<<9|i>>>23)+N|0)<<13|i>>>19)+L|0)<<18|i>>>14;n.writeUint32LE(_+a|0,e,0),n.writeUint32LE(E+s|0,e,4),n.writeUint32LE(S+c|0,e,8),n.writeUint32LE(k+u|0,e,12),n.writeUint32LE(x+l|0,e,16),n.writeUint32LE(C+d|0,e,20),n.writeUint32LE(I+f|0,e,24),n.writeUint32LE(T+h|0,e,28),n.writeUint32LE(O+p|0,e,32),n.writeUint32LE(P+g|0,e,36),n.writeUint32LE(M+m|0,e,40),n.writeUint32LE(R+y|0,e,44),n.writeUint32LE(N+v|0,e,48),n.writeUint32LE(L+b|0,e,52),n.writeUint32LE(B+w|0,e,56),n.writeUint32LE(D+A|0,e,60)}function s(e,t,r,n,o){if(void 0===o&&(o=0),32!==e.length)throw new Error("Salsa20: key size must be 32 bytes");if(n.length>>=8,t++;if(n>0)throw new Error("Salsa20: counter overflow")}t.streamXOR=s,t.stream=function(e,t,r,n){return void 0===n&&(n=0),i.wipe(r),s(e,t,r,r,n)}},78166:(e,t,r)=>{"use strict";var n=r(13310),i=r(95070);t.On=32,t.cS=64;var o=function(){function e(){this.digestLength=t.On,this.blockSize=t.cS,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._temp),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var r=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[r++],t--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(r=s(this._temp,this._state,e,r,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[r++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t/536870912|0,o=t<<3,a=t%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.state),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.aD=o;var a=new Int32Array([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 s(e,t,r,i,o){for(;o>=64;){for(var s=t[0],c=t[1],u=t[2],l=t[3],d=t[4],f=t[5],h=t[6],p=t[7],g=0;g<16;g++){var m=i+4*g;e[g]=n.readUint32BE(r,m)}for(g=16;g<64;g++){var y=e[g-2],v=(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10,b=((y=e[g-15])>>>7|y<<25)^(y>>>18|y<<14)^y>>>3;e[g]=(v+e[g-7]|0)+(b+e[g-16]|0)}for(g=0;g<64;g++){v=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&f^~d&h)|0)+(p+(a[g]+e[g]|0)|0)|0,b=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&c^s&u^c&u)|0;p=h,h=f,f=d,d=l+v|0,l=u,u=c,c=s,s=v+b|0}t[0]+=s,t[1]+=c,t[2]+=u,t[3]+=l,t[4]+=d,t[5]+=f,t[6]+=h,t[7]+=p,i+=64,o-=64}return i}t.tW=function(e){var t=new o;t.update(e);var r=t.digest();return t.clean(),r}},9816:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(13310),i=r(95070);t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var o=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,r){if(void 0===r&&(r=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t/536870912|0,o=t<<3,a=t%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.stateHi),i.wipe(e.stateLo),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA512=o;var a=new Int32Array([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 s(e,t,r,i,o,s,c){for(var u,l,d,f,h,p,g,m,y=r[0],v=r[1],b=r[2],w=r[3],A=r[4],_=r[5],E=r[6],S=r[7],k=i[0],x=i[1],C=i[2],I=i[3],T=i[4],O=i[5],P=i[6],M=i[7];c>=128;){for(var R=0;R<16;R++){var N=8*R+s;e[R]=n.readUint32BE(o,N),t[R]=n.readUint32BE(o,N+4)}for(R=0;R<80;R++){var L,B,D=y,U=v,j=b,F=w,z=A,q=_,H=E,V=k,$=x,K=C,W=I,G=T,Q=O,Y=P;if(h=65535&(l=M),p=l>>>16,g=65535&(u=S),m=u>>>16,h+=65535&(l=(T>>>14|A<<18)^(T>>>18|A<<14)^(A>>>9|T<<23)),p+=l>>>16,g+=65535&(u=(A>>>14|T<<18)^(A>>>18|T<<14)^(T>>>9|A<<23)),m+=u>>>16,h+=65535&(l=T&O^~T&P),p+=l>>>16,g+=65535&(u=A&_^~A&E),m+=u>>>16,u=a[2*R],h+=65535&(l=a[2*R+1]),p+=l>>>16,g+=65535&u,m+=u>>>16,u=e[R%16],p+=(l=t[R%16])>>>16,g+=65535&u,m+=u>>>16,g+=(p+=(h+=65535&l)>>>16)>>>16,h=65535&(l=f=65535&h|p<<16),p=l>>>16,g=65535&(u=d=65535&g|(m+=g>>>16)<<16),m=u>>>16,h+=65535&(l=(k>>>28|y<<4)^(y>>>2|k<<30)^(y>>>7|k<<25)),p+=l>>>16,g+=65535&(u=(y>>>28|k<<4)^(k>>>2|y<<30)^(k>>>7|y<<25)),m+=u>>>16,p+=(l=k&x^k&C^x&C)>>>16,g+=65535&(u=y&v^y&b^v&b),m+=u>>>16,L=65535&(g+=(p+=(h+=65535&l)>>>16)>>>16)|(m+=g>>>16)<<16,B=65535&h|p<<16,h=65535&(l=W),p=l>>>16,g=65535&(u=F),m=u>>>16,p+=(l=f)>>>16,g+=65535&(u=d),m+=u>>>16,v=D,b=U,w=j,A=F=65535&(g+=(p+=(h+=65535&l)>>>16)>>>16)|(m+=g>>>16)<<16,_=z,E=q,S=H,y=L,x=V,C=$,I=K,T=W=65535&h|p<<16,O=G,P=Q,M=Y,k=B,R%16===15)for(N=0;N<16;N++)u=e[N],h=65535&(l=t[N]),p=l>>>16,g=65535&u,m=u>>>16,u=e[(N+9)%16],h+=65535&(l=t[(N+9)%16]),p+=l>>>16,g+=65535&u,m+=u>>>16,d=e[(N+1)%16],h+=65535&(l=((f=t[(N+1)%16])>>>1|d<<31)^(f>>>8|d<<24)^(f>>>7|d<<25)),p+=l>>>16,g+=65535&(u=(d>>>1|f<<31)^(d>>>8|f<<24)^d>>>7),m+=u>>>16,d=e[(N+14)%16],p+=(l=((f=t[(N+14)%16])>>>19|d<<13)^(d>>>29|f<<3)^(f>>>6|d<<26))>>>16,g+=65535&(u=(d>>>19|f<<13)^(f>>>29|d<<3)^d>>>6),m+=u>>>16,m+=(g+=(p+=(h+=65535&l)>>>16)>>>16)>>>16,e[N]=65535&g|m<<16,t[N]=65535&h|p<<16}h=65535&(l=k),p=l>>>16,g=65535&(u=y),m=u>>>16,u=r[0],p+=(l=i[0])>>>16,g+=65535&u,m+=u>>>16,m+=(g+=(p+=(h+=65535&l)>>>16)>>>16)>>>16,r[0]=y=65535&g|m<<16,i[0]=k=65535&h|p<<16,h=65535&(l=x),p=l>>>16,g=65535&(u=v),m=u>>>16,u=r[1],p+=(l=i[1])>>>16,g+=65535&u,m+=u>>>16,m+=(g+=(p+=(h+=65535&l)>>>16)>>>16)>>>16,r[1]=v=65535&g|m<<16,i[1]=x=65535&h|p<<16,h=65535&(l=C),p=l>>>16,g=65535&(u=b),m=u>>>16,u=r[2],p+=(l=i[2])>>>16,g+=65535&u,m+=u>>>16,m+=(g+=(p+=(h+=65535&l)>>>16)>>>16)>>>16,r[2]=b=65535&g|m<<16,i[2]=C=65535&h|p<<16,h=65535&(l=I),p=l>>>16,g=65535&(u=w),m=u>>>16,u=r[3],p+=(l=i[3])>>>16,g+=65535&u,m+=u>>>16,m+=(g+=(p+=(h+=65535&l)>>>16)>>>16)>>>16,r[3]=w=65535&g|m<<16,i[3]=I=65535&h|p<<16,h=65535&(l=T),p=l>>>16,g=65535&(u=A),m=u>>>16,u=r[4],p+=(l=i[4])>>>16,g+=65535&u,m+=u>>>16,m+=(g+=(p+=(h+=65535&l)>>>16)>>>16)>>>16,r[4]=A=65535&g|m<<16,i[4]=T=65535&h|p<<16,h=65535&(l=O),p=l>>>16,g=65535&(u=_),m=u>>>16,u=r[5],p+=(l=i[5])>>>16,g+=65535&u,m+=u>>>16,m+=(g+=(p+=(h+=65535&l)>>>16)>>>16)>>>16,r[5]=_=65535&g|m<<16,i[5]=O=65535&h|p<<16,h=65535&(l=P),p=l>>>16,g=65535&(u=E),m=u>>>16,u=r[6],p+=(l=i[6])>>>16,g+=65535&u,m+=u>>>16,m+=(g+=(p+=(h+=65535&l)>>>16)>>>16)>>>16,r[6]=E=65535&g|m<<16,i[6]=P=65535&h|p<<16,h=65535&(l=M),p=l>>>16,g=65535&(u=S),m=u>>>16,u=r[7],p+=(l=i[7])>>>16,g+=65535&u,m+=u>>>16,m+=(g+=(p+=(h+=65535&l)>>>16)>>>16)>>>16,r[7]=S=65535&g|m<<16,i[7]=M=65535&h|p<<16,s+=128,c-=128}return s}t.hash=function(e){var t=new o;t.update(e);var r=t.digest();return t.clean(),r}},41790:(e,t)=>{"use strict";t.lF=void 0;const r="utf8: invalid string",n="utf8: invalid source encoding";function i(e){let t=0;for(let n=0;n=55296&&i<=56319){if(n===e.length-1)throw new Error(r);n++;const t=e.charCodeAt(n);if(t<56320||t>57343)throw new Error(r);i=t-56320+(i-55296<<10)+65536}t+=i<128?1:i<2048?2:i<65536?3:4}return t}t.lF=function(e){const t=new Uint8Array(i(e));let r=0;for(let n=0;n=55296&&i<=56319&&(i=(i-55296<<10)+(e.charCodeAt(++n)-56320)+65536),i<128?t[r++]=i:i<2048?(t[r++]=192|i>>6,t[r++]=128|63&i):i<65536?(t[r++]=224|i>>12,t[r++]=128|i>>6&63,t[r++]=128|63&i):(t[r++]=240|i>>18,t[r++]=128|i>>12&63,t[r++]=128|i>>6&63,t[r++]=128|63&i)}return t}},95070:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.X25519Session=t.SECRET_SEED_LENGTH=t.SAVED_STATE_LENGTH=t.ACCEPT_MESSAGE_LENGTH=t.OFFER_MESSAGE_LENGTH=void 0;const n=r(86022),i=r(95070),o=r(34520),a=r(77774);t.OFFER_MESSAGE_LENGTH=o.PUBLIC_KEY_LENGTH,t.ACCEPT_MESSAGE_LENGTH=o.PUBLIC_KEY_LENGTH,t.SAVED_STATE_LENGTH=o.SECRET_KEY_LENGTH,t.SECRET_SEED_LENGTH=o.SECRET_KEY_LENGTH;t.X25519Session=class{constructor(e,r){this.offerMessageLength=t.OFFER_MESSAGE_LENGTH,this.acceptMessageLength=t.ACCEPT_MESSAGE_LENGTH,this.sharedKeyLength=o.SHARED_KEY_LENGTH,this.savedStateLength=t.SAVED_STATE_LENGTH,this._seed=e||(0,n.randomBytes)(o.SECRET_KEY_LENGTH,r)}saveState(){return new Uint8Array(this._seed)}restoreState(e){return this._seed=new Uint8Array(e),this}clean(){this._seed&&(0,i.wipe)(this._seed),this._keyPair&&((0,i.wipe)(this._keyPair.secretKey),(0,i.wipe)(this._keyPair.publicKey)),this._sharedKey&&(0,i.wipe)(this._sharedKey),this._sessionKeys&&((0,i.wipe)(this._sessionKeys.receive),(0,i.wipe)(this._sessionKeys.send))}offer(){return this._keyPair=(0,o.generateKeyPairFromSeed)(this._seed),new Uint8Array(this._keyPair.publicKey)}accept(e){if(this._keyPair)throw new Error("X25519Session: accept shouldn't be called by offering party");if(e.length!==this.offerMessageLength)throw new Error("X25519Session: incorrect offer message length");if(this._sharedKey)throw new Error("X25519Session: accept was already called");const t=(0,o.generateKeyPairFromSeed)(this._seed);return this._sharedKey=(0,o.sharedKey)(t.secretKey,e),this._sessionKeys=(0,a.clientSessionKeysFromSharedKey)(this._sharedKey,t.publicKey,e),(0,i.wipe)(t.secretKey),t.publicKey}finish(e){if(e.length!==this.acceptMessageLength)throw new Error("X25519Session: incorrect accept message length");if(!this._keyPair)throw new Error("X25519Session: no offer state");if(this._sharedKey)throw new Error("X25519Session: finish was already called");return this._sharedKey=(0,o.sharedKey)(this._keyPair.secretKey,e),this._sessionKeys=(0,a.serverSessionKeysFromSharedKey)(this._sharedKey,this._keyPair.publicKey,e),this}getSharedKey(){if(!this._sharedKey)throw new Error("X25519Session: no shared key established");return new Uint8Array(this._sharedKey)}getSessionKeys(){if(!this._sessionKeys)throw new Error("X25519Session: no shared key established");return{receive:new Uint8Array(this._sessionKeys.receive),send:new Uint8Array(this._sessionKeys.send)}}}},77774:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clientSessionKeys=t.serverSessionKeys=t.clientSessionKeysFromSharedKey=t.serverSessionKeysFromSharedKey=t.X25519Session=void 0;const n=r(12758),i=r(34520);var o=r(51924);Object.defineProperty(t,"X25519Session",{enumerable:!0,get:function(){return o.X25519Session}});const a=32;function s(e,t,r){const i=new(arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.BLAKE2b);if(i.digestLength!==2*a)throw new Error("X25519: incorrect digest length");const o=i.update(e).update(r).update(t).digest();return{send:o.subarray(0,a),receive:o.subarray(a)}}function c(e,t,r){const i=new(arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.BLAKE2b);if(i.digestLength!==2*a)throw new Error("X25519: incorrect digest length");const o=i.update(e).update(t).update(r).digest();return{receive:o.subarray(0,a),send:o.subarray(a)}}t.serverSessionKeysFromSharedKey=s,t.clientSessionKeysFromSharedKey=c,t.serverSessionKeys=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.BLAKE2b;return s((0,i.sharedKey)(e.secretKey,t),e.publicKey,t,r)},t.clientSessionKeys=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.BLAKE2b;return c((0,i.sharedKey)(e.secretKey,t),e.publicKey,t,r)}},34520:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sharedKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.scalarMultBase=t.scalarMult=t.SHARED_KEY_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=void 0;const n=r(86022),i=r(95070);function o(e){const t=new Float64Array(16);if(e)for(let r=0;r=0;--o){const e=r[o>>>3]>>>(7&o)&1;u(i,a,e),u(p,g,e),l(m,i,p),d(i,i,p),l(p,a,g),d(a,a,g),h(g,m),h(y,i),f(i,p,i),f(p,a,m),l(m,i,p),d(i,i,p),h(a,i),d(p,g,y),f(i,p,s),l(i,i,g),f(p,p,i),f(i,g,y),f(g,a,n),h(a,m),u(i,a,e),u(p,g,e)}for(let o=0;o<16;o++)n[o+16]=i[o],n[o+32]=p[o],n[o+48]=a[o],n[o+64]=g[o];const v=n.subarray(32),b=n.subarray(16);!function(e,t){const r=o();for(let n=0;n<16;n++)r[n]=t[n];for(let n=253;n>=0;n--)h(r,r),2!==n&&4!==n&&f(r,r,t);for(let n=0;n<16;n++)e[n]=r[n]}(v,v),f(b,b,v);const w=new Uint8Array(32);return function(e,t){const r=o(),n=o();for(let i=0;i<16;i++)n[i]=t[i];c(n),c(n),c(n);for(let i=0;i<2;i++){r[0]=n[0]-65517;for(let t=1;t<15;t++)r[t]=n[t]-65535-(r[t-1]>>16&1),r[t-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const e=r[15]>>16&1;r[14]&=65535,u(n,r,1-e)}for(let i=0;i<16;i++)e[2*i]=255&n[i],e[2*i+1]=n[i]>>8}(w,b),w}function g(e){return p(e,a)}function m(e){if(e.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const r=new Uint8Array(e);return{publicKey:g(r),secretKey:r}}t.scalarMult=p,t.scalarMultBase=g,t.generateKeyPairFromSeed=m,t.generateKeyPair=function(e){const t=(0,n.randomBytes)(32,e),r=m(t);return(0,i.wipe)(t),r},t.sharedKey=function(e,r){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(r.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const i=p(e,r);if(n){let e=0;for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(13310),i=r(70478),o=r(95070);function a(e,t,r,n,a){if(void 0===a&&(a=0),0===a){if(24!==t.length)throw new Error("XSalsa20 nonce must be 24 bytes")}else if(32!==t.length)throw new Error("XSalsa20 nonce with counter must be 32 bytes");var s=c(e,t.subarray(0,16),new Uint8Array(32)),u=i.streamXOR(s,t.subarray(16),r,n,a);return o.wipe(s),u}t.streamXOR=a,t.stream=function(e,t,r,n){return void 0===n&&(n=0),o.wipe(r),a(e,t,r,r,n)};var s=20;function c(e,t,r){for(var i,o=1634760805,a=e[3]<<24|e[2]<<16|e[1]<<8|e[0],c=e[7]<<24|e[6]<<16|e[5]<<8|e[4],u=e[11]<<24|e[10]<<16|e[9]<<8|e[8],l=e[15]<<24|e[14]<<16|e[13]<<8|e[12],d=857760878,f=t[3]<<24|t[2]<<16|t[1]<<8|t[0],h=t[7]<<24|t[6]<<16|t[5]<<8|t[4],p=t[11]<<24|t[10]<<16|t[9]<<8|t[8],g=t[15]<<24|t[14]<<16|t[13]<<8|t[12],m=2036477234,y=e[19]<<24|e[18]<<16|e[17]<<8|e[16],v=e[23]<<24|e[22]<<16|e[21]<<8|e[20],b=e[27]<<24|e[26]<<16|e[25]<<8|e[24],w=e[31]<<24|e[30]<<16|e[29]<<8|e[28],A=1797285236,_=0;_>>25)+o|0)<<9|i>>>23)+l|0)<<13|i>>>19)+p|0)<<18|i>>>14,d^=(i=(a^=(i=(b^=(i=(g^=(i=d+a|0)<<7|i>>>25)+d|0)<<9|i>>>23)+g|0)<<13|i>>>19)+b|0)<<18|i>>>14,m^=(i=(f^=(i=(c^=(i=(w^=(i=m+f|0)<<7|i>>>25)+m|0)<<9|i>>>23)+w|0)<<13|i>>>19)+c|0)<<18|i>>>14,A^=(i=(y^=(i=(h^=(i=(u^=(i=A+y|0)<<7|i>>>25)+A|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,o^=(i=(u^=(i=(c^=(i=(a^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+c|0)<<18|i>>>14,d^=(i=(l^=(i=(h^=(i=(f^=(i=d+l|0)<<7|i>>>25)+d|0)<<9|i>>>23)+f|0)<<13|i>>>19)+h|0)<<18|i>>>14,m^=(i=(g^=(i=(p^=(i=(y^=(i=m+g|0)<<7|i>>>25)+m|0)<<9|i>>>23)+y|0)<<13|i>>>19)+p|0)<<18|i>>>14,A^=(i=(w^=(i=(b^=(i=(v^=(i=A+w|0)<<7|i>>>25)+A|0)<<9|i>>>23)+v|0)<<13|i>>>19)+b|0)<<18|i>>>14;return n.writeUint32LE(o,r,0),n.writeUint32LE(d,r,4),n.writeUint32LE(m,r,8),n.writeUint32LE(A,r,12),n.writeUint32LE(f,r,16),n.writeUint32LE(h,r,20),n.writeUint32LE(p,r,24),n.writeUint32LE(g,r,28),r}t.hsalsa=c},83199:(e,t,r)=>{e.exports=r(80929)},99982:(e,t,r)=>{"use strict";var n=r(32762),i=r(74136),o=r(40174),a=r(65396),s=r(28989),c=r(53534),u=r(64948),l=r(91889),d=r(74106),f=r(51582);e.exports=function(e){return new Promise((function(t,r){var h,p=e.data,g=e.headers,m=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}n.isFormData(p)&&delete g["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+w)}var A=s(e.baseURL,e.url);function _(){if(v){var n="getAllResponseHeaders"in v?c(v.getAllResponseHeaders()):null,o={data:m&&"text"!==m&&"json"!==m?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v};i((function(e){t(e),y()}),(function(e){r(e),y()}),o),v=null}}if(v.open(e.method.toUpperCase(),a(A,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=_:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(_)},v.onabort=function(){v&&(r(l("Request aborted",e,"ECONNABORTED",v)),v=null)},v.onerror=function(){r(l("Network Error",e,null,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},n.isStandardBrowserEnv()){var E=(e.withCredentials||u(A))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;E&&(g[e.xsrfHeaderName]=E)}"setRequestHeader"in v&&n.forEach(g,(function(e,t){"undefined"===typeof p&&"content-type"===t.toLowerCase()?delete g[t]:v.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),m&&"json"!==m&&(v.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){v&&(r(!e||e&&e.type?new f("canceled"):e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),p||(p=null),v.send(p)}))}},80929:(e,t,r)=>{"use strict";var n=r(32762),i=r(45334),o=r(16033),a=r(64073);var s=function e(t){var r=new o(t),s=i(o.prototype.request,r);return n.extend(s,o.prototype,r),n.extend(s,r),s.create=function(r){return e(a(t,r))},s}(r(290));s.Axios=o,s.Cancel=r(51582),s.CancelToken=r(91941),s.isCancel=r(60338),s.VERSION=r(91699).version,s.all=function(e){return Promise.all(e)},s.spread=r(52030),s.isAxiosError=r(12945),e.exports=s,e.exports.default=s},51582:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},91941:(e,t,r)=>{"use strict";var n=r(51582);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},16033:(e,t,r)=>{"use strict";var n=r(32762),i=r(65396),o=r(62753),a=r(41736),s=r(64073),c=r(40643),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&c.assertOptions(r,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var o,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!i){var d=[a,void 0];for(Array.prototype.unshift.apply(d,n),d=d.concat(l),o=Promise.resolve(t);d.length;)o=o.then(d.shift(),d.shift());return o}for(var f=t;n.length;){var h=n.shift(),p=n.shift();try{f=h(f)}catch(g){p(g);break}}try{o=a(f)}catch(g){return Promise.reject(g)}for(;l.length;)o=o.then(l.shift(),l.shift());return o},l.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=l},62753:(e,t,r)=>{"use strict";var n=r(32762);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},28989:(e,t,r)=>{"use strict";var n=r(65931),i=r(6830);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},91889:(e,t,r)=>{"use strict";var n=r(13727);e.exports=function(e,t,r,i,o){var a=new Error(e);return n(a,t,r,i,o)}},41736:(e,t,r)=>{"use strict";var n=r(32762),i=r(85271),o=r(60338),a=r(290),s=r(51582);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(c(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},13727:e=>{"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},64073:(e,t,r)=>{"use strict";var n=r(32762);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function a(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function s(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function c(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||o,i=t(e);n.isUndefined(i)&&t!==c||(r[e]=i)})),r}},74136:(e,t,r)=>{"use strict";var n=r(91889);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},85271:(e,t,r)=>{"use strict";var n=r(32762),i=r(290);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,(function(r){e=r.call(o,e,t)})),e}},290:(e,t,r)=>{"use strict";var n=r(32762),i=r(82928),o=r(13727),a=r(74106),s={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u={transitional:a,adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=r(99982)),e}(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(c(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,r=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||i&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(a){if("SyntaxError"===s.name)throw o(s,this,"E_JSON_PARSE");throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(s)})),e.exports=u},74106:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},91699:e=>{e.exports={version:"0.26.1"}},45334:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n{"use strict";var n=r(32762);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},6830:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},40174:(e,t,r)=>{"use strict";var n=r(32762);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},65931:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},12945:(e,t,r)=>{"use strict";var n=r(32762);e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},64948:(e,t,r)=>{"use strict";var n=r(32762);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},82928:(e,t,r)=>{"use strict";var n=r(32762);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},53534:(e,t,r)=>{"use strict";var n=r(32762),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},52030:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},40643:(e,t,r)=>{"use strict";var n=r(91699).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var o={};i.transitional=function(e,t,r){function i(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new Error(i(n," has been removed"+(t?" in "+t:"")));return t&&!o[n]&&(o[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={assertOptions:function(e,t,r){if("object"!==typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],c=void 0===s||a(s,o,e);if(!0!==c)throw new TypeError("option "+o+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:i}},32762:(e,t,r)=>{"use strict";var n=r(45334),i=Object.prototype.toString;function o(e){return Array.isArray(e)}function a(e){return"undefined"===typeof e}function s(e){return"[object ArrayBuffer]"===i.call(e)}function c(e){return null!==e&&"object"===typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===i.call(e)}function d(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),o(e))for(var r=0,n=e.length;r{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!==typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}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 e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i{"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(){const e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=i,t.isBrowserCryptoAvailable=function(){return!!n()&&!!i()}},55227:(e,t)=>{"use strict";function r(){return"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product}function n(){return"undefined"!==typeof process&&"undefined"!==typeof process.versions&&"undefined"!==typeof process.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=r,t.isNode=n,t.isBrowser=function(){return!r()&&!n()}},21776:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(61900);n.__exportStar(r(32623),t),n.__exportStar(r(55227),t)},61900:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>b,__asyncValues:()=>A,__await:()=>v,__awaiter:()=>l,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>x,__createBinding:()=>f,__decorate:()=>s,__exportStar:()=>h,__extends:()=>i,__generator:()=>d,__importDefault:()=>S,__importStar:()=>E,__makeTemplateObject:()=>_,__metadata:()=>u,__param:()=>c,__read:()=>g,__rest:()=>a,__spread:()=>m,__spreadArrays:()=>y,__values:()=>p});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function d(e,t){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=(i=a.trys).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]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >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 e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof v?Promise.resolve(e.value.v).then(c,u):l(o[0][2],e)}(i[e](t))}catch(r){l(o[0][3],r)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:v(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function A(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},16454:(e,t,r)=>{"use strict";r.d(t,{H:()=>n});class n{}},26832:(e,t,r)=>{"use strict";r.d(t,{Uf:()=>l,XW:()=>d,fO:()=>c,jf:()=>u,zR:()=>s});const n="PARSE_ERROR",i="INVALID_REQUEST",o="METHOD_NOT_FOUND",a="INVALID_PARAMS",s="INTERNAL_ERROR",c="SERVER_ERROR",u=[-32700,-32600,-32601,-32602,-32603],l={[n]:{code:-32700,message:"Parse error"},[i]:{code:-32600,message:"Invalid Request"},[o]:{code:-32601,message:"Method not found"},[a]:{code:-32602,message:"Invalid params"},[s]:{code:-32603,message:"Internal error"},[c]:{code:-32e3,message:"Server error"}},d=c},68142:(e,t,r)=>{"use strict";var n=r(21776);r.o(n,"IJsonRpcProvider")&&r.d(t,{IJsonRpcProvider:function(){return n.IJsonRpcProvider}}),r.o(n,"formatJsonRpcError")&&r.d(t,{formatJsonRpcError:function(){return n.formatJsonRpcError}}),r.o(n,"formatJsonRpcRequest")&&r.d(t,{formatJsonRpcRequest:function(){return n.formatJsonRpcRequest}}),r.o(n,"formatJsonRpcResult")&&r.d(t,{formatJsonRpcResult:function(){return n.formatJsonRpcResult}}),r.o(n,"getBigIntRpcId")&&r.d(t,{getBigIntRpcId:function(){return n.getBigIntRpcId}}),r.o(n,"isHttpUrl")&&r.d(t,{isHttpUrl:function(){return n.isHttpUrl}}),r.o(n,"isJsonRpcError")&&r.d(t,{isJsonRpcError:function(){return n.isJsonRpcError}}),r.o(n,"isJsonRpcRequest")&&r.d(t,{isJsonRpcRequest:function(){return n.isJsonRpcRequest}}),r.o(n,"isJsonRpcResponse")&&r.d(t,{isJsonRpcResponse:function(){return n.isJsonRpcResponse}}),r.o(n,"isJsonRpcResult")&&r.d(t,{isJsonRpcResult:function(){return n.isJsonRpcResult}}),r.o(n,"isLocalhostUrl")&&r.d(t,{isLocalhostUrl:function(){return n.isLocalhostUrl}}),r.o(n,"isReactNative")&&r.d(t,{isReactNative:function(){return n.isReactNative}}),r.o(n,"isWsUrl")&&r.d(t,{isWsUrl:function(){return n.isWsUrl}}),r.o(n,"payloadId")&&r.d(t,{payloadId:function(){return n.payloadId}})},74619:(e,t,r)=>{"use strict";r.d(t,{eF:()=>s,mE:()=>i,rI:()=>a,vG:()=>o});var n=r(26832);function i(e){return n.jf.includes(e)}function o(e){return Object.keys(n.Uf).includes(e)?n.Uf[e]:n.Uf[n.XW]}function a(e){const t=Object.values(n.Uf).find((t=>t.code===e));return t||n.Uf[n.XW]}function s(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}},10162:(e,t,r)=>{"use strict";r.d(t,{ER:()=>o,Im:()=>c,dZ:()=>u,eX:()=>a,e_:()=>s});var n=r(74619),i=r(26832);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function a(){return BigInt(o(arguments.length>0&&void 0!==arguments[0]?arguments[0]:6))}function s(e,t,r){return{id:r||o(),jsonrpc:"2.0",method:e,params:t}}function c(e,t){return{id:e,jsonrpc:"2.0",result:t}}function u(e,t,r){return{id:e,jsonrpc:"2.0",error:l(t,r)}}function l(e,t){return"undefined"===typeof e?(0,n.vG)(i.zR):("string"===typeof e&&(e=Object.assign(Object.assign({},(0,n.vG)(i.fO)),{message:e})),"undefined"!==typeof t&&(e.data=t),(0,n.mE)(e.code)&&(e=(0,n.rI)(e.code)),e)}},90217:(e,t,r)=>{"use strict";r.d(t,{IJsonRpcProvider:()=>a.kF,formatJsonRpcError:()=>o.dZ,formatJsonRpcRequest:()=>o.e_,formatJsonRpcResult:()=>o.Im,getBigIntRpcId:()=>o.eX,isHttpUrl:()=>s.q$,isJsonRpcError:()=>c.U$,isJsonRpcRequest:()=>c.p3,isJsonRpcResponse:()=>c.tq,isJsonRpcResult:()=>c.xT,isLocalhostUrl:()=>s.z,isWsUrl:()=>s.A1,parseConnectionError:()=>n.eF,payloadId:()=>o.ER});r(26832);var n=r(74619),i=r(68142);r.o(i,"IJsonRpcProvider")&&r.d(t,{IJsonRpcProvider:function(){return i.IJsonRpcProvider}}),r.o(i,"formatJsonRpcError")&&r.d(t,{formatJsonRpcError:function(){return i.formatJsonRpcError}}),r.o(i,"formatJsonRpcRequest")&&r.d(t,{formatJsonRpcRequest:function(){return i.formatJsonRpcRequest}}),r.o(i,"formatJsonRpcResult")&&r.d(t,{formatJsonRpcResult:function(){return i.formatJsonRpcResult}}),r.o(i,"getBigIntRpcId")&&r.d(t,{getBigIntRpcId:function(){return i.getBigIntRpcId}}),r.o(i,"isHttpUrl")&&r.d(t,{isHttpUrl:function(){return i.isHttpUrl}}),r.o(i,"isJsonRpcError")&&r.d(t,{isJsonRpcError:function(){return i.isJsonRpcError}}),r.o(i,"isJsonRpcRequest")&&r.d(t,{isJsonRpcRequest:function(){return i.isJsonRpcRequest}}),r.o(i,"isJsonRpcResponse")&&r.d(t,{isJsonRpcResponse:function(){return i.isJsonRpcResponse}}),r.o(i,"isJsonRpcResult")&&r.d(t,{isJsonRpcResult:function(){return i.isJsonRpcResult}}),r.o(i,"isLocalhostUrl")&&r.d(t,{isLocalhostUrl:function(){return i.isLocalhostUrl}}),r.o(i,"isReactNative")&&r.d(t,{isReactNative:function(){return i.isReactNative}}),r.o(i,"isWsUrl")&&r.d(t,{isWsUrl:function(){return i.isWsUrl}}),r.o(i,"payloadId")&&r.d(t,{payloadId:function(){return i.payloadId}});var o=r(10162),a=r(50176),s=r(91152),c=r(95962)},50176:(e,t,r)=>{"use strict";r.d(t,{kF:()=>o});class n{}class i extends n{constructor(){super()}}class o extends i{constructor(e){super()}}},91152:(e,t,r)=>{"use strict";r.d(t,{A1:()=>s,q$:()=>a,z:()=>c});const n="^https?:",i="^wss?:";function o(e,t){const r=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return"undefined"!==typeof r&&new RegExp(t).test(r)}function a(e){return o(e,n)}function s(e){return o(e,i)}function c(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}},95962:(e,t,r)=>{"use strict";function n(e){return"object"===typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function i(e){return n(e)&&"method"in e}function o(e){return n(e)&&(a(e)||s(e))}function a(e){return"result"in e}function s(e){return"error"in e}r.d(t,{U$:()=>s,p3:()=>i,tq:()=>o,xT:()=>a})},50235:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(28981),i=r(23224),o=r(90217);const a=e=>e.split("?")[0],s=typeof WebSocket<"u"?WebSocket:typeof r.g<"u"&&typeof r.g.WebSocket<"u"?r.g.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:r(79506);class c{constructor(e){if(this.url=e,this.events=new n.EventEmitter,this.registering=!1,!(0,o.isWsUrl)(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;await this.register(e)}async close(){return new Promise(((e,t)=>{typeof this.socket>"u"?t(new Error("Connection already closed")):(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close())}))}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send((0,i.h)(e))}catch(t){this.onError(e.id,t)}}register(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;if(!(0,o.isWsUrl)(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,n)=>{const i=new URLSearchParams(e).get("origin"),a=(0,o.isReactNative)()?{headers:{origin:i}}:{rejectUnauthorized:!(0,o.isLocalhostUrl)(e)},c=new s(e,[],a);typeof WebSocket<"u"||typeof r.g<"u"&&typeof r.g.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?c.onerror=e=>{const t=e;n(this.emitError(t.error))}:c.on("error",(e=>{n(this.emitError(e))})),c.onopen=()=>{this.onOpen(c),t(c)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?(0,i.j)(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),n=r.message||r.toString(),i=(0,o.formatJsonRpcError)(e,n);this.events.emit("payload",i)}parseError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.url;return(0,o.parseConnectionError)(e,a(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${a(this.url)}`));return this.events.emit("register_error",t),t}}},79506:e=>{"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},75974:(e,t,r)=>{"use strict";r.d(t,{A:()=>R});const n=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,i=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,o=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function a(e,t){if(!("__proto__"===e||"constructor"===e&&t&&"object"===typeof t&&"prototype"in t))return t;!function(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}(e)}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!==typeof e)return e;const r=e.trim();if('"'===e[0]&&e.endsWith('"')&&!e.includes("\\"))return r.slice(1,-1);if(r.length<=9){const e=r.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!o.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(n.test(e)||i.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,a)}return JSON.parse(e)}catch(s){if(t.strict)throw s;return e}}function c(e){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{const e=new Map;return{name:"memory",options:{},hasItem:t=>e.has(t),getItem:t=>e.get(t)??null,getItemRaw:t=>e.get(t)??null,setItem(t,r){e.set(t,r)},setItemRaw(t,r){e.set(t,r)},removeItem(t){e.delete(t)},getKeys:()=>Array.from(e.keys()),clear(){e.clear()},dispose(){e.clear()}}};function m(){const e={mounts:{"":(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).driver||g()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=t=>{for(const r of e.mountpoints)if(t.startsWith(r))return{base:r,relativeKey:t.slice(r.length),driver:e.mounts[r]};return{base:"",relativeKey:t,driver:e.mounts[""]}},r=(t,r)=>e.mountpoints.filter((e=>e.startsWith(t)||r&&t.startsWith(e))).map((r=>({relativeBase:t.length>r.length?t.slice(r.length):void 0,mountpoint:r,driver:e.mounts[r]}))),n=(t,r)=>{if(e.watching){r=f(r);for(const n of e.watchListeners)n(t,r)}},i=async()=>{if(e.watching){for(const t in e.unwatch)await e.unwatch[t]();e.unwatch={},e.watching=!1}},o=(e,r,n)=>{const i=new Map,o=e=>{let t=i.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},i.set(e.base,t)),t};for(const a of e){const e="string"===typeof a,n=f(e?a:a.key),i=e?void 0:a.value,s=e||!a.options?r:{...r,...a.options},c=t(n);o(c).items.push({key:n,value:i,relativeKey:c.relativeKey,options:s})}return Promise.all([...i.values()].map((e=>n(e)))).then((e=>e.flat()))},a={hasItem(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=f(e);const{relativeKey:n,driver:i}=t(e);return c(i.hasItem,n,r)},getItem(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=f(e);const{relativeKey:n,driver:i}=t(e);return c(i.getItem,n,r).then((e=>s(e)))},getItems:(e,t)=>o(e,t,(e=>e.driver.getItems?c(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:h(e.base,t.key),value:s(t.value)}))))):Promise.all(e.items.map((t=>c(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:s(e)})))))))),getItemRaw(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=f(e);const{relativeKey:n,driver:i}=t(e);return i.getItemRaw?c(i.getItemRaw,n,r):c(i.getItem,n,r).then((e=>function(e){return"string"!==typeof e?e:e.startsWith(d)?(l(),Buffer.from(e.slice(d.length),"base64")):e}(e)))},async setItem(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(void 0===r)return a.removeItem(e);e=f(e);const{relativeKey:o,driver:s}=t(e);s.setItem&&(await c(s.setItem,o,u(r),i),s.watch||n("update",e))},async setItems(e,t){await o(e,t,(async e=>{if(e.driver.setItems)return c(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:u(e.value),options:e.options}))),t);e.driver.setItem&&await Promise.all(e.items.map((t=>c(e.driver.setItem,t.relativeKey,u(t.value),t.options))))}))},async setItemRaw(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(void 0===r)return a.removeItem(e,i);e=f(e);const{relativeKey:o,driver:s}=t(e);if(s.setItemRaw)await c(s.setItemRaw,o,r,i);else{if(!s.setItem)return;await c(s.setItem,o,function(e){if("string"===typeof e)return e;l();const t=Buffer.from(e).toString("base64");return d+t}(r),i)}s.watch||n("update",e)},async removeItem(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"boolean"===typeof r&&(r={removeMeta:r}),e=f(e);const{relativeKey:i,driver:o}=t(e);o.removeItem&&(await c(o.removeItem,i,r),(r.removeMeta||r.removeMata)&&await c(o.removeItem,i+"$",r),o.watch||n("remove",e))},async getMeta(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"boolean"===typeof r&&(r={nativeOnly:r}),e=f(e);const{relativeKey:n,driver:i}=t(e),o=Object.create(null);if(i.getMeta&&Object.assign(o,await c(i.getMeta,n,r)),!r.nativeOnly){const e=await c(i.getItem,n+"$",r).then((e=>s(e)));e&&"object"===typeof e&&("string"===typeof e.atime&&(e.atime=new Date(e.atime)),"string"===typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(o,e))}return o},setMeta(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.setItem(e+"$",t,r)},removeMeta(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.removeItem(e+"$",t)},async getKeys(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=p(e);const n=r(e,!0);let i=[];const o=[];for(const r of n){const e=(await c(r.driver.getKeys,r.relativeBase,t)).map((e=>r.mountpoint+f(e))).filter((e=>!i.some((t=>e.startsWith(t)))));o.push(...e),i=[r.mountpoint,...i.filter((e=>!e.startsWith(r.mountpoint)))]}return e?o.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):o.filter((e=>!e.endsWith("$")))},async clear(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=p(e),await Promise.all(r(e,!1).map((async e=>{if(e.driver.clear)return c(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){const r=await e.driver.getKeys(e.relativeBase||"",t);return Promise.all(r.map((r=>e.driver.removeItem(r,t))))}})))},async dispose(){await Promise.all(Object.values(e.mounts).map((e=>v(e))))},watch:async t=>(await(async()=>{if(!e.watching){e.watching=!0;for(const t in e.mounts)e.unwatch[t]=await y(e.mounts[t],n,t)}})(),e.watchListeners.push(t),async()=>{e.watchListeners=e.watchListeners.filter((e=>e!==t)),0===e.watchListeners.length&&await i()}),async unwatch(){e.watchListeners=[],await i()},mount(t,r){if((t=p(t))&&e.mounts[t])throw new Error(`already mounted at ${t}`);return t&&(e.mountpoints.push(t),e.mountpoints.sort(((e,t)=>t.length-e.length))),e.mounts[t]=r,e.watching&&Promise.resolve(y(r,n,t)).then((r=>{e.unwatch[t]=r})).catch(console.error),a},async unmount(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(t=p(t))&&e.mounts[t]&&(e.watching&&t in e.unwatch&&(e.unwatch[t](),delete e.unwatch[t]),r&&await v(e.mounts[t]),e.mountpoints=e.mountpoints.filter((e=>e!==t)),delete e.mounts[t])},getMount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=f(e)+":";const r=t(e);return{driver:r.driver,base:r.base}},getMounts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=f(e);return r(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint})))}};return a}function y(e,t,r){return e.watch?e.watch(((e,n)=>t(e,r+n))):()=>{}}async function v(e){"function"===typeof e.dispose&&await c(e.dispose)}function b(e){return new Promise(((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)}))}function w(e,t){const r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);const n=b(r);return(e,r)=>n.then((n=>r(n.transaction(t,e).objectStore(t))))}let A;function _(){return A||(A=w("keyval-store","keyval")),A}function E(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:_())("readonly",(t=>b(t.get(e))))}function S(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},b(e.transaction)}var k=r(23224);var x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.base&&e.base.length>0?`${e.base}:`:"",r=e=>t+e;let n;return e.dbName&&e.storeName&&(n=w(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await E(r(e),n)>"u"),getItem:async e=>await E(r(e),n)??null,setItem:(e,t)=>function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:_())("readwrite",(r=>(r.put(t,e),b(r.transaction))))}(r(e),t,n),removeItem:e=>function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:_())("readwrite",(t=>(t.delete(e),b(t.transaction))))}(r(e),n),getKeys:()=>function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:_())("readonly",(e=>{if(e.getAllKeys)return b(e.getAllKeys());const t=[];return S(e,(e=>t.push(e.key))).then((()=>t))}))}(n),clear:()=>function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:_())("readwrite",(e=>(e.clear(),b(e.transaction))))}(n)}};class C{constructor(){this.indexedDb=m({driver:x({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((e=>[e.key,e.value]))}async getItem(e){const t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,(0,k.h)(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var I=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof r.g<"u"?r.g:typeof self<"u"?self:{},T={exports:{}};function O(e){var t;return[e[0],(0,k.j)(null!=(t=e[1])?t:"")]}!function(){let e;function t(){}e=t,e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),typeof I<"u"&&I.localStorage?T.exports=I.localStorage:typeof window<"u"&&window.localStorage?T.exports=window.localStorage:T.exports=new t}();class P{constructor(){this.localStorage=T.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(O)}async getItem(e){const t=this.localStorage.getItem(e);if(null!==t)return(0,k.j)(t)}async setItem(e,t){this.localStorage.setItem(e,(0,k.h)(t))}async removeItem(e){this.localStorage.removeItem(e)}}const M=async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))};class R{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const e=new P;this.storage=e;try{(async(e,t,r)=>{const n="wc_storage_version",i=await t.getItem(n);if(i&&i>=1)return void r(t);const o=await e.getKeys();if(!o.length)return void r(t);const a=[];for(;o.length;){const r=o.shift();if(!r)continue;const n=r.toLowerCase();if(n.includes("wc@")||n.includes("walletconnect")||n.includes("wc_")||n.includes("wallet_connect")){const n=await e.getItem(r);await t.setItem(r,n),a.push(r)}}await t.setItem(n,1),r(t),M(e,a)})(e,new C,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise((e=>{const t=setInterval((()=>{this.initialized&&(clearInterval(t),e())}),20)}))}}},4708:(e,t,r)=>{"use strict";r.d(t,{D5:()=>x,U5:()=>k,h6:()=>i.a,iP:()=>E,oI:()=>S});var n=r(39758),i=r.n(n),o=r(23224);const a={level:"info"},s="custom_context",c=1024e3;class u{constructor(e){this.nodeValue=e,this.sizeInBytes=(new TextEncoder).encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class l{constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){const t=new u(e);if(t.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=t),this.tail=t):(this.head=t,this.tail=t),this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let t=this.head;for(;null!==t;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const t=e.value;return e=e.next,{done:!1,value:t}}}}}class d{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;this.level=e??"error",this.levelValue=n.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new l(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,t){t===n.levels.values.error?console.error(e):t===n.levels.values.warn?console.warn(e):t===n.levels.values.debug?console.debug(e):t===n.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append((0,o.h)({timestamp:(new Date).toISOString(),log:e}));const t="string"==typeof e?JSON.parse(e).level:e.level;t>=this.levelValue&&this.forwardToConsole(e,t)}getLogs(){return this.logs}clearLogs(){this.logs=new l(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const t=this.getLogArray();return t.push((0,o.h)({extraMetadata:e})),new Blob(t,{type:"application/json"})}}class f{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;this.baseChunkLogger=new d(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const t=URL.createObjectURL(this.logsToBlob(e)),r=document.createElement("a");r.href=t,r.download=`walletconnect-logs-${(new Date).toISOString()}.txt`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(t)}}class h{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;this.baseChunkLogger=new d(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}}var p=Object.defineProperty,g=Object.defineProperties,m=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,w=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t||(t={}))v.call(t,r)&&w(e,r,t[r]);if(y)for(var r of y(t))b.call(t,r)&&w(e,r,t[r]);return e},_=(e,t)=>g(e,m(t));function E(e){return _(A({},e),{level:e?.level||a.level})}function S(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,r="";return r=typeof e.bindings>"u"?function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:s]||""}(e,t):e.bindings().context||"",r}function k(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s;const n=function(e,t){const r=S(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:s);return r.trim()?`${r}/${t}`:t}(e,t,r);return function(e,t){return e[arguments.length>2&&void 0!==arguments[2]?arguments[2]:s]=t,e}(e.child({context:n}),n,r)}function x(e){return typeof e.loggerOverride<"u"&&"string"!=typeof e.loggerOverride?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?function(e){var t,r;const n=new f(null==(t=e.opts)?void 0:t.level,e.maxSizeInBytes);return{logger:i()(_(A({},e.opts),{level:"trace",browser:_(A({},null==(r=e.opts)?void 0:r.browser),{write:e=>n.write(e)})})),chunkLoggerController:n}}(e):function(e){var t;const r=new h(null==(t=e.opts)?void 0:t.level,e.maxSizeInBytes);return{logger:i()(_(A({},e.opts),{level:"trace"}),r),chunkLoggerController:r}}(e)}},43586:(e,t,r)=>{"use strict";r.d(t,{CG:()=>n});const n={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}}},49182:(e,t,r)=>{"use strict";r.d(t,{encodeIss:()=>S,generateKeyPair:()=>k,signJWT:()=>x});var n=r(4914),i=r(86022),o=r(50878);const a="EdDSA",s="JWT",c=".",u="base64url",l="utf8",d="utf8",f=":",h="did",p="key",g="base58btc",m="z",y="K36",v=32;var b=r(79055),w=r(54262),A=r(69477),_=r(23224);function E(e){return(0,w.d)((0,A.s)((0,_.h)(e),l),u)}function S(e){const t=(0,A.s)(y,g),r=m+(0,w.d)((0,b.x)([t,e]),g);return[h,p,r].join(f)}function k(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.randomBytes)(v);return n.K(e)}async function x(e,t,r,i){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:(0,o.fromMiliseconds)(Date.now());const f={alg:a,typ:s},h={iss:S(i.publicKey),sub:e,aud:t,iat:l,exp:l+r},p=(g={header:f,payload:h},(0,A.s)([E(g.header),E(g.payload)].join(c),d));var g;return function(e){return[E(e.header),E(e.payload),(t=e.signature,(0,w.d)(t,u))].join(c);var t}({header:f,payload:h,signature:n._S(i.secretKey,p)})}r(28023)},28023:()=>{},23224:(e,t,r)=>{"use strict";r.d(t,{h:()=>a,j:()=>o});const n=e=>JSON.stringify(e,((e,t)=>"bigint"===typeof t?t.toString()+"n":t)),i=e=>{const t=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"===typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))};function o(e){if("string"!==typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return i(e)}catch(t){return e}}function a(e){return"string"===typeof e?e:n(e)||""}},82824:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AUTH_CONTEXT:()=>dn,AUTH_KEYS_CONTEXT:()=>fn,AUTH_PAIRING_TOPIC_CONTEXT:()=>hn,AUTH_PROTOCOL:()=>un,AUTH_PUBLIC_KEY_NAME:()=>mn,AUTH_REQUEST_CONTEXT:()=>pn,AUTH_STORAGE_PREFIX:()=>gn,AUTH_VERSION:()=>ln,ENGINE_CONTEXT:()=>rn,ENGINE_QUEUE_STATES:()=>an,ENGINE_RPC_OPTS:()=>nn,HISTORY_CONTEXT:()=>Qr,HISTORY_EVENTS:()=>Gr,HISTORY_STORAGE_VERSION:()=>Yr,METHODS_TO_VERIFY:()=>cn,PROPOSAL_CONTEXT:()=>Zr,PROPOSAL_EXPIRY:()=>Jr,PROPOSAL_EXPIRY_MESSAGE:()=>Xr,REQUEST_CONTEXT:()=>sn,SESSION_CONTEXT:()=>en,SESSION_EXPIRY:()=>tn,SESSION_REQUEST_EXPIRY_BOUNDARIES:()=>on,SIGN_CLIENT_CONTEXT:()=>qr,SIGN_CLIENT_DEFAULT:()=>Vr,SIGN_CLIENT_EVENTS:()=>$r,SIGN_CLIENT_PROTOCOL:()=>Fr,SIGN_CLIENT_STORAGE_OPTIONS:()=>Kr,SIGN_CLIENT_STORAGE_PREFIX:()=>Hr,SIGN_CLIENT_VERSION:()=>zr,SessionStore:()=>Ln,SignClient:()=>Bn,WALLETCONNECT_DEEPLINK_CHOICE:()=>Wr,default:()=>Nn});var n=r(28981),i=r.n(n),o=r(75974),a=r(50878),s=r(16454);class c extends s.H{constructor(e){super()}}const u=a.FIVE_SECONDS,l="heartbeat_pulse";class d extends c{constructor(e){super(e),this.events=new n.EventEmitter,this.interval=u,this.interval=e?.interval||u}static async init(e){const t=new d(e);return await t.init(),t}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async initialize(){this.intervalRef=setInterval((()=>this.pulse()),(0,a.toMiliseconds)(this.interval))}pulse(){this.events.emit(l)}}var f=r(4708);class h extends s.H{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class p extends s.H{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}}class g{constructor(e,t){this.logger=e,this.core=t}}class m extends s.H{constructor(e,t){super(),this.relayer=e,this.logger=t}}class y extends s.H{constructor(e){super()}}class v{constructor(e,t,r,n){this.core=e,this.logger=t,this.name=r}}class b extends s.H{constructor(e,t){super(),this.relayer=e,this.logger=t}}class w extends s.H{constructor(e,t){super(),this.core=e,this.logger=t}}class A{constructor(e,t){this.projectId=e,this.logger=t}}class _{constructor(e,t){this.projectId=e,this.logger=t}}i();n.EventEmitter;var E=r(23224),S=r(49182),k=r(57107),x=r(20019),C=r(90217);class I extends C.IJsonRpcProvider{constructor(e){super(e),this.events=new n.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict((0,C.formatJsonRpcRequest)(e.method,e.params||[],e.id||(0,C.getBigIntRpcId)().toString()),t)}async requestStrict(e,t){return new Promise((async(r,n)=>{if(!this.connection.connected)try{await this.open()}catch(c){n(c)}this.events.on(`${e.id}`,(e=>{(0,C.isJsonRpcError)(e)?n(e.error):r(e.result)}));try{await this.connection.send(e,t)}catch(c){n(c)}}))}setConnection(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection}onPayload(e){this.events.emit("payload",e),(0,C.isJsonRpcResponse)(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}var T=r(50235),O=r(51812),P=r.n(O),M=r(62838),R=r.n(M);var N=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,a=new Uint8Array(o);e[t];){var l=r[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=o-1;(0!==l||d>>0,a[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var h=o-i;h!==o&&0===a[h];)h++;for(var p=new Uint8Array(n+(o-h)),g=n;h!==o;)p[g++]=a[h++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var a=(o-i)*l+1>>>0,u=new Uint8Array(a);i!==o;){for(var d=t[i],f=0,h=a-1;(0!==d||f>>0,u[h]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");n=f,i++}for(var p=a-n;p!==a&&0===u[p];)p++;for(var g=c.repeat(r);p{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class D{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class U{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return F(this,e)}}class j{constructor(e){this.decoders=e}or(e){return F(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const F=(e,t)=>new j({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class z{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new D(e,t,r),this.decoder=new U(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const q=e=>{let{name:t,prefix:r,encode:n,decode:i}=e;return new z(t,r,n,i)},H=e=>{let{prefix:t,name:r,alphabet:n}=e;const{encode:i,decode:o}=L(n,r);return q({prefix:t,name:r,encode:i,decode:e=>B(o(e))})},V=e=>{let{name:t,prefix:r,bitsPerChar:n,alphabet:i}=e;return q({prefix:r,name:t,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<r;)a-=r,o+=t[i&s>>a];if(a&&(o+=t[i&s<((e,t,r,n)=>{const i={};for(let l=0;l=8&&(s-=8,a[u++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a})(e,i,n,t)})},$=q({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var K=Object.freeze({__proto__:null,identity:$});const W=V({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var G=Object.freeze({__proto__:null,base2:W});const Q=V({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Y=Object.freeze({__proto__:null,base8:Q});const Z=H({prefix:"9",name:"base10",alphabet:"0123456789"});var J=Object.freeze({__proto__:null,base10:Z});const X=V({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),ee=V({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var te=Object.freeze({__proto__:null,base16:X,base16upper:ee});const re=V({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),ne=V({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),ie=V({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),oe=V({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ae=V({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),se=V({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),ce=V({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),ue=V({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),le=V({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var de=Object.freeze({__proto__:null,base32:re,base32upper:ne,base32pad:ie,base32padupper:oe,base32hex:ae,base32hexupper:se,base32hexpad:ce,base32hexpadupper:ue,base32z:le});const fe=H({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),he=H({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var pe=Object.freeze({__proto__:null,base36:fe,base36upper:he});const ge=H({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),me=H({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var ye=Object.freeze({__proto__:null,base58btc:ge,base58flickr:me});const ve=V({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),be=V({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),we=V({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Ae=V({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var _e=Object.freeze({__proto__:null,base64:ve,base64pad:be,base64url:we,base64urlpad:Ae});const Ee=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),Se=Ee.reduce(((e,t,r)=>(e[r]=t,e)),[]),ke=Ee.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]);const xe=q({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Se[t]),"")},decode:function(e){const t=[];for(const r of e){const e=ke[r.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}});var Ce=Object.freeze({__proto__:null,base256emoji:xe}),Ie=function e(t,r,n){r=r||[];for(var i=n=n||0;t>=Pe;)r[n++]=255&t|Te,t/=128;for(;t&Oe;)r[n++]=255&t|Te,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},Te=128,Oe=-128,Pe=Math.pow(2,31);var Me=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],i+=o<28?(n&Ne)<=Re);return e.bytes=a-r,i},Re=128,Ne=127;var Le=Math.pow(2,7),Be=Math.pow(2,14),De=Math.pow(2,21),Ue=Math.pow(2,28),je=Math.pow(2,35),Fe=Math.pow(2,42),ze=Math.pow(2,49),qe=Math.pow(2,56),He=Math.pow(2,63),Ve={encode:Ie,decode:Me,encodingLength:function(e){return e2&&void 0!==arguments[2]?arguments[2]:0;return $e.encode(e,t,r),t},We=e=>$e.encodingLength(e),Ge=(e,t)=>{const r=t.byteLength,n=We(e),i=n+We(r),o=new Uint8Array(i+r);return Ke(e,o,0),Ke(r,o,n),o.set(t,i),new Qe(e,r,t,o)};class Qe{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const Ye=e=>{let{name:t,code:r,encode:n}=e;return new Ze(t,r,n)};class Ze{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?Ge(this.code,t):t.then((e=>Ge(this.code,e)))}throw Error("Unknown type, must be binary type")}}const Je=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Xe=Ye({name:"sha2-256",code:18,encode:Je("SHA-256")}),et=Ye({name:"sha2-512",code:19,encode:Je("SHA-512")});Object.freeze({__proto__:null,sha256:Xe,sha512:et});const tt=B,rt={code:0,name:"identity",encode:tt,digest:e=>Ge(0,tt(e))};Object.freeze({__proto__:null,identity:rt});new TextEncoder,new TextDecoder;const nt={...K,...G,...Y,...J,...te,...de,...pe,...ye,..._e,...Ce};function it(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const ot=it("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),at=it("ascii","a",(e=>{let t="a";for(let r=0;r{const t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}((e=e.substring(1)).length);for(let r=0;r{if(!this.initialized){const e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();const t=this.keychain.get(e);if(typeof t>"u"){const{message:t}=(0,k.getInternalError)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=(0,f.U5)(t,this.name)}get context(){return(0,f.oI)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,(0,k.mapToObj)(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?(0,k.objToMap)(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=(0,k.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Jt{constructor(e,t,r){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>{this.isInitialized();const e=await this.getClientSeed(),t=S.generateKeyPair(e);return S.encodeIss(t.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const e=(0,k.generateKeyPair)();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=await this.getClientSeed(),r=S.generateKeyPair(t),n=(0,k.generateRandomBytes32)(),i=ht;return await S.signJWT(n,e,i,r)},this.generateSharedKey=(e,t,r)=>{this.isInitialized();const n=this.getPrivateKey(e),i=(0,k.deriveSymKey)(n,t);return this.setSymKey(i,r)},this.setSymKey=async(e,t)=>{this.isInitialized();const r=t||(0,k.hashKey)(e);return await this.keychain.set(r,e),r},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,r)=>{this.isInitialized();const n=(0,k.validateEncoding)(r),i=(0,E.h)(t);if((0,k.isTypeOneEnvelope)(n)){const t=n.senderPublicKey,r=n.receiverPublicKey;e=await this.generateSharedKey(t,r)}const o=this.getSymKey(e),{type:a,senderPublicKey:s}=n;return(0,k.encrypt)({type:a,symKey:o,message:i,senderPublicKey:s})},this.decode=async(e,t,r)=>{this.isInitialized();const n=(0,k.validateDecoding)(t,r);if((0,k.isTypeOneEnvelope)(n)){const t=n.receiverPublicKey,r=n.senderPublicKey;e=await this.generateSharedKey(t,r)}try{const r=this.getSymKey(e),n=(0,k.decrypt)({symKey:r,encoded:t});return(0,E.j)(n)}catch(p){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(p)}},this.getPayloadType=e=>{const t=(0,k.deserialize)(e);return(0,k.decodeTypeByte)(t.type)},this.getPayloadSenderPublicKey=e=>{const t=(0,k.deserialize)(e);return t.senderPublicKey?(0,x.dI)(t.senderPublicKey,k.BASE16):void 0},this.core=e,this.logger=(0,f.U5)(t,this.name),this.keychain=r||new Zt(this.core,this.logger)}get context(){return(0,f.oI)(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(ft)}catch{e=(0,k.generateRandomBytes32)(),await this.keychain.set(ft,e)}return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const r=st[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${e}`):globalThis.Buffer.from(e,"utf8")}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=(0,k.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Xt extends g{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=ut,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();const r=(0,k.hashMessage)(t);let n=this.messages.get(e);return typeof n>"u"&&(n={}),typeof n[r]<"u"||(n[r]=t,this.messages.set(e,n),await this.persist()),r},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>{this.isInitialized();return typeof this.get(e)[(0,k.hashMessage)(t)]<"u"},this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=(0,f.U5)(e,this.name),this.core=t}get context(){return(0,f.oI)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,(0,k.mapToObj)(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?(0,k.objToMap)(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=(0,k.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class er extends m{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new n.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,a.toMiliseconds)(a.ONE_MINUTE),this.failedPublishTimeout=(0,a.toMiliseconds)(a.ONE_SECOND),this.needsTransportRestart=!1,this.publish=async(e,t,r)=>{var n;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}});const i=r?.ttl||pt,o=(0,k.getRelayProtocolName)(r),a=r?.prompt||!1,s=r?.tag||0,c=r?.id||(0,C.getBigIntRpcId)().toString(),u={topic:e,message:t,opts:{ttl:i,relay:o,prompt:a,tag:s,id:c}},l=`Failed to publish payload, please try again. id:${c} tag:${s}`,d=Date.now();let f,h=1;try{for(;void 0===f;){if(Date.now()-d>this.publishTimeout)throw new Error(l);this.logger.trace({id:c,attempts:h},`publisher.publish - attempt ${h}`),f=await await(0,k.createExpiringPromise)(this.rpcPublish(e,t,i,o,a,s,c).catch((e=>this.logger.warn(e))),this.publishTimeout,l),h++,f||await new Promise((e=>setTimeout(e,this.failedPublishTimeout)))}this.relayer.events.emit(Et,u),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{id:c,topic:e,message:t,opts:r}})}catch(an){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(an),null!=(n=r?.internal)&&n.throwOnFailedPublish)throw an;this.queue.set(c,u)}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=(0,f.U5)(t,this.name),this.registerEventListeners()}get context(){return(0,f.oI)(this.logger)}rpcPublish(e,t,r,n,i,o,a){var s,c,u,l;const d={method:(0,k.getRelayProtocolApi)(n.protocol).publish,params:{topic:e,message:t,ttl:r,prompt:i,tag:o},id:a};return(0,k.isUndefined)(null==(s=d.params)?void 0:s.prompt)&&(null==(c=d.params)||delete c.prompt),(0,k.isUndefined)(null==(u=d.params)?void 0:u.tag)&&(null==(l=d.params)||delete l.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:d}),this.relayer.request(d)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{const{topic:t,message:r,opts:n}=e;await this.publish(t,r,n)}))}registerEventListeners(){this.relayer.core.heartbeat.on(l,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(_t);this.checkQueue()})),this.relayer.on(vt,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class tr{constructor(){this.map=new Map,this.set=(e,t)=>{const r=this.get(e);this.exists(e,t)||this.map.set(e,[...r,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;const r=this.get(e);if(!this.exists(e,t))return;const n=r.filter((e=>e!==t));n.length?this.map.set(e,n):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var rr=Object.defineProperty,nr=Object.defineProperties,ir=Object.getOwnPropertyDescriptors,or=Object.getOwnPropertySymbols,ar=Object.prototype.hasOwnProperty,sr=Object.prototype.propertyIsEnumerable,cr=(e,t,r)=>t in e?rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ur=(e,t)=>{for(var r in t||(t={}))ar.call(t,r)&&cr(e,r,t[r]);if(or)for(var r of or(t))sr.call(t,r)&&cr(e,r,t[r]);return e},lr=(e,t)=>nr(e,ir(t));class dr extends b{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new tr,this.events=new n.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=ut,this.subscribeTimeout=(0,a.toMiliseconds)(a.ONE_MINUTE),this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.pendingBatchMessages=[],this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{const r=(0,k.getRelayProtocolName)(t),n={topic:e,relay:r};this.pending.set(e,n);const i=await this.rpcSubscribe(e,r);return"string"==typeof i&&(this.onSubscribe(i,n),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}})),i}catch(r){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(r),r}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof t?.id<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>{if(this.topics.includes(e))return!0;const t=`${this.pendingSubscriptionWatchLabel}_${e}`;return await new Promise(((r,n)=>{const i=new a.Watch;i.start(t);const o=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(o),i.stop(t),r(!0)),i.elapsed(t)>=Rt&&(clearInterval(o),i.stop(t),n(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1))},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.start=async()=>{await this.onConnect()},this.stop=async()=>{await this.onDisconnect()},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=(0,f.U5)(t,this.name),this.clientId=""}get context(){return(0,f.oI)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let r=!1;try{r=this.getSubscription(e).topic===t}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const r=this.topicMap.get(e);await Promise.all(r.map((async r=>await this.unsubscribeById(e,r,t))))}async unsubscribeById(e,t,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}});try{const n=(0,k.getRelayProtocolName)(r);await this.rpcUnsubscribe(e,t,n);const i=(0,k.getSdkError)("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}})}catch(u){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(u),u}}async rpcSubscribe(e,t){const r={method:(0,k.getRelayProtocolApi)(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{return await await(0,k.createExpiringPromise)(this.relayer.request(r).catch((e=>this.logger.warn(e))),this.subscribeTimeout)?(0,k.hashMessage)(e+this.clientId):null}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(_t)}return null}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,r={method:(0,k.getRelayProtocolApi)(t.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{return await await(0,k.createExpiringPromise)(this.relayer.request(r).catch((e=>this.logger.warn(e))),this.subscribeTimeout)}catch{this.relayer.events.emit(_t)}}async rpcBatchFetchMessages(e){if(!e.length)return;const t=e[0].relay,r={method:(0,k.getRelayProtocolApi)(t.protocol).batchFetchMessages,params:{topics:e.map((e=>e.topic))}};let n;this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{n=await await(0,k.createExpiringPromise)(this.relayer.request(r).catch((e=>this.logger.warn(e))),this.subscribeTimeout)}catch{this.relayer.events.emit(_t)}return n}rpcUnsubscribe(e,t,r){const n={method:(0,k.getRelayProtocolApi)(r.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n}),this.relayer.request(n)}onSubscribe(e,t){this.setSubscription(e,lr(ur({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,ur({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,r){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,r),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t)}addSubscription(e,t){this.subscriptions.set(e,ur({},t)),this.topicMap.set(t.topic,e),this.events.emit(Tt,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:t}=(0,k.getInternalError)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(Ot,lr(ur({},r),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Pt)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=(0,k.getInternalError)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);(0,k.isValidArray)(t)&&this.onBatchSubscribe(t.map(((t,r)=>lr(ur({},e[r]),{id:t}))))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);const t=await this.rpcBatchFetchMessages(e);t&&t.messages&&(this.pendingBatchMessages=this.pendingBatchMessages.concat(t.messages))}async onConnect(){await this.restart(),this.onEnable()}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||!this.relayer.connected)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e),this.pendingBatchMessages.length&&(await this.relayer.handleBatchMessageEvents(this.pendingBatchMessages),this.pendingBatchMessages=[])}registerEventListeners(){this.relayer.core.heartbeat.on(l,(async()=>{await this.checkPending()})),this.events.on(Tt,(async e=>{const t=Tt;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(Ot,(async e=>{const t=Ot;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=(0,k.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}}var fr=Object.defineProperty,hr=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable,mr=(e,t,r)=>t in e?fr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class yr extends y{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new n.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","stalled","interrupted"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.heartBeatTimeout=(0,a.toMiliseconds)(a.THIRTY_SECONDS+a.ONE_SECOND),this.request=async e=>{var t,r;this.logger.debug("Publishing Request Payload");const n=e.id||(0,C.getBigIntRpcId)().toString();await this.toEstablishConnection();try{const i=this.provider.request(e);this.requestsInFlight.set(n,{promise:i,request:e}),this.logger.trace({id:n,method:e.method,topic:null==(t=e.params)?void 0:t.topic},"relayer.request - attempt to publish...");const o=await new Promise((async(e,t)=>{const r=()=>{t(new Error(`relayer.request - publish interrupted, id: ${n}`))};this.provider.on(xt,r);const o=await i;this.provider.off(xt,r),e(o)}));return this.logger.trace({id:n,method:e.method,topic:null==(r=e.params)?void 0:r.topic},"relayer.request - published"),o}catch(c){throw this.logger.debug(`Failed to Publish Request: ${n}`),c}finally{this.requestsInFlight.delete(n)}},this.resetPingTimeout=()=>{if((0,k.isNode)())try{clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout((()=>{var e,t,r;null==(r=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)||r.terminate()}),this.heartBeatTimeout)}catch(e){this.logger.warn(e)}},this.onPayloadHandler=e=>{this.onProviderPayload(e),this.resetPingTimeout()},this.onConnectHandler=()=>{this.startPingTimeout(),this.events.emit(bt)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(At,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(St,this.onPayloadHandler),this.provider.on(kt,this.onConnectHandler),this.provider.on(xt,this.onDisconnectHandler),this.provider.on(Ct,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?(0,f.U5)(e.logger,this.name):(0,f.h6)((0,f.iP)({level:e.logger||"error"})),this.messages=new Xt(this.logger,e.core),this.subscriber=new dr(this,this.logger),this.publisher=new er(this,this.logger),this.relayUrl=e?.relayUrl||gt,this.projectId=e.projectId,this.bundleId=(0,k.getBundleId)(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${mt}...`),await this.restartTransport(mt)}this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&0===this.subscriber.pending.size&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return(0,f.oI)(this.logger)}get connected(){var e,t,r;return 1===(null==(r=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:r.readyState)}get connecting(){var e,t,r;return 0===(null==(r=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:r.readyState)}async publish(e,t,r){this.isInitialized(),await this.publisher.publish(e,t,r),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var r;this.isInitialized();let n,i=(null==(r=this.subscriber.topicMap.get(e))?void 0:r[0])||"";const o=t=>{t.topic===e&&(this.subscriber.off(Tt,o),n())};return await Promise.all([new Promise((e=>{n=e,this.subscriber.on(Tt,o)})),new Promise((async r=>{i=await this.subscriber.subscribe(e,t)||i,r()}))]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportDisconnect(){if(!this.hasExperiencedNetworkDisruption&&this.connected&&this.requestsInFlight.size>0)try{await Promise.all(Array.from(this.requestsInFlight.values()).map((e=>e.promise)))}catch(e){this.logger.warn(e)}this.hasExperiencedNetworkDisruption||this.connected?await(0,k.createExpiringPromise)(this.provider.disconnect(),2e3,"provider.disconnect()").catch((()=>this.onProviderDisconnect())):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),await this.createProvider(),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;try{await new Promise((async(e,t)=>{const r=()=>{this.provider.off(xt,r),t(new Error("Connection interrupted while trying to subscribe"))};this.provider.on(xt,r),await(0,k.createExpiringPromise)(this.provider.connect(),(0,a.toMiliseconds)(a.ONE_MINUTE),`Socket stalled when trying to connect to ${this.relayUrl}`).catch((e=>{t(e)})),await this.subscriber.start(),this.hasExperiencedNetworkDisruption=!1,e()}))}catch(t){this.logger.error(t);const e=t;if(this.hasExperiencedNetworkDisruption=!0,!this.isConnectionStalled(e.message))throw t}finally{this.connectionAttemptInProgress=!1}}async restartTransport(e){this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await(0,k.isOnline)())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if(0===e?.length)return void this.logger.trace("Batch message events is empty. Ignoring...");const t=e.sort(((e,t)=>e.publishedAt-t.publishedAt));this.logger.trace(`Batch of ${t.length} message events sorted`);for(const r of t)try{await this.onMessageEvent(r)}catch(u){this.logger.warn(u)}this.logger.trace(`Batch of ${t.length} message events processed`)}startPingTimeout(){var e,t,r,n,i;if((0,k.isNode)())try{null!=(t=null==(e=this.provider)?void 0:e.connection)&&t.socket&&(null==(i=null==(n=null==(r=this.provider)?void 0:r.connection)?void 0:n.socket)||i.once("ping",(()=>{this.resetPingTimeout()}))),this.resetPingTimeout()}catch(c){this.logger.warn(c)}}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new I(new T.A((0,k.formatRelayRpcUrl)({sdkVersion:"2.13.3",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:r}=e;await this.messages.set(t,r)}async shouldIgnoreMessageEvent(e){const{topic:t,message:r}=e;if(!r||0===r.length)return this.logger.debug(`Ignoring invalid/empty message: ${r}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const n=this.messages.has(t,r);return n&&this.logger.debug(`Ignoring duplicate message: ${r}`),n}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),(0,C.isJsonRpcRequest)(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:r,message:n,publishedAt:i}=t.data,o={topic:r,message:n,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var r in t||(t={}))pr.call(t,r)&&mr(e,r,t[r]);if(hr)for(var r of hr(t))gr.call(t,r)&&mr(e,r,t[r]);return e})({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else(0,C.isJsonRpcResponse)(e)&&this.events.emit(vt,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(yt,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=(0,C.formatJsonRpcResult)(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(St,this.onPayloadHandler),this.provider.off(kt,this.onConnectHandler),this.provider.off(xt,this.onDisconnectHandler),this.provider.off(Ct,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await(0,k.isOnline)();(0,k.subscribeToNetworkChange)((async t=>{e!==t&&(e=t,t?await this.restartTransport().catch((e=>this.logger.error(e))):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}))}async onProviderDisconnect(){await this.subscriber.stop(),this.requestsInFlight.clear(),clearTimeout(this.pingTimeout),this.events.emit(wt),this.connectionAttemptInProgress=!1,!this.transportExplicitlyClosed&&setTimeout((async()=>{await this.transportOpen().catch((e=>this.logger.error(e)))}),(0,a.toMiliseconds)(It))}isInitialized(){if(!this.initialized){const{message:e}=(0,k.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){await this.confirmOnlineStateOrThrow(),!this.connected&&(this.connectionAttemptInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)})),await this.transportOpen())}}var vr=Object.defineProperty,br=Object.getOwnPropertySymbols,wr=Object.prototype.hasOwnProperty,Ar=Object.prototype.propertyIsEnumerable,_r=(e,t,r)=>t in e?vr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Er=(e,t)=>{for(var r in t||(t={}))wr.call(t,r)&&_r(e,r,t[r]);if(br)for(var r of br(t))Ar.call(t,r)&&_r(e,r,t[r]);return e};class Sr extends v{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ut,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;super(e,t,r,n),this.core=e,this.logger=t,this.name=r,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=ut,this.recentlyDeleted=[],this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!(0,k.isUndefined)(e)?this.map.set(this.getKey(e),e):(0,k.isProposalStruct)(e)?this.map.set(e.id,e):(0,k.isSessionStruct)(e)&&this.map.set(e.topic,e)})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((r=>P()(t[r],e[r]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});const r=Er(Er({},this.getData(e)),t);this.map.set(e,r),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),this.addToRecentlyDeleted(e),await this.persist())},this.logger=(0,f.U5)(t,this.name),this.storagePrefix=n,this.getKey=i}get context(){return(0,f.oI)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){if(this.recentlyDeleted.includes(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}const{message:t}=(0,k.getInternalError)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:e}=(0,k.getInternalError)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=(0,k.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class kr{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new(i()),this.initialized=!1,this.storagePrefix=ut,this.ignoredPayloadTypes=[k.TYPE_1],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=e=>{let{methods:t}=e;this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...t])]},this.create=async e=>{this.isInitialized();const t=(0,k.generateRandomBytes32)(),r=await this.core.crypto.setSymKey(t),n=(0,k.calcExpiry)(a.FIVE_MINUTES),i={protocol:"irn"},o={topic:r,expiry:n,relay:i,active:!1},s=(0,k.formatUri)({protocol:this.core.protocol,version:this.core.version,topic:r,symKey:t,relay:i,expiryTimestamp:n,methods:e?.methods});return this.core.expirer.set(r,n),await this.pairings.set(r,o),await this.core.relayer.subscribe(r),{topic:r,uri:s}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:r,relay:n,expiryTimestamp:i,methods:o}=(0,k.parseUri)(e.uri);let s;if(this.pairings.keys.includes(t)&&(s=this.pairings.get(t),s.active))throw new Error(`Pairing already exists: ${t}. Please try again with a new connection URI.`);const c=i||(0,k.calcExpiry)(a.FIVE_MINUTES),u={topic:t,relay:n,expiry:c,active:!1,methods:o};return this.core.expirer.set(t,c),await this.pairings.set(t,u),e.activatePairing&&await this.activate({topic:t}),this.events.emit(Lt,u),this.core.crypto.keychain.has(t)||await this.core.crypto.setSymKey(r,t),await this.core.relayer.subscribe(t,{relay:n}),u},this.activate=async e=>{let{topic:t}=e;this.isInitialized();const r=(0,k.calcExpiry)(a.THIRTY_DAYS);this.core.expirer.set(t,r),await this.pairings.update(t,{active:!0,expiry:r})},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.pairings.keys.includes(t)){const e=await this.sendRequest(t,"wc_pairingPing",{}),{done:r,resolve:n,reject:i}=(0,k.createDelayedPromise)();this.events.once((0,k.engineEvent)("pairing_ping",e),(e=>{let{error:t}=e;t?i(t):n()})),await r()}},this.updateExpiry=async e=>{let{topic:t,expiry:r}=e;this.isInitialized(),await this.pairings.update(t,{expiry:r})},this.updateMetadata=async e=>{let{topic:t,metadata:r}=e;this.isInitialized(),await this.pairings.update(t,{peerMetadata:r})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",(0,k.getSdkError)("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,r)=>{const n=(0,C.formatJsonRpcRequest)(t,r),i=await this.core.crypto.encode(e,n),o=Nt[t].req;return this.core.history.set(e,n),this.core.relayer.publish(e,i,o),n.id},this.sendResult=async(e,t,r)=>{const n=(0,C.formatJsonRpcResult)(e,r),i=await this.core.crypto.encode(t,n),o=await this.core.history.get(t,e),a=Nt[o.request.method].res;await this.core.relayer.publish(t,i,a),await this.core.history.resolve(n)},this.sendError=async(e,t,r)=>{const n=(0,C.formatJsonRpcError)(e,r),i=await this.core.crypto.encode(t,n),o=await this.core.history.get(t,e),a=Nt[o.request.method]?Nt[o.request.method].res:Nt.unregistered_method.res;await this.core.relayer.publish(t,i,a),await this.core.history.resolve(n)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,(0,k.getSdkError)("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{const e=this.pairings.getAll().filter((e=>(0,k.isExpired)(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{const{topic:t,payload:r}=e;switch(r.method){case"wc_pairingPing":return this.onPairingPingRequest(t,r);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,r);default:return this.onUnknownRpcMethodRequest(t,r)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:r}=e,n=(await this.core.history.get(t,r.id)).request.method;return"wc_pairingPing"===n?this.onPairingPingResponse(t,r):this.onUnknownRpcMethodResponse(n)},this.onPairingPingRequest=async(e,t)=>{const{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult(r,e,!0),this.events.emit(Ut,{id:r,topic:e})}catch(c){await this.sendError(r,e,c),this.logger.error(c)}},this.onPairingPingResponse=(e,t)=>{const{id:r}=t;setTimeout((()=>{(0,C.isJsonRpcResult)(t)?this.events.emit((0,k.engineEvent)("pairing_ping",r),{}):(0,C.isJsonRpcError)(t)&&this.events.emit((0,k.engineEvent)("pairing_ping",r),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{const{id:r}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(Dt,{id:r,topic:e})}catch(c){await this.sendError(r,e,c),this.logger.error(c)}},this.onUnknownRpcMethodRequest=async(e,t)=>{const{id:r,method:n}=t;try{if(this.registeredMethods.includes(n))return;const t=(0,k.getSdkError)("WC_METHOD_UNSUPPORTED",n);await this.sendError(r,e,t),this.logger.error(t)}catch(g){await this.sendError(r,e,g),this.logger.error(g)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error((0,k.getSdkError)("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!(0,k.isValidUrl)(e.uri)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}const r=(0,k.parseUri)(e.uri);if(null==(t=r?.relay)||!t.protocol){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==r||!r.symKey){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}if(null!=r&&r.expiryTimestamp&&(0,a.toMiliseconds)(r?.expiryTimestamp){if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!(0,k.isValidString)(e,!1)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=(0,k.getInternalError)("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if((0,k.isExpired)(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=(0,k.getInternalError)("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=(0,f.U5)(t,this.name),this.pairings=new Sr(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,f.oI)(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=(0,k.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(yt,(async e=>{const{topic:t,message:r}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))return;const n=await this.core.crypto.decode(t,r);try{(0,C.isJsonRpcRequest)(n)?(this.core.history.set(t,n),this.onRelayEventRequest({topic:t,payload:n})):(0,C.isJsonRpcResponse)(n)&&(await this.core.history.resolve(n),await this.onRelayEventResponse({topic:t,payload:n}),this.core.history.delete(t,n.id))}catch(i){this.logger.error(i)}}))}registerExpirerEvents(){this.core.expirer.on($t,(async e=>{const{topic:t}=(0,k.parseExpirerTarget)(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(Bt,{topic:t}))}))}}class xr extends p{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new n.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=ut,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,r)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:r}),this.records.has(t.id))return;const n={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:r,expiry:(0,k.calcExpiry)(a.THIRTY_DAYS)};this.records.set(n.id,n),this.persist(),this.events.emit(jt,n)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;const t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=(0,C.isJsonRpcError)(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.persist(),this.events.emit(Ft,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((r=>{if(r.topic===e){if(typeof t<"u"&&r.id!==t)return;this.records.delete(r.id),this.events.emit(zt,r)}})),this.persist()},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=(0,f.U5)(t,this.name)}get context(){return(0,f.oI)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;const r={topic:t.topic,request:(0,C.formatJsonRpcRequest)(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(r)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:t}=(0,k.getInternalError)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(qt)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=(0,k.getInternalError)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(jt,(e=>{const t=jt;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})})),this.events.on(Ft,(e=>{const t=Ft;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})})),this.events.on(zt,(e=>{const t=zt;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})})),this.core.heartbeat.on(l,(()=>{this.cleanup()}))}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach((t=>{(0,a.toMiliseconds)(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.records.delete(t.id),this.events.emit(zt,t,!1),e=!0)})),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=(0,k.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Cr extends w{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new n.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=ut,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{const t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();const r=this.formatTarget(e),n={target:r,expiry:t};this.expirations.set(r,n),this.checkExpiry(r,n),this.events.emit(Ht,{target:r,expiration:n})},this.get=e=>{this.isInitialized();const t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){const t=this.formatTarget(e),r=this.getExpiration(t);this.expirations.delete(t),this.events.emit(Vt,{target:t,expiration:r})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=(0,f.U5)(t,this.name)}get context(){return(0,f.oI)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return(0,k.formatTopicTarget)(e);if("number"==typeof e)return(0,k.formatIdTarget)(e);const{message:t}=(0,k.getInternalError)("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Kt)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=(0,k.getInternalError)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:t}=(0,k.getInternalError)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:r}=t;(0,a.toMiliseconds)(r)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit($t,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(l,(()=>this.checkExpirations())),this.events.on(Ht,(e=>{const t=Ht;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on($t,(e=>{const t=$t;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(Vt,(e=>{const t=Vt;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=(0,k.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Ir extends A{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=Wt,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||(0,k.isReactNative)()||!(0,k.isBrowser)())return;const t=this.getVerifyUrl(e?.verifyUrl);this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(r){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(r)}if(!this.initialized){this.removeIframe(),this.verifyUrl=Qt;try{await this.createIframe()}catch(r){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(r),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{if(this.isDevEnv)return"";const t=this.getVerifyUrl(e?.verifyUrl);let r;try{r=await this.fetchAttestation(e.attestationId,t)}catch(c){this.logger.info(`failed to resolve attestation: ${e.attestationId} from url: ${t}`),this.logger.info(c),r=await this.fetchAttestation(e.attestationId,Qt)}return r},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);const r=this.startAbortTimer(2*a.ONE_SECOND),n=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(r),200===n.status?await n.json():void 0},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach((e=>this.sendPost(e))),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e;const t=r=>{"verify_ready"===r.data&&(this.onInit(),window.removeEventListener("message",t),e())};await Promise.race([new Promise((r=>{const n=document.getElementById(Wt);if(n)return this.iframe=n,this.onInit(),r();window.addEventListener("message",t);const i=document.createElement("iframe");i.id=Wt,i.src=`${this.verifyUrl}/${this.projectId}`,i.style.display="none",document.body.append(i),this.iframe=i,e=r})),new Promise(((e,r)=>setTimeout((()=>{window.removeEventListener("message",t),r("verify iframe load timeout")}),(0,a.toMiliseconds)(a.FIVE_SECONDS))))])},this.onInit=()=>{this.initialized=!0,this.processQueue()},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||Gt;return Yt.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${Gt}`),t=Gt),t},this.logger=(0,f.U5)(t,this.name),this.verifyUrl=Gt,this.abortController=new AbortController,this.isDevEnv=(0,k.isNode)()&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_ENV_VALUE:"prod",REACT_APP_ENV_DOMAIN:"ludo.com",REACT_APP_STATIC_DOMAIN:"ludo.com",REACT_APP_PROJECT_ID:"0ed0fee8b164ad80bcc7d706a7bde9cd",REACT_APP_ROBOTS_ENV:"follow",REACT_APP_WEB3_AUTH_CLIENT_ID:"BLBEu5HlaSvmdvNbz_KHuF4yczw64O2V4xfQyY0gl1xfNV2br56Huey8OXepYUh0D1-RyOnW7lldCV8r17YmjsQ",REACT_APP_DISCORD_VERIFIER:"discord-ludo-prod-verifier",REACT_APP_DISCORD_CLIENT_ID:"1296374001668718652",REACT_APP_EMAIL_VERIFIER:"email-ludo-verifier",REACT_APP_SMS_VERIFIER:"sms-ludo-verifier",REACT_APP_GOOGLE_VERIFIER:"google-ludo-verifier",REACT_APP_GOOGLE_CLIENT_ID:"295347577004-ol4ksmq4ivb4g3t0bna2btti2s9mv5hh.apps.googleusercontent.com"}.IS_VITEST}get context(){return(0,f.oI)(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),(0,a.toMiliseconds)(e))}}class Tr extends _{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context="echo",this.registerDeviceToken=async e=>{const{clientId:t,token:r,notificationType:n,enableEncrypted:i=!1}=e,o=`https://echo.walletconnect.com/${this.projectId}/clients`;await R()(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:n,token:r,always_raw:i})})},this.logger=(0,f.U5)(t,this.context)}}var Or=Object.defineProperty,Pr=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,Nr=(e,t,r)=>t in e?Or(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lr=(e,t)=>{for(var r in t||(t={}))Mr.call(t,r)&&Nr(e,r,t[r]);if(Pr)for(var r of Pr(t))Rr.call(t,r)&&Nr(e,r,t[r]);return e};class Br extends h{constructor(e){var t;super(e),this.protocol="wc",this.version=2,this.name=ct,this.events=new n.EventEmitter,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||gt,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const r=(0,f.iP)({level:"string"==typeof e?.logger&&e.logger?e.logger:lt}),{logger:i,chunkLoggerController:a}=(0,f.D5)({opts:r,maxSizeInBytes:e?.maxLogBlobSizeInBytes,loggerOverride:e?.logger});this.logChunkController=a,null!=(t=this.logChunkController)&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var e,t;null!=(e=this.logChunkController)&&e.downloadLogsBlobInBrowser&&(null==(t=this.logChunkController)||t.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=(0,f.U5)(i,this.name),this.heartbeat=new d,this.crypto=new Jt(this,this.logger,e?.keychain),this.history=new xr(this,this.logger),this.expirer=new Cr(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new o.A(Lr(Lr({},dt),e?.storageOptions)),this.relayer=new yr({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new kr(this,this.logger),this.verify=new Ir(this.projectId||"",this.logger),this.echoClient=new Tr(this.projectId||"",this.logger)}static async init(e){const t=new Br(e);await t.initialize();const r=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",r),t}get context(){return(0,f.oI)(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return null==(e=this.logChunkController)?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const Dr=Br;s.H;s.H;s.H;s.H;s.H;s.H;i();class Ur{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}n.EventEmitter;class jr{constructor(e){this.client=e}}const Fr="wc",zr=2,qr="client",Hr=`${Fr}@${zr}:${qr}:`,Vr={name:qr,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},$r={session_proposal:"session_proposal",session_update:"session_update",session_extend:"session_extend",session_ping:"session_ping",session_delete:"session_delete",session_expire:"session_expire",session_request:"session_request",session_request_sent:"session_request_sent",session_event:"session_event",proposal_expire:"proposal_expire",session_authenticate:"session_authenticate",session_request_expire:"session_request_expire"},Kr={database:":memory:"},Wr="WALLETCONNECT_DEEPLINK_CHOICE",Gr={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},Qr="history",Yr="0.3",Zr="proposal",Jr=a.THIRTY_DAYS,Xr="Proposal expired",en="session",tn=a.SEVEN_DAYS,rn="engine",nn={wc_sessionPropose:{req:{ttl:a.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:a.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:a.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:a.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:a.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:a.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:a.ONE_DAY,prompt:!1,tag:1104},res:{ttl:a.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:a.ONE_DAY,prompt:!1,tag:1106},res:{ttl:a.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:a.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:a.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:a.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:a.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:a.ONE_DAY,prompt:!1,tag:1112},res:{ttl:a.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:a.ONE_DAY,prompt:!1,tag:1114},res:{ttl:a.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:a.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:a.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:a.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:a.FIVE_MINUTES,prompt:!1,tag:1119}}},on={min:a.FIVE_MINUTES,max:a.SEVEN_DAYS},an={idle:"IDLE",active:"ACTIVE"},sn="request",cn=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"],un="wc",ln=1.5,dn="auth",fn="authKeys",hn="pairingTopics",pn="requests",gn=`${un}@1.5:${dn}:`,mn=`${gn}:PUB_KEY`;var yn=Object.defineProperty,vn=Object.defineProperties,bn=Object.getOwnPropertyDescriptors,wn=Object.getOwnPropertySymbols,An=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable,En=(e,t,r)=>t in e?yn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sn=(e,t)=>{for(var r in t||(t={}))An.call(t,r)&&En(e,r,t[r]);if(wn)for(var r of wn(t))_n.call(t,r)&&En(e,r,t[r]);return e},kn=(e,t)=>vn(e,bn(t));class xn extends jr{constructor(e){var t;super(e),t=this,this.name=rn,this.events=new(i()),this.initialized=!1,this.requestQueue={state:an.idle,queue:[]},this.sessionRequestQueue={state:an.idle,queue:[]},this.requestQueueDelay=a.ONE_SECOND,this.expectedPairingMethodMap=new Map,this.recentlyDeletedMap=new Map,this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(nn)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),(0,a.toMiliseconds)(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=kn(Sn({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:r,requiredNamespaces:n,optionalNamespaces:i,sessionProperties:o,relays:s}=t;let c,u=r,l=!1;try{u&&(l=this.client.core.pairing.pairings.get(u).active)}catch(_){throw this.client.logger.error(`connect() -> pairing.get(${u}) failed`),_}if(!u||!l){const{topic:e,uri:t}=await this.client.core.pairing.create();u=e,c=t}if(!u){const{message:e}=(0,k.getInternalError)("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error(e)}const d=await this.client.core.crypto.generateKeyPair(),f=nn.wc_sessionPropose.req.ttl||a.FIVE_MINUTES,h=(0,k.calcExpiry)(f),p=Sn({requiredNamespaces:n,optionalNamespaces:i,relays:s??[{protocol:"irn"}],proposer:{publicKey:d,metadata:this.client.metadata},expiryTimestamp:h,pairingTopic:u},o&&{sessionProperties:o}),{reject:g,resolve:m,done:y}=(0,k.createDelayedPromise)(f,Xr);this.events.once((0,k.engineEvent)("session_connect"),(async e=>{let{error:t,session:r}=e;if(t)g(t);else if(r){r.self.publicKey=d;const e=kn(Sn({},r),{pairingTopic:p.pairingTopic,requiredNamespaces:p.requiredNamespaces,optionalNamespaces:p.optionalNamespaces});await this.client.session.set(r.topic,e),await this.setExpiry(r.topic,r.expiry),u&&await this.client.core.pairing.updateMetadata({topic:u,metadata:r.peer.metadata}),this.cleanupDuplicatePairings(e),m(e)}}));const v=await this.sendRequest({topic:u,method:"wc_sessionPropose",params:p,throwOnFailedPublish:!0});return await this.setProposal(v,Sn({id:v},p)),{uri:c,approval:y}},this.pair=async e=>{await this.isInitialized();try{return await this.client.core.pairing.pair(e)}catch(t){throw this.client.logger.error("pair() failed"),t}},this.approve=async e=>{await this.isInitialized();try{await this.isValidApprove(e)}catch(m){throw this.client.logger.error("approve() -> isValidApprove() failed"),m}const{id:t,relayProtocol:r,namespaces:n,sessionProperties:i,sessionConfig:o}=e;let a;try{a=this.client.proposal.get(t)}catch(m){throw this.client.logger.error(`approve() -> proposal.get(${t}) failed`),m}const{pairingTopic:s,proposer:c,requiredNamespaces:u,optionalNamespaces:l}=a,d=await this.client.core.crypto.generateKeyPair(),f=c.publicKey,h=await this.client.core.crypto.generateSharedKey(d,f),p=Sn(Sn({relay:{protocol:r??"irn"},namespaces:n,controller:{publicKey:d,metadata:this.client.metadata},expiry:(0,k.calcExpiry)(tn)},i&&{sessionProperties:i}),o&&{sessionConfig:o});await this.client.core.relayer.subscribe(h);const g=kn(Sn({},p),{topic:h,requiredNamespaces:u,optionalNamespaces:l,pairingTopic:s,acknowledged:!1,self:p.controller,peer:{publicKey:c.publicKey,metadata:c.metadata},controller:d});await this.client.session.set(h,g);try{await this.sendResult({id:t,topic:s,result:{relay:{protocol:r??"irn"},responderPublicKey:d},throwOnFailedPublish:!0}),await this.sendRequest({topic:h,method:"wc_sessionSettle",params:p,throwOnFailedPublish:!0})}catch(m){throw this.client.logger.error(m),this.client.session.delete(h,(0,k.getSdkError)("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(h),m}return await this.client.core.pairing.updateMetadata({topic:s,metadata:c.metadata}),await this.client.proposal.delete(t,(0,k.getSdkError)("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:s}),await this.setExpiry(h,(0,k.calcExpiry)(tn)),{topic:h,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(h))),500)))}},this.reject=async e=>{await this.isInitialized();try{await this.isValidReject(e)}catch(i){throw this.client.logger.error("reject() -> isValidReject() failed"),i}const{id:t,reason:r}=e;let n;try{n=this.client.proposal.get(t).pairingTopic}catch(i){throw this.client.logger.error(`reject() -> proposal.get(${t}) failed`),i}n&&(await this.sendError({id:t,topic:n,error:r,rpcOpts:nn.wc_sessionPropose.reject}),await this.client.proposal.delete(t,(0,k.getSdkError)("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized();try{await this.isValidUpdate(e)}catch(b){throw this.client.logger.error("update() -> isValidUpdate() failed"),b}const{topic:t,namespaces:r}=e,{done:n,resolve:i,reject:o}=(0,k.createDelayedPromise)(),a=(0,C.payloadId)(),s=(0,C.getBigIntRpcId)().toString(),c=this.client.session.get(t).namespaces;return this.events.once((0,k.engineEvent)("session_update",a),(e=>{let{error:t}=e;t?o(t):i()})),await this.client.session.update(t,{namespaces:r}),await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:r},throwOnFailedPublish:!0,clientRpcId:a,relayRpcId:s}).catch((e=>{this.client.logger.error(e),this.client.session.update(t,{namespaces:c}),o(e)})),{acknowledged:n}},this.extend=async e=>{await this.isInitialized();try{await this.isValidExtend(e)}catch(g){throw this.client.logger.error("extend() -> isValidExtend() failed"),g}const{topic:t}=e,r=(0,C.payloadId)(),{done:n,resolve:i,reject:o}=(0,k.createDelayedPromise)();return this.events.once((0,k.engineEvent)("session_extend",r),(e=>{let{error:t}=e;t?o(t):i()})),await this.setExpiry(t,(0,k.calcExpiry)(tn)),this.sendRequest({topic:t,method:"wc_sessionExtend",params:{},clientRpcId:r,throwOnFailedPublish:!0}).catch((e=>{o(e)})),{acknowledged:n}},this.request=async e=>{await this.isInitialized();try{await this.isValidRequest(e)}catch(v){throw this.client.logger.error("request() -> isValidRequest() failed"),v}const{chainId:t,request:r,topic:n,expiry:i=nn.wc_sessionRequest.req.ttl}=e,o=this.client.session.get(n),a=(0,C.payloadId)(),s=(0,C.getBigIntRpcId)().toString(),{done:c,resolve:u,reject:l}=(0,k.createDelayedPromise)(i,"Request expired. Please try again.");return this.events.once((0,k.engineEvent)("session_request",a),(e=>{let{error:t,result:r}=e;t?l(t):u(r)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:a,relayRpcId:s,topic:n,method:"wc_sessionRequest",params:{request:kn(Sn({},r),{expiryTimestamp:(0,k.calcExpiry)(i)}),chainId:t},expiry:i,throwOnFailedPublish:!0}).catch((e=>l(e))),this.client.events.emit("session_request_sent",{topic:n,request:r,chainId:t,id:a}),e()})),new Promise((async e=>{var t;if(null==(t=o.sessionConfig)||!t.disableDeepLink){const e=await(0,k.getDeepLink)(this.client.core.storage,Wr);(0,k.handleDeeplinkRedirect)({id:a,topic:n,wcDeepLink:e})}e()})),c()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:r}=e,{id:n}=r;(0,C.isJsonRpcResult)(r)?await this.sendResult({id:n,topic:t,result:r.result,throwOnFailedPublish:!0}):(0,C.isJsonRpcError)(r)&&await this.sendError({id:n,topic:t,error:r.error}),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized();try{await this.isValidPing(e)}catch(u){throw this.client.logger.error("ping() -> isValidPing() failed"),u}const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=(0,C.payloadId)(),r=(0,C.getBigIntRpcId)().toString(),{done:n,resolve:i,reject:o}=(0,k.createDelayedPromise)();this.events.once((0,k.engineEvent)("session_ping",e),(e=>{let{error:t}=e;t?o(t):i()})),await Promise.all([this.sendRequest({topic:t,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:e,relayRpcId:r}),n()])}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:r,chainId:n}=e,i=(0,C.getBigIntRpcId)().toString();await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:r,chainId:n},throwOnFailedPublish:!0,relayRpcId:i})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:"wc_sessionDelete",params:(0,k.getSdkError)("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else{if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:e}=(0,k.getInternalError)("MISMATCHED_TOPIC",`Session or pairing topic not found: ${t}`);throw new Error(e)}await this.client.core.pairing.disconnect({topic:t})}},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>(0,k.isSessionCompatible)(t,e)))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.authenticate=async e=>{this.isInitialized(),this.isValidAuthenticate(e);const{chains:t,statement:r="",uri:n,domain:i,nonce:o,type:a,exp:s,nbf:c,methods:u=[],expiry:l}=e,d=[...e.resources||[]],{topic:f,uri:h}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"]});this.client.logger.info({message:"Generated new pairing",pairing:{topic:f,uri:h}});const p=await this.client.core.crypto.generateKeyPair(),g=(0,k.hashKey)(p);if(await Promise.all([this.client.auth.authKeys.set(mn,{responseTopic:g,publicKey:p}),this.client.auth.pairingTopics.set(g,{topic:g,pairingTopic:f})]),await this.client.core.relayer.subscribe(g),this.client.logger.info(`sending request to new pairing topic: ${f}`),u.length>0){const{namespace:e}=(0,k.parseChainId)(t[0]);let r=(0,k.createEncodedRecap)(e,"request",u);(0,k.getRecapFromResources)(d)&&(r=(0,k.mergeEncodedRecaps)(r,d.pop())),d.push(r)}const m=l&&l>nn.wc_sessionAuthenticate.req.ttl?l:nn.wc_sessionAuthenticate.req.ttl,y={authPayload:{type:a??"caip122",chains:t,statement:r,aud:n,domain:i,version:"1",nonce:o,iat:(new Date).toISOString(),exp:s,nbf:c,resources:d},requester:{publicKey:p,metadata:this.client.metadata},expiryTimestamp:(0,k.calcExpiry)(m)},v={requiredNamespaces:{},optionalNamespaces:{eip155:{chains:t,methods:[...new Set(["personal_sign",...u])],events:["chainChanged","accountsChanged"]}},relays:[{protocol:"irn"}],pairingTopic:f,proposer:{publicKey:p,metadata:this.client.metadata},expiryTimestamp:(0,k.calcExpiry)(nn.wc_sessionPropose.req.ttl)},{done:b,resolve:w,reject:A}=(0,k.createDelayedPromise)(m,"Request expired"),_=async e=>{let{error:t,session:r}=e;if(this.events.off((0,k.engineEvent)("session_request",S),E),t)A(t);else if(r){r.self.publicKey=p,await this.client.session.set(r.topic,r),await this.setExpiry(r.topic,r.expiry),f&&await this.client.core.pairing.updateMetadata({topic:f,metadata:r.peer.metadata});const e=this.client.session.get(r.topic);await this.deleteProposal(x),w({session:e})}},E=async e=>{if(await this.deletePendingAuthRequest(S,{message:"fulfilled",code:0}),e.error){const t=(0,k.getSdkError)("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return e.error.code===t.code?void 0:(this.events.off((0,k.engineEvent)("session_connect"),_),A(e.error.message))}await this.deleteProposal(x),this.events.off((0,k.engineEvent)("session_connect"),_);const{cacaos:t,responder:r}=e.result,n=[],i=[];for(const s of t){await(0,k.validateSignedCacao)({cacao:s,projectId:this.client.core.projectId})||(this.client.logger.error(s,"Signature verification failed"),A((0,k.getSdkError)("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:e}=s,t=(0,k.getRecapFromResources)(e.resources),r=[(0,k.getNamespacedDidChainId)(e.iss)],o=(0,k.getDidAddress)(e.iss);if(t){const e=(0,k.getMethodsFromRecap)(t),i=(0,k.getChainsFromRecap)(t);n.push(...e),r.push(...i)}for(const n of r)i.push(`${n}:${o}`)}const o=await this.client.core.crypto.generateSharedKey(p,r.publicKey);let a;n.length>0&&(a={topic:o,acknowledged:!0,self:{publicKey:p,metadata:this.client.metadata},peer:r,controller:r.publicKey,expiry:(0,k.calcExpiry)(tn),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:f,namespaces:(0,k.buildNamespacesFromAuth)([...new Set(n)],[...new Set(i)])},await this.client.core.relayer.subscribe(o),await this.client.session.set(o,a),a=this.client.session.get(o)),w({auths:t,session:a})},S=(0,C.payloadId)(),x=(0,C.payloadId)();this.events.once((0,k.engineEvent)("session_connect"),_),this.events.once((0,k.engineEvent)("session_request",S),E);try{await Promise.all([this.sendRequest({topic:f,method:"wc_sessionAuthenticate",params:y,expiry:e.expiry,throwOnFailedPublish:!0,clientRpcId:S}),this.sendRequest({topic:f,method:"wc_sessionPropose",params:v,expiry:nn.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:x})])}catch(I){throw this.events.off((0,k.engineEvent)("session_connect"),_),this.events.off((0,k.engineEvent)("session_request",S),E),I}return await this.setProposal(x,Sn({id:x},v)),await this.setAuthRequest(S,{request:kn(Sn({},y),{verifyContext:{}}),pairingTopic:f}),{uri:h,response:b}},this.approveSessionAuthenticate=async e=>{this.isInitialized();const{id:t,auths:r}=e,n=this.getPendingAuthRequest(t);if(!n)throw new Error(`Could not find pending auth request with id ${t}`);const i=n.requester.publicKey,o=await this.client.core.crypto.generateKeyPair(),a=(0,k.hashKey)(i),s={type:k.TYPE_1,receiverPublicKey:i,senderPublicKey:o},c=[],u=[];for(const f of r){if(!await(0,k.validateSignedCacao)({cacao:f,projectId:this.client.core.projectId})){const e=(0,k.getSdkError)("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:t,topic:a,error:e,encodeOpts:s}),new Error(e.message)}const{p:e}=f,r=(0,k.getRecapFromResources)(e.resources),n=[(0,k.getNamespacedDidChainId)(e.iss)],i=(0,k.getDidAddress)(e.iss);if(r){const e=(0,k.getMethodsFromRecap)(r),t=(0,k.getChainsFromRecap)(r);c.push(...e),n.push(...t)}for(const t of n)u.push(`${t}:${i}`)}const l=await this.client.core.crypto.generateSharedKey(o,i);let d;return c?.length>0&&(d={topic:l,acknowledged:!0,self:{publicKey:o,metadata:this.client.metadata},peer:{publicKey:i,metadata:n.requester.metadata},controller:i,expiry:(0,k.calcExpiry)(tn),authentication:r,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:"",namespaces:(0,k.buildNamespacesFromAuth)([...new Set(c)],[...new Set(u)])},await this.client.core.relayer.subscribe(l),await this.client.session.set(l,d)),await this.sendResult({topic:a,id:t,result:{cacaos:r,responder:{publicKey:o,metadata:this.client.metadata}},encodeOpts:s,throwOnFailedPublish:!0}),await this.client.auth.requests.delete(t,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:n.pairingTopic}),{session:d}},this.rejectSessionAuthenticate=async e=>{await this.isInitialized();const{id:t,reason:r}=e,n=this.getPendingAuthRequest(t);if(!n)throw new Error(`Could not find pending auth request with id ${t}`);const i=n.requester.publicKey,o=await this.client.core.crypto.generateKeyPair(),a=(0,k.hashKey)(i),s={type:k.TYPE_1,receiverPublicKey:i,senderPublicKey:o};await this.sendError({id:t,topic:a,error:r,encodeOpts:s,rpcOpts:nn.wc_sessionAuthenticate.reject}),await this.client.auth.requests.delete(t,{message:"rejected",code:0}),await this.client.proposal.delete(t,(0,k.getSdkError)("USER_DISCONNECTED"))},this.formatAuthMessage=e=>{this.isInitialized();const{request:t,iss:r}=e;return(0,k.formatMessage)(t,r)},this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),r=this.client.core.pairing.pairings.getAll().filter((r=>{var n,i;return(null==(n=r.peerMetadata)?void 0:n.url)&&(null==(i=r.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&r.topic&&r.topic!==t.topic}));if(0===r.length)return;this.client.logger.info(`Cleaning up ${r.length} duplicate pairing(s)`),await Promise.all(r.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(t){this.client.logger.error(t)}},this.deleteSession=async e=>{var t;const{topic:r,expirerHasDeleted:n=!1,emitEvent:i=!0,id:o=0}=e,{self:a}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),await this.client.session.delete(r,(0,k.getSdkError)("USER_DISCONNECTED")),this.addToRecentlyDeleted(r,"session"),this.client.core.crypto.keychain.has(a.publicKey)&&await this.client.core.crypto.deleteKeyPair(a.publicKey),this.client.core.crypto.keychain.has(r)&&await this.client.core.crypto.deleteSymKey(r),n||this.client.core.expirer.del(r),this.client.core.storage.removeItem(Wr).catch((e=>this.client.logger.warn(e))),this.getPendingSessionRequests().forEach((e=>{e.topic===r&&this.deletePendingSessionRequest(e.id,(0,k.getSdkError)("USER_DISCONNECTED"))})),r===(null==(t=this.sessionRequestQueue.queue[0])?void 0:t.topic)&&(this.sessionRequestQueue.state=an.idle),i&&this.client.events.emit("session_delete",{id:o,topic:r})},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,(0,k.getSdkError)("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,"proposal")},this.deletePendingSessionRequest=async function(e,r){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];await Promise.all([t.client.pendingRequest.delete(e,r),n?Promise.resolve():t.client.core.expirer.del(e)]),t.addToRecentlyDeleted(e,"request"),t.sessionRequestQueue.queue=t.sessionRequestQueue.queue.filter((t=>t.id!==e)),n&&(t.sessionRequestQueue.state=an.idle,t.client.events.emit("session_request_expire",{id:e}))},this.deletePendingAuthRequest=async function(e,r){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];await Promise.all([t.client.auth.requests.delete(e,r),n?Promise.resolve():t.client.core.expirer.del(e)])},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&(this.client.core.expirer.set(e,t),await this.client.session.update(e,{expiry:t}))},this.setProposal=async(e,t)=>{this.client.core.expirer.set(e,(0,k.calcExpiry)(nn.wc_sessionPropose.req.ttl)),await this.client.proposal.set(e,t)},this.setAuthRequest=async(e,t)=>{const{request:r,pairingTopic:n}=t;this.client.core.expirer.set(e,r.expiryTimestamp),await this.client.auth.requests.set(e,{authPayload:r.authPayload,requester:r.requester,expiryTimestamp:r.expiryTimestamp,id:e,pairingTopic:n,verifyContext:r.verifyContext})},this.setPendingSessionRequest=async e=>{const{id:t,topic:r,params:n,verifyContext:i}=e,o=n.request.expiryTimestamp||(0,k.calcExpiry)(nn.wc_sessionRequest.req.ttl);this.client.core.expirer.set(t,o),await this.client.pendingRequest.set(t,{id:t,topic:r,params:n,verifyContext:i})},this.sendRequest=async e=>{const{topic:t,method:r,params:n,expiry:i,relayRpcId:o,clientRpcId:a,throwOnFailedPublish:s}=e,c=(0,C.formatJsonRpcRequest)(r,n,a);if((0,k.isBrowser)()&&cn.includes(r)){const e=(0,k.hashMessage)(JSON.stringify(c));this.client.core.verify.register({attestationId:e})}let u;try{u=await this.client.core.crypto.encode(t,c)}catch(v){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${t} failed`),v}const l=nn[r].req;return i&&(l.ttl=i),o&&(l.id=o),this.client.core.history.set(t,c),s?(l.internal=kn(Sn({},l.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,u,l)):this.client.core.relayer.publish(t,u,l).catch((e=>this.client.logger.error(e))),c.id},this.sendResult=async e=>{const{id:t,topic:r,result:n,throwOnFailedPublish:i,encodeOpts:o}=e,a=(0,C.formatJsonRpcResult)(t,n);let s,c;try{s=await this.client.core.crypto.encode(r,a,o)}catch(m){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${r} failed`),m}try{c=await this.client.core.history.get(r,t)}catch(m){throw this.client.logger.error(`sendResult() -> history.get(${r}, ${t}) failed`),m}const u=nn[c.request.method].res;i?(u.internal=kn(Sn({},u.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(r,s,u)):this.client.core.relayer.publish(r,s,u).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(a)},this.sendError=async e=>{const{id:t,topic:r,error:n,encodeOpts:i,rpcOpts:o}=e,a=(0,C.formatJsonRpcError)(t,n);let s,c;try{s=await this.client.core.crypto.encode(r,a,i)}catch(m){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${r} failed`),m}try{c=await this.client.core.history.get(r,t)}catch(m){throw this.client.logger.error(`sendError() -> history.get(${r}, ${t}) failed`),m}const u=o||nn[c.request.method].res;this.client.core.relayer.publish(r,s,u),await this.client.core.history.resolve(a)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{let r=!1;(0,k.isExpired)(t.expiry)&&(r=!0),this.client.core.crypto.keychain.has(t.topic)||(r=!0),r&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{(0,k.isExpired)(e.expiryTimestamp)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession({topic:e}))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state!==an.active){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=an.active;const t=this.requestQueue.queue.shift();if(t)try{this.processRequest(t),await new Promise((e=>setTimeout(e,300)))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=an.idle}else this.client.logger.info("Request queue already active, skipping...")},this.processRequest=e=>{const{topic:t,payload:r}=e,n=r.method;if(!this.shouldIgnorePairingRequest({topic:t,requestMethod:n}))switch(n){case"wc_sessionPropose":return this.onSessionProposeRequest(t,r);case"wc_sessionSettle":return this.onSessionSettleRequest(t,r);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,r);case"wc_sessionExtend":return this.onSessionExtendRequest(t,r);case"wc_sessionPing":return this.onSessionPingRequest(t,r);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,r);case"wc_sessionRequest":return this.onSessionRequest(t,r);case"wc_sessionEvent":return this.onSessionEventRequest(t,r);case"wc_sessionAuthenticate":return this.onSessionAuthenticateRequest(t,r);default:return this.client.logger.info(`Unsupported request method ${n}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:r}=e,n=(await this.client.core.history.get(t,r.id)).request.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeResponse(t,r);case"wc_sessionSettle":return this.onSessionSettleResponse(t,r);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,r);case"wc_sessionExtend":return this.onSessionExtendResponse(t,r);case"wc_sessionPing":return this.onSessionPingResponse(t,r);case"wc_sessionRequest":return this.onSessionRequestResponse(t,r);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(t,r);default:return this.client.logger.info(`Unsupported response method ${n}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:r}=(0,k.getInternalError)("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(r)},this.shouldIgnorePairingRequest=e=>{const{topic:t,requestMethod:r}=e,n=this.expectedPairingMethodMap.get(t);return!(!n||n.includes(r))&&!!(n.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)},this.onSessionProposeRequest=async(e,t)=>{const{params:r,id:n}=t;try{this.isValidConnect(Sn({},t.params));const i=r.expiryTimestamp||(0,k.calcExpiry)(nn.wc_sessionPropose.req.ttl),o=Sn({id:n,pairingTopic:e,expiryTimestamp:i},r);await this.setProposal(n,o);const a=(0,k.hashMessage)(JSON.stringify(t)),s=await this.getVerifyContext(a,o.proposer.metadata);this.client.events.emit("session_proposal",{id:n,params:o,verifyContext:s})}catch(i){await this.sendError({id:n,topic:e,error:i,rpcOpts:nn.wc_sessionPropose.autoReject}),this.client.logger.error(i)}},this.onSessionProposeResponse=async(e,t)=>{const{id:r}=t;if((0,C.isJsonRpcResult)(t)){const{result:n}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:n});const i=this.client.proposal.get(r);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const o=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});const a=n.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:a});const s=await this.client.core.crypto.generateSharedKey(o,a);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:s});const c=await this.client.core.relayer.subscribe(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else if((0,C.isJsonRpcError)(t)){await this.client.proposal.delete(r,(0,k.getSdkError)("USER_DISCONNECTED"));const e=(0,k.engineEvent)("session_connect");if(0===this.events.listenerCount(e))throw new Error(`emitting ${e} without any listeners, 954`);this.events.emit((0,k.engineEvent)("session_connect"),{error:t.error})}},this.onSessionSettleRequest=async(e,t)=>{const{id:r,params:n}=t;try{this.isValidSessionSettleRequest(n);const{relay:r,controller:i,expiry:o,namespaces:a,sessionProperties:s,sessionConfig:c}=t.params,u=Sn(Sn({topic:e,relay:r,expiry:o,namespaces:a,acknowledged:!0,pairingTopic:"",requiredNamespaces:{},optionalNamespaces:{},controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},s&&{sessionProperties:s}),c&&{sessionConfig:c});await this.sendResult({id:t.id,topic:e,result:!0,throwOnFailedPublish:!0});const l=(0,k.engineEvent)("session_connect");if(0===this.events.listenerCount(l))throw new Error(`emitting ${l} without any listeners 997`);this.events.emit((0,k.engineEvent)("session_connect"),{session:u})}catch(i){await this.sendError({id:r,topic:e,error:i}),this.client.logger.error(i)}},this.onSessionSettleResponse=async(e,t)=>{const{id:r}=t;(0,C.isJsonRpcResult)(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit((0,k.engineEvent)("session_approve",r),{})):(0,C.isJsonRpcError)(t)&&(await this.client.session.delete(e,(0,k.getSdkError)("USER_DISCONNECTED")),this.events.emit((0,k.engineEvent)("session_approve",r),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:r,id:n}=t;try{const t=`${e}_session_update`,i=k.MemoryStore.get(t);if(i&&this.isRequestOutOfSync(i,n))return this.client.logger.info(`Discarding out of sync request - ${n}`),void this.sendError({id:n,topic:e,error:(0,k.getSdkError)("INVALID_UPDATE_REQUEST")});this.isValidUpdate(Sn({topic:e},r));try{k.MemoryStore.set(t,n),await this.client.session.update(e,{namespaces:r.namespaces}),await this.sendResult({id:n,topic:e,result:!0,throwOnFailedPublish:!0})}catch(g){throw k.MemoryStore.delete(t),g}this.client.events.emit("session_update",{id:n,topic:e,params:r})}catch(i){await this.sendError({id:n,topic:e,error:i}),this.client.logger.error(i)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{const{id:r}=t,n=(0,k.engineEvent)("session_update",r);if(0===this.events.listenerCount(n))throw new Error(`emitting ${n} without any listeners`);(0,C.isJsonRpcResult)(t)?this.events.emit((0,k.engineEvent)("session_update",r),{}):(0,C.isJsonRpcError)(t)&&this.events.emit((0,k.engineEvent)("session_update",r),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:r}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,(0,k.calcExpiry)(tn)),await this.sendResult({id:r,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_extend",{id:r,topic:e})}catch(n){await this.sendError({id:r,topic:e,error:n}),this.client.logger.error(n)}},this.onSessionExtendResponse=(e,t)=>{const{id:r}=t,n=(0,k.engineEvent)("session_extend",r);if(0===this.events.listenerCount(n))throw new Error(`emitting ${n} without any listeners`);(0,C.isJsonRpcResult)(t)?this.events.emit((0,k.engineEvent)("session_extend",r),{}):(0,C.isJsonRpcError)(t)&&this.events.emit((0,k.engineEvent)("session_extend",r),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:r,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:r,topic:e})}catch(n){await this.sendError({id:r,topic:e,error:n}),this.client.logger.error(n)}},this.onSessionPingResponse=(e,t)=>{const{id:r}=t,n=(0,k.engineEvent)("session_ping",r);if(0===this.events.listenerCount(n))throw new Error(`emitting ${n} without any listeners`);setTimeout((()=>{(0,C.isJsonRpcResult)(t)?this.events.emit((0,k.engineEvent)("session_ping",r),{}):(0,C.isJsonRpcError)(t)&&this.events.emit((0,k.engineEvent)("session_ping",r),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:r}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(Et,(async()=>{t(await this.deleteSession({topic:e,id:r}))}))})),this.sendResult({id:r,topic:e,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:(0,k.getSdkError)("USER_DISCONNECTED")})])}catch(n){this.client.logger.error(n)}},this.onSessionRequest=async(e,t)=>{var r;const{id:n,params:i}=t;try{await this.isValidRequest(Sn({topic:e},i));const t=(0,k.hashMessage)(JSON.stringify((0,C.formatJsonRpcRequest)("wc_sessionRequest",i,n))),o=this.client.session.get(e),a={id:n,topic:e,params:i,verifyContext:await this.getVerifyContext(t,o.peer.metadata)};await this.setPendingSessionRequest(a),null!=(r=this.client.signConfig)&&r.disableRequestQueue?this.emitSessionRequest(a):(this.addSessionRequestToSessionRequestQueue(a),this.processSessionRequestQueue())}catch(I){await this.sendError({id:n,topic:e,error:I}),this.client.logger.error(I)}},this.onSessionRequestResponse=(e,t)=>{const{id:r}=t,n=(0,k.engineEvent)("session_request",r);if(0===this.events.listenerCount(n))throw new Error(`emitting ${n} without any listeners`);(0,C.isJsonRpcResult)(t)?this.events.emit((0,k.engineEvent)("session_request",r),{result:t.result}):(0,C.isJsonRpcError)(t)&&this.events.emit((0,k.engineEvent)("session_request",r),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:r,params:n}=t;try{const t=`${e}_session_event_${n.event.name}`,i=k.MemoryStore.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidEmit(Sn({topic:e},n)),this.client.events.emit("session_event",{id:r,topic:e,params:n}),k.MemoryStore.set(t,r)}catch(i){await this.sendError({id:r,topic:e,error:i}),this.client.logger.error(i)}},this.onSessionAuthenticateResponse=(e,t)=>{const{id:r}=t;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:e,payload:t}),(0,C.isJsonRpcResult)(t)?this.events.emit((0,k.engineEvent)("session_request",r),{result:t.result}):(0,C.isJsonRpcError)(t)&&this.events.emit((0,k.engineEvent)("session_request",r),{error:t.error})},this.onSessionAuthenticateRequest=async(e,t)=>{try{const{requester:r,authPayload:n,expiryTimestamp:i}=t.params,o=(0,k.hashMessage)(JSON.stringify(t)),a=await this.getVerifyContext(o,this.client.metadata),s={requester:r,pairingTopic:e,id:t.id,authPayload:n,verifyContext:a,expiryTimestamp:i};await this.setAuthRequest(t.id,{request:s,pairingTopic:e}),this.client.events.emit("session_authenticate",{topic:e,params:t.params,id:t.id})}catch(u){this.client.logger.error(u);const n=t.params.requester.publicKey,i=await this.client.core.crypto.generateKeyPair(),o={type:k.TYPE_1,receiverPublicKey:n,senderPublicKey:i};await this.sendError({id:t.id,topic:e,error:u,encodeOpts:o,rpcOpts:nn.wc_sessionAuthenticate.autoReject})}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.sessionRequestQueue.state=an.idle,this.processSessionRequestQueue()}),(0,a.toMiliseconds)(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=e=>{let{topic:t,error:r}=e;const n=this.client.core.history.pending;n.length>0&&n.filter((e=>e.topic===t&&"wc_sessionRequest"===e.request.method)).forEach((e=>{const t=e.request.id,n=(0,k.engineEvent)("session_request",t);if(0===this.events.listenerCount(n))throw new Error(`emitting ${n} without any listeners`);this.events.emit((0,k.engineEvent)("session_request",e.request.id),{error:r})}))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===an.active)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=an.active,this.emitSessionRequest(e)}catch(t){this.client.logger.error(t)}else this.client.logger.info("session request queue is empty.")},this.emitSessionRequest=e=>{this.client.events.emit("session_request",e)},this.onPairingCreated=e=>{if(e.methods&&this.expectedPairingMethodMap.set(e.topic,e.methods),e.active)return;const t=this.client.proposal.getAll().find((t=>t.pairingTopic===e.topic));t&&this.onSessionProposeRequest(e.topic,(0,C.formatJsonRpcRequest)("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:r,optionalNamespaces:n,sessionProperties:i,relays:o}=e;if((0,k.isUndefined)(t)||await this.isValidPairingTopic(t),!(0,k.isValidRelays)(o,!0)){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID",`connect() relays: ${o}`);throw new Error(e)}!(0,k.isUndefined)(r)&&0!==(0,k.isValidObject)(r)&&this.validateNamespaces(r,"requiredNamespaces"),!(0,k.isUndefined)(n)&&0!==(0,k.isValidObject)(n)&&this.validateNamespaces(n,"optionalNamespaces"),(0,k.isUndefined)(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const r=(0,k.isValidRequiredNamespaces)(e,"connect()",t);if(r)throw new Error(r.message)},this.isValidApprove=async e=>{if(!(0,k.isValidParams)(e))throw new Error((0,k.getInternalError)("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:r,relayProtocol:n,sessionProperties:i}=e;this.checkRecentlyDeleted(t),await this.isValidProposalId(t);const o=this.client.proposal.get(t),a=(0,k.isValidNamespaces)(r,"approve()");if(a)throw new Error(a.message);const s=(0,k.isConformingNamespaces)(o.requiredNamespaces,r,"approve()");if(s)throw new Error(s.message);if(!(0,k.isValidString)(n,!0)){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID",`approve() relayProtocol: ${n}`);throw new Error(e)}(0,k.isUndefined)(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:r}=e;if(this.checkRecentlyDeleted(t),await this.isValidProposalId(t),!(0,k.isValidErrorReason)(r)){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:r,namespaces:n,expiry:i}=e;if(!(0,k.isValidRelay)(t)){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const o=(0,k.isValidController)(r,"onSessionSettleRequest()");if(o)throw new Error(o.message);const a=(0,k.isValidNamespaces)(n,"onSessionSettleRequest()");if(a)throw new Error(a.message);if((0,k.isExpired)(i)){const{message:e}=(0,k.getInternalError)("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}const{topic:t,namespaces:r}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);const n=this.client.session.get(t),i=(0,k.isValidNamespaces)(r,"update()");if(i)throw new Error(i.message);const o=(0,k.isConformingNamespaces)(n.requiredNamespaces,r,"update()");if(o)throw new Error(o.message)},this.isValidExtend=async e=>{if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}const{topic:t,request:r,chainId:n,expiry:i}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);const{namespaces:o}=this.client.session.get(t);if(!(0,k.isValidNamespacesChainId)(o,n)){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID",`request() chainId: ${n}`);throw new Error(e)}if(!(0,k.isValidRequest)(r)){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID",`request() ${JSON.stringify(r)}`);throw new Error(e)}if(!(0,k.isValidNamespacesRequest)(o,n,r.method)){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID",`request() method: ${r.method}`);throw new Error(e)}if(i&&!(0,k.isValidRequestExpiry)(i,on)){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${on.min} and ${on.max}`);throw new Error(e)}},this.isValidRespond=async e=>{var t;if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:r,response:n}=e;try{await this.isValidSessionTopic(r)}catch(i){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),i}if(!(0,k.isValidResponse)(n)){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(n)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}const{topic:t,event:r,chainId:n}=e;await this.isValidSessionTopic(t);const{namespaces:i}=this.client.session.get(t);if(!(0,k.isValidNamespacesChainId)(i,n)){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID",`emit() chainId: ${n}`);throw new Error(e)}if(!(0,k.isValidEvent)(r)){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(e)}if(!(0,k.isValidNamespacesEvent)(i,n,r.name)){const{message:e}=(0,k.getInternalError)("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!(0,k.isValidParams)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidAuthenticate=e=>{const{chains:t,uri:r,domain:n,nonce:i}=e;if(!Array.isArray(t)||0===t.length)throw new Error("chains is required and must be a non-empty array");if(!(0,k.isValidString)(r,!1))throw new Error("uri is required parameter");if(!(0,k.isValidString)(n,!1))throw new Error("domain is required parameter");if(!(0,k.isValidString)(i,!1))throw new Error("nonce is required parameter");if([...new Set(t.map((e=>(0,k.parseChainId)(e).namespace)))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:o}=(0,k.parseChainId)(t[0]);if("eip155"!==o)throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")},this.getVerifyContext=async(e,t)=>{const r={verified:{verifyUrl:t.verifyUrl||Gt,validation:"UNKNOWN",origin:t.url||""}};try{const n=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});n&&(r.verified.origin=n.origin,r.verified.isScam=n.isScam,r.verified.validation=n.origin===new URL(t.url).origin?"VALID":"INVALID")}catch(n){this.client.logger.info(n)}return this.client.logger.info(`Verify context: ${JSON.stringify(r)}`),r},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!(0,k.isValidString)(e,!1)){const{message:r}=(0,k.getInternalError)("MISSING_OR_INVALID",`${t} must be in Record format. Received: ${JSON.stringify(e)}`);throw new Error(r)}}))},this.getPendingAuthRequest=e=>{const t=this.client.auth.requests.get(e);return"object"==typeof t?t:void 0},this.addToRecentlyDeleted=(e,t)=>{if(this.recentlyDeletedMap.set(e,t),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let e=0;const t=this.recentlyDeletedLimit/2;for(const r of this.recentlyDeletedMap.keys()){if(e++>=t)break;this.recentlyDeletedMap.delete(r)}}},this.checkRecentlyDeleted=e=>{const t=this.recentlyDeletedMap.get(e);if(t){const{message:r}=(0,k.getInternalError)("MISSING_OR_INVALID",`Record was recently deleted - ${t}: ${e}`);throw new Error(r)}}}async isInitialized(){if(!this.initialized){const{message:e}=(0,k.getInternalError)("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(yt,(async e=>{const{topic:t,message:r}=e,{publicKey:n}=this.client.auth.authKeys.keys.includes(mn)?this.client.auth.authKeys.get(mn):{responseTopic:void 0,publicKey:void 0},i=await this.client.core.crypto.decode(t,r,{receiverPublicKey:n});try{(0,C.isJsonRpcRequest)(i)?(this.client.core.history.set(t,i),this.onRelayEventRequest({topic:t,payload:i})):(0,C.isJsonRpcResponse)(i)?(await this.client.core.history.resolve(i),await this.onRelayEventResponse({topic:t,payload:i}),this.client.core.history.delete(t,i.id)):this.onRelayEventUnknownPayload({topic:t,payload:i})}catch(o){this.client.logger.error(o)}}))}registerExpirerEvents(){this.client.core.expirer.on($t,(async e=>{const{topic:t,id:r}=(0,k.parseExpirerTarget)(e.target);return r&&this.client.pendingRequest.keys.includes(r)?await this.deletePendingSessionRequest(r,(0,k.getInternalError)("EXPIRED"),!0):r&&this.client.auth.requests.keys.includes(r)?await this.deletePendingAuthRequest(r,(0,k.getInternalError)("EXPIRED"),!0):void(t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r})))}))}registerPairingEvents(){this.client.core.pairing.events.on(Lt,(e=>this.onPairingCreated(e))),this.client.core.pairing.events.on(Dt,(e=>{this.addToRecentlyDeleted(e.topic,"pairing")}))}isValidPairingTopic(e){if(!(0,k.isValidString)(e,!1)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=(0,k.getInternalError)("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if((0,k.isExpired)(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=(0,k.getInternalError)("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!(0,k.isValidString)(e,!1)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){const{message:t}=(0,k.getInternalError)("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if((0,k.isExpired)(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=(0,k.getInternalError)("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if((0,k.isValidString)(e,!1)){const{message:t}=(0,k.getInternalError)("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if(!(0,k.isValidId)(e)){const{message:t}=(0,k.getInternalError)("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=(0,k.getInternalError)("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if((0,k.isExpired)(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=(0,k.getInternalError)("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class Cn extends Sr{constructor(e,t){super(e,t,Zr,Hr),this.core=e,this.logger=t}}class In extends Sr{constructor(e,t){super(e,t,en,Hr),this.core=e,this.logger=t}}class Tn extends Sr{constructor(e,t){super(e,t,sn,Hr,(e=>e.id)),this.core=e,this.logger=t}}class On extends Sr{constructor(e,t){super(e,t,fn,gn,(()=>mn)),this.core=e,this.logger=t}}class Pn extends Sr{constructor(e,t){super(e,t,hn,gn),this.core=e,this.logger=t}}class Mn extends Sr{constructor(e,t){super(e,t,pn,gn,(e=>e.id)),this.core=e,this.logger=t}}class Rn{constructor(e,t){this.core=e,this.logger=t,this.authKeys=new On(this.core,this.logger),this.pairingTopics=new Pn(this.core,this.logger),this.requests=new Mn(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}class Nn extends Ur{constructor(e){super(e),this.protocol=Fr,this.version=zr,this.name=Vr.name,this.events=new n.EventEmitter,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(u){throw this.logger.error(u.message),u}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(u){throw this.logger.error(u.message),u}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(u){throw this.logger.error(u.message),u}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(u){throw this.logger.error(u.message),u}},this.update=async e=>{try{return await this.engine.update(e)}catch(u){throw this.logger.error(u.message),u}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(u){throw this.logger.error(u.message),u}},this.request=async e=>{try{return await this.engine.request(e)}catch(u){throw this.logger.error(u.message),u}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(u){throw this.logger.error(u.message),u}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(u){throw this.logger.error(u.message),u}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(u){throw this.logger.error(u.message),u}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(u){throw this.logger.error(u.message),u}},this.find=e=>{try{return this.engine.find(e)}catch(u){throw this.logger.error(u.message),u}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.authenticate=async e=>{try{return await this.engine.authenticate(e)}catch(u){throw this.logger.error(u.message),u}},this.formatAuthMessage=e=>{try{return this.engine.formatAuthMessage(e)}catch(u){throw this.logger.error(u.message),u}},this.approveSessionAuthenticate=async e=>{try{return await this.engine.approveSessionAuthenticate(e)}catch(u){throw this.logger.error(u.message),u}},this.rejectSessionAuthenticate=async e=>{try{return await this.engine.rejectSessionAuthenticate(e)}catch(u){throw this.logger.error(u.message),u}},this.name=e?.name||Vr.name,this.metadata=e?.metadata||(0,k.getAppMetadata)(),this.signConfig=e?.signConfig;const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,f.h6)((0,f.iP)({level:e?.logger||Vr.logger}));this.core=e?.core||new Dr(e),this.logger=(0,f.U5)(t,this.name),this.session=new In(this.core,this.logger),this.proposal=new Cn(this.core,this.logger),this.pendingRequest=new Tn(this.core,this.logger),this.engine=new xn(this),this.auth=new Rn(this.core,this.logger)}static async init(e){const t=new Nn(e);return await t.initialize(),t}get context(){return(0,f.oI)(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),await this.auth.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(c){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(c.message),c}}}const Ln=In,Bn=Nn},69064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(88686);n.__exportStar(r(44754),t),n.__exportStar(r(64059),t)},44754:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},64059:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},50878:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(88686);n.__exportStar(r(31560),t),n.__exportStar(r(70737),t),n.__exportStar(r(732),t),n.__exportStar(r(69064),t)},732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(88686).__exportStar(r(66643),t)},66643:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;t.IWatch=class{}},86367:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const n=r(69064);t.toMiliseconds=function(e){return e*n.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/n.ONE_THOUSAND)}},91359:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}},31560:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(88686);n.__exportStar(r(91359),t),n.__exportStar(r(86367),t)},70737:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if("undefined"!==typeof t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const r=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:r})}get(e){const t=this.timestamps.get(e);if("undefined"===typeof t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=r,t.default=r},88686:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>b,__asyncValues:()=>A,__await:()=>v,__awaiter:()=>l,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>x,__createBinding:()=>f,__decorate:()=>s,__exportStar:()=>h,__extends:()=>i,__generator:()=>d,__importDefault:()=>S,__importStar:()=>E,__makeTemplateObject:()=>_,__metadata:()=>u,__param:()=>c,__read:()=>g,__rest:()=>a,__spread:()=>m,__spreadArrays:()=>y,__values:()=>p});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(t){o(t)}}function s(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function d(e,t){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=(i=a.trys).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]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >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 e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof v?Promise.resolve(e.value.v).then(c,u):l(o[0][2],e)}(i[e](t))}catch(r){l(o[0][3],r)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:v(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function A(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},57107:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BASE10:()=>Ro,BASE16:()=>No,BASE64:()=>Lo,COLON:()=>j,DEFAULT_DEPTH:()=>z,EMPTY_SPACE:()=>U,ENV_MAP:()=>D,INTERNAL_ERRORS:()=>za,MemoryStore:()=>Rs,ONE_THOUSAND:()=>q,REACT_NATIVE_PRODUCT:()=>B,RELAYER_DEFAULT_PROTOCOL:()=>na,SDK_ERRORS:()=>Fa,SDK_TYPE:()=>H,SLASH:()=>F,TYPE_0:()=>Do,TYPE_1:()=>Uo,UTF8:()=>Bo,addResourceToRecap:()=>wo,appendToQueryString:()=>Q,assertType:()=>ne,assignAbilityToActions:()=>Ao,base64Decode:()=>yo,base64Encode:()=>mo,buildApprovedNamespaces:()=>Na,buildAuthObject:()=>co,buildNamespacesFromAuth:()=>ja,buildRecapStatement:()=>Po,calcExpiry:()=>we,capitalize:()=>he,capitalizeWord:()=>fe,createDelayedPromise:()=>pe,createEncodedRecap:()=>So,createExpiringPromise:()=>ge,createRecap:()=>bo,decodeRecap:()=>Eo,decodeTypeByte:()=>Qo,decrypt:()=>Zo,deriveSymKey:()=>$o,deserialize:()=>Xo,encodeRecap:()=>_o,encodeTypeByte:()=>Go,encrypt:()=>Yo,engineEvent:()=>_e,enumify:()=>de,formatAccountId:()=>b,formatAccountWithChain:()=>E,formatChainId:()=>y,formatExpirerTarget:()=>me,formatIdTarget:()=>ve,formatMessage:()=>so,formatMessageContext:()=>oe,formatRelayParams:()=>va,formatRelayRpcUrl:()=>te,formatStatementFromRecap:()=>Io,formatTopicTarget:()=>ye,formatUA:()=>ee,formatUri:()=>ba,generateKeyPair:()=>Ho,generateRandomBytes32:()=>Vo,getAccountsChains:()=>Ta,getAccountsFromNamespaces:()=>x,getAddressFromAccount:()=>A,getAddressesFromAccounts:()=>S,getAppMetadata:()=>Y,getBrowserOnlineStatus:()=>xs,getBundleId:()=>G,getChainFromAccount:()=>_,getChainsFromAccounts:()=>k,getChainsFromNamespace:()=>T,getChainsFromNamespaces:()=>C,getChainsFromRecap:()=>Oo,getChainsFromRequiredNamespaces:()=>I,getCommonValuesInArrays:()=>xe,getDecodedRecapFromResources:()=>lo,getDeepLink:()=>ke,getDidAddress:()=>oo,getDidAddressSegments:()=>ro,getDidChainId:()=>no,getEnvironment:()=>W,getHttpUrl:()=>re,getInternalError:()=>qa,getJavascriptID:()=>X,getJavascriptOS:()=>J,getLastItems:()=>se,getMethodsFromRecap:()=>To,getNamespacedDidChainId:()=>io,getNamespacesChains:()=>Oa,getNamespacesEventsForChainId:()=>Ma,getNamespacesFromAccounts:()=>Ua,getNamespacesMethodsForChainId:()=>Pa,getNodeOnlineStatus:()=>Is,getReCapActions:()=>go,getReactNativeOnlineStatus:()=>Cs,getRecapAbilitiesFromResource:()=>po,getRecapFromResources:()=>Mo,getRecapResource:()=>ho,getRelayClientMetadata:()=>Z,getRelayProtocolApi:()=>oa,getRelayProtocolName:()=>ia,getRequiredNamespacesFromNamespaces:()=>Ra,getSdkError:()=>Ha,getUniqueValues:()=>w,handleDeeplinkRedirect:()=>Se,hasOverlap:()=>ae,hashKey:()=>Ko,hashMessage:()=>Wo,isBrowser:()=>K,isCaipNamespace:()=>La,isConformingNamespaces:()=>_s,isExpired:()=>Ae,isNode:()=>V,isOnline:()=>ks,isProposalStruct:()=>Xa,isReactNative:()=>$,isRecap:()=>ko,isSessionCompatible:()=>Qa,isSessionStruct:()=>es,isTypeOneEnvelope:()=>ra,isUndefined:()=>Ka,isValidAccountId:()=>Za,isValidAccounts:()=>os,isValidActions:()=>ss,isValidArray:()=>Va,isValidChainId:()=>Ya,isValidChains:()=>ns,isValidController:()=>ts,isValidEip1271Signature:()=>Ki,isValidEip191Signature:()=>$i,isValidErrorReason:()=>gs,isValidEvent:()=>vs,isValidId:()=>hs,isValidNamespaceAccounts:()=>as,isValidNamespaceActions:()=>cs,isValidNamespaceChains:()=>is,isValidNamespaceMethodsOrEvents:()=>rs,isValidNamespaces:()=>ls,isValidNamespacesChainId:()=>bs,isValidNamespacesEvent:()=>As,isValidNamespacesRequest:()=>ws,isValidNumber:()=>Ga,isValidObject:()=>$a,isValidParams:()=>ps,isValidRecap:()=>vo,isValidRelay:()=>ds,isValidRelays:()=>fs,isValidRequest:()=>ms,isValidRequestExpiry:()=>Ss,isValidRequiredNamespaces:()=>us,isValidResponse:()=>ys,isValidString:()=>Wa,isValidUrl:()=>Ja,mapEntries:()=>le,mapToObj:()=>ce,mergeArrays:()=>Ee,mergeEncodedRecaps:()=>xo,mergeRecaps:()=>Co,normalizeNamespaces:()=>Da,objToMap:()=>ue,parseAccountId:()=>v,parseChainId:()=>m,parseContextNames:()=>ie,parseExpirerTarget:()=>be,parseNamespaceKey:()=>Ba,parseRelayParams:()=>ga,parseTopic:()=>ya,parseUri:()=>ma,populateAuthPayload:()=>uo,recapHasResource:()=>fo,serialize:()=>Jo,subscribeToBrowserNetworkChange:()=>Os,subscribeToNetworkChange:()=>Ts,subscribeToReactNativeNetworkChange:()=>Ps,validateDecoding:()=>ea,validateEncoding:()=>ta,validateSignedCacao:()=>ao,verifySignature:()=>Vi});var n=r(96338),i=r(50878),o=r(72146),a=r(5509),s=r(74465),c=r(462),u=r(48438),l=r(86022),d=r(78166),f=r(34520),h=r(20019),p=r(43586);const g=":";function m(e){const[t,r]=e.split(g);return{namespace:t,reference:r}}function y(e){const{namespace:t,reference:r}=e;return[t,r].join(g)}function v(e){const[t,r,n]=e.split(g);return{namespace:t,reference:r,address:n}}function b(e){const{namespace:t,reference:r,address:n}=e;return[t,r,n].join(g)}function w(e,t){const r=[];return e.forEach((e=>{const n=t(e);r.includes(n)||r.push(n)})),r}function A(e){const{address:t}=v(e);return t}function _(e){const{namespace:t,reference:r}=v(e);return y({namespace:t,reference:r})}function E(e,t){const{namespace:r,reference:n}=m(t);return b({namespace:r,reference:n,address:e})}function S(e){return w(e,A)}function k(e){return w(e,_)}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];return Object.keys(e).forEach((n=>{if(t.length&&!t.includes(n))return;const i=e[n];r.push(...i.accounts)})),r}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];return Object.keys(e).forEach((n=>{if(t.length&&!t.includes(n))return;const i=e[n];r.push(...k(i.accounts))})),r}function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];return Object.keys(e).forEach((n=>{if(t.length&&!t.includes(n))return;const i=e[n];r.push(...T(n,i))})),r}function T(e,t){return e.includes(":")?[e]:t.chains||[]}var O=Object.defineProperty,P=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,N=(e,t,r)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))M.call(t,r)&&N(e,r,t[r]);if(P)for(var r of P(t))R.call(t,r)&&N(e,r,t[r]);return e};const B="ReactNative",D={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},U=" ",j=":",F="/",z=2,q=1e3,H="js";function V(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function $(){return!(0,o.getDocument)()&&!!(0,o.getNavigator)()&&navigator.product===B}function K(){return!V()&&!!(0,o.getNavigator)()&&!!(0,o.getDocument)()}function W(){return $()?D.reactNative:V()?D.node:K()?D.browser:D.unknown}function G(){var e;try{return $()&&typeof r.g<"u"&&typeof(null==r.g?void 0:r.g.Application)<"u"?null==(e=r.g.Application)?void 0:e.applicationId:void 0}catch{return}}function Q(e,t){let r=s.parse(e);return r=L(L({},r),t),e=s.stringify(r)}function Y(){return(0,a.g)()||{name:"",description:"",url:"",icons:[""]}}function Z(e,t){var r;const n=W(),i={protocol:e,version:t,env:n};return"browser"===n&&(i.host=(null==(r=(0,o.getLocation)())?void 0:r.host)||"unknown"),i}function J(){if(W()===D.reactNative&&typeof r.g<"u"&&typeof(null==r.g?void 0:r.g.Platform)<"u"){const{OS:e,Version:t}=r.g.Platform;return[e,t].join("-")}const e=(0,n.o0)();if(null===e)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}function X(){var e;const t=W();return t===D.browser?[t,(null==(e=(0,o.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}function ee(e,t,r){const n=J(),i=X();return[[e,t].join("-"),[H,r].join("-"),n,i].join("/")}function te(e){let{protocol:t,version:r,relayUrl:n,sdkVersion:i,auth:o,projectId:a,useOnCloseEvent:s,bundleId:c}=e;const u=n.split("?"),l={auth:o,ua:ee(t,r,i),projectId:a,useOnCloseEvent:s||void 0,origin:c||void 0},d=Q(u[1]||"",l);return u[0]+"?"+d}function re(e){let t=(e.match(/^[^:]+(?=:\/\/)/gi)||[])[0];const r=typeof t<"u"?e.split("://")[1]:e;return t="wss"===t?"https":"http",[t,r].join("://")}function ne(e,t,r){if(!e[t]||typeof e[t]!==r)throw new Error(`Missing or invalid "${t}" param`)}function ie(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z;return se(e.split(F),t)}function oe(e){return ie(e).join(U)}function ae(e,t){return e.filter((e=>t.includes(e))).length===e.length}function se(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z;return e.slice(Math.max(e.length-t,0))}function ce(e){return Object.fromEntries(e.entries())}function ue(e){return new Map(Object.entries(e))}function le(e,t){const r={};return Object.keys(e).forEach((n=>{r[n]=t(e[n])})),r}const de=e=>e;function fe(e){return e.trim().replace(/^\w/,(e=>e.toUpperCase()))}function he(e){return e.split(U).map((e=>fe(e))).join(U)}function pe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.FIVE_MINUTES,t=arguments.length>1?arguments[1]:void 0;const r=(0,i.toMiliseconds)(e||i.FIVE_MINUTES);let n,o,a;return{resolve:e=>{a&&n&&(clearTimeout(a),n(e))},reject:e=>{a&&o&&(clearTimeout(a),o(e))},done:()=>new Promise(((e,i)=>{a=setTimeout((()=>{i(new Error(t))}),r),n=e,o=i}))}}function ge(e,t,r){return new Promise((async(n,i)=>{const o=setTimeout((()=>i(new Error(r))),t);try{n(await e)}catch(a){i(a)}clearTimeout(o)}))}function me(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function ye(e){return me("topic",e)}function ve(e){return me("id",e)}function be(e){const[t,r]=e.split(":"),n={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof r)n.topic=r;else{if("id"!==t||!Number.isInteger(Number(r)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);n.id=Number(r)}return n}function we(e,t){return(0,i.fromMiliseconds)((t||Date.now())+(0,i.toMiliseconds)(e))}function Ae(e){return Date.now()>=(0,i.toMiliseconds)(e)}function _e(e,t){return`${e}${t?`:${t}`:""}`}function Ee(){return[...new Set([...arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]])]}async function Se(e){let{id:t,topic:n,wcDeepLink:i}=e;try{if(!i)return;const e="string"==typeof i?JSON.parse(i):i;let o=e?.href;if("string"!=typeof o)return;o.endsWith("/")&&(o=o.slice(0,-1));const a=`${o}/wc?requestId=${t}&sessionTopic=${n}`,s=W();s===D.browser?a.startsWith("https://")||a.startsWith("http://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):s===D.reactNative&&typeof(null==r.g?void 0:r.g.Linking)<"u"&&await r.g.Linking.openURL(a)}catch(o){console.error(o)}}async function ke(e,t){try{return await e.getItem(t)||(K()?localStorage.getItem(t):void 0)}catch(r){console.error(r)}}function xe(e,t){return e.filter((e=>t.includes(e)))}var Ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof r.g<"u"?r.g:typeof self<"u"?self:{};var Ie={exports:{}};!function(e){!function(){var t="input is invalid type",r="object"==typeof window,n=r?window:{};n.JS_SHA3_NO_WINDOW&&(r=!1);var i=!r&&"object"==typeof self;!n.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?n=Ce:i&&(n=self);var o=!n.JS_SHA3_NO_COMMON_JS&&e.exports,a=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",s="0123456789abcdef".split(""),c=[4,1024,262144,67108864],u=[0,8,16,24],l=[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],d=[224,256,384,512],f=[128,256],h=["hex","buffer","arrayBuffer","array","digest"],p={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),a&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var g=function(e,t,r){return function(n){return new O(e,t,e).update(n)[r]()}},m=function(e,t,r){return function(n,i){return new O(e,t,i).update(n)[r]()}},y=function(e,t,r){return function(t,n,i,o){return _["cshake"+e].update(t,n,i,o)[r]()}},v=function(e,t,r){return function(t,n,i,o){return _["kmac"+e].update(t,n,i,o)[r]()}},b=function(e,t,r,n){for(var i=0;i>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 P(e,t,r){O.call(this,e,t,r)}O.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(a&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!a||!ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var i,o,s=this.blocks,c=this.byteCount,l=e.length,d=this.blockCount,f=0,h=this.s;f>2]|=e[f]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(s[i>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=c){for(this.start=i-c,this.block=s[d],i=0;i>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},O.prototype.encodeString=function(e){var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(a&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!a||!ArrayBuffer.isView(e)))throw new Error(t);r=!0}var i=0,o=e.length;if(r)i=o;else for(var s=0;s=57344?i+=3:(c=65536+((1023&c)<<10|1023&e.charCodeAt(++s)),i+=4)}return i+=this.encode(8*i),this.update(e),i},O.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+s[15&e]+s[e>>12&15]+s[e>>8&15]+s[e>>20&15]+s[e>>16&15]+s[e>>28&15]+s[e>>24&15];a%t===0&&(M(r),o=0)}return i&&(e=r[o],c+=s[e>>4&15]+s[15&e],i>1&&(c+=s[e>>12&15]+s[e>>8&15]),i>2&&(c+=s[e>>20&15]+s[e>>16&15])),c},O.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);a>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%r===0&&M(n)}return o&&(e=s<<2,t=n[a],c[e]=255&t,o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c},P.prototype=new O,P.prototype.finalize=function(){return this.encode(this.outputBits,!0),O.prototype.finalize.call(this)};var M=function(e){var t,r,n,i,o,a,s,c,u,d,f,h,p,g,m,y,v,b,w,A,_,E,S,k,x,C,I,T,O,P,M,R,N,L,B,D,U,j,F,z,q,H,V,$,K,W,G,Q,Y,Z,J,X,ee,te,re,ne,ie,oe,ae,se,ce,ue,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|u>>>31),r=o^(u<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(d<<1|f>>>31),r=s^(f<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(h<<1|p>>>31),r=u^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,g=e[0],m=e[1],W=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,V=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,P=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,D=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,$=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=g^~y&b,e[1]=m^~v&w,e[10]=k^~C&T,e[11]=x^~I&O,e[20]=L^~D&j,e[21]=B^~U&F,e[30]=$^~W&Q,e[31]=K^~G&Y,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~b&A,e[3]=v^~w&_,e[12]=C^~T&P,e[13]=I^~O&M,e[22]=D^~j&z,e[23]=U^~F&q,e[32]=W^~Q&Z,e[33]=G^~Y&J,e[42]=ne^~oe&se,e[43]=ie^~ae&ce,e[4]=b^~A&E,e[5]=w^~_&S,e[14]=T^~P&R,e[15]=O^~M&N,e[24]=j^~z&H,e[25]=F^~q&V,e[34]=Q^~Z&X,e[35]=Y^~J&ee,e[44]=oe^~se&ue,e[45]=ae^~ce&le,e[6]=A^~E&g,e[7]=_^~S&m,e[16]=P^~R&k,e[17]=M^~N&x,e[26]=z^~H&L,e[27]=q^~V&B,e[36]=Z^~X&$,e[37]=J^~ee&K,e[46]=se^~ue&te,e[47]=ce^~le&re,e[8]=E^~g&y,e[9]=S^~m&v,e[18]=R^~k&C,e[19]=N^~x&I,e[28]=H^~L&D,e[29]=V^~B&U,e[38]=X^~$&W,e[39]=ee^~K&G,e[48]=ue^~te&ne,e[49]=le^~re&ie,e[0]^=l[n],e[1]^=l[n+1]};if(o)e.exports=_;else for(S=0;S{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch{e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var Be,De;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(Be||(Be={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(De||(De={}));const Ue="0123456789abcdef";class je{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==Me[r]&&this.throwArgumentError("invalid log level name","logLevel",e),!(Re>Me[r])&&console.log.apply(console,t)}debug(){for(var e=arguments.length,t=new Array(e),r=0;r{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=Ue[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch{n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const i=e;let o="";switch(t){case De.NUMERIC_FAULT:{o="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":o+="-"+t;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break}case De.CALL_EXCEPTION:case De.INSUFFICIENT_FUNDS:case De.MISSING_NEW:case De.NONCE_EXPIRED:case De.REPLACEMENT_UNDERPRICED:case De.TRANSACTION_REPLACED:case De.UNPREDICTABLE_GAS_LIMIT:o=t}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const a=new Error(e);return a.reason=i,a.code=t,Object.keys(r).forEach((function(e){a[e]=r[e]})),a}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,je.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){Le&&this.throwError("platform missing String.prototype.normalize",je.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Le})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,je.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,je.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,je.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",je.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",je.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",je.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Ne||(Ne=new je("logger/5.7.0")),Ne}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",je.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Oe){if(!e)return;this.globalLogger().throwError("error censorship permanent",je.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Pe=!!e,Oe=!!t}static setLogLevel(e){const t=Me[e.toLowerCase()];null!=t?Re=t:je.globalLogger().warn("invalid log level - "+e)}static from(e){return new je(e)}}je.errors=De,je.levels=Be;const Fe=new je("bytes/5.7.0");function ze(e){return!!e.toHexString}function qe(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return qe(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function He(e){return"number"==typeof e&&e==e&&e%1===0}function Ve(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e||!He(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function $e(e,t){if(t||(t={}),"number"==typeof e){Fe.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),qe(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),ze(e)&&(e=e.toHexString()),Ke(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":Fe.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;e>4]+We[15&n]}return t}return Fe.throwArgumentError("invalid hexlify value","value",e)}function Qe(e,t,r){return"string"!=typeof e?e=Ge(e):(!Ke(e)||e.length%2)&&Fe.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function Ye(e,t){for("string"!=typeof e?e=Ge(e):Ke(e)||Fe.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&Fe.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function Ze(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(function(e){return Ke(e)&&!(e.length%2)||Ve(e)}(e)){let r=$e(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=Ge(r.slice(0,32)),t.s=Ge(r.slice(32,64))):65===r.length?(t.r=Ge(r.slice(0,32)),t.s=Ge(r.slice(32,64)),t.v=r[64]):Fe.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:Fe.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=Ge(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=function(e,t){(e=$e(e)).length>t&&Fe.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),qe(r)}($e(t._vs),32);t._vs=Ge(r);const n=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=n:t.recoveryParam!==n&&Fe.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const i=Ge(r);null==t.s?t.s=i:t.s!==i&&Fe.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?Fe.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&Fe.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&Ke(t.r)?t.r=Ye(t.r,32):Fe.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&Ke(t.s)?t.s=Ye(t.s,32):Fe.throwArgumentError("signature missing or invalid s","signature",e);const r=$e(t.s);r[0]>=128&&Fe.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const n=Ge(r);t._vs&&(Ke(t._vs)||Fe.throwArgumentError("signature invalid _vs","signature",e),t._vs=Ye(t._vs,32)),null==t._vs?t._vs=n:t._vs!==n&&Fe.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function Je(e){return"0x"+Te.keccak_256($e(e))}var Xe={exports:{}},et=function(e){var t=e.default;if("function"==typeof t){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}(Object.freeze({__proto__:null,default:{}}));!function(e){!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:et.Buffer}catch{}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,n,i){for(var o=0,a=0,s=Math.min(e.length,n),c=t;c=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&a0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=s(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},typeof Symbol<"u"&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch{i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],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],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];i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?d[6-c.length]+c+n:c+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],l=h[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modrn(l).toString(e);n=(p=p.idivn(l)).isZero()?g+n:d[u-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[u]=0|d,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}i.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],w=8191&b,A=b>>>13,_=0|a[4],E=8191&_,S=_>>>13,k=0|a[5],x=8191&k,C=k>>>13,I=0|a[6],T=8191&I,O=I>>>13,P=0|a[7],M=8191&P,R=P>>>13,N=0|a[8],L=8191&N,B=N>>>13,D=0|a[9],U=8191&D,j=D>>>13,F=0|s[0],z=8191&F,q=F>>>13,H=0|s[1],V=8191&H,$=H>>>13,K=0|s[2],W=8191&K,G=K>>>13,Q=0|s[3],Y=8191&Q,Z=Q>>>13,J=0|s[4],X=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],de=8191&le,fe=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(f,z)|0))<<13)|0;u=((o=Math.imul(f,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(g,z)|0,o=Math.imul(g,q);var ye=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(f,V)|0))<<13)|0;u=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(v,z)|0,o=Math.imul(v,q),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,$)|0;var ve=(u+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,W)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,G)|0;var be=(u+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,Y)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var we=(u+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var Ae=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;u=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(u+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;u=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,q))+Math.imul(R,z)|0,o=Math.imul(R,q),n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((o=o+Math.imul(f,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0;var Se=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,q))+Math.imul(j,z)|0,o=Math.imul(j,q),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,$)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,fe)|0;var ke=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ge)|0)+Math.imul(f,pe)|0))<<13)|0;u=((o=o+Math.imul(f,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,$))+Math.imul(j,V)|0,o=Math.imul(j,$),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(v,de)|0,o=o+Math.imul(v,fe)|0;var xe=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;u=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,G))+Math.imul(j,W)|0,o=Math.imul(j,G),n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,ue)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,fe)|0;var Ce=(u+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(v,pe)|0))<<13)|0;u=((o=o+Math.imul(v,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,Y),i=(i=Math.imul(U,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,ue)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,fe)|0;var Ie=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,X),i=(i=Math.imul(U,ee))+Math.imul(j,X)|0,o=Math.imul(j,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Te=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(S,pe)|0))<<13)|0;u=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(j,re)|0,o=Math.imul(j,ne),n=n+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(O,de)|0,o=o+Math.imul(O,fe)|0;var Oe=(u+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(C,pe)|0))<<13)|0;u=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,ae))+Math.imul(j,oe)|0,o=Math.imul(j,ae),n=n+Math.imul(L,ce)|0,i=(i=i+Math.imul(L,ue)|0)+Math.imul(B,ce)|0,o=o+Math.imul(B,ue)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(j,ce)|0,o=Math.imul(j,ue),n=n+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,fe)|0;var Me=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,de),i=(i=Math.imul(U,fe))+Math.imul(j,de)|0,o=Math.imul(j,fe);var Re=(u+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ge)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(u+(n=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul(j,pe)|0))<<13)|0;return u=((o=Math.imul(j,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=me,c[1]=ye,c[2]=ve,c[3]=be,c[4]=we,c[5]=Ae,c[6]=_e,c[7]=Ee,c[8]=Se,c[9]=ke,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Te,c[14]=Oe,c[15]=Pe,c[16]=Me,c[17]=Re,c[18]=Ne,0!==u&&(c[19]=u,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>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 y(e,t,r){return m(e,t,r)}Math.imul||(g=p),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?p(this,e,t):r<1024?m(this,e,t):y(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),y(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+n]=67108863&a}for(;i>26,this.words[i+n]=67108863&a;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,a=0|o.words[o.length-1];0!==(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,c=n.length-o.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var f=67108864*(0|n.words[o.length+d])+(0|n.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(o,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(o,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;!(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(l),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,g=1;!(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),a.isub(c)):(n.isub(t),s.isub(o),c.isub(a))}return{a:s,b:c,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t,n=this,o=e.clone();n=0!==n.negative?n.umod(e):n.clone();for(var a=new i(1),s=new i(0),c=o.clone();n.cmpn(1)>0&&o.cmpn(1)>0;){for(var u=0,l=1;!(n.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(n.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;!(o.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(o.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);n.cmp(o)>=0?(n.isub(o),a.isub(s)):(o.isub(n),s.isub(a))}return(t=0===n.cmpn(1)?a:s).cmpn(0)<0&&t.iadd(e),t},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new S(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},n(w,b),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new A;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return v[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var g=h,m=0;0!==g.cmp(s);m++)g=g.redSqr();r(m=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var d=u>>l&1;(o!==r[0]&&(o=this.sqr(o)),0!==d||0!==a)?(a<<=1,a|=d,(4===++s||0===n&&0===l)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}c=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new k(e)},n(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,Ce)}(Xe);var tt=Xe.exports;const rt="bignumber/5.7.0";var nt=tt.BN;const it=new je(rt),ot={},at=9007199254740991;let st=!1;class ct{constructor(e,t){e!==ot&&it.throwError("cannot call constructor directly; use BigNumber.from",je.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return lt(dt(this).fromTwos(e))}toTwos(e){return lt(dt(this).toTwos(e))}abs(){return"-"===this._hex[0]?ct.from(this._hex.substring(1)):this}add(e){return lt(dt(this).add(dt(e)))}sub(e){return lt(dt(this).sub(dt(e)))}div(e){return ct.from(e).isZero()&&ft("division-by-zero","div"),lt(dt(this).div(dt(e)))}mul(e){return lt(dt(this).mul(dt(e)))}mod(e){const t=dt(e);return t.isNeg()&&ft("division-by-zero","mod"),lt(dt(this).umod(t))}pow(e){const t=dt(e);return t.isNeg()&&ft("negative-power","pow"),lt(dt(this).pow(t))}and(e){const t=dt(e);return(this.isNegative()||t.isNeg())&&ft("unbound-bitwise-result","and"),lt(dt(this).and(t))}or(e){const t=dt(e);return(this.isNegative()||t.isNeg())&&ft("unbound-bitwise-result","or"),lt(dt(this).or(t))}xor(e){const t=dt(e);return(this.isNegative()||t.isNeg())&&ft("unbound-bitwise-result","xor"),lt(dt(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&ft("negative-width","mask"),lt(dt(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&ft("negative-width","shl"),lt(dt(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&ft("negative-width","shr"),lt(dt(this).shrn(e))}eq(e){return dt(this).eq(dt(e))}lt(e){return dt(this).lt(dt(e))}lte(e){return dt(this).lte(dt(e))}gt(e){return dt(this).gt(dt(e))}gte(e){return dt(this).gte(dt(e))}isNegative(){return"-"===this._hex[0]}isZero(){return dt(this).isZero()}toNumber(){try{return dt(this).toNumber()}catch{ft("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return it.throwError("this platform does not support BigInt",je.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?st||(st=!0,it.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?it.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",je.errors.UNEXPECTED_ARGUMENT,{}):it.throwError("BigNumber.toString does not accept parameters",je.errors.UNEXPECTED_ARGUMENT,{})),dt(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof ct)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new ct(ot,ut(e)):e.match(/^-?[0-9]+$/)?new ct(ot,ut(new nt(e))):it.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&ft("underflow","BigNumber.from",e),(e>=at||e<=-at)&&ft("overflow","BigNumber.from",e),ct.from(String(e));const t=e;if("bigint"==typeof t)return ct.from(t.toString());if(Ve(t))return ct.from(Ge(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return ct.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(Ke(e)||"-"===e[0]&&Ke(e.substring(1))))return ct.from(e)}return it.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function ut(e){if("string"!=typeof e)return ut(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&it.throwArgumentError("invalid hex","value",e),"0x00"===(e=ut(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function lt(e){return ct.from(ut(e))}function dt(e){const t=ct.from(e).toHexString();return"-"===t[0]?new nt("-"+t.substring(3),16):new nt(t.substring(2),16)}function ft(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),it.throwError(e,je.errors.NUMERIC_FAULT,n)}const ht=new je(rt),pt={},gt=ct.from(0),mt=ct.from(-1);function yt(e,t,r,n){const i={fault:t,operation:r};return void 0!==n&&(i.value=n),ht.throwError(e,je.errors.NUMERIC_FAULT,i)}let vt="0";for(;vt.length<256;)vt+=vt;function bt(e){if("number"!=typeof e)try{e=ct.from(e).toNumber()}catch{}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+vt.substring(0,e):ht.throwArgumentError("invalid decimal size","decimals",e)}function wt(e,t){null==t&&(t=0);const r=bt(t),n=(e=ct.from(e)).lt(gt);n&&(e=e.mul(mt));let i=e.mod(r).toString();for(;i.length2&&ht.throwArgumentError("too many decimal points","value",e);let o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&yt("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.lengthnull==e[t]?n:(typeof e[t]!==r&&ht.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&ht.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&ht.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new _t(pt,t,r,n)}}class Et{constructor(e,t,r,n){e!==pt&&ht.throwError("cannot use FixedNumber constructor; use FixedNumber.from",je.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&ht.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=At(this._value,this.format.decimals),r=At(e._value,e.format.decimals);return Et.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=At(this._value,this.format.decimals),r=At(e._value,e.format.decimals);return Et.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=At(this._value,this.format.decimals),r=At(e._value,e.format.decimals);return Et.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=At(this._value,this.format.decimals),r=At(e._value,e.format.decimals);return Et.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=Et.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(St.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=Et.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(St.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&ht.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=Et.from("1"+vt.substring(0,e),this.format),n=kt.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&ht.throwArgumentError("invalid byte width","width",e);return Ye(ct.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString(),e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Et.fromString(this._value,e)}static fromValue(e,t,r){return null==r&&null!=t&&!function(e){return null!=e&&(ct.isBigNumber(e)||"number"==typeof e&&e%1===0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||Ke(e)||"bigint"==typeof e||Ve(e))}(t)&&(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),Et.fromString(wt(e,t),_t.from(r))}static fromString(e,t){null==t&&(t="fixed");const r=_t.from(t),n=At(e,r.decimals);!r.signed&&n.lt(gt)&&yt("unsigned value cannot be negative","overflow","value",e);let i=null;r.signed?i=n.toTwos(r.width).toHexString():(i=n.toHexString(),i=Ye(i,r.width/8));const o=wt(n,r.decimals);return new Et(pt,i,o,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=_t.from(t);if($e(e).length>r.width/8)throw new Error("overflow");let n=ct.from(e);r.signed&&(n=n.fromTwos(r.width));const i=n.toTwos((r.signed?0:1)+r.width).toHexString(),o=wt(n,r.decimals);return new Et(pt,i,o,r)}static from(e,t){if("string"==typeof e)return Et.fromString(e,t);if(Ve(e))return Et.fromBytes(e,t);try{return Et.fromValue(e,0,t)}catch(r){if(r.code!==je.errors.INVALID_ARGUMENT)throw r}return ht.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const St=Et.from(1),kt=Et.from("0.5"),xt=new je("strings/5.7.0");var Ct,It;function Tt(e,t,r,n,i){if(e===It.BAD_PREFIX||e===It.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6===2;n++)e++;return e}return e===It.OVERRUN?r.length-t-1:0}function Ot(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ct.current;t!=Ct.current&&(xt.checkNormalize(),e=e.normalize(t));let r=[];for(let n=0;n>6|192),r.push(63&t|128);else if(55296==(64512&t)){n++;const i=e.charCodeAt(n);if(n>=e.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&t)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(t>>12|224),r.push(t>>6&63|128),r.push(63&t|128)}return $e(r)}function Pt(e,t){t||(t=function(e){return[parseInt(e,16)]});let r=0,n={};return e.split(",").forEach((e=>{let i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function Mt(e){let t=0;return e.split(",").map((e=>{let r=e.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=t+parseInt(r[0],16);return t=parseInt(r[1],16),{l:n,h:t}}))}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(Ct||(Ct={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(It||(It={})),Object.freeze({error:function(e,t,r,n,i){return xt.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:Tt,replace:function(e,t,r,n,i){return e===It.OVERLONG?(n.push(i),0):(n.push(65533),Tt(e,t,r))}}),Mt("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"),"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),Pt("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"),Pt("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"),Pt("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(e){if(e.length%4!==0)throw new Error("bad data");let t=[];for(let r=0;r0&&Array.isArray(e)?i(e,t-1):r.push(e)}))};return i(e,t),r}function Lt(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let w=1;w>--c&1}const d=Math.pow(2,31),f=d>>>1,h=f>>1,p=d-1;let g=0;for(let w=0;w<31;w++)g=g<<1|l();let m=[],y=0,v=d;for(;;){let e=Math.floor(((g-y+1)*i-1)/v),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e>>1|l(),a=a<<1^f,s=(s^f)<<1|f|1;y=a,v=1+s-a}let b=n-4;return m.map((t=>{switch(t-b){case 3:return b+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return b+256+(e[s++]<<8|e[s++]);case 1:return b+e[s++];default:return t-1}}))}(e))}function Bt(e){return 1&e?~e>>1:e>>1}function Dt(e,t){let r=Array(e);for(let n=0,i=-1;nt[e])):r}function Ft(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let i=0;in[t].push(e)));return n}function zt(e,t){let r=1+t(),n=t(),i=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return Nt(Ft(i.length,1+e,t).map(((e,t)=>{const o=e[0],a=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*n;return[o+t*r,a.map((e=>e+i))]}))})))}function qt(e,t){return Ft(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const Ht=Lt(function(e){e=atob(e);const t=[];for(let r=0;re-t));(function r(){let n=[];for(;;){let i=jt(e,t);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let i=e(),o=i%3;i=i/3|0;let a=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:a,save:1==i,check:2==i}})()}(Ht),new je(Rt);new Uint8Array(32).fill(0);const Vt="\x19Ethereum Signed Message:\n";function $t(e){return"string"==typeof e&&(e=Ot(e)),Je(function(e){const t=e.map((e=>$e(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),qe(n)}([Ot(Vt),Ot(String(e.length)),e]))}new je("rlp/5.7.0");const Kt=new je("address/5.7.0");function Wt(e){Ke(e,20)||Kt.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=t[i].charCodeAt(0);const n=$e(Je(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&n[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const Gt={};for(let Ns=0;Ns<10;Ns++)Gt[String(Ns)]=String(Ns);for(let Ns=0;Ns<26;Ns++)Gt[String.fromCharCode(65+Ns)]=String(10+Ns);const Qt=Math.floor(function(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}(9007199254740991));function Yt(e){let t=null;if("string"!=typeof e&&Kt.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=Wt(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&Kt.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>Gt[e])).join("");for(;t.length>=Qt;){let e=t.substring(0,Qt);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}(e)&&Kt.throwArgumentError("bad icap checksum","address",e),t=function(e){return new nt(e,36).toString(16)}(e.substring(4));t.length<40;)t="0"+t;t=Wt("0x"+t)}else Kt.throwArgumentError("invalid address","address",e);return t}function Zt(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}new je("properties/5.7.0"),new je(Rt);new Uint8Array(32).fill(0),ct.from(-1);const Jt=ct.from(0),Xt=ct.from(1);ct.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ye(Xt.toHexString(),32),Ye(Jt.toHexString(),32);var er={},tr={},rr=nr;function nr(e,t){if(!e)throw new Error(t||"Assertion failed")}nr.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var ir={exports:{}};"function"==typeof Object.create?ir.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ir.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}};var or=rr,ar=ir.exports;function sr(e,t){return!(55296!==(64512&e.charCodeAt(t))||t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1))}function cr(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function ur(e){return 1===e.length?"0"+e:e}function lr(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}tr.inherits=ar,tr.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i>6|192,r[n++]=63&o|128):sr(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i>>0}return o},tr.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},tr.rotr32=function(e,t){return e>>>t|e<<32-t},tr.rotl32=function(e,t){return e<>>32-t},tr.sum32=function(e,t){return e+t>>>0},tr.sum32_3=function(e,t,r){return e+t+r>>>0},tr.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},tr.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},tr.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},tr.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},tr.sum64_lo=function(e,t,r,n){return t+n>>>0},tr.sum64_4_hi=function(e,t,r,n,i,o,a,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},tr.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},tr.sum64_5_hi=function(e,t,r,n,i,o,a,s,c,u){var l=0,d=t;return l+=(d=d+n>>>0)>>0)>>0)>>0)>>0},tr.sum64_5_lo=function(e,t,r,n,i,o,a,s,c,u){return t+n+o+s+u>>>0},tr.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},tr.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},tr.shr64_hi=function(e,t,r){return e>>>r},tr.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0};var dr={},fr=tr,hr=rr;function pr(){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}dr.BlockHash=pr,pr.prototype.update=function(e,t){if(e=fr.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=fr.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o>>3},mr.g1_256=function(e){return yr(e,17)^yr(e,19)^e>>>10};var Ar=tr,_r=dr,Er=mr,Sr=Ar.rotl32,kr=Ar.sum32,xr=Ar.sum32_5,Cr=Er.ft_1,Ir=_r.BlockHash,Tr=[1518500249,1859775393,2400959708,3395469782];function Or(){if(!(this instanceof Or))return new Or;Ir.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Ar.inherits(Or,Ir);var Pr=Or;Or.blockSize=512,Or.outSize=160,Or.hmacStrength=80,Or.padLength=64,Or.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),Zn(e.length<=this.blockSize);for(var t=e.length;t>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),ii=ei((function(e,t){var r=t;r.assert=ti,r.toArray=ni.toArray,r.zero2=ni.zero2,r.toHex=ni.toHex,r.encode=ni.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,c=e.andln(3)+i&3,u=t.andln(3)+o&3;3===c&&(c=-1),3===u&&(u=-1),1&c?a=3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?c:-c:a=0,r[0].push(a),1&u?s=3!==(n=t.andln(7)+o&7)&&5!==n||2!==c?u:-u:s=0,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new tt(e,"hex","le")}})),oi=ii.getNAF,ai=ii.getJSF,si=ii.assert;function ci(e,t){this.type=e,this.p=new tt(t.p,16),this.red=t.prime?tt.red(t.prime):tt.mont(this.p),this.zero=new tt(0).toRed(this.red),this.one=new tt(1).toRed(this.red),this.two=new tt(2).toRed(this.red),this.n=t.n&&new tt(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var ui=ci;function li(e,t){this.curve=e,this.type=t,this.precomputed=null}ci.prototype.point=function(){throw new Error("Not implemented")},ci.prototype.validate=function(){throw new Error("Not implemented")},ci.prototype._fixedNafMul=function(e,t){si(e.precomputed);var r=e._getDoubles(),n=oi(t,1,this._bitLength),i=(1<=o;c--)a=(a<<1)+n[c];s.push(a)}for(var u=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(o=0;o=0;s--){for(var c=0;s>=0&&0===o[s];s--)c++;if(s>=0&&c++,a=a.dblp(c),s<0)break;var u=o[s];si(0!==u),a="affine"===e.type?u>0?a.mixedAdd(i[u-1>>1]):a.mixedAdd(i[-u-1>>1].neg()):u>0?a.add(i[u-1>>1]):a.add(i[-u-1>>1].neg())}return"affine"===e.type?a.toP():a},ci.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,c=this._wnafT1,u=this._wnafT2,l=this._wnafT3,d=0;for(o=0;o=1;o-=2){var h=o-1,p=o;if(1===c[h]&&1===c[p]){var g=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(g[1]=t[h].add(t[p]),g[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(g[1]=t[h].toJ().mixedAdd(t[p]),g[2]=t[h].add(t[p].neg())):(g[1]=t[h].toJ().mixedAdd(t[p]),g[2]=t[h].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],y=ai(r[h],r[p]);for(d=Math.max(y[0].length,d),l[h]=new Array(d),l[p]=new Array(d),a=0;a=0;o--){for(var _=0;o>=0;){var E=!0;for(a=0;a=0&&_++,w=w.dblp(_),o<0)break;for(a=0;a0?s=u[a][S-1>>1]:S<0&&(s=u[a][-S-1>>1].neg()),w="affine"===s.type?w.mixedAdd(s):w.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},li.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(o=t,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}]},hi.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:c.add(u).neg()}},hi.prototype.pointFromX=function(e,t){(e=new tt(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},hi.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},hi.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},gi.prototype.isInfinity=function(){return this.inf},gi.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},gi.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},gi.prototype.getX=function(){return this.x.fromRed()},gi.prototype.getY=function(){return this.y.fromRed()},gi.prototype.mul=function(e){return e=new tt(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},gi.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},gi.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},gi.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},gi.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},gi.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},di(mi,ui.BasePoint),hi.prototype.jpoint=function(e,t,r){return new mi(this,e,t,r)},mi.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},mi.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},mi.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),d=n.redMul(u),f=c.redSqr().redIAdd(l).redISub(d).redISub(d),h=c.redMul(d.redISub(f)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},mi.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=r.redMul(c),d=s.redSqr().redIAdd(u).redISub(l).redISub(l),f=s.redMul(l.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},mi.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},mi.prototype.inspect=function(){return this.isInfinity()?"":""},mi.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var yi=ei((function(e,t){var r=t;r.base=ui,r.short=pi,r.mont=null,r.edwards=null})),vi=ei((function(e,t){var r,n=t,i=ii.assert;function o(e){"short"===e.type?this.curve=new yi.short(e):"edwards"===e.type?this.curve=new yi.edwards(e):this.curve=new yi.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{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:er.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:er.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:er.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:er.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:er.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:er.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:er.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch{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:er.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function bi(e){if(!(this instanceof bi))return new bi(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=ni.toArray(e.entropy,e.entropyEnc||"hex"),r=ni.toArray(e.nonce,e.nonceEnc||"hex"),n=ni.toArray(e.pers,e.persEnc||"hex");ti(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var wi=bi;bi.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},bi.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=ni.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var Si=ii.assert;function ki(e,t){if(e instanceof ki)return e;this._importDER(e,t)||(Si(e.r&&e.s,"Signature without r or s"),this.r=new tt(e.r,16),this.s=new tt(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var xi=ki;function Ci(){this.place=0}function Ii(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function Ti(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}ki.prototype._importDER=function(e,t){e=ii.toArray(e,t);var r=new Ci;if(48!==e[r.place++])return!1;var n=Ii(e,r);if(!1===n||n+r.place!==e.length||2!==e[r.place++])return!1;var i=Ii(e,r);if(!1===i)return!1;var o=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var a=Ii(e,r);if(!1===a||e.length!==a+r.place)return!1;var s=e.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 tt(o),this.s=new tt(s),this.recoveryParam=null,!0},ki.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=Ti(t),r=Ti(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];Oi(n,t.length),(n=n.concat(t)).push(2),Oi(n,r.length);var i=n.concat(r),o=[48];return Oi(o,i.length),o=o.concat(i),ii.encode(o,e)};var Pi=function(){throw new Error("unsupported")},Mi=ii.assert;function Ri(e){if(!(this instanceof Ri))return new Ri(e);"string"==typeof e&&(Mi(Object.prototype.hasOwnProperty.call(vi,e),"Unknown curve "+e),e=vi[e]),e instanceof vi.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Ni=Ri;Ri.prototype.keyPair=function(e){return new Ei(this,e)},Ri.prototype.keyFromPrivate=function(e,t){return Ei.fromPrivate(this,e,t)},Ri.prototype.keyFromPublic=function(e,t){return Ei.fromPublic(this,e,t)},Ri.prototype.genKeyPair=function(e){e||(e={});for(var t=new wi({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Pi(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new tt(2));;){var i=new tt(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},Ri.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Ri.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new tt(e,16));for(var i=this.n.byteLength(),o=t.getPrivate().toArray("be",i),a=e.toArray("be",i),s=new wi({hash:this.hash,entropy:o,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new tt(1)),u=0;;u++){var l=n.k?n.k(u):new tt(s.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(c)>=0)){var d=this.g.mul(l);if(!d.isInfinity()){var f=d.getX(),h=f.umod(this.n);if(0!==h.cmpn(0)){var p=l.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var g=(d.getY().isOdd()?1:0)|(0!==f.cmp(h)?2:0);return n.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),g^=1),new xi({r:h,s:p,recoveryParam:g})}}}}}},Ri.prototype.verify=function(e,t,r,n){e=this._truncateToN(new tt(e,16)),r=this.keyFromPublic(r,n);var i=(t=new xi(t,"hex")).r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,s=o.invm(this.n),c=s.mul(e).umod(this.n),u=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),u)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(c,r.getPublic(),u)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)},Ri.prototype.recoverPubKey=function(e,t,r,n){Mi((3&r)===r,"The recovery param is more than two bits"),t=new xi(t,n);var i=this.n,o=new tt(e),a=t.r,s=t.s,c=1&r,u=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");a=u?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var l=t.r.invm(i),d=i.sub(o).mul(l).umod(i),f=s.mul(l).umod(i);return this.g.mulAdd(d,a,f)},Ri.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new xi(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch{continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var Li=ei((function(e,t){var r=t;r.version="6.5.4",r.utils=ii,r.rand=function(){throw new Error("unsupported")},r.curve=yi,r.curves=vi,r.ec=Ni,r.eddsa=null})).ec;const Bi=new je("signing-key/5.7.0");let Di=null;function Ui(){return Di||(Di=new Li("secp256k1")),Di}class ji{constructor(e){Zt(this,"curve","secp256k1"),Zt(this,"privateKey",Ge(e)),32!==function(e){if("string"!=typeof e)e=Ge(e);else if(!Ke(e)||e.length%2)return null;return(e.length-2)/2}(this.privateKey)&&Bi.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=Ui().keyFromPrivate($e(this.privateKey));Zt(this,"publicKey","0x"+t.getPublic(!1,"hex")),Zt(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),Zt(this,"_isSigningKey",!0)}_addPoint(e){const t=Ui().keyFromPublic($e(this.publicKey)),r=Ui().keyFromPublic($e(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=Ui().keyFromPrivate($e(this.privateKey)),r=$e(e);32!==r.length&&Bi.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return Ze({recoveryParam:n.recoveryParam,r:Ye("0x"+n.r.toString(16),32),s:Ye("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=Ui().keyFromPrivate($e(this.privateKey)),r=Ui().keyFromPublic($e(Fi(e)));return Ye("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function Fi(e,t){const r=$e(e);if(32===r.length){const e=new ji(r);return t?"0x"+Ui().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?Ge(r):"0x"+Ui().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+Ui().keyFromPublic(r).getPublic(!0,"hex"):Ge(r):Bi.throwArgumentError("invalid public or private key","key","[REDACTED]")}var zi;function qi(e,t){return function(e){return Yt(Qe(Je(Qe(Fi(e),1)),12))}(function(e,t){const r=Ze(t),n={r:$e(r.r),s:$e(r.s)};return"0x"+Ui().recoverPubKey($e(e),n,r.recoveryParam).encode("hex",!1)}($e(e),t))}new je("transactions/5.7.0"),function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(zi||(zi={}));const Hi="https://rpc.walletconnect.com/v1";async function Vi(e,t,r,n,i,o){switch(r.t){case"eip191":return $i(e,t,r.s);case"eip1271":return await Ki(e,t,r.s,n,i,o);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${r.t}`)}}function $i(e,t,r){return qi($t(t),r).toLowerCase()===e.toLowerCase()}async function Ki(e,t,r,n,i,o){try{const a="0x1626ba7e",s="0000000000000000000000000000000000000000000000000000000000000040",c="0000000000000000000000000000000000000000000000000000000000000041",u=r.substring(2),l=a+$t(t).substring(2)+s+c+u,d=await fetch(`${o||Hi}/?chainId=${n}&projectId=${i}`,{method:"POST",body:JSON.stringify({id:Date.now()+Math.floor(1e3*Math.random()),jsonrpc:"2.0",method:"eth_call",params:[{to:e,data:l},"latest"]})}),{result:f}=await d.json();return!!f&&f.slice(0,a.length).toLowerCase()===a.toLowerCase()}catch(a){return console.error("isValidEip1271Signature: ",a),!1}}var Wi=Object.defineProperty,Gi=Object.defineProperties,Qi=Object.getOwnPropertyDescriptors,Yi=Object.getOwnPropertySymbols,Zi=Object.prototype.hasOwnProperty,Ji=Object.prototype.propertyIsEnumerable,Xi=(e,t,r)=>t in e?Wi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eo=(e,t)=>{for(var r in t||(t={}))Zi.call(t,r)&&Xi(e,r,t[r]);if(Yi)for(var r of Yi(t))Ji.call(t,r)&&Xi(e,r,t[r]);return e},to=(e,t)=>Gi(e,Qi(t));const ro=e=>e?.split(":"),no=e=>{const t=e&&ro(e);if(t)return e.includes("did:pkh:")?t[3]:t[1]},io=e=>{const t=e&&ro(e);if(t)return t[2]+":"+t[3]},oo=e=>{const t=e&&ro(e);if(t)return t.pop()};async function ao(e){const{cacao:t,projectId:r}=e,{s:n,p:i}=t,o=so(i,i.iss),a=oo(i.iss);return await Vi(a,o,n,no(i.iss),r)}const so=(e,t)=>{const r=`${e.domain} wants you to sign in with your Ethereum account:`,n=oo(t);if(!e.aud&&!e.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let i=e.statement||void 0;const o=`URI: ${e.aud||e.uri}`,a=`Version: ${e.version}`,s=`Chain ID: ${no(t)}`,c=`Nonce: ${e.nonce}`,u=`Issued At: ${e.iat}`,l=e.resources?`Resources:${e.resources.map((e=>`\n- ${e}`)).join("")}`:void 0,d=Mo(e.resources);if(d){i=Io(i,Eo(d))}return[r,n,"",i,"",o,a,s,c,u,l].filter((e=>null!=e)).join("\n")};function co(e,t,r){return r.includes("did:pkh:")||(r=`did:pkh:${r}`),{h:{t:"caip122"},p:{iss:r,domain:e.domain,aud:e.aud,version:e.version,nonce:e.nonce,iat:e.iat,statement:e.statement,requestId:e.requestId,resources:e.resources,nbf:e.nbf,exp:e.exp},s:t}}function uo(e){var t;const{authPayload:r,chains:n,methods:i}=e,o=r.statement||"";if(null==n||!n.length)return r;const a=xe(r.chains,n);if(null==a||!a.length)throw new Error("No supported chains");const s=lo(r.resources);if(!s)return r;vo(s);const c=ho(s,"eip155");let u=r?.resources||[];if(null!=c&&c.length){const e=go(c),n=xe(e,i);if(null==n||!n.length)throw new Error(`Supported methods don't satisfy the requested: ${JSON.stringify(e)}, supported: ${JSON.stringify(i)}`);const o=wo(s,"eip155",Ao("request",n,{chains:a}));u=(null==(t=r?.resources)?void 0:t.slice(0,-1))||[],u.push(_o(o))}return to(eo({},r),{statement:Po(o,Mo(u)),chains:a,resources:null!=r&&r.resources||u.length>0?u:void 0})}function lo(e){const t=Mo(e);if(t&&ko(t))return Eo(t)}function fo(e,t){var r;return null==(r=e?.att)?void 0:r.hasOwnProperty(t)}function ho(e,t){var r,n;return null!=(r=e?.att)&&r[t]?Object.keys(null==(n=e?.att)?void 0:n[t]):[]}function po(e){return e?.map((e=>Object.keys(e)))||[]}function go(e){return e?.map((e=>{var t;return null==(t=e.split("/"))?void 0:t[1]}))||[]}function mo(e){return Buffer.from(JSON.stringify(e)).toString("base64")}function yo(e){return JSON.parse(Buffer.from(e,"base64").toString("utf-8"))}function vo(e){if(!e)throw new Error("No recap provided, value is undefined");if(!e.att)throw new Error("No `att` property found");const t=Object.keys(e.att);if(null==t||!t.length)throw new Error("No resources found in `att` property");t.forEach((t=>{const r=e.att[t];if(Array.isArray(r))throw new Error(`Resource must be an object: ${t}`);if("object"!=typeof r)throw new Error(`Resource must be an object: ${t}`);if(!Object.keys(r).length)throw new Error(`Resource object is empty: ${t}`);Object.keys(r).forEach((e=>{const t=r[e];if(!Array.isArray(t))throw new Error(`Ability limits ${e} must be an array of objects, found: ${t}`);if(!t.length)throw new Error(`Value of ${e} is empty array, must be an array with objects`);t.forEach((t=>{if("object"!=typeof t)throw new Error(`Ability limits (${e}) must be an array of objects, found: ${t}`)}))}))}))}function bo(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return r?.sort(((e,t)=>e.localeCompare(t))),{att:{[e]:Ao(t,r,n)}}}function wo(e,t,r){var n;return e.att[t]=eo({},r),(null==(n=Object.keys(e.att))?void 0:n.sort(((e,t)=>e.localeCompare(t)))).reduce(((t,r)=>(t.att[r]=e.att[r],t)),{att:{}})}function Ao(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t=t?.sort(((e,t)=>e.localeCompare(t)));const n=t.map((t=>({[`${e}/${t}`]:[r]})));return Object.assign({},...n)}function _o(e){return vo(e),`urn:recap:${mo(e).replace(/=/g,"")}`}function Eo(e){const t=yo(e.replace("urn:recap:",""));return vo(t),t}function So(e,t,r){return _o(bo(e,t,r))}function ko(e){return e&&e.includes("urn:recap:")}function xo(e,t){return _o(Co(Eo(e),Eo(t)))}function Co(e,t){vo(e),vo(t);const r=Object.keys(e.att).concat(Object.keys(t.att)).sort(((e,t)=>e.localeCompare(t))),n={att:{}};return r.forEach((r=>{var i,o;Object.keys((null==(i=e.att)?void 0:i[r])||{}).concat(Object.keys((null==(o=t.att)?void 0:o[r])||{})).sort(((e,t)=>e.localeCompare(t))).forEach((i=>{var o,a;n.att[r]=to(eo({},n.att[r]),{[i]:(null==(o=e.att[r])?void 0:o[i])||(null==(a=t.att[r])?void 0:a[i])})}))})),n}function Io(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;vo(t);const r="I further authorize the stated URI to perform the following actions on my behalf: ";if(e.includes(r))return e;const n=[];let i=0;Object.keys(t.att).forEach((e=>{const r=Object.keys(t.att[e]).map((e=>({ability:e.split("/")[0],action:e.split("/")[1]})));r.sort(((e,t)=>e.action.localeCompare(t.action)));const o={};r.forEach((e=>{o[e.ability]||(o[e.ability]=[]),o[e.ability].push(e.action)}));const a=Object.keys(o).map((t=>(i++,`(${i}) '${t}': '${o[t].join("', '")}' for '${e}'.`)));n.push(a.join(", ").replace(".,","."))}));return`${e?e+" ":""}${`${r}${n.join(" ")}`}`}function To(e){var t;const r=Eo(e);vo(r);const n=null==(t=r.att)?void 0:t.eip155;return n?Object.keys(n).map((e=>e.split("/")[1])):[]}function Oo(e){const t=Eo(e);vo(t);const r=[];return Object.values(t.att).forEach((e=>{Object.values(e).forEach((e=>{var t;null!=(t=e?.[0])&&t.chains&&r.push(e[0].chains)}))})),[...new Set(r.flat())]}function Po(e,t){if(!t)return e;const r=Eo(t);return vo(r),Io(e,r)}function Mo(e){if(!e)return;const t=e?.[e.length-1];return ko(t)?t:void 0}const Ro="base10",No="base16",Lo="base64pad",Bo="utf8",Do=0,Uo=1,jo=0,Fo=1,zo=12,qo=32;function Ho(){const e=f.generateKeyPair();return{privateKey:(0,h.dI)(e.secretKey,No),publicKey:(0,h.dI)(e.publicKey,No)}}function Vo(){const e=(0,l.randomBytes)(qo);return(0,h.dI)(e,No)}function $o(e,t){const r=f.sharedKey((0,h.sH)(e,No),(0,h.sH)(t,No),!0),n=new u.i(d.aD,r).expand(qo);return(0,h.dI)(n,No)}function Ko(e){const t=(0,d.tW)((0,h.sH)(e,No));return(0,h.dI)(t,No)}function Wo(e){const t=(0,d.tW)((0,h.sH)(e,Bo));return(0,h.dI)(t,No)}function Go(e){return(0,h.sH)(`${e}`,Ro)}function Qo(e){return Number((0,h.dI)(e,Ro))}function Yo(e){const t=Go(typeof e.type<"u"?e.type:Do);if(Qo(t)===Uo&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof e.senderPublicKey<"u"?(0,h.sH)(e.senderPublicKey,No):void 0,n=typeof e.iv<"u"?(0,h.sH)(e.iv,No):(0,l.randomBytes)(zo);return Jo({type:t,sealed:new c.g6((0,h.sH)(e.symKey,No)).seal(n,(0,h.sH)(e.message,Bo)),iv:n,senderPublicKey:r})}function Zo(e){const t=new c.g6((0,h.sH)(e.symKey,No)),{sealed:r,iv:n}=Xo(e.encoded),i=t.open(n,r);if(null===i)throw new Error("Failed to decrypt");return(0,h.dI)(i,Bo)}function Jo(e){if(Qo(e.type)===Uo){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return(0,h.dI)((0,h.xW)([e.type,e.senderPublicKey,e.iv,e.sealed]),Lo)}return(0,h.dI)((0,h.xW)([e.type,e.iv,e.sealed]),Lo)}function Xo(e){const t=(0,h.sH)(e,Lo),r=t.slice(jo,Fo),n=Fo;if(Qo(r)===Uo){const e=n+qo,i=e+zo,o=t.slice(n,e),a=t.slice(e,i);return{type:r,sealed:t.slice(i),iv:a,senderPublicKey:o}}const i=n+zo,o=t.slice(n,i);return{type:r,sealed:t.slice(i),iv:o}}function ea(e,t){const r=Xo(e);return ta({type:Qo(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?(0,h.dI)(r.senderPublicKey,No):void 0,receiverPublicKey:t?.receiverPublicKey})}function ta(e){const t=e?.type||Do;if(t===Uo){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function ra(e){return e.type===Uo&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}const na="irn";function ia(e){return e?.relay||{protocol:na}}function oa(e){const t=p.CG[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var aa=Object.defineProperty,sa=Object.defineProperties,ca=Object.getOwnPropertyDescriptors,ua=Object.getOwnPropertySymbols,la=Object.prototype.hasOwnProperty,da=Object.prototype.propertyIsEnumerable,fa=(e,t,r)=>t in e?aa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ha=(e,t)=>{for(var r in t||(t={}))la.call(t,r)&&fa(e,r,t[r]);if(ua)for(var r of ua(t))da.call(t,r)&&fa(e,r,t[r]);return e},pa=(e,t)=>sa(e,ca(t));function ga(e){const t={},r="relay"+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-");return Object.keys(e).forEach((n=>{if(n.startsWith(r)){const i=n.replace(r,""),o=e[n];t[i]=o}})),t}function ma(e){const t=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),r=-1!==e.indexOf("?")?e.indexOf("?"):void 0,n=e.substring(0,t),i=e.substring(t+1,r).split("@"),o=typeof r<"u"?e.substring(r):"",a=s.parse(o),c="string"==typeof a.methods?a.methods.split(","):void 0;return{protocol:n,topic:ya(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:ga(a),methods:c,expiryTimestamp:a.expiryTimestamp?parseInt(a.expiryTimestamp,10):void 0}}function ya(e){return e.startsWith("//")?e.substring(2):e}function va(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";const r={};return Object.keys(e).forEach((n=>{const i="relay"+t+n;e[n]&&(r[i]=e[n])})),r}function ba(e){return`${e.protocol}:${e.topic}@${e.version}?`+s.stringify(ha(pa(ha({symKey:e.symKey},va(e.relay)),{expiryTimestamp:e.expiryTimestamp}),e.methods?{methods:e.methods.join(",")}:{}))}var wa=Object.defineProperty,Aa=Object.defineProperties,_a=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertySymbols,Sa=Object.prototype.hasOwnProperty,ka=Object.prototype.propertyIsEnumerable,xa=(e,t,r)=>t in e?wa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ca=(e,t)=>{for(var r in t||(t={}))Sa.call(t,r)&&xa(e,r,t[r]);if(Ea)for(var r of Ea(t))ka.call(t,r)&&xa(e,r,t[r]);return e},Ia=(e,t)=>Aa(e,_a(t));function Ta(e){const t=[];return e.forEach((e=>{const[r,n]=e.split(":");t.push(`${r}:${n}`)})),t}function Oa(e){const t=[];return Object.values(e).forEach((e=>{t.push(...Ta(e.accounts))})),t}function Pa(e,t){const r=[];return Object.values(e).forEach((e=>{Ta(e.accounts).includes(t)&&r.push(...e.methods)})),r}function Ma(e,t){const r=[];return Object.values(e).forEach((e=>{Ta(e.accounts).includes(t)&&r.push(...e.events)})),r}function Ra(e,t){const r=ls(e,t);if(r)throw new Error(r.message);const n={};for(const[i,o]of Object.entries(e))n[i]={methods:o.methods,events:o.events,chains:o.accounts.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))};return n}function Na(e){const{proposal:{requiredNamespaces:t,optionalNamespaces:r={}},supportedNamespaces:n}=e,i=Da(t),o=Da(r),a={};Object.keys(n).forEach((e=>{const t=n[e].chains,r=n[e].methods,i=n[e].events,o=n[e].accounts;t.forEach((t=>{if(!o.some((e=>e.includes(t))))throw new Error(`No accounts provided for chain ${t} in namespace ${e}`)})),a[e]={chains:t,methods:r,events:i,accounts:o}}));const s=_s(t,a,"approve()");if(s)throw new Error(s.message);const c={};return Object.keys(t).length||Object.keys(r).length?(Object.keys(i).forEach((e=>{const t=n[e].chains.filter((t=>{var r,n;return null==(n=null==(r=i[e])?void 0:r.chains)?void 0:n.includes(t)})),r=n[e].methods.filter((t=>{var r,n;return null==(n=null==(r=i[e])?void 0:r.methods)?void 0:n.includes(t)})),o=n[e].events.filter((t=>{var r,n;return null==(n=null==(r=i[e])?void 0:r.events)?void 0:n.includes(t)})),a=t.map((t=>n[e].accounts.filter((e=>e.includes(`${t}:`))))).flat();c[e]={chains:t,methods:r,events:o,accounts:a}})),Object.keys(o).forEach((e=>{var t,r,i,a,s,u;if(!n[e])return;const l=null==(r=null==(t=o[e])?void 0:t.chains)?void 0:r.filter((t=>n[e].chains.includes(t))),d=n[e].methods.filter((t=>{var r,n;return null==(n=null==(r=o[e])?void 0:r.methods)?void 0:n.includes(t)})),f=n[e].events.filter((t=>{var r,n;return null==(n=null==(r=o[e])?void 0:r.events)?void 0:n.includes(t)})),h=l?.map((t=>n[e].accounts.filter((e=>e.includes(`${t}:`))))).flat();c[e]={chains:Ee(null==(i=c[e])?void 0:i.chains,l),methods:Ee(null==(a=c[e])?void 0:a.methods,d),events:Ee(null==(s=c[e])?void 0:s.events,f),accounts:Ee(null==(u=c[e])?void 0:u.accounts,h)}})),c):a}function La(e){return e.includes(":")}function Ba(e){return La(e)?e.split(":")[0]:e}function Da(e){var t,r,n;const i={};if(!$a(e))return i;for(const[o,a]of Object.entries(e)){const e=La(o)?[o]:a.chains,s=a.methods||[],c=a.events||[],u=Ba(o);i[u]=Ia(Ca({},i[u]),{chains:Ee(e,null==(t=i[u])?void 0:t.chains),methods:Ee(s,null==(r=i[u])?void 0:r.methods),events:Ee(c,null==(n=i[u])?void 0:n.events)})}return i}function Ua(e){const t={};return e?.forEach((e=>{const[r,n]=e.split(":");t[r]||(t[r]={accounts:[],chains:[],events:[]}),t[r].accounts.push(e),t[r].chains.push(`${r}:${n}`)})),t}function ja(e,t){const r=Ua(t=t.map((e=>e.replace("did:pkh:",""))));for(const[n,i]of Object.entries(r))i.methods?i.methods=Ee(i.methods,e):i.methods=e,i.events=["chainChanged","accountsChanged"];return r}const Fa={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},za={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function qa(e,t){const{message:r,code:n}=za[e];return{message:t?`${r} ${t}`:r,code:n}}function Ha(e,t){const{message:r,code:n}=Fa[e];return{message:t?`${r} ${t}`:r,code:n}}function Va(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function $a(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function Ka(e){return typeof e>"u"}function Wa(e,t){return!(!t||!Ka(e))||"string"==typeof e&&!!e.trim().length}function Ga(e,t){return!(!t||!Ka(e))||"number"==typeof e&&!isNaN(e)}function Qa(e,t){const{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),i=Object.keys(r);let o=!0;return!!ae(i,n)&&(n.forEach((t=>{const{accounts:n,methods:i,events:a}=e.namespaces[t],s=Ta(n),c=r[t];(!ae(T(t,c),s)||!ae(c.methods,i)||!ae(c.events,a))&&(o=!1)})),o)}function Ya(e){return!(!Wa(e,!1)||!e.includes(":"))&&2===e.split(":").length}function Za(e){if(Wa(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&Ya(e)}}return!1}function Ja(e){if(Wa(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function Xa(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}function es(e){return e?.topic}function ts(e,t){let r=null;return Wa(e?.publicKey,!1)||(r=qa("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function rs(e){let t=!0;return Va(e)?e.length&&(t=e.every((e=>Wa(e,!1)))):t=!1,t}function ns(e,t,r){let n=null;return Va(t)&&t.length?t.forEach((e=>{n||Ya(e)||(n=Ha("UNSUPPORTED_CHAINS",`${r}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):Ya(e)||(n=Ha("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function is(e,t,r){let n=null;return Object.entries(e).forEach((e=>{let[i,o]=e;if(n)return;const a=ns(i,T(i,o),`${t} ${r}`);a&&(n=a)})),n}function os(e,t){let r=null;return Va(e)?e.forEach((e=>{r||Za(e)||(r=Ha("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):r=Ha("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function as(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;const n=os(e?.accounts,`${t} namespace`);n&&(r=n)})),r}function ss(e,t){let r=null;return rs(e?.methods)?rs(e?.events)||(r=Ha("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=Ha("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}function cs(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;const n=ss(e,`${t}, namespace`);n&&(r=n)})),r}function us(e,t,r){let n=null;if(e&&$a(e)){const i=cs(e,t);i&&(n=i);const o=is(e,t,r);o&&(n=o)}else n=qa("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return n}function ls(e,t){let r=null;if(e&&$a(e)){const n=cs(e,t);n&&(r=n);const i=as(e,t);i&&(r=i)}else r=qa("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function ds(e){return Wa(e.protocol,!0)}function fs(e,t){let r=!1;return t&&!e?r=!0:e&&Va(e)&&e.length&&e.forEach((e=>{r=ds(e)})),r}function hs(e){return"number"==typeof e}function ps(e){return typeof e<"u"&&null!==typeof e}function gs(e){return!(!e||"object"!=typeof e||!e.code||!Ga(e.code,!1)||!e.message||!Wa(e.message,!1))}function ms(e){return!(Ka(e)||!Wa(e.method,!1))}function ys(e){return!(Ka(e)||Ka(e.result)&&Ka(e.error)||!Ga(e.id,!1)||!Wa(e.jsonrpc,!1))}function vs(e){return!(Ka(e)||!Wa(e.name,!1))}function bs(e,t){return!(!Ya(t)||!Oa(e).includes(t))}function ws(e,t,r){return!!Wa(r,!1)&&Pa(e,t).includes(r)}function As(e,t,r){return!!Wa(r,!1)&&Ma(e,t).includes(r)}function _s(e,t,r){let n=null;const i=function(e){const t={};return Object.keys(e).forEach((r=>{var n;r.includes(":")?t[r]=e[r]:null==(n=e[r].chains)||n.forEach((n=>{t[n]={methods:e[r].methods,events:e[r].events}}))})),t}(e),o=function(e){const t={};return Object.keys(e).forEach((r=>{if(r.includes(":"))t[r]=e[r];else{const n=Ta(e[r].accounts);n?.forEach((n=>{t[n]={accounts:e[r].accounts.filter((e=>e.includes(`${n}:`))),methods:e[r].methods,events:e[r].events}}))}})),t}(t),a=Object.keys(i),s=Object.keys(o),c=Es(Object.keys(e)),u=Es(Object.keys(t)),l=c.filter((e=>!u.includes(e)));return l.length&&(n=qa("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.\n Required: ${l.toString()}\n Received: ${Object.keys(t).toString()}`)),ae(a,s)||(n=qa("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.\n Required: ${a.toString()}\n Approved: ${s.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||n)return;const i=Ta(t[e].accounts);i.includes(e)||(n=qa("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${e}\n Required: ${e}\n Approved: ${i.toString()}`))})),a.forEach((e=>{n||(ae(i[e].methods,o[e].methods)?ae(i[e].events,o[e].events)||(n=qa("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${e}`)):n=qa("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${e}`))})),n}function Es(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function Ss(e,t){return Ga(e,!1)&&e<=t.max&&e>=t.min}function ks(){const e=W();return new Promise((t=>{switch(e){case D.browser:t(xs());break;case D.reactNative:t(Cs());break;case D.node:default:t(!0)}}))}function xs(){return K()&&navigator?.onLine}async function Cs(){if($()&&typeof r.g<"u"&&null!=r.g&&r.g.NetInfo){const e=await(null==r.g?void 0:r.g.NetInfo.fetch());return e?.isConnected}return!0}function Is(){return!0}function Ts(e){switch(W()){case D.browser:Os(e);break;case D.reactNative:Ps(e);case D.node:}}function Os(e){!$()&&K()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}function Ps(e){$()&&typeof r.g<"u"&&null!=r.g&&r.g.NetInfo&&r.g?.NetInfo.addEventListener((t=>e(t?.isConnected)))}const Ms={};class Rs{static get(e){return Ms[e]}static set(e,t){Ms[e]=t}static delete(e){delete Ms[e]}}},72146:(e,t)=>{"use strict";function r(e){let t;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(t=window[e]),t}function n(e){const t=r(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=n,t.getDocumentOrThrow=function(){return n("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return n("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return n("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return n("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return n("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},5509:(e,t,r)=>{"use strict";t.g=void 0;const n=r(72146);t.g=function(){let e,t;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(o){return null}function r(){for(var t=arguments.length,r=new Array(t),n=0;nt.getAttribute(e))).filter((e=>!!e&&r.includes(e)));if(n.length&&n){const e=t.getAttribute("content");if(e)return e}}return""}const i=function(){let t=r("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:r("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const r=e.getElementsByTagName("link"),n=[];for(let e=0;e-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let r=t.protocol+"//"+t.host;if(0===e.indexOf("/"))r+=e;else{const n=t.pathname.split("/");n.pop();r+=n.join("/")+"/"+e}n.push(r)}else if(0===e.indexOf("//")){const r=t.protocol+e;n.push(r)}else n.push(e)}}return n}(),name:i}}},41697:(e,t,r)=>{"use strict";const{SymbolDispose:n}=r(66592),{AbortError:i,codes:o}=r(19909),{isNodeStream:a,isWebStream:s,kControllerErrorFunction:c}=r(53169),u=r(62780),{ERR_INVALID_ARG_TYPE:l}=o;let d;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!==typeof e||!("aborted"in e))throw new l(t,"AbortSignal",e)})(t,"signal"),!a(r)&&!s(r))throw new l("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!==typeof e||!("aborted"in e))return t;const o=a(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[c](new i(void 0,{cause:e.reason}))};if(e.aborted)o();else{d=d||r(69894).addAbortListener;const i=d(e,o);u(t,i[n])}return t}},77987:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:a}=r(66592),{Buffer:s}=r(93325),{inspect:c}=r(69894);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(eo.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(o(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new a(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}o(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return c(this,{...t,depth:0,customInspect:!1})}}},66024:(e,t,r)=>{"use strict";const{pipeline:n}=r(97696),i=r(43528),{destroyer:o}=r(37414),{isNodeStream:a,isReadable:s,isWritable:c,isWebStream:u,isTransformStream:l,isWritableStream:d,isReadableStream:f}=r(53169),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:g}}=r(19909),m=r(62780);e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&!(c(t[n])||d(t[n])||l(t[n])))throw new p(`streams[${n}]`,y[n],"must be writable")}let v,b,w,A,_;const E=t[0],S=n(t,(function(e){const t=A;A=null,t?t(e):e?_.destroy(e):x||k||_.destroy()})),k=!!(c(E)||d(E)||l(E)),x=!!(s(S)||f(S)||l(S));if(_=new i({writableObjectMode:!(null===E||void 0===E||!E.writableObjectMode),readableObjectMode:!(null===S||void 0===S||!S.readableObjectMode),writable:k,readable:x}),k){if(a(E))_._write=function(e,t,r){E.write(e,t)?r():v=r},_._final=function(e){E.end(),b=e},E.on("drain",(function(){if(v){const e=v;v=null,e()}}));else if(u(E)){const e=(l(E)?E.writable:E).getWriter();_._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(i){n(i)}},_._final=async function(t){try{await e.ready,e.close().catch((()=>{})),b=t}catch(r){t(r)}}}const e=l(S)?S.readable:S;m(e,(()=>{if(b){const e=b;b=null,e()}}))}if(x)if(a(S))S.on("readable",(function(){if(w){const e=w;w=null,e()}})),S.on("end",(function(){_.push(null)})),_._read=function(){for(;;){const e=S.read();if(null===e)return void(w=_._read);if(!_.push(e))return}};else if(u(S)){const e=(l(S)?S.readable:S).getReader();_._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!_.push(t))return;if(r)return void _.push(null)}catch{return}}}return _._destroy=function(e,t){e||null===A||(e=new h),w=null,v=null,b=null,null===A?t(e):(A=t,a(S)&&o(S,e))},_}},37414:(e,t,r)=>{"use strict";const n=r(85224),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:a}=r(19909),{Symbol:s}=r(66592),{kIsDestroyed:c,isDestroyed:u,isFinished:l,isServerRequest:d}=r(53169),f=s("kDestroy"),h=s("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function g(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,a=e._writableState;p(t,a,o),a&&(a.closed=!0),o&&(o.closed=!0),"function"===typeof r&&r(t),t?n.nextTick(m,e,t):n.nextTick(y,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function m(e,t){v(e,t),y(e)}function y(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!==r&&void 0!==r&&r.emitClose||null!==t&&void 0!==t&&t.emitClose)&&e.emit("close")}function v(e,t){const r=e._readableState,n=e._writableState;null!==n&&void 0!==n&&n.errorEmitted||null!==r&&void 0!==r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function b(e,t,r){const i=e._readableState,o=e._writableState;if(null!==o&&void 0!==o&&o.destroyed||null!==i&&void 0!==i&&i.destroyed)return this;null!==i&&void 0!==i&&i.autoDestroy||null!==o&&void 0!==o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(v,e,t):v(e,t))}function w(e){let t=!1;function r(r){if(t)return void b(e,null!==r&&void 0!==r?r:new o);t=!0;const i=e._readableState,a=e._writableState,s=a||i;i&&(i.constructed=!0),a&&(a.constructed=!0),s.destroyed?e.emit(f,r):r?b(e,r,!0):n.nextTick(A,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(i){n.nextTick(r,i)}}function A(e){e.emit(h)}function _(e){return(null===e||void 0===e?void 0:e.setHeader)&&"function"===typeof e.abort}function E(e){e.emit("close")}function S(e,t){e.emit("error",t),n.nextTick(E,e)}e.exports={construct:function(e,t){if("function"!==typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(h,t),e.listenerCount(h)>1||n.nextTick(w,e)},destroyer:function(e,t){e&&!u(e)&&(t||l(e)||(t=new a),d(e)?(e.socket=null,e.destroy(t)):_(e)?e.abort():_(e.req)?e.req.abort():"function"===typeof e.destroy?e.destroy(t):"function"===typeof e.close?e.close():t?n.nextTick(S,e,t):n.nextTick(E,e),e.destroyed||(e[c]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!==n&&void 0!==n&&n.destroyed||null!==r&&void 0!==r&&r.destroyed?("function"===typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?g(this,e,t):this.once(f,(function(r){g(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:b}},43528:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:a}=r(66592);e.exports=u;const s=r(78078),c=r(43090);a(u.prototype,s.prototype),a(u,s);{const e=o(c.prototype);for(let t=0;t{const n=r(85224),i=r(93325),{isReadable:o,isWritable:a,isIterable:s,isNodeStream:c,isReadableNodeStream:u,isWritableNodeStream:l,isDuplexNodeStream:d,isReadableStream:f,isWritableStream:h}=r(53169),p=r(62780),{AbortError:g,codes:{ERR_INVALID_ARG_TYPE:m,ERR_INVALID_RETURN_VALUE:y}}=r(19909),{destroyer:v}=r(37414),b=r(43528),w=r(78078),A=r(43090),{createDeferredPromise:_}=r(69894),E=r(28390),S=globalThis.Blob||i.Blob,k="undefined"!==typeof S?function(e){return e instanceof S}:function(e){return!1},x=globalThis.AbortController||r(27542).AbortController,{FunctionPrototypeCall:C}=r(66592);class I extends b{constructor(e){super(e),!1===(null===e||void 0===e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null===e||void 0===e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function T(e){const t=e.readable&&"function"!==typeof e.readable.read?w.wrap(e.readable):e.readable,r=e.writable;let n,i,s,c,u,l=!!o(t),d=!!a(r);function f(e){const t=c;c=null,t?t(e):e&&u.destroy(e)}return u=new I({readableObjectMode:!(null===t||void 0===t||!t.readableObjectMode),writableObjectMode:!(null===r||void 0===r||!r.writableObjectMode),readable:l,writable:d}),d&&(p(r,(e=>{d=!1,e&&v(t,e),f(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),l&&(p(t,(e=>{l=!1,e&&v(t,e),f(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(s=u._read);if(!u.push(e))return}}),u._destroy=function(e,o){e||null===c||(e=new g),s=null,n=null,i=null,null===c?o(e):(c=o,v(r,e),v(t,e))},u}e.exports=function e(t,r){if(d(t))return t;if(u(t))return T({readable:t});if(l(t))return T({writable:t});if(c(t))return T({writable:!1,readable:!1});if(f(t))return T({readable:w.fromWeb(t)});if(h(t))return T({writable:A.fromWeb(t)});if("function"===typeof t){const{value:e,write:i,final:o,destroy:a}=function(e){let{promise:t,resolve:r}=_();const i=new x,o=i.signal,a=e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:a,cb:s}=await e;if(n.nextTick(s),a)return;if(o.aborted)throw new g(void 0,{cause:o.reason});({promise:t,resolve:r}=_()),yield i}}(),{signal:o});return{value:a,write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return E(I,e,{objectMode:!0,write:i,final:o,destroy:a});const c=null===e||void 0===e?void 0:e.then;if("function"===typeof c){let t;const r=C(c,e,(e=>{if(null!=e)throw new y("nully","body",e)}),(e=>{v(t,e)}));return t=new I({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:a})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,e)}if(k(t))return e(t.arrayBuffer());if(s(t))return E(I,t,{objectMode:!0,writable:!1});if(f(null===t||void 0===t?void 0:t.readable)&&h(null===t||void 0===t?void 0:t.writable))return I.fromWeb(t);if("object"===typeof(null===t||void 0===t?void 0:t.writable)||"object"===typeof(null===t||void 0===t?void 0:t.readable)){return T({readable:null!==t&&void 0!==t&&t.readable?u(null===t||void 0===t?void 0:t.readable)?null===t||void 0===t?void 0:t.readable:e(t.readable):void 0,writable:null!==t&&void 0!==t&&t.writable?l(null===t||void 0===t?void 0:t.writable)?null===t||void 0===t?void 0:t.writable:e(t.writable):void 0})}const i=null===t||void 0===t?void 0:t.then;if("function"===typeof i){let e;return C(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{v(e,t)})),e=new I({objectMode:!0,writable:!1,read(){}})}throw new m(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},62780:(e,t,r)=>{const n=r(85224),{AbortError:i,codes:o}=r(19909),{ERR_INVALID_ARG_TYPE:a,ERR_STREAM_PREMATURE_CLOSE:s}=o,{kEmptyObject:c,once:u}=r(69894),{validateAbortSignal:l,validateFunction:d,validateObject:f,validateBoolean:h}=r(38899),{Promise:p,PromisePrototypeThen:g,SymbolDispose:m}=r(66592),{isClosed:y,isReadable:v,isReadableNodeStream:b,isReadableStream:w,isReadableFinished:A,isReadableErrored:_,isWritable:E,isWritableNodeStream:S,isWritableStream:k,isWritableFinished:x,isWritableErrored:C,isNodeStream:I,willEmitClose:T,kIsClosedPromise:O}=r(53169);let P;const M=()=>{};function R(e,t,o){var h,p;if(2===arguments.length?(o=t,t=c):null==t?t=c:f(t,"options"),d(o,"callback"),l(t.signal,"options.signal"),o=u(o),w(e)||k(e))return function(e,t,o){let a=!1,s=M;if(t.signal)if(s=()=>{a=!0,o.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(s);else{P=P||r(69894).addAbortListener;const n=P(t.signal,s),i=o;o=u((function(){n[m]();for(var t=arguments.length,r=new Array(t),o=0;oo.apply(e,r)))};return g(e[O].promise,c,c),M}(e,t,o);if(!I(e))throw new a("stream",["ReadableStream","WritableStream","Stream"],e);const R=null!==(h=t.readable)&&void 0!==h?h:b(e),N=null!==(p=t.writable)&&void 0!==p?p:S(e),L=e._writableState,B=e._readableState,D=()=>{e.writable||F()};let U=T(e)&&b(e)===R&&S(e)===N,j=x(e,!1);const F=()=>{j=!0,e.destroyed&&(U=!1),(!U||e.readable&&!R)&&(R&&!z||o.call(e))};let z=A(e,!1);const q=()=>{z=!0,e.destroyed&&(U=!1),(!U||e.writable&&!N)&&(N&&!j||o.call(e))},H=t=>{o.call(e,t)};let V=y(e);const $=()=>{V=!0;const t=C(e)||_(e);return t&&"boolean"!==typeof t?o.call(e,t):R&&!z&&b(e,!0)&&!A(e,!1)?o.call(e,new s):!N||j||x(e,!1)?void o.call(e):o.call(e,new s)},K=()=>{V=!0;const t=C(e)||_(e);if(t&&"boolean"!==typeof t)return o.call(e,t);o.call(e)},W=()=>{e.req.on("finish",F)};!function(e){return e.setHeader&&"function"===typeof e.abort}(e)?N&&!L&&(e.on("end",D),e.on("close",D)):(e.on("complete",F),U||e.on("abort",$),e.req?W():e.on("request",W)),U||"boolean"!==typeof e.aborted||e.on("aborted",$),e.on("end",q),e.on("finish",F),!1!==t.error&&e.on("error",H),e.on("close",$),V?n.nextTick($):null!==L&&void 0!==L&&L.errorEmitted||null!==B&&void 0!==B&&B.errorEmitted?U||n.nextTick(K):(R||U&&!v(e)||!j&&!1!==E(e))&&(N||U&&!E(e)||!z&&!1!==v(e))?B&&e.req&&e.aborted&&n.nextTick(K):n.nextTick(K);const G=()=>{o=M,e.removeListener("aborted",$),e.removeListener("complete",F),e.removeListener("abort",$),e.removeListener("request",W),e.req&&e.req.removeListener("finish",F),e.removeListener("end",D),e.removeListener("close",D),e.removeListener("finish",F),e.removeListener("end",q),e.removeListener("error",H),e.removeListener("close",$)};if(t.signal&&!V){const a=()=>{const r=o;G(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(a);else{P=P||r(69894).addAbortListener;const n=P(t.signal,a),i=o;o=u((function(){n[m]();for(var t=arguments.length,r=new Array(t),o=0;o{const o=R(e,t,(e=>{n&&o(),e?i(e):r()}))}))}},28390:(e,t,r)=>{"use strict";const n=r(85224),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:a}=r(66592),{Buffer:s}=r(93325),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:u}=r(19909).codes;e.exports=function(e,t,r){let l,d;if("string"===typeof t||t instanceof s)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])d=!0,l=t[o]();else{if(!t||!t[a])throw new c("iterable",["Iterable"],t);d=!1,l=t[a]()}const f=new e({objectMode:!0,highWaterMark:1,...r});let h=!1;return f._read=function(){h||(h=!0,async function(){for(;;){try{const{value:e,done:t}=d?await l.next():l.next();if(t)f.push(null);else{const t=e&&"function"===typeof e.then?await e:e;if(null===t)throw h=!1,new u;if(f.push(t))continue;h=!1}}catch(e){f.destroy(e)}break}}())},f._destroy=function(e,t){i(async function(e){const t=void 0!==e&&null!==e,r="function"===typeof l.throw;if(t&&r){const{value:t,done:r}=await l.throw(e);if(await t,r)return}if("function"===typeof l.return){const{value:e}=await l.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},f}},58313:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(66592),{EventEmitter:o}=r(28981);function a(e){o.call(this,e)}function s(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(a.prototype,o.prototype),i(a,o),a.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",c),r.on("close",u));let a=!1;function c(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"===typeof e.destroy&&e.destroy())}function l(e){d(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function d(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",c),r.removeListener("close",u),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",d),r.removeListener("close",d),e.removeListener("close",d)}return s(r,"error",l),s(e,"error",l),r.on("end",d),r.on("close",d),e.on("close",d),e.emit("pipe",r),e},e.exports={Stream:a,prependListener:s}},20170:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(27542).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:a,ERR_OUT_OF_RANGE:s},AbortError:c}=r(19909),{validateAbortSignal:u,validateInteger:l,validateObject:d}=r(38899),f=r(66592).Symbol("kWeak"),h=r(66592).Symbol("kResistStopPropagation"),{finished:p}=r(62780),g=r(66024),{addAbortSignalNoValidate:m}=r(41697),{isWritable:y,isNodeStream:v}=r(53169),{deprecate:b}=r(69894),{ArrayPrototypePush:w,Boolean:A,MathFloor:_,Number:E,NumberIsNaN:S,Promise:k,PromiseReject:x,PromiseResolve:C,PromisePrototypeThen:I,Symbol:T}=r(66592),O=T("kEmpty"),P=T("kEof");function M(e,t){if("function"!==typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&d(t,"options"),null!=(null===t||void 0===t?void 0:t.signal)&&u(t.signal,"options.signal");let n=1;null!=(null===t||void 0===t?void 0:t.concurrency)&&(n=_(t.concurrency));let i=n-1;return null!=(null===t||void 0===t?void 0:t.highWaterMark)&&(i=_(t.highWaterMark)),l(n,"options.concurrency",1),l(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(69894).AbortSignalAny([null===t||void 0===t?void 0:t.signal].filter(A)),a=this,s=[],u={signal:o};let l,d,f=!1,h=0;function p(){f=!0,g()}function g(){h-=1,m()}function m(){d&&!f&&h=i||h>=n)&&await new k((e=>{d=e}))}s.push(P)}catch(t){const e=x(t);I(e,g,p),s.push(e)}finally{f=!0,l&&(l(),l=null)}}();try{for(;;){for(;s.length>0;){const e=await s[0];if(e===P)return;if(o.aborted)throw new c;e!==O&&(yield e),s.shift(),m()}await new k((e=>{l=e}))}}finally{f=!0,d&&(d(),d=null)}}.call(this)}async function R(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;for await(const r of N.call(this,e,t))return!0;return!1}function N(e,t){if("function"!==typeof e)throw new o("fn",["Function","AsyncFunction"],e);return M.call(this,(async function(t,r){return await e(t,r)?t:O}),t)}class L extends a{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function B(e){if(e=E(e),S(e))return 0;if(e<0)throw new s("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:b((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return null!=e&&d(e,"options"),null!=(null===e||void 0===e?void 0:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!==e&&void 0!==e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return null!=t&&d(t,"options"),null!=(null===t||void 0===t?void 0:t.signal)&&u(t.signal,"options.signal"),e=B(e),async function*(){var r;if(null!==t&&void 0!==t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const i of this){var n;if(null!==t&&void 0!==t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;e--<=0&&(yield i)}}.call(this)},filter:N,flatMap:function(e,t){const r=M.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:M,take:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return null!=t&&d(t,"options"),null!=(null===t||void 0===t?void 0:t.signal)&&u(t.signal,"options.signal"),e=B(e),async function*(){var r;if(null!==t&&void 0!==t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const i of this){var n;if(null!==t&&void 0!==t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;if(e-- >0&&(yield i),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&d(t,"options"),null!=(null===t||void 0===t?void 0:t.signal)&&u(t.signal,"options.signal"),v(e)&&!y(e))throw new i("stream",e,"must be writable");const r=g(this,e);return null!==t&&void 0!==t&&t.signal&&m(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if("function"!==typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await R.call(this,(async function(){return!await e(...arguments)}),t)},forEach:async function(e,t){if("function"!==typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of M.call(this,(async function(t,r){return await e(t,r),O}),t));},reduce:async function(e,t,r){var i;if("function"!==typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&d(r,"options"),null!=(null===r||void 0===r?void 0:r.signal)&&u(r.signal,"options.signal");let a=arguments.length>1;if(null!==r&&void 0!==r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new c(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const s=new n,l=s.signal;if(null!==r&&void 0!==r&&r.signal){const e={once:!0,[f]:this,[h]:!0};r.signal.addEventListener("abort",(()=>s.abort()),e)}let g=!1;try{for await(const n of this){var m;if(g=!0,null!==r&&void 0!==r&&null!==(m=r.signal)&&void 0!==m&&m.aborted)throw new c;a?t=await e(t,n,{signal:l}):(t=n,a=!0)}if(!g&&!a)throw new L}finally{s.abort()}return t},toArray:async function(e){null!=e&&d(e,"options"),null!=(null===e||void 0===e?void 0:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!==e&&void 0!==e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c(void 0,{cause:e.signal.reason});w(t,n)}return t},some:R,find:async function(e,t){for await(const r of N.call(this,e,t))return r}}},25290:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(66592);e.exports=o;const i=r(96664);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},97696:(e,t,r)=>{const n=r(85224),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:a,SymbolDispose:s}=r(66592),c=r(62780),{once:u}=r(69894),l=r(37414),d=r(43528),{aggregateTwoErrors:f,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:g,ERR_STREAM_DESTROYED:m,ERR_STREAM_PREMATURE_CLOSE:y},AbortError:v}=r(19909),{validateFunction:b,validateAbortSignal:w}=r(38899),{isIterable:A,isReadable:_,isReadableNodeStream:E,isNodeStream:S,isTransformStream:k,isWebStream:x,isReadableStream:C,isReadableFinished:I}=r(53169),T=globalThis.AbortController||r(27542).AbortController;let O,P,M;function R(e,t,r){let n=!1;e.on("close",(()=>{n=!0}));return{destroy:t=>{n||(n=!0,l.destroyer(e,t||new m("pipe")))},cleanup:c(e,{readable:t,writable:r},(e=>{n=!e}))}}function N(e){if(A(e))return e;if(E(e))return async function*(e){P||(P=r(78078));yield*P.prototype[a].call(e)}(e);throw new h("val",["Readable","Iterable","AsyncIterable"],e)}async function L(e,t,r,n){let i,{end:a}=n,s=null;const u=e=>{if(e&&(i=e),s){const e=s;s=null,e()}},l=()=>new o(((e,t)=>{i?t(i):s=()=>{i?t(i):e()}}));t.on("drain",u);const d=c(t,{readable:!1},u);try{t.writableNeedDrain&&await l();for await(const r of e)t.write(r)||await l();a&&(t.end(),await l()),r()}catch(h){r(i!==h?f(i,h):h)}finally{d(),t.off("drain",u)}}async function B(e,t,r,n){let{end:i}=n;k(t)&&(t=t.writable);const o=t.getWriter();try{for await(const t of e)await o.ready,o.write(t).catch((()=>{}));await o.ready,i&&await o.close(),r()}catch(a){try{await o.abort(a),r(a)}catch(a){r(a)}}}function D(e,t,o){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new g("streams");const a=new T,c=a.signal,u=null===o||void 0===o?void 0:o.signal,l=[];function f(){F(new v)}let m,y,b;w(u,"options.signal"),M=M||r(69894).addAbortListener,u&&(m=M(u,f));const I=[];let P,D=0;function j(e){F(e,0===--D)}function F(e,r){var i;if(!e||y&&"ERR_STREAM_PREMATURE_CLOSE"!==y.code||(y=e),y||r){for(;I.length;)I.shift()(y);null===(i=m)||void 0===i||i[s](),a.abort(),r&&(y||l.forEach((e=>e())),n.nextTick(t,y,b))}}for(let V=0;V0,G=K||!1!==(null===o||void 0===o?void 0:o.end),Q=V===e.length-1;if(S($)){if(G){const{destroy:Y,cleanup:Z}=R($,K,W);I.push(Y),_($)&&Q&&l.push(Z)}function z(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&j(e)}$.on("error",z),_($)&&Q&&l.push((()=>{$.removeListener("error",z)}))}if(0===V)if("function"===typeof $){if(P=$({signal:c}),!A(P))throw new p("Iterable, AsyncIterable or Stream","source",P)}else P=A($)||E($)||k($)?$:d.from($);else if("function"===typeof $){var q;if(k(P))P=N(null===(q=P)||void 0===q?void 0:q.readable);else P=N(P);if(P=$(P,{signal:c}),K){if(!A(P,!0))throw new p("AsyncIterable",`transform[${V-1}]`,P)}else{var H;O||(O=r(25290));const J=new O({objectMode:!0}),X=null===(H=P)||void 0===H?void 0:H.then;if("function"===typeof X)D++,X.call(P,(e=>{b=e,null!=e&&J.write(e),G&&J.end(),n.nextTick(j)}),(e=>{J.destroy(e),n.nextTick(j,e)}));else if(A(P,!0))D++,L(P,J,j,{end:G});else{if(!C(P)&&!k(P))throw new p("AsyncIterable or Promise","destination",P);{const re=P.readable||P;D++,L(re,J,j,{end:G})}}P=J;const{destroy:ee,cleanup:te}=R(P,!1,!0);I.push(ee),Q&&l.push(te)}}else if(S($)){if(E(P)){D+=2;const ne=U(P,$,j,{end:G});_($)&&Q&&l.push(ne)}else if(k(P)||C(P)){const ie=P.readable||P;D++,L(ie,$,j,{end:G})}else{if(!A(P))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],P);D++,L(P,$,j,{end:G})}P=$}else if(x($)){if(E(P))D++,B(N(P),$,j,{end:G});else if(C(P)||A(P))D++,B(P,$,j,{end:G});else{if(!k(P))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],P);D++,B(P.readable,$,j,{end:G})}P=$}else P=d.from($)}return(null!==c&&void 0!==c&&c.aborted||null!==u&&void 0!==u&&u.aborted)&&n.nextTick(f),P}function U(e,t,r,i){let{end:o}=i,a=!1;if(t.on("close",(()=>{a||r(new y)})),e.pipe(t,{end:!1}),o){function s(){a=!0,t.end()}I(e)?n.nextTick(s):e.once("end",s)}else r();return c(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),c(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:D,pipeline:function(){for(var e=arguments.length,t=new Array(e),r=0;r{const n=r(85224),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:a,NumberParseInt:s,ObjectDefineProperties:c,ObjectKeys:u,ObjectSetPrototypeOf:l,Promise:d,SafeSet:f,SymbolAsyncDispose:h,SymbolAsyncIterator:p,Symbol:g}=r(66592);e.exports=Q,Q.ReadableState=G;const{EventEmitter:m}=r(28981),{Stream:y,prependListener:v}=r(58313),{Buffer:b}=r(93325),{addAbortSignal:w}=r(41697),A=r(62780);let _=r(69894).debuglog("stream",(e=>{_=e}));const E=r(77987),S=r(37414),{getHighWaterMark:k,getDefaultHighWaterMark:x}=r(72377),{aggregateTwoErrors:C,codes:{ERR_INVALID_ARG_TYPE:I,ERR_METHOD_NOT_IMPLEMENTED:T,ERR_OUT_OF_RANGE:O,ERR_STREAM_PUSH_AFTER_EOF:P,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:M},AbortError:R}=r(19909),{validateObject:N}=r(38899),L=g("kPaused"),{StringDecoder:B}=r(50923),D=r(28390);l(Q.prototype,y.prototype),l(Q,y);const U=()=>{},{errorOrDestroy:j}=S,F=1,z=16,q=32,H=64,V=2048,$=4096,K=65536;function W(e){return{enumerable:!1,get(){return 0!==(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function G(e,t,n){"boolean"!==typeof n&&(n=t instanceof r(43528)),this.state=V|$|z|q,e&&e.objectMode&&(this.state|=F),n&&e&&e.readableObjectMode&&(this.state|=F),this.highWaterMark=e?k(this,e,"readableHighWaterMark",n):x(!1),this.buffer=new E,this.length=0,this.pipes=[],this.flowing=null,this[L]=null,e&&!1===e.emitClose&&(this.state&=~V),e&&!1===e.autoDestroy&&(this.state&=~$),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new B(e.encoding),this.encoding=e.encoding)}function Q(e){if(!(this instanceof Q))return new Q(e);const t=this instanceof r(43528);this._readableState=new G(e,this,t),e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&w(e.signal,this)),y.call(this,e),S.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function Y(e,t,r,n){_("readableAddChunk",t);const i=e._readableState;let o;if(0===(i.state&F)&&("string"===typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=b.from(t,r).toString(i.encoding):(t=b.from(t,r),r=""))):t instanceof b?r="":y._isUint8Array(t)?(t=y._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new I("chunk",["string","Buffer","Uint8Array"],t))),o)j(e,o);else if(null===t)i.state&=-9,function(e,t){if(_("onEofChunk"),t.ended)return;if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?X(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}(e,i);else if(0!==(i.state&F)||t&&t.length>0)if(n)if(0!==(4&i.state))j(e,new M);else{if(i.destroyed||i.errored)return!1;Z(e,i,t,!0)}else if(i.ended)j(e,new P);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?Z(e,i,t,!1):te(e,i)):Z(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length0?(0!==(t.state&K)?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),0!==(t.state&H)&&X(e)),te(e,t)}c(G.prototype,{objectMode:W(F),ended:W(2),endEmitted:W(4),reading:W(8),constructed:W(z),sync:W(q),needReadable:W(H),emittedReadable:W(128),readableListening:W(256),resumeScheduled:W(512),errorEmitted:W(1024),emitClose:W(V),autoDestroy:W($),destroyed:W(8192),closed:W(16384),closeEmitted:W(32768),multiAwaitDrain:W(K),readingMore:W(1<<17),dataEmitted:W(1<<18)}),Q.prototype.destroy=S.destroy,Q.prototype._undestroy=S.undestroy,Q.prototype._destroy=function(e,t){t(e)},Q.prototype[m.captureRejectionSymbol]=function(e){this.destroy(e)},Q.prototype[h]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new R,this.destroy(e)),new d(((t,r)=>A(this,(n=>n&&n!==e?r(n):t(null)))))},Q.prototype.push=function(e,t){return Y(this,e,t,!1)},Q.prototype.unshift=function(e,t){return Y(this,e,t,!0)},Q.prototype.isPaused=function(){const e=this._readableState;return!0===e[L]||!1===e.flowing},Q.prototype.setEncoding=function(e){const t=new B(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const i of r)n+=t.write(i);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this};function J(e,t){return e<=0||0===t.length&&t.ended?0:0!==(t.state&F)?1:a(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function X(e){const t=e._readableState;_("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(_("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;_("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,ae(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!1===t[L]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){_("readable nexttick read 0"),e.read(0)}function oe(e,t){_("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),ae(e),t.flowing&&!t.reading&&e.read(0)}function ae(e){const t=e._readableState;for(_("flow",t.flowing);t.flowing&&null!==e.read(););}function se(e,t){"function"!==typeof e.read&&(e=Q.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=U;function i(t){this===e?(n(),n=U):n=t}e.on("readable",i);const o=A(e,{writable:!1},(e=>{r=e?C(r,e):null,n(),n=U}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new d(i)}}}catch(a){throw r=C(r,a),r}finally{!r&&!1===(null===t||void 0===t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):S.destroyer(e,null)}}(e,t);return r.stream=e,r}function ce(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function ue(e){const t=e._readableState;_("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(le,t,e))}function le(e,t){if(_("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(de,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function de(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let fe;function he(){return void 0===fe&&(fe={}),fe}Q.prototype.read=function(e){_("read",e),void 0===e?e=NaN:o(e)||(e=s(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new O("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return _("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ue(this):X(this),null;if(0===(e=J(e,t))&&t.ended)return 0===t.length&&ue(this),null;let n,i=0!==(t.state&H);if(_("need readable",i),(0===t.length||t.length-e0?ce(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ue(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},Q.prototype._read=function(e){throw new T("_read()")},Q.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new f(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),_("pipe count=%d opts=%j",i.pipes.length,t);const o=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?s:m;function a(t,n){_("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,function(){_("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),c&&e.removeListener("drain",c);e.removeListener("error",h),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",m),r.removeListener("data",d),u=!0,c&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&c()}())}function s(){_("onend"),e.end()}let c;i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",a);let u=!1;function l(){u||(1===i.pipes.length&&i.pipes[0]===e?(_("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(_("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),c||(c=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(_("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(_("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",c))}function d(t){_("ondata");const r=e.write(t);_("dest.write",r),!1===r&&l()}function h(t){if(_("onerror",t),m(),e.removeListener("error",h),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?j(e,t):e.emit("error",t)}}function p(){e.removeListener("finish",g),m()}function g(){_("onfinish"),e.removeListener("close",p),m()}function m(){_("unpipe"),r.unpipe(e)}return r.on("data",d),v(e,"error",h),e.once("close",p),e.once("finish",g),e.emit("pipe",r),!0===e.writableNeedDrain?l():i.flowing||(_("pipe resume"),r.resume()),e},Q.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,_("on readable",i.length,i.reading),i.length?X(this):i.reading||n.nextTick(ie,this))),r},Q.prototype.addListener=Q.prototype.on,Q.prototype.removeListener=function(e,t){const r=y.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},Q.prototype.off=Q.prototype.removeListener,Q.prototype.removeAllListeners=function(e){const t=y.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},Q.prototype.resume=function(){const e=this._readableState;return e.flowing||(_("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(oe,e,t))}(this,e)),e[L]=!1,this},Q.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[L]=!0,this},Q.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{j(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=u(e);for(let n=1;n{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(66592),{validateInteger:o}=r(38899),{ERR_INVALID_ARG_VALUE:a}=r(19909).codes;let s=16384,c=16;function u(e){return e?c:s}e.exports={getHighWaterMark:function(e,t,r,o){const s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=s){if(!i(s)||s<0){throw new a(o?`options.${r}`:"options.highWaterMark",s)}return n(s)}return u(e.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(e,t){o(t,"value",0),e?c=t:s=t}}},96664:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(66592);e.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(19909).codes,a=r(43528),{getHighWaterMark:s}=r(72377);n(u.prototype,a.prototype),n(u,a);const c=i("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?s(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),a.call(this,e),this._readableState.sync=!1,this[c]=null,e&&("function"===typeof e.transform&&(this._transform=e.transform),"function"===typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function l(e){"function"!==typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function d(){this._final!==l&&l.call(this)}u.prototype._final=l,u.prototype._transform=function(e,t,r){throw new o("_transform()")},u.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=r(66592),a=o("nodejs.stream.destroyed"),s=o("nodejs.stream.errored"),c=o("nodejs.stream.readable"),u=o("nodejs.stream.writable"),l=o("nodejs.stream.disturbed"),d=o("nodejs.webstream.isClosedPromise"),f=o("nodejs.webstream.controllerErrorFunction");function h(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var r;return!(!e||"function"!==typeof e.pipe||"function"!==typeof e.on||t&&("function"!==typeof e.pause||"function"!==typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!==typeof e.write||"function"!==typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function g(e){return e&&(e._readableState||e._writableState||"function"===typeof e.write&&"function"===typeof e.on||"function"===typeof e.pipe&&"function"===typeof e.on)}function m(e){return!(!e||g(e)||"function"!==typeof e.pipeThrough||"function"!==typeof e.getReader||"function"!==typeof e.cancel)}function y(e){return!(!e||g(e)||"function"!==typeof e.getWriter||"function"!==typeof e.abort)}function v(e){return!(!e||g(e)||"object"!==typeof e.readable||"object"!==typeof e.writable)}function b(e){if(!g(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[a]||null!==n&&void 0!==n&&n.destroyed)}function w(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null===t||void 0===t||!t.errored)&&("boolean"!==typeof(null===t||void 0===t?void 0:t.ended)?null:t.ended)}function A(e,t){if(!h(e))return null;const r=e._readableState;return(null===r||void 0===r||!r.errored)&&("boolean"!==typeof(null===r||void 0===r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function _(e){return e&&null!=e[c]?e[c]:"boolean"!==typeof(null===e||void 0===e?void 0:e.readable)?null:!b(e)&&(h(e)&&e.readable&&!A(e))}function E(e){return e&&null!=e[u]?e[u]:"boolean"!==typeof(null===e||void 0===e?void 0:e.writable)?null:!b(e)&&(p(e)&&e.writable&&!w(e))}function S(e){return"boolean"===typeof e._closed&&"boolean"===typeof e._defaultKeepAlive&&"boolean"===typeof e._removedConnection&&"boolean"===typeof e._removedContLen}function k(e){return"boolean"===typeof e._sent100&&S(e)}e.exports={isDestroyed:b,kIsDestroyed:a,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[l])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:l,isErrored:function(e){var t,r,n,i,o,a,c,u,l,d;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(a=e[s])&&void 0!==a?a:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(c=e._readableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(l=e._readableState)||void 0===l?void 0:l.errored)&&void 0!==t?t:null===(d=e._writableState)||void 0===d?void 0:d.errored))},kIsErrored:s,isReadable:_,kIsReadable:c,kIsClosedPromise:d,kControllerErrorFunction:f,kIsWritable:u,isClosed:function(e){if(!g(e))return null;if("boolean"===typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"===typeof(null===t||void 0===t?void 0:t.closed)||"boolean"===typeof(null===r||void 0===r?void 0:r.closed)?(null===t||void 0===t?void 0:t.closed)||(null===r||void 0===r?void 0:r.closed):"boolean"===typeof e._closed&&S(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!==typeof e.pipe||!e._readableState||"function"!==typeof e.on||"function"!==typeof e.write)},isFinished:function(e,t){return g(e)?!!b(e)||(!1===(null===t||void 0===t?void 0:t.readable)||!_(e))&&(!1===(null===t||void 0===t?void 0:t.writable)||!E(e)):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"===typeof e[n]:!1===t?"function"===typeof e[i]:"function"===typeof e[n]||"function"===typeof e[i])},isReadableNodeStream:h,isReadableStream:m,isReadableEnded:function(e){if(!h(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!==typeof(null===t||void 0===t?void 0:t.ended)?null:t.ended)},isReadableFinished:A,isReadableErrored:function(e){var t,r;return g(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:g,isWebStream:function(e){return m(e)||y(e)||v(e)},isWritable:E,isWritableNodeStream:p,isWritableStream:y,isWritableEnded:w,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null===r||void 0===r||!r.errored)&&("boolean"!==typeof(null===r||void 0===r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return g(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"===typeof e._consuming&&"boolean"===typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:k,willEmitClose:function(e){if(!g(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&k(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:v}},43090:(e,t,r)=>{const n=r(85224),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:a,ObjectDefineProperty:s,ObjectDefineProperties:c,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:l,Symbol:d,SymbolHasInstance:f}=r(66592);e.exports=N,N.WritableState=M;const{EventEmitter:h}=r(28981),p=r(58313).Stream,{Buffer:g}=r(93325),m=r(37414),{addAbortSignal:y}=r(41697),{getHighWaterMark:v,getDefaultHighWaterMark:b}=r(72377),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_MULTIPLE_CALLBACK:_,ERR_STREAM_CANNOT_PIPE:E,ERR_STREAM_DESTROYED:S,ERR_STREAM_ALREADY_FINISHED:k,ERR_STREAM_NULL_VALUES:x,ERR_STREAM_WRITE_AFTER_END:C,ERR_UNKNOWN_ENCODING:I}=r(19909).codes,{errorOrDestroy:T}=m;function O(){}u(N.prototype,p.prototype),u(N,p);const P=d("kOnFinished");function M(e,t,n){"boolean"!==typeof n&&(n=t instanceof r(43528)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?v(this,e,"writableHighWaterMark",n):b(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=U.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,R(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[P]=[]}function R(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function N(e){const t=this instanceof r(43528);if(!t&&!a(N,this))return new N(e);this._writableState=new M(e,this,t),e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final),"function"===typeof e.construct&&(this._construct=e.construct),e.signal&&y(e.signal,this)),p.call(this,e),m.construct(this,(()=>{const e=this._writableState;e.writing||q(this,e),$(this,e)}))}function L(e,t,r,i){const o=e._writableState;if("function"===typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!g.isEncoding(r))throw new I(r)}else r=o.defaultEncoding;"function"!==typeof i&&(i=O)}if(null===t)throw new x;if(!o.objectMode)if("string"===typeof t)!1!==o.decodeStrings&&(t=g.from(t,r),r="buffer");else if(t instanceof g)r="buffer";else{if(!p._isUint8Array(t))throw new w("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let a;return o.ending?a=new C:o.destroyed&&(a=new S("write")),a?(n.nextTick(i,a),T(e,a,!0),a):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const a=t.lengthr.bufferedIndex&&q(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(j,r.afterWriteTickInfo)):F(e,r,1,o))):T(e,new _)}function j(e){let{stream:t,state:r,count:n,cb:i}=e;return r.afterWriteTickInfo=null,F(t,r,n,i)}function F(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&z(t),$(e,t)}function z(e){if(e.writing)return;for(let i=e.bufferedIndex;i1&&e._writev){t.pendingcb-=a-1;const n=t.allNoop?O:e=>{for(let t=s;t256?(r.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}function H(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function V(e,t){t.prefinished||t.finalCalled||("function"!==typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)T(e,null!==i&&void 0!==i?i:_());else if(r=!0,t.pendingcb--,i){const r=t[P].splice(0);for(let e=0;e{H(t)?K(e,t):t.pendingcb--}),e,t)):H(t)&&(t.pendingcb++,K(e,t))))}function K(e,t){t.pendingcb--,t.finished=!0;const r=t[P].splice(0);for(let n=0;n{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:a,NumberIsInteger:s,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:l,NumberParseInt:d,ObjectPrototypeHasOwnProperty:f,RegExpPrototypeExec:h,String:p,StringPrototypeToUpperCase:g,StringPrototypeTrim:m}=r(66592),{hideStackFrames:y,codes:{ERR_SOCKET_BAD_PORT:v,ERR_INVALID_ARG_TYPE:b,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:A,ERR_UNKNOWN_SIGNAL:_}}=r(19909),{normalizeEncoding:E}=r(69894),{isAsyncFunction:S,isArrayBufferView:k}=r(69894).types,x={};const C=/^[0-7]+$/;const I=y((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:u;if("number"!==typeof e)throw new b(t,"number",e);if(!s(e))throw new A(t,"an integer",e);if(en)throw new A(t,`>= ${r} && <= ${n}`,e)})),T=y((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-2147483648,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2147483647;if("number"!==typeof e)throw new b(t,"number",e);if(!s(e))throw new A(t,"an integer",e);if(en)throw new A(t,`>= ${r} && <= ${n}`,e)})),O=y((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"!==typeof e)throw new b(t,"number",e);if(!s(e))throw new A(t,"an integer",e);const n=r?1:0,i=4294967295;if(ei)throw new A(t,`>= ${n} && <= ${i}`,e)}));function P(e,t){if("string"!==typeof e)throw new b(t,"string",e)}const M=y(((e,t,r)=>{if(!i(r,e)){const n=o(a(r,(e=>"string"===typeof e?`'${e}'`:p(e))),", ");throw new w(t,e,"must be one of: "+n)}}));function R(e,t){if("boolean"!==typeof e)throw new b(t,"boolean",e)}function N(e,t,r){return null!=e&&f(e,t)?e[t]:r}const L=y((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const i=N(r,"allowArray",!1),o=N(r,"allowFunction",!1);if(!N(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!==typeof e&&(!o||"function"!==typeof e))throw new b(t,"Object",e)})),B=y(((e,t)=>{if(null!=e&&"object"!==typeof e&&"function"!==typeof e)throw new b(t,"a dictionary",e)})),D=y((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!n(e))throw new b(t,"Array",e);if(e.length1&&void 0!==arguments[1]?arguments[1]:"buffer";if(!k(e))throw new b(t,["Buffer","TypedArray","DataView"],e)}));const j=y(((e,t)=>{if(void 0!==e&&(null===e||"object"!==typeof e||!("aborted"in e)))throw new b(t,"AbortSignal",e)})),F=y(((e,t)=>{if("function"!==typeof e)throw new b(t,"Function",e)})),z=y(((e,t)=>{if("function"!==typeof e||S(e))throw new b(t,"Function",e)})),q=y(((e,t)=>{if(void 0!==e)throw new b(t,"undefined",e)}));const H=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function V(e,t){if("undefined"===typeof e||!h(H,e))throw new w(t,e,'must be an array or string of format "; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if("undefined"===typeof e&&(e=r),"string"===typeof e){if(null===h(C,e))throw new w(t,e,"must be a 32-bit unsigned integer or an octal string");e=d(e,8)}return O(e,t),e},validateArray:D,validateStringArray:function(e,t){D(e,t);for(let r=0;r2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;if("number"!==typeof e)throw new b(t,"number",e);if(null!=r&&en||(null!=r||null!=n)&&c(e))throw new A(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:L,validateOneOf:M,validatePlainFunction:z,validatePort:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Port",r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("number"!==typeof e&&"string"!==typeof e||"string"===typeof e&&0===m(e).length||+e!==+e>>>0||e>65535||0===e&&!r)throw new v(t,e,r);return 0|e},validateSignalName:function(e){if(P(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"signal"),void 0===x[e]){if(void 0!==x[g(e)])throw new _(e+" (signals must use all capital letters)");throw new _(e)}},validateString:P,validateUint32:O,validateUndefined:q,validateUnion:function(e,t,r){if(!i(r,e))throw new b(t,`('${o(r,"|")}')`,e)},validateAbortSignal:j,validateLinkHeaderValue:function(e){if("string"===typeof e)return V(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n; rel=preload; as=style"')}}},76080:(e,t,r)=>{"use strict";const n=r(93788),i=r(87697),o=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=o,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},19909:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:o}=r(69894),a=globalThis.AggregateError||o,s=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,l={};function d(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function f(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function h(e,t,r){r||(r=Error);class i extends r{constructor(){for(var r=arguments.length,i=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:"The operation was aborted",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(void 0!==t&&"object"!==typeof t)throw new l.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",((e,t,r)=>{d("string"===typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],a=[],s=[];for(const i of t)d("string"===typeof i,"All expected entries have to be of type string"),c.includes(i)?o.push(i.toLowerCase()):u.test(i)?a.push(i):(d("object"!==i,'The value "object" should be written as "Object"'),s.push(i));if(a.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),a.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(a.length>0||s.length>0)&&(n+=" or ")}if(a.length>0){switch(a.length){case 1:n+=`an instance of ${a[0]}`;break;case 2:n+=`an instance of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`an instance of ${a.join(", ")}, or ${e}`}}s.length>0&&(n+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(n+="an "),n+=`${s[0]}`;break;case 2:n+=`one of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`one of ${s.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"===typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"===typeof r){var l;if(null!==(l=r.constructor)&&void 0!==l&&l.name)n+=`. Received an instance of ${r.constructor.name}`;else{n+=`. Received ${i(r,{depth:-1})}`}}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),h("ERR_INVALID_ARG_VALUE",(function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid",n=i(t);n.length>128&&(n=n.slice(0,128)+"...");return`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),h("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!==r&&void 0!==r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),h("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");const i=t.length;switch(t=(Array.isArray(t)?t:[t]).map((e=>`"${e}"`)).join(" or "),i){case 1:n+=`The ${t[0]} argument`;break;case 2:n+=`The ${t[0]} and ${t[1]} arguments`;break;default:{const e=t.pop();n+=`The ${t.join(", ")}, and ${e} arguments`}}return`${n} must be specified`}),TypeError),h("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return d(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=f(String(r)):"bigint"===typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=f(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:g,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new a([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:l}},66592:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error:Error,FunctionPrototypeCall(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;iFunction.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number:Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise:Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String:String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol:Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean:Boolean,Uint8Array:Uint8Array}},69894:(e,t,r)=>{"use strict";const n=r(93325),{kResistStopPropagation:i,SymbolDispose:o}=r(66592),a=globalThis.AbortSignal||r(27542).AbortSignal,s=globalThis.AbortController||r(27542).AbortController,c=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,l="undefined"!==typeof u?function(e){return e instanceof u}:function(e){return!1},d=(e,t)=>{if(void 0!==e&&(null===e||"object"!==typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class f extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e((function(e){if(e)return r(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;ofunction(){},format(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;ne instanceof c,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:l,deprecate:(e,t)=>e,addAbortListener:r(28981).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return d(e,"signal"),((e,t)=>{if("function"!==typeof e)throw new ERR_INVALID_ARG_TYPE(t,"Function",e)})(t,"listener"),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[o](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:a.any||function(e){if(1===e.length)return e[0];const t=new s,r=()=>t.abort();return e.forEach((e=>{d(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},93788:(e,t,r)=>{const{Buffer:n}=r(93325),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:a}=r(66592),{promisify:{custom:s}}=r(69894),{streamReturningOperators:c,promiseReturningOperators:u}=r(20170),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=r(19909),d=r(66024),{setDefaultHighWaterMark:f,getDefaultHighWaterMark:h}=r(72377),{pipeline:p}=r(97696),{destroyer:g}=r(37414),m=r(62780),y=r(87697),v=r(53169),b=e.exports=r(58313).Stream;b.isDestroyed=v.isDestroyed,b.isDisturbed=v.isDisturbed,b.isErrored=v.isErrored,b.isReadable=v.isReadable,b.isWritable=v.isWritable,b.Readable=r(78078);for(const _ of o(c)){const E=c[_];function w(){if(new.target)throw l();for(var e=arguments.length,t=new Array(e),r=0;ry}),i(p,s,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(m,s,{__proto__:null,enumerable:!0,get:()=>y.finished}),b.Stream=b,b._isUint8Array=function(e){return e instanceof Uint8Array},b._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},87697:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(66592),{isIterable:o,isNodeStream:a,isWebStream:s}=r(53169),{pipelineImpl:c}=r(97696),{finished:u}=r(62780);r(93788),e.exports={finished:u,pipeline:function(){for(var e=arguments.length,t=new Array(e),r=0;r{let i,u;const l=t[t.length-1];if(l&&"object"===typeof l&&!a(l)&&!o(l)&&!s(l)){const e=n(t);i=e.signal,u=e.end}c(t,((t,n)=>{t?r(t):e(n)}),{signal:i,end:u})}))}}},77620:(e,t,r)=>{const n=r(17026),i=r(89058),o=r(6620),a=r(79377);function s(e,t,r,o,a){const s=[].slice.call(arguments,1),c=s.length,u="function"===typeof s[c-1];if(!u&&!n())throw new Error("Callback required as last argument");if(!u){if(c<1)throw new Error("Too few arguments provided");return 1===c?(r=t,t=o=void 0):2!==c||t.getContext||(o=r,r=t,t=void 0),new Promise((function(n,a){try{const a=i.create(r,o);n(e(a,t,o))}catch(s){a(s)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(a=r,r=t,t=o=void 0):3===c&&(t.getContext&&"undefined"===typeof a?(a=o,o=void 0):(a=o,o=r,r=t,t=void 0));try{const n=i.create(r,o);a(null,e(n,t,o))}catch(l){a(l)}}t.create=i.create,t.toCanvas=s.bind(null,o.render),t.toDataURL=s.bind(null,o.renderToDataURL),t.toString=s.bind(null,(function(e,t,r){return a.render(e,r)}))},17026:e=>{e.exports=function(){return"function"===typeof Promise&&Promise.prototype&&Promise.prototype.then}},79392:(e,t,r)=>{const n=r(11099).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=n(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),o=[r-7];for(let n=1;n{const n=r(29067),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(e){this.mode=n.ALPHANUMERIC,this.data=e}o.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*i.indexOf(this.data[t]);r+=i.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=o},31780:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1===(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},42519:e=>{function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,n){const i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},27803:(e,t,r)=>{const n=r(53979),i=r(29067);function o(e){this.mode=i.BYTE,"string"===typeof e&&(e=n(e)),this.data=new Uint8Array(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(let t=0,r=this.data.length;t{const n=r(93786),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];t.getBlocksCount=function(e,t){switch(t){case n.L:return i[4*(e-1)+0];case n.M:return i[4*(e-1)+1];case n.Q:return i[4*(e-1)+2];case n.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case n.L:return o[4*(e-1)+0];case n.M:return o[4*(e-1)+1];case n.Q:return o[4*(e-1)+2];case n.H:return o[4*(e-1)+3];default:return}}},93786:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&"undefined"!==typeof e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(n){return r}}},76147:(e,t,r)=>{const n=r(11099).getSymbolSize;t.getPositions=function(e){const t=n(e);return[[0,0],[t-7,0],[0,t-7]]}},24276:(e,t,r)=>{const n=r(11099),i=n.getBCHDigit(1335);t.getEncodedBits=function(e,t){const r=e.bit<<3|t;let o=r<<10;for(;n.getBCHDigit(o)-i>=0;)o^=1335<{const r=new Uint8Array(512),n=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)r[t]=e,n[e]=t,e<<=1,256&e&&(e^=285);for(let t=255;t<512;t++)r[t]=r[t-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return n[e]},t.exp=function(e){return r[e]},t.mul=function(e,t){return 0===e||0===t?0:r[n[e]+n[t]]}},20854:(e,t,r)=>{const n=r(29067),i=r(11099);function o(e){this.mode=n.KANJI,this.data=e}o.getBitsLength=function(e){return 13*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},e.exports=o},45704:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const r=3,n=3,i=40,o=10;function a(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2===0;case t.Patterns.PATTERN001:return r%2===0;case t.Patterns.PATTERN010:return n%3===0;case t.Patterns.PATTERN011:return(r+n)%3===0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2===0;case t.Patterns.PATTERN101:return r*n%2+r*n%3===0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2===0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let n=0,i=0,o=0,a=null,s=null;for(let c=0;c=5&&(n+=r+(i-5)),a=t,i=1),t=e.get(u,c),t===s?o++:(o>=5&&(n+=r+(o-5)),s=t,o=1)}i>=5&&(n+=r+(i-5)),o>=5&&(n+=r+(o-5))}return n},t.getPenaltyN2=function(e){const t=e.size;let r=0;for(let n=0;n=10&&(1488===n||93===n)&&r++,o=o<<1&2047|e.get(a,i),a>=10&&(1488===o||93===o)&&r++}return r*i},t.getPenaltyN4=function(e){let t=0;const r=e.data.length;for(let n=0;n{const n=r(73364),i=r(31597);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!n.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(n){return r}}},71794:(e,t,r)=>{const n=r(29067);function i(e){this.mode=n.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%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(e){let t,r,n;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),n=parseInt(r,10),e.put(n,10);const i=this.data.length-t;i>0&&(r=this.data.substr(t),n=parseInt(r,10),e.put(n,3*i+1))},e.exports=i},54150:(e,t,r)=>{const n=r(63456);t.mul=function(e,t){const r=new Uint8Array(e.length+t.length-1);for(let i=0;i=0;){const e=r[0];for(let o=0;o{const n=r(11099),i=r(93786),o=r(31780),a=r(42519),s=r(79392),c=r(76147),u=r(45704),l=r(57847),d=r(52067),f=r(28190),h=r(24276),p=r(29067),g=r(23686);function m(e,t,r){const n=e.size,i=h.getEncodedBits(t,r);let o,a;for(o=0;o<15;o++)a=1===(i>>o&1),o<6?e.set(o,8,a,!0):o<8?e.set(o+1,8,a,!0):e.set(n-15+o,8,a,!0),o<8?e.set(8,n-o-1,a,!0):o<9?e.set(8,15-o-1+1,a,!0):e.set(8,15-o-1,a,!0);e.set(n-8,8,1,!0)}function y(e,t,r){const i=new o;r.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(i)}));const a=8*(n.getSymbolTotalCodewords(e)-l.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const s=(a-i.getLengthInBits())/8;for(let n=0;n=0&&n<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===n||6===n)||n>=2&&n<=4&&i>=2&&i<=4?e.set(t+n,o+i,!0,!0):e.set(t+n,o+i,!1,!0))}}(p,t),function(e){const t=e.size;for(let r=8;r=7&&function(e,t){const r=e.size,n=f.getEncodedBits(t);let i,o,a;for(let s=0;s<18;s++)i=Math.floor(s/3),o=s%3+r-8-3,a=1===(n>>s&1),e.set(i,o,a,!0),e.set(o,i,a,!0)}(p,t),function(e,t){const r=e.size;let n=-1,i=r-1,o=7,a=0;for(let s=r-1;s>0;s-=2)for(6===s&&s--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,s-r)){let n=!1;a>>o&1)),e.set(i,s-r,n),o--,-1===o&&(a++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}(p,d),isNaN(i)&&(i=u.getBestMask(p,m.bind(null,p,r))),u.applyMask(i,p),m(p,r,i),{modules:p,version:t,errorCorrectionLevel:r,maskPattern:i,segments:o}}t.create=function(e,t){if("undefined"===typeof e||""===e)throw new Error("No input text");let r,o,a=i.M;return"undefined"!==typeof t&&(a=i.from(t.errorCorrectionLevel,i.M),r=f.from(t.version),o=u.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),v(e,r,a,o)}},52067:(e,t,r)=>{const n=r(54150);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(r,i),e}return r},e.exports=i},31597:(e,t)=>{const r="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";t.KANJI=new RegExp(n,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(r,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+n+"$"),a=new RegExp("^"+r+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},23686:(e,t,r)=>{const n=r(29067),i=r(71794),o=r(85684),a=r(27803),s=r(20854),c=r(31597),u=r(11099),l=r(22238);function d(e){return unescape(encodeURIComponent(e)).length}function f(e,t,r){const n=[];let i;for(;null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function h(e){const t=f(c.NUMERIC,n.NUMERIC,e),r=f(c.ALPHANUMERIC,n.ALPHANUMERIC,e);let i,o;u.isKanjiModeEnabled()?(i=f(c.BYTE,n.BYTE,e),o=f(c.KANJI,n.KANJI,e)):(i=f(c.BYTE_KANJI,n.BYTE,e),o=[]);return t.concat(r,i,o).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function p(e,t){switch(t){case n.NUMERIC:return i.getBitsLength(e);case n.ALPHANUMERIC:return o.getBitsLength(e);case n.KANJI:return s.getBitsLength(e);case n.BYTE:return a.getBitsLength(e)}}function g(e,t){let r;const c=n.getBestModeForData(e);if(r=n.from(t,c),r!==n.BYTE&&r.bit=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(s))},t.rawSplit=function(e){return t.fromArray(h(e,u.isKanjiModeEnabled()))}},11099:(e,t)=>{let r;const 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];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return n[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!==typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return"undefined"!==typeof r},t.toSJIS=function(e){return r(e)}},73364:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},28190:(e,t,r)=>{const n=r(11099),i=r(57847),o=r(93786),a=r(29067),s=r(73364),c=n.getBCHDigit(7973);function u(e,t){return a.getCharCountIndicator(e,t)+4}function l(e,t){let r=0;return e.forEach((function(e){const n=u(e.mode,t);r+=n+e.getBitsLength()})),r}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!s.isValid(e))throw new Error("Invalid QR Code version");"undefined"===typeof r&&(r=a.BYTE);const o=8*(n.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(r===a.MIXED)return o;const c=o-u(r,e);switch(r){case a.NUMERIC:return Math.floor(c/10*3);case a.ALPHANUMERIC:return Math.floor(c/11*2);case a.KANJI:return Math.floor(c/13);case a.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,r){let n;const i=o.from(r,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,r){for(let n=1;n<=40;n++)if(l(e,n)<=t.getCapacity(n,r,a.MIXED))return n}(e,i);if(0===e.length)return 1;n=e[0]}else n=e;return function(e,r,n){for(let i=1;i<=40;i++)if(r<=t.getCapacity(i,n,e))return i}(n.mode,n.getLength(),i)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;n.getBCHDigit(t)-c>=0;)t^=7973<{const n=r(14691);t.render=function(e,t,r){let i=r,o=t;"undefined"!==typeof i||t&&t.getContext||(i=t,t=void 0),t||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);const a=n.getImageWidth(e.modules.size,i),s=o.getContext("2d"),c=s.createImageData(a,a);return n.qrToImageData(c.data,e,i),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(s,o,a),s.putImageData(c,0,0),o},t.renderToDataURL=function(e,r,n){let i=n;"undefined"!==typeof i||r&&r.getContext||(i=r,r=void 0),i||(i={});const o=t.render(e,r,i),a=i.type||"image/png",s=i.rendererOpts||{};return o.toDataURL(a,s.quality)}},79377:(e,t,r)=>{const n=r(14691);function i(e,t){const r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function o(e,t,r){let n=e+t;return"undefined"!==typeof r&&(n+=" "+r),n}t.render=function(e,t,r){const a=n.getOptions(t),s=e.modules.size,c=e.modules.data,u=s+2*a.margin,l=a.color.light.a?"':"",d="0&&u>0&&e[c-1]||(n+=a?o("M",u+r,.5+l+r):o("m",i,0),i=0,a=!1),u+1',f='viewBox="0 0 '+u+" "+u+'"',h=''+l+d+"\n";return"function"===typeof r&&r(null,h),h}},14691:(e,t)=>{function r(e){if("number"===typeof e&&(e=e.toString()),"string"!==typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t="undefined"===typeof e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){const n=t.getScale(e,r);return Math.floor((e+2*r.margin)*n)},t.qrToImageData=function(e,r,n){const i=r.modules.size,o=r.modules.data,a=t.getScale(i,n),s=Math.floor((i+2*n.margin)*a),c=n.margin*a,u=[n.color.light,n.color.dark];for(let t=0;t=c&&r>=c&&t{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!==typeof self?self:"undefined"!==typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},50608:(e,t,r)=>{"use strict";e.exports=r(13128)},63149:(e,t,r)=>{"use strict";const{ApolloLink:n,Observable:i}=r(61389),{createSignalIfSupported:o,fallbackHttpConfig:a,parseAndCheckHttpResponse:s,rewriteURIForGET:c,selectHttpOptionsAndBody:u,selectURI:l,serializeFetchParameter:d}=r(38598),f=r(17096),h=r(85612),p=r(7777);e.exports=function(){let{uri:e="/graphql",useGETForQueries:t,isExtractableFile:r=p,FormData:g,formDataAppendFile:m=h,fetch:y,fetchOptions:v,credentials:b,headers:w,includeExtensions:A}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const _={http:{includeExtensions:A},options:v,credentials:b,headers:w};return new n((n=>{const h=n.getContext(),{clientAwareness:{name:p,version:v}={},headers:b}=h,w={http:h.http,options:h.fetchOptions,credentials:h.credentials,headers:{...p&&{"apollographql-client-name":p},...v&&{"apollographql-client-version":v},...b}},{options:A,body:E}=u(n,a,_,w),{clone:S,files:k}=f(E,"",r);let x=l(n,e);if(k.size){delete A.headers["content-type"];const e=new(g||FormData);e.append("operations",d(S,"Payload"));const t={};let r=0;k.forEach((e=>{t[++r]=e})),e.append("map",JSON.stringify(t)),r=0,k.forEach(((t,n)=>{m(e,++r,n)})),A.body=e}else if(t&&!n.query.definitions.some((e=>"OperationDefinition"===e.kind&&"mutation"===e.operation))&&(A.method="GET"),"GET"===A.method){const{newURI:e,parseError:t}=c(x,E);if(t)return new i((e=>{e.error(t)}));x=e}else A.body=d(S,"Payload");const{controller:C}=o();C&&(A.signal&&(A.signal.aborted?C.abort():A.signal.addEventListener("abort",(()=>{C.abort()}),{once:!0})),A.signal=C.signal);const I=y||fetch;return new i((e=>{let t;return I(x,A).then((e=>(n.setContext({response:e}),e))).then(s(n)).then((t=>{e.next(t),e.complete()})).catch((r=>{t||(r.result&&r.result.errors&&r.result.data&&e.next(r.result),e.error(r))})),()=>{t=!0,C&&C.abort()}}))}))}},85612:e=>{"use strict";e.exports=function(e,t,r){e.append(t,r,r.name)}},9014:(e,t,r)=>{"use strict";t.createUploadLink=r(63149),t.formDataAppendFile=r(85612),t.isExtractableFile=r(7777),t.ReactNativeFile=r(50608)},7777:(e,t,r)=>{"use strict";e.exports=r(61097)},83242:(e,t,r)=>{"use strict";var n=r(16047).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,l=new Uint8Array(a);r>>0,l[h]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");o=f,r++}for(var p=a-o;p!==a&&0===l[p];)p++;var g=n.allocUnsafe(i+(a-p));g.fill(0,0,i);for(var m=i;p!==a;)g[m++]=l[p++];return g}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,a=t.length;o!==a&&0===t[o];)o++,r++;for(var u=(a-o)*l+1>>>0,d=new Uint8Array(u);o!==a;){for(var f=t[o],h=0,p=u-1;(0!==f||h>>0,d[p]=f%s>>>0,f=f/s>>>0;if(0!==f)throw new Error("Non-zero carry");i=h,o++}for(var g=u-i;g!==u&&0===d[g];)g++;for(var m=c.repeat(r);g{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],c=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,c)),l=0,d=c>0?a-4:a;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;su?u:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},51262:(e,t,r)=>{"use strict";var n=r(54673);function i(e,t){return void 0===t&&(t="utf8"),Buffer.isBuffer(e)?a(e.toString("base64")):a(Buffer.from(e,t).toString("base64"))}function o(e){return e=e.toString(),n.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function a(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var s=i;s.encode=i,s.decode=function(e,t){return void 0===t&&(t="utf8"),Buffer.from(o(e),"base64").toString(t)},s.toBase64=o,s.fromBase64=a,s.toBuffer=function(e){return Buffer.from(o(e),"base64")},t.default=s},54673:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.length,r=t%4;if(!r)return e;var n=t,i=4-r,o=t+i,a=Buffer.alloc(o);for(a.write(e);i--;)a.write("=",n++);return a.toString()}},15161:(e,t,r)=>{e.exports=r(51262).default,e.exports.default=e.exports},25240:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<32;n++){var i=t.charAt(n);if(void 0!==r[i])throw new TypeError(i+" is ambiguous");r[i]=n}function o(e){var t=e>>25;return(33554431&e)<<5^996825010&-(1&t)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(t=o(t),r=0;rt)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var s=(e=n).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var c=e.slice(0,s),u=e.slice(s+1);if(u.length<6)return"Data too short";var l=a(c);if("string"===typeof l)return l;for(var d=[],f=0;f=u.length||d.push(p)}return 1!==l?"Invalid checksum for "+e:{prefix:c,words:d}}function c(e,t,r,n){for(var i=0,o=0,a=(1<=r;)o-=r,s.push(i>>o&a);if(n)o>0&&s.push(i<=t)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=a(e=e.toLowerCase());if("string"===typeof i)throw new Error(i);for(var s=e+"1",c=0;c>5!==0)throw new Error("Non 5-bit word");i=o(i)^u,s+=t.charAt(u)}for(c=0;c<6;++c)i=o(i);for(i^=1,c=0;c<6;++c){s+=t.charAt(i>>5*(5-c)&31)}return s},toWordsUnsafe:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},63160:function(e,t,r){var n;!function(){"use strict";var i,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,s=Math.floor,c="[BigNumber Error] ",u=c+"Number primitive has more than 15 significant digits: ",l=1e14,d=14,f=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],p=1e7,g=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function y(e){for(var t,r,n=1,i=e.length,o=e[0]+"";nu^r?1:-1;for(s=(c=i.length)<(u=o.length)?c:u,a=0;ao[a]^r?1:-1;return c==u?0:c>u^r?1:-1}function b(e,t,r,n){if(er||e!==s(e))throw Error(c+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return m(e.e/d)==t&&e.c[t]%2!=0}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function _(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else tO?y.c=y.e=null:e.e=10;h/=10,l++);return void(l>O?y.c=y.e=null:(y.e=l,y.c=[e]))}m=String(e)}else{if(!o.test(m=String(e)))return i(y,m,p);y.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(l=m.indexOf("."))>-1&&(m=m.replace(".","")),(h=m.search(/e/i))>0?(l<0&&(l=h),l+=+m.slice(h+1),m=m.substring(0,h)):l<0&&(l=m.length)}else{if(b(t,2,L.length,"Base"),10==t&&B)return z(y=new D(e),k+y.e+1,x);if(m=String(e),p="number"==typeof e){if(0*e!=0)return i(y,m,p,t);if(y.s=1/e<0?(m=m.slice(1),-1):1,D.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else y.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(r=L.slice(0,t),l=h=0,g=m.length;hl){l=g;continue}}else if(!c&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){c=!0,h=-1,l=0;continue}return i(y,String(e),p,t)}p=!1,(l=(m=n(m,t,10,y.s)).indexOf("."))>-1?m=m.replace(".",""):l=m.length}for(h=0;48===m.charCodeAt(h);h++);for(g=m.length;48===m.charCodeAt(--g););if(m=m.slice(h,++g)){if(g-=h,p&&D.DEBUG&&g>15&&(e>f||e!==s(e)))throw Error(u+y.s*e);if((l=l-h-1)>O)y.c=y.e=null;else if(l=I)?A(c,a):_(c,a,"0");else if(o=(e=z(new D(e),t,r)).e,s=(c=y(e.c)).length,1==n||2==n&&(t<=o||o<=C)){for(;ss){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-s)>0)for(o+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function j(e,t){for(var r,n,i=1,o=new D(e[0]);i=10;i/=10,n++);return(r=n+r*d-1)>O?e.c=e.e=null:r=10;u/=10,i++);if((o=t-i)<0)o+=d,c=t,f=m[p=0],g=s(f/y[i-c-1]%10);else if((p=a((o+1)/d))>=m.length){if(!n)break e;for(;m.length<=p;m.push(0));f=g=0,i=1,c=(o%=d)-d+1}else{for(f=u=m[p],i=1;u>=10;u/=10,i++);g=(c=(o%=d)-d+i)<0?0:s(f/y[i-c-1]%10)}if(n=n||t<0||null!=m[p+1]||(c<0?f:f%y[i-c-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(o>0?c>0?f/y[i-c]:0:m[p-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=y[(d-t%d)%d],e.e=-t||0):m[0]=e.e=0,e;if(0==o?(m.length=p,u=1,p--):(m.length=p+1,u=y[d-o],m[p]=c>0?s(f/y[i-c]%y[c])*u:0),n)for(;;){if(0==p){for(o=1,c=m[0];c>=10;c/=10,o++);for(c=m[0]+=u,u=1;c>=10;c/=10,u++);o!=u&&(e.e++,m[0]==l&&(m[0]=1));break}if(m[p]+=u,m[p]!=l)break;m[p--]=0,u=1}for(o=m.length;0===m[--o];m.pop());}e.e>O?e.c=e.e=null:e.e=I?A(t,r):_(t,r,"0"),e.s<0?"-"+t:t)}return D.clone=e,D.ROUND_UP=0,D.ROUND_DOWN=1,D.ROUND_CEIL=2,D.ROUND_FLOOR=3,D.ROUND_HALF_UP=4,D.ROUND_HALF_DOWN=5,D.ROUND_HALF_EVEN=6,D.ROUND_HALF_CEIL=7,D.ROUND_HALF_FLOOR=8,D.EUCLID=9,D.config=D.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(b(r=e[t],0,g,t),k=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(b(r=e[t],0,8,t),x=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(b(r[0],-g,0,t),b(r[1],0,g,t),C=r[0],I=r[1]):(b(r,-g,g,t),C=-(I=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)b(r[0],-g,-1,t),b(r[1],1,g,t),T=r[0],O=r[1];else{if(b(r,-g,g,t),!r)throw Error(c+t+" cannot be zero: "+r);T=-(O=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(c+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw P=!r,Error(c+"crypto unavailable");P=r}else P=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(b(r=e[t],0,9,t),M=r),e.hasOwnProperty(t="POW_PRECISION")&&(b(r=e[t],0,g,t),R=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(c+t+" not an object: "+r);N=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(c+t+" invalid: "+r);B="0123456789"==r.slice(0,10),L=r}}return{DECIMAL_PLACES:k,ROUNDING_MODE:x,EXPONENTIAL_AT:[C,I],RANGE:[T,O],CRYPTO:P,MODULO_MODE:M,POW_PRECISION:R,FORMAT:N,ALPHABET:L}},D.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!D.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-g&&i<=g&&i===s(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%d)<1&&(t+=d),String(n[0]).length==t){for(t=0;t=l||r!==s(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},D.maximum=D.max=function(){return j(arguments,-1)},D.minimum=D.min=function(){return j(arguments,1)},D.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return s(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var r,n,i,o,u,l=0,f=[],p=new D(S);if(null==e?e=k:b(e,0,g),o=a(e/d),P)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(o*=2));l>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),r[l]=n[0],r[l+1]=n[1]):(f.push(u%1e14),l+=2);l=o/2}else{if(!crypto.randomBytes)throw P=!1,Error(c+"crypto unavailable");for(r=crypto.randomBytes(o*=7);l=9e15?crypto.randomBytes(7).copy(r,l):(f.push(u%1e14),l+=7);l=o/7}if(!P)for(;l=10;u/=10,l++);lr-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(n,i,o,a,s){var c,u,l,d,f,h,p,g,m=n.indexOf("."),v=k,b=x;for(m>=0&&(d=R,R=0,n=n.replace(".",""),h=(g=new D(i)).pow(n.length-m),R=d,g.c=t(_(y(h.c),h.e,"0"),10,o,e),g.e=g.c.length),l=d=(p=t(n,i,o,s?(c=L,e):(c=e,L))).length;0==p[--d];p.pop());if(!p[0])return c.charAt(0);if(m<0?--l:(h.c=p,h.e=l,h.s=a,p=(h=r(h,g,v,b,o)).c,f=h.r,l=h.e),m=p[u=l+v+1],d=o/2,f=f||u<0||null!=p[u+1],f=b<4?(null!=m||f)&&(0==b||b==(h.s<0?3:2)):m>d||m==d&&(4==b||f||6==b&&1&p[u-1]||b==(h.s<0?8:7)),u<1||!p[0])n=f?_(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(p.length=u,f)for(--o;++p[--u]>o;)p[u]=0,u||(++l,p=[1].concat(p));for(d=p.length;!p[--d];);for(m=0,n="";m<=d;n+=c.charAt(p[m++]));n=_(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,a,s=0,c=e.length,u=t%p,l=t/p|0;for(e=e.slice();c--;)s=((i=u*(o=e[c]%p)+(n=l*o+(a=e[c]/p|0)*u)%p*p+s)/r|0)+(n/p|0)+l*a,e[c]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,o,a,c){var u,f,h,p,g,y,v,b,w,A,_,E,S,k,x,C,I,T=n.s==i.s?1:-1,O=n.c,P=i.c;if(!O||!O[0]||!P||!P[0])return new D(n.s&&i.s&&(O?!P||O[0]!=P[0]:P)?O&&0==O[0]||!P?0*T:T/0:NaN);for(w=(b=new D(T)).c=[],T=o+(f=n.e-i.e)+1,c||(c=l,f=m(n.e/d)-m(i.e/d),T=T/d|0),h=0;P[h]==(O[h]||0);h++);if(P[h]>(O[h]||0)&&f--,T<0)w.push(1),p=!0;else{for(k=O.length,C=P.length,h=0,T+=2,(g=s(c/(P[0]+1)))>1&&(P=e(P,g,c),O=e(O,g,c),C=P.length,k=O.length),S=C,_=(A=O.slice(0,C)).length;_=c/2&&x++;do{if(g=0,(u=t(P,A,C,_))<0){if(E=A[0],C!=_&&(E=E*c+(A[1]||0)),(g=s(E/x))>1)for(g>=c&&(g=c-1),v=(y=e(P,g,c)).length,_=A.length;1==t(y,A,v,_);)g--,r(y,C=10;T/=10,h++);z(b,o+(b.e=h+f*d-1)+1,a,p)}else b.e=f,b.r=+p;return b}}(),i=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,r=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,u){var l,d=s?a:a.replace(i,"");if(n.test(d))o.s=isNaN(d)?null:d<0?-1:1;else{if(!s&&(d=d.replace(e,(function(e,t,r){return l="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=l?e:t})),u&&(l=u,d=d.replace(t,"$1").replace(r,"0.$1")),a!=d))return new D(d,l);if(D.DEBUG)throw Error(c+"Not a"+(u?" base "+u:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),E.absoluteValue=E.abs=function(){var e=new D(this);return e.s<0&&(e.s=1),e},E.comparedTo=function(e,t){return v(this,new D(e,t))},E.decimalPlaces=E.dp=function(e,t){var r,n,i,o=this;if(null!=e)return b(e,0,g),null==t?t=x:b(t,0,8),z(new D(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-m(this.e/d))*d,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},E.dividedBy=E.div=function(e,t){return r(this,new D(e,t),k,x)},E.dividedToIntegerBy=E.idiv=function(e,t){return r(this,new D(e,t),0,1)},E.exponentiatedBy=E.pow=function(e,t){var r,n,i,o,u,l,f,h,p=this;if((e=new D(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+q(e));if(null!=t&&(t=new D(t)),u=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return h=new D(Math.pow(+q(p),u?e.s*(2-w(e)):+q(e))),t?h.mod(t):h;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new D(NaN);(n=!l&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||u&&p.c[1]>=24e7:p.c[0]<8e13||u&&p.c[0]<=9999975e7)))return o=p.s<0&&w(e)?-0:0,p.e>-1&&(o=1/o),new D(l?1/o:o);R&&(o=a(R/d+2))}for(u?(r=new D(.5),l&&(e.s=1),f=w(e)):f=(i=Math.abs(+q(e)))%2,h=new D(S);;){if(f){if(!(h=h.times(p)).c)break;o?h.c.length>o&&(h.c.length=o):n&&(h=h.mod(t))}if(i){if(0===(i=s(i/2)))break;f=i%2}else if(z(e=e.times(r),e.e+1,1),e.e>14)f=w(e);else{if(0===(i=+q(e)))break;f=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(t))}return n?h:(l&&(h=S.div(h)),t?h.mod(t):o?z(h,R,x,undefined):h)},E.integerValue=function(e){var t=new D(this);return null==e?e=x:b(e,0,8),z(t,t.e+1,e)},E.isEqualTo=E.eq=function(e,t){return 0===v(this,new D(e,t))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(e,t){return v(this,new D(e,t))>0},E.isGreaterThanOrEqualTo=E.gte=function(e,t){return 1===(t=v(this,new D(e,t)))||0===t},E.isInteger=function(){return!!this.c&&m(this.e/d)>this.c.length-2},E.isLessThan=E.lt=function(e,t){return v(this,new D(e,t))<0},E.isLessThanOrEqualTo=E.lte=function(e,t){return-1===(t=v(this,new D(e,t)))||0===t},E.isNaN=function(){return!this.s},E.isNegative=function(){return this.s<0},E.isPositive=function(){return this.s>0},E.isZero=function(){return!!this.c&&0==this.c[0]},E.minus=function(e,t){var r,n,i,o,a=this,s=a.s;if(t=(e=new D(e,t)).s,!s||!t)return new D(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/d,u=e.e/d,f=a.c,h=e.c;if(!c||!u){if(!f||!h)return f?(e.s=-t,e):new D(h?a:NaN);if(!f[0]||!h[0])return h[0]?(e.s=-t,e):new D(f[0]?a:3==x?-0:0)}if(c=m(c),u=m(u),f=f.slice(),s=c-u){for((o=s<0)?(s=-s,i=f):(u=c,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(o=(s=f.length)<(t=h.length))?s:t,s=t=0;t0)for(;t--;f[r++]=0);for(t=l-1;n>s;){if(f[--n]=0;){for(r=0,g=E[i]%w,y=E[i]/w|0,o=i+(a=c);o>i;)r=((u=g*(u=_[--a]%w)+(s=y*u+(f=_[a]/w|0)*g)%w*w+v[o]+r)/b|0)+(s/w|0)+y*f,v[o--]=u%b;v[o]=r}return r?++n:v.splice(0,1),F(e,v,n)},E.negated=function(){var e=new D(this);return e.s=-e.s||null,e},E.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new D(e,t)).s,!i||!t)return new D(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/d,a=e.e/d,s=n.c,c=e.c;if(!o||!a){if(!s||!c)return new D(i/0);if(!s[0]||!c[0])return c[0]?e:new D(s[0]?n:0*i)}if(o=m(o),a=m(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=c):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/l|0,s[t]=l===s[t]?0:s[t]%l;return i&&(s=[i].concat(s),++a),F(e,s,a)},E.precision=E.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return b(e,1,g),null==t?t=x:b(t,0,8),z(new D(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*d+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},E.shiftedBy=function(e){return b(e,-9007199254740991,f),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,t,n,i,o,a=this,s=a.c,c=a.s,u=a.e,l=k+4,d=new D("0.5");if(1!==c||!s||!s[0])return new D(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+q(a)))||c==1/0?(((t=y(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=m((u+1)/2)-(u<0||u%2),n=new D(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new D(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(o=n,n=d.times(o.plus(r(a,o,l,1))),y(o.c).slice(0,c)===(t=y(n.c)).slice(0,c)){if(n.e0&&g>0){for(o=g%s||s,d=p.substr(0,o);o0&&(d+=l+p.slice(o)),h&&(d="-"+d)}n=f?d+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):d}return(r.prefix||"")+n+(r.suffix||"")},E.toFraction=function(e){var t,n,i,o,a,s,u,l,f,p,g,m,v=this,b=v.c;if(null!=e&&(!(u=new D(e)).isInteger()&&(u.c||1!==u.s)||u.lt(S)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+q(u));if(!b)return new D(v);for(t=new D(S),f=n=new D(S),i=l=new D(S),m=y(b),a=t.e=m.length-v.e-1,t.c[0]=h[(s=a%d)<0?d+s:s],e=!e||u.comparedTo(t)>0?a>0?t:f:u,s=O,O=1/0,u=new D(m),l.c[0]=0;p=r(u,t,0,1),1!=(o=n.plus(p.times(i))).comparedTo(e);)n=i,i=o,f=l.plus(p.times(o=f)),l=o,t=u.minus(p.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),l=l.plus(o.times(f)),n=n.plus(o.times(i)),l.s=f.s=v.s,g=r(f,i,a*=2,x).minus(v).abs().comparedTo(r(l,n,a,x).minus(v).abs())<1?[f,i]:[l,n],O=s,g},E.toNumber=function(){return+q(this)},E.toPrecision=function(e,t){return null!=e&&b(e,1,g),U(this,e,t,2)},E.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=C||o>=I?A(y(r.c),o):_(y(r.c),o,"0"):10===e&&B?t=_(y((r=z(new D(r),k+o+1,x)).c),r.e,"0"):(b(e,2,L.length,"Base"),t=n(_(y(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},E.valueOf=E.toJSON=function(){return q(this)},E._isBigNumber=!0,null!=t&&D.set(t),D}(),i.default=i.BigNumber=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},33182:(e,t,r)=>{function n(e){if(!n.supported)return null;var t=e&&e.imports,o=function(e){return"function"===typeof atob?new Uint8Array(atob(e).split("").map(i)):new(r(93325).Buffer)(e,"base64")}("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMK00AElgMAIABCADcDACAAQQhqQgA3AwAgAEEQakIANwMAIABBGGpCADcDACAAQSBqQgA3AwAgAEEoakIANwMAIABBMGpCADcDACAAQThqQgA3AwAgAEHAAGpCADcDACAAQcgAakIANwMAIABB0ABqQgA3AwAgAEHYAGpCADcDACAAQeAAakIANwMAIABB6ABqQgA3AwAgAEHwAGpCADcDACAAQfgAakIANwMAIABBgAFqQoiS853/zPmE6gBBACkDAIU3AwAgAEGIAWpCu86qptjQ67O7f0EIKQMAhTcDACAAQZABakKr8NP0r+68tzxBECkDAIU3AwAgAEGYAWpC8e30+KWn/aelf0EYKQMAhTcDACAAQaABakLRhZrv+s+Uh9EAQSApAwCFNwMAIABBqAFqQp/Y+dnCkdqCm39BKCkDAIU3AwAgAEGwAWpC6/qG2r+19sEfQTApAwCFNwMAIABBuAFqQvnC+JuRo7Pw2wBBOCkDAIU3AwAgAEHAAWpCADcDACAAQcgBakIANwMAIABB0AFqQgA3AwALbQEDfyAAQcABaiEDIABByAFqIQQgBCkDAKchBQJAA0AgASACRg0BIAVBgAFGBEAgAyADKQMAIAWtfDcDAEEAIQUgABADCyAAIAVqIAEtAAA6AAAgBUEBaiEFIAFBAWohAQwACwsgBCAFrTcDAAtkAQN/IABBwAFqIQEgAEHIAWohAiABIAEpAwAgAikDAHw3AwAgAEHQAWpCfzcDACACKQMApyEDAkADQCADQYABRg0BIAAgA2pBADoAACADQQFqIQMMAAsLIAIgA603AwAgABADC+U7AiB+CX8gAEGAAWohISAAQYgBaiEiIABBkAFqISMgAEGYAWohJCAAQaABaiElIABBqAFqISYgAEGwAWohJyAAQbgBaiEoICEpAwAhASAiKQMAIQIgIykDACEDICQpAwAhBCAlKQMAIQUgJikDACEGICcpAwAhByAoKQMAIQhCiJLznf/M+YTqACEJQrvOqqbY0Ouzu38hCkKr8NP0r+68tzwhC0Lx7fT4paf9p6V/IQxC0YWa7/rPlIfRACENQp/Y+dnCkdqCm38hDkLr+obav7X2wR8hD0L5wvibkaOz8NsAIRAgACkDACERIABBCGopAwAhEiAAQRBqKQMAIRMgAEEYaikDACEUIABBIGopAwAhFSAAQShqKQMAIRYgAEEwaikDACEXIABBOGopAwAhGCAAQcAAaikDACEZIABByABqKQMAIRogAEHQAGopAwAhGyAAQdgAaikDACEcIABB4ABqKQMAIR0gAEHoAGopAwAhHiAAQfAAaikDACEfIABB+ABqKQMAISAgDSAAQcABaikDAIUhDSAPIABB0AFqKQMAhSEPIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgFXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBZ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAXfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBl8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAafHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgG3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBx8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAdfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHnx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB98fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAgfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgH3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBt8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAVfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBp8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAgfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggHnx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBd8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiASfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBF8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByATfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBh8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAWfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBx8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAZfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgHXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBF8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAWfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgE3x8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIICB8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAefHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgG3x8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB98fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAUfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgF3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBh8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCASfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgGnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBV8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAYfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgGnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBR8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiASfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgHnx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIB18fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAcfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggH3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBN8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAXfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgFnx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBt8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAVfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggEXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFICB8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAZfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgGnx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBF8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAWfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGHx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBN8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAVfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggG3x8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIICB8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAffHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgEnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBx8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAdfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggF3x8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBl8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAUfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgHnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBN8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAdfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgF3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBt8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByARfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBl8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAUfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgFXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB58fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAYfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgFnx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIICB8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAffHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgEnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBp8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAdfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgFnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBJ8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAgfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgH3x8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIB58fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAVfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggG3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBF8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAYfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgF3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBR8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAafHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggE3x8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBl8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAcfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgHnx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBx8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAYfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgH3x8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIB18fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByASfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggFHx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBp8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAWfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgEXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHICB8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAVfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggGXx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBd8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSATfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgG3x8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBd8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAgfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgH3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBp8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAcfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgFHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBF8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAZfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgHXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBN8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAefHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgGHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBJ8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAVfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgG3x8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBZ8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAbfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgE3x8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBl8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAVfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgGHx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBd8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCASfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggFnx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGICB8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAcfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgGnx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIB98fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAUfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB58fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSARfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgEXx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBJ8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiATfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgFHx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBV8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAWfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggF3x8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBh8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAZfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgGnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBt8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAcfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHXx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIB58fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAffHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgIHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB98fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAbfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBl8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAafHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgIHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIB58fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAXfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEnx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB18fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByARfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgE3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBx8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAYfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgFnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBR8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFICEgISkDACABIAmFhTcDACAiICIpAwAgAiAKhYU3AwAgIyAjKQMAIAMgC4WFNwMAICQgJCkDACAEIAyFhTcDACAlICUpAwAgBSANhYU3AwAgJiAmKQMAIAYgDoWFNwMAICcgJykDACAHIA+FhTcDACAoICgpAwAgCCAQhYU3AwAL"),a=null,s={buffer:o,memory:null,exports:null,realloc:function(e){s.exports.memory.grow(Math.ceil(Math.abs(e-s.memory.length)/65536)),s.memory=new Uint8Array(s.exports.memory.buffer)},onload:c};return c((function(){})),s;function c(r){if(s.exports)return r();if(a)a.then(r.bind(null,null)).catch(r);else{try{if(e&&e.async)throw new Error("async");u({instance:new WebAssembly.Instance(new WebAssembly.Module(o),t)})}catch(n){a=WebAssembly.instantiate(o,t).then(u)}c(r)}}function u(e){s.exports=e.instance.exports,s.memory=s.exports.memory&&s.exports.memory.buffer&&new Uint8Array(s.exports.memory.buffer)}}function i(e){return e.charCodeAt(0)}e.exports=n,n.supported="undefined"!==typeof WebAssembly},24947:(e,t,r)=>{var n=r(49831),i=r(33182)(),o=64,a=[];e.exports=h;var s=e.exports.BYTES_MIN=16,c=e.exports.BYTES_MAX=64,u=(e.exports.BYTES=32,e.exports.KEYBYTES_MIN=16),l=e.exports.KEYBYTES_MAX=64,d=(e.exports.KEYBYTES=32,e.exports.SALTBYTES=16),f=e.exports.PERSONALBYTES=16;function h(e,t,r,p,g){if(!(this instanceof h))return new h(e,t,r,p,g);if(!i||!i.exports)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");e||(e=32),!0!==g&&(n(e>=s,"digestLength must be at least "+s+", was given "+e),n(e<=c,"digestLength must be at most "+c+", was given "+e),null!=t&&n(t.length>=u,"key must be at least "+u+", was given "+t.length),null!=t&&n(t.length<=l,"key must be at least "+l+", was given "+t.length),null!=r&&n(r.length===d,"salt must be exactly "+d+", was given "+r.length),null!=p&&n(p.length===f,"personal must be exactly "+f+", was given "+p.length)),a.length||(a.push(o),o+=216),this.digestLength=e,this.finalized=!1,this.pointer=a.pop(),i.memory.fill(0,0,64),i.memory[0]=this.digestLength,i.memory[1]=t?t.length:0,i.memory[2]=1,i.memory[3]=1,r&&i.memory.set(r,32),p&&i.memory.set(p,48),this.pointer+216>i.memory.length&&i.realloc(this.pointer+216),i.exports.blake2b_init(this.pointer,this.digestLength),t&&(this.update(t),i.memory.fill(0,o,o+t.length),i.memory[this.pointer+200]=128)}function p(){}function g(e){return e<16?"0"+e.toString(16):e.toString(16)}h.prototype.update=function(e){return n(!1===this.finalized,"Hash instance finalized"),n(e,"input must be TypedArray or Buffer"),o+e.length>i.memory.length&&i.realloc(o+e.length),i.memory.set(e,o),i.exports.blake2b_update(this.pointer,o,o+e.length),this},h.prototype.digest=function(e){if(n(!1===this.finalized,"Hash instance finalized"),this.finalized=!0,a.push(this.pointer),i.exports.blake2b_final(this.pointer),!e||"binary"===e)return i.memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if("hex"===e)return function(e,t,r){for(var n="",i=0;i=this.digestLength,"input must be TypedArray or Buffer");for(var t=0;t{var n=r(49831),i=r(24947);function o(e,t,r){var n=e[t]+e[r],i=e[t+1]+e[r+1];n>=4294967296&&i++,e[t]=n,e[t+1]=i}function a(e,t,r,n){var i=e[t]+r;r<0&&(i+=4294967296);var o=e[t+1]+n;i>=4294967296&&o++,e[t]=i,e[t+1]=o}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function c(e,t,r,n,i,s){var c=f[i],u=f[i+1],l=f[s],h=f[s+1];o(d,e,t),a(d,e,c,u);var p=d[n]^d[e],g=d[n+1]^d[e+1];d[n]=g,d[n+1]=p,o(d,r,n),p=d[t]^d[r],g=d[t+1]^d[r+1],d[t]=p>>>24^g<<8,d[t+1]=g>>>24^p<<8,o(d,e,t),a(d,e,l,h),p=d[n]^d[e],g=d[n+1]^d[e+1],d[n]=p>>>16^g<<16,d[n+1]=g>>>16^p<<16,o(d,r,n),p=d[t]^d[r],g=d[t+1]^d[r+1],d[t]=g>>>31^p<<1,d[t+1]=p>>>31^g<<1}var u=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),l=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),d=new Uint32Array(32),f=new Uint32Array(32);function h(e,t){var r=0;for(r=0;r<16;r++)d[r]=e.h[r],d[r+16]=u[r];for(d[24]=d[24]^e.t,d[25]=d[25]^e.t/4294967296,t&&(d[28]=~d[28],d[29]=~d[29]),r=0;r<32;r++)f[r]=s(e.b,4*r);for(r=0;r<12;r++)c(0,8,16,24,l[16*r+0],l[16*r+1]),c(2,10,18,26,l[16*r+2],l[16*r+3]),c(4,12,20,28,l[16*r+4],l[16*r+5]),c(6,14,22,30,l[16*r+6],l[16*r+7]),c(0,10,20,30,l[16*r+8],l[16*r+9]),c(2,12,22,24,l[16*r+10],l[16*r+11]),c(4,14,16,26,l[16*r+12],l[16*r+13]),c(6,8,18,28,l[16*r+14],l[16*r+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^d[r]^d[r+16]}var p=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function g(e,t,r,n){p.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=e,p[0]=e,t&&(p[1]=t.length),p[2]=1,p[3]=1,r&&p.set(r,32),n&&p.set(n,48);for(var i=0;i<16;i++)this.h[i]=u[i]^s(p,4*i);t&&(m(this,t),this.c=128)}function m(e,t){for(var r=0;r=this.outlen,"out must have at least outlen bytes of space"),function(e,t){e.t+=e.c;for(;e.c<128;)e.b[e.c++]=0;h(e,!0);for(var r=0;r>2]>>8*(3&r)}(this,t),"hex"===e?function(e){for(var t="",r=0;r=b,"outlen must be at least "+b+", was given "+e),n(e<=w,"outlen must be at most "+w+", was given "+e),null!=t&&n(t.length>=A,"key must be at least "+A+", was given "+t.length),null!=t&&n(t.length<=_,"key must be at most "+_+", was given "+t.length),null!=r&&n(r.length===E,"salt must be exactly "+E+", was given "+r.length),null!=i&&n(i.length===S,"personal must be exactly "+S+", was given "+i.length)),new v(e,t,r,i)},e.exports.ready=function(e){i.ready((function(){e()}))},e.exports.WASM_SUPPORTED=i.SUPPORTED,e.exports.WASM_LOADED=!1;var b=e.exports.BYTES_MIN=16,w=e.exports.BYTES_MAX=64,A=(e.exports.BYTES=32,e.exports.KEYBYTES_MIN=16),_=e.exports.KEYBYTES_MAX=64,E=(e.exports.KEYBYTES=32,e.exports.SALTBYTES=16),S=e.exports.PERSONALBYTES=16;i.ready((function(t){t||(e.exports.WASM_LOADED=!0,v=i)}))},82098:(e,t,r)=>{const n=r(9135);function i(e,t,r){const n=e[t]+e[r];let i=e[t+1]+e[r+1];n>=4294967296&&i++,e[t]=n,e[t+1]=i}function o(e,t,r,n){let i=e[t]+r;r<0&&(i+=4294967296);let o=e[t+1]+n;i>=4294967296&&o++,e[t]=i,e[t+1]=o}function a(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function s(e,t,r,n,a,s){const c=d[a],u=d[a+1],f=d[s],h=d[s+1];i(l,e,t),o(l,e,c,u);let p=l[n]^l[e],g=l[n+1]^l[e+1];l[n]=g,l[n+1]=p,i(l,r,n),p=l[t]^l[r],g=l[t+1]^l[r+1],l[t]=p>>>24^g<<8,l[t+1]=g>>>24^p<<8,i(l,e,t),o(l,e,f,h),p=l[n]^l[e],g=l[n+1]^l[e+1],l[n]=p>>>16^g<<16,l[n+1]=g>>>16^p<<16,i(l,r,n),p=l[t]^l[r],g=l[t+1]^l[r+1],l[t]=g>>>31^p<<1,l[t+1]=p>>>31^g<<1}const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),l=new Uint32Array(32),d=new Uint32Array(32);function f(e,t){let r=0;for(r=0;r<16;r++)l[r]=e.h[r],l[r+16]=c[r];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),r=0;r<32;r++)d[r]=a(e.b,4*r);for(r=0;r<12;r++)s(0,8,16,24,u[16*r+0],u[16*r+1]),s(2,10,18,26,u[16*r+2],u[16*r+3]),s(4,12,20,28,u[16*r+4],u[16*r+5]),s(6,14,22,30,u[16*r+6],u[16*r+7]),s(0,10,20,30,u[16*r+8],u[16*r+9]),s(2,12,22,24,u[16*r+10],u[16*r+11]),s(4,14,16,26,u[16*r+12],u[16*r+13]),s(6,8,18,28,u[16*r+14],u[16*r+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^l[r]^l[r+16]}const h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function p(e,t,r,n){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&16!==r.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(n&&16!==n.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};h.fill(0),h[0]=e,t&&(h[1]=t.length),h[2]=1,h[3]=1,r&&h.set(r,32),n&&h.set(n,48);for(let o=0;o<16;o++)i.h[o]=c[o]^a(h,4*o);return t&&(g(i,t),i.c=128),i}function g(e,t){for(let r=0;r>2]>>8*(3&r);return t}function y(e,t,r,i,o){r=r||64,e=n.normalizeInput(e),i&&(i=n.normalizeInput(i)),o&&(o=n.normalizeInput(o));const a=p(r,t,i,o);return g(a,e),m(a)}e.exports={blake2b:y,blake2bHex:function(e,t,r,i,o){const a=y(e,t,r,i,o);return n.toHex(a)},blake2bInit:p,blake2bUpdate:g,blake2bFinal:m}},22737:(e,t,r)=>{const n=r(9135);function i(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,r,n,i,o){u[e]=u[e]+u[t]+i,u[n]=a(u[n]^u[e],16),u[r]=u[r]+u[n],u[t]=a(u[t]^u[r],12),u[e]=u[e]+u[t]+o,u[n]=a(u[n]^u[e],8),u[r]=u[r]+u[n],u[t]=a(u[t]^u[r],7)}function a(e,t){return e>>>t^e<<32-t}const s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),u=new Uint32Array(16),l=new Uint32Array(16);function d(e,t){let r=0;for(r=0;r<8;r++)u[r]=e.h[r],u[r+8]=s[r];for(u[12]^=e.t,u[13]^=e.t/4294967296,t&&(u[14]=~u[14]),r=0;r<16;r++)l[r]=i(e.b,4*r);for(r=0;r<10;r++)o(0,4,8,12,l[c[16*r+0]],l[c[16*r+1]]),o(1,5,9,13,l[c[16*r+2]],l[c[16*r+3]]),o(2,6,10,14,l[c[16*r+4]],l[c[16*r+5]]),o(3,7,11,15,l[c[16*r+6]],l[c[16*r+7]]),o(0,5,10,15,l[c[16*r+8]],l[c[16*r+9]]),o(1,6,11,12,l[c[16*r+10]],l[c[16*r+11]]),o(2,7,8,13,l[c[16*r+12]],l[c[16*r+13]]),o(3,4,9,14,l[c[16*r+14]],l[c[16*r+15]]);for(r=0;r<8;r++)e.h[r]^=u[r]^u[r+8]}function f(e,t){if(!(e>0&&e<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=t?t.length:0;if(t&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const n={h:new Uint32Array(s),b:new Uint8Array(64),c:0,t:0,outlen:e};return n.h[0]^=16842752^r<<8^e,r>0&&(h(n,t),n.c=64),n}function h(e,t){for(let r=0;r>2]>>8*(3&r)&255;return t}function g(e,t,r){r=r||32,e=n.normalizeInput(e);const i=f(r,t);return h(i,e),p(i)}e.exports={blake2s:g,blake2sHex:function(e,t,r){const i=g(e,t,r);return n.toHex(i)},blake2sInit:f,blake2sUpdate:h,blake2sFinal:p}},94703:(e,t,r)=>{const n=r(82098),i=r(22737);e.exports={blake2b:n.blake2b,blake2bHex:n.blake2bHex,blake2bInit:n.blake2bInit,blake2bUpdate:n.blake2bUpdate,blake2bFinal:n.blake2bFinal,blake2s:i.blake2s,blake2sHex:i.blake2sHex,blake2sInit:i.blake2sInit,blake2sUpdate:i.blake2sUpdate,blake2sFinal:i.blake2sFinal}},9135:e=>{function t(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){let t;if(e instanceof Uint8Array)t=e;else{if("string"!==typeof e)throw new Error("Input must be an string, Buffer or Uint8Array");t=(new TextEncoder).encode(e)}return t},toHex:function(e){return Array.prototype.map.call(e,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")},debugPrint:function(e,r,n){let i="\n"+e+" = ";for(let o=0;o=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),c=t;c=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=c(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,l=r;l1&&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")]=d}catch(I){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?""}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"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],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(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?f[6-c.length]+c+r:c+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],l=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modrn(l).toString(e);r=(d=d.idivn(l)).isZero()?g+r:f[u-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function g(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[u]=0|d,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,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(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],w=8191&b,A=b>>>13,_=0|a[4],E=8191&_,S=_>>>13,k=0|a[5],x=8191&k,C=k>>>13,I=0|a[6],T=8191&I,O=I>>>13,P=0|a[7],M=8191&P,R=P>>>13,N=0|a[8],L=8191&N,B=N>>>13,D=0|a[9],U=8191&D,j=D>>>13,F=0|s[0],z=8191&F,q=F>>>13,H=0|s[1],V=8191&H,$=H>>>13,K=0|s[2],W=8191&K,G=K>>>13,Q=0|s[3],Y=8191&Q,Z=Q>>>13,J=0|s[4],X=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],de=8191&le,fe=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(f,z)|0))<<13)|0;u=((o=Math.imul(f,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(g,z)|0,o=Math.imul(g,q);var ye=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(f,V)|0))<<13)|0;u=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(v,z)|0,o=Math.imul(v,q),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,$)|0;var ve=(u+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,W)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,G)|0;var be=(u+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,Y)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var we=(u+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var Ae=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;u=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(u+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;u=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,q))+Math.imul(R,z)|0,o=Math.imul(R,q),n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((o=o+Math.imul(f,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0;var Se=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,q))+Math.imul(j,z)|0,o=Math.imul(j,q),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,$)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,fe)|0;var ke=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ge)|0)+Math.imul(f,pe)|0))<<13)|0;u=((o=o+Math.imul(f,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,$))+Math.imul(j,V)|0,o=Math.imul(j,$),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(v,de)|0,o=o+Math.imul(v,fe)|0;var xe=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;u=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,G))+Math.imul(j,W)|0,o=Math.imul(j,G),n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,ue)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,fe)|0;var Ce=(u+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(v,pe)|0))<<13)|0;u=((o=o+Math.imul(v,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,Y),i=(i=Math.imul(U,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,ue)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,fe)|0;var Ie=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,X),i=(i=Math.imul(U,ee))+Math.imul(j,X)|0,o=Math.imul(j,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Te=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(S,pe)|0))<<13)|0;u=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(j,re)|0,o=Math.imul(j,ne),n=n+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(O,de)|0,o=o+Math.imul(O,fe)|0;var Oe=(u+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(C,pe)|0))<<13)|0;u=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,ae))+Math.imul(j,oe)|0,o=Math.imul(j,ae),n=n+Math.imul(L,ce)|0,i=(i=i+Math.imul(L,ue)|0)+Math.imul(B,ce)|0,o=o+Math.imul(B,ue)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(j,ce)|0,o=Math.imul(j,ue),n=n+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,fe)|0;var Me=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,de),i=(i=Math.imul(U,fe))+Math.imul(j,de)|0,o=Math.imul(j,fe);var Re=(u+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ge)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(u+(n=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul(j,pe)|0))<<13)|0;return u=((o=Math.imul(j,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=me,c[1]=ye,c[2]=ve,c[3]=be,c[4]=we,c[5]=Ae,c[6]=_e,c[7]=Ee,c[8]=Se,c[9]=ke,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Te,c[14]=Oe,c[15]=Pe,c[16]=Me,c[17]=Re,c[18]=Ne,0!==u&&(c[19]=u,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>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 v(e,t,r){return y(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(m=g),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?g(this,e,t):r<1024?y(this,e,t):v(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;0===(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>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(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new x(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(_,A),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return w[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var g=h,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var d=u>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new C(e)},i(C,x),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),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)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},85970:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(r),a=Math.max(i,o),s=0,c=e.map([t,r],(function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===s)return 0;a-=1}else if(c[0][a]1?i-1:0),a=1;a0){var a=Object.keys(r),c=s.default.find(a,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(r[c]);if(void 0!==u)return u}var l=s.default.find(a,(function(e){return t.isPlatform(e)}));if(l){var d=this.satisfies(r[l]);if(void 0!==d)return d}}if(o>0){var f=Object.keys(i),h=s.default.find(f,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(s.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(t),n={name:o.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:o.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=a,e.exports=t.default}})},96587:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r{var n=r(83242);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},19834:(e,t,r)=>{"use strict";var n=r(70689),i=r(16047).Buffer;e.exports=function(e){function t(t){var r=t.slice(0,-4),n=t.slice(-4),i=e(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{encode:function(t){var r=e(t);return n.encode(i.concat([t,r],t.length+4))},decode:function(e){var r=t(n.decode(e));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(e){var r=n.decodeUnsafe(e);if(r)return t(r)}}}},88087:(e,t,r)=>{"use strict";var n=r(68062),i=r(19834);e.exports=i((function(e){var t=n("sha256").update(e).digest();return n("sha256").update(t).digest()}))},93325:(e,t,r)=>{"use strict";const n=r(46676),i=r(66897),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,r)}function u(e,t,r){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=s(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Q(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Q(e,ArrayBuffer)||e&&Q(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(Q(e,SharedArrayBuffer)||e&&Q(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!==typeof e.length||Y(e.length)?s(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return l(e),s(e<0?0:0|p(e))}function f(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Q(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(i)return n?-1:K(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;os&&(r=s-c),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,c;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128===(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[i+1],n=e[i+2],128===(192&r)&&128===(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128===(192&r)&&128===(192&n)&&128===(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(Q(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),u=this.slice(n,i),l=e.slice(t,r);for(let c=0;c>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let o=t;or)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i){q(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,i){q(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function B(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,o){return t=+t,r>>>=0,o||B(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return t=+t,r>>>=0,o||B(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=J((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=J((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||M(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){R(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){R(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=J((function(e){return N(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=J((function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=J((function(e){return N(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=J((function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function q(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new j.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,i,o)}function H(e,t){if("number"!==typeof e)throw new j.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new j.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"===typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const $=/[^+/0-9A-Za-z-_]/g;function K(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace($,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function G(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!==e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function J(e){return"undefined"===typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},41061:(e,t,r)=>{"use strict";var n=r(37375),i=r(43629),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"===typeof r&&o(e,".prototype.")>-1?i(r):r}},43629:(e,t,r)=>{"use strict";var n=r(76989),i=r(37375),o=r(38259),a=r(37277),s=i("%Function.prototype.apply%"),c=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||n.call(c,s),l=r(96709),d=i("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new a("a function is required");var t=u(n,c,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var f=function(){return u(n,s,arguments)};l?l(e.exports,"apply",{value:f}):e.exports.apply=f},82122:(e,t,r)=>{var n=r(16047).Buffer,i=r(84451).Transform,o=r(50923).StringDecoder;function a(e){i.call(this),this.hashMode="string"===typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(61596)(a,i),a.prototype.update=function(e,t,r){"string"===typeof e&&(e=n.from(e,t));var i=this._update(e);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(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(i){n=i}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},90138:e=>{e.exports=function(e,t,r){return tr?r:e:et?t:e}},63484:(e,t,r)=>{"use strict";const n=r(49184),i=r(24066),o=r(41314),a=r(90138);e.exports=function(e){return e=e.map((function(e){if("rgb"!=(e=n(e)).space){if("hsl"!=e.space)throw"c.spacespace is not supported.";e.values=i.rgb(e.values)}return e.values.push(e.alpha),e.values})),function(t,r){r=r||o,t=a(t,0,1);var n=(e.length-1)*t,i=Math.floor(n),s=Math.ceil(n);t=n-i;var c=e[i],u=e[s],l=c.map((function(e,n){return e=r(e,u[n],t),n<3&&(e=Math.round(e)),e}));return 1===l[3]?"rgb("+l.slice(0,3)+")":"rgba("+l+")"}}},52958:e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},49184:(e,t,r)=>{"use strict";var n=r(52958);e.exports=function(e){var t,r,o=[],a=1;if("string"===typeof e)if(e=e.toLowerCase(),n[e])o=n[e].slice(),r="rgb";else if("transparent"===e)a=0,r="rgb",o=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var s=e.slice(1);a=1,(l=s.length)<=4?(o=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===l&&(a=parseInt(s[3]+s[3],16)/255)):(o=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===l&&(a=parseInt(s[6]+s[7],16)/255)),o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0),r="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var c=t[1],u="rgb"===c;r=s=c.replace(/a$/,"");var l="cmyk"===s?4:"gray"===s?1:3;o=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===l?parseFloat(e)/100:"rgb"===s?255*parseFloat(e)/100:parseFloat(e);if("h"===s[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==i[e])return i[e]}return parseFloat(e)})),c===s&&o.push(1),a=u||void 0===o[l]?1:o[l],o=o.slice(0,l)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(o=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),r=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(o=[e[0],e[1],e[2]],r="rgb",a=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(r="rgb",o=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(r="hsl",o=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),a=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(a/=100)):(r="rgb",o=[e>>>16,(65280&e)>>>8,255&e]);return{space:r,values:o,alpha:a}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},24066:(e,t,r)=>{"use strict";var n=r(95966);e.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t,r,n,i,o,a=e[0]/360,s=e[1]/100,c=e[2]/100;if(0===s)return[o=255*c,o,o];t=2*c-(r=c<.5?c*(1+s):c+s-c*s),i=[0,0,0];for(var u=0;u<3;u++)(n=a+1/3*-(u-1))<0?n++:n>1&&n--,o=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[u]=255*o;return i}},n.hsl=function(e){var t,r,n=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(n,i,o),s=Math.max(n,i,o),c=s-a;return s===a?t=0:n===s?t=(i-o)/c:i===s?t=2+(o-n)/c:o===s&&(t=4+(n-i)/c),(t=Math.min(60*t,360))<0&&(t+=360),r=(a+s)/2,[t,100*(s===a?0:r<=.5?c/(s+a):c/(2-s-a)),100*r]}},95966:e=>{"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},96340:(e,t,r)=>{var n=r(52958),i=r(96122),o=Object.hasOwnProperty,a=Object.create(null);for(var s in n)o.call(n,s)&&(a[n[s]]=s);var c=e.exports={to:{},get:{}};function u(e,t,r){return Math.min(Math.max(t,e),r)}function l(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}c.get=function(e){var t,r;switch(e.substring(0,3).toLowerCase()){case"hsl":t=c.get.hsl(e),r="hsl";break;case"hwb":t=c.get.hwb(e),r="hwb";break;default:t=c.get.rgb(e),r="rgb"}return t?{model:r,value:t}:null},c.get.rgb=function(e){if(!e)return null;var t,r,i,a=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=t[2],t=t[1],r=0;r<3;r++){var s=2*r;a[r]=parseInt(t.slice(s,s+2),16)}i&&(a[3]=parseInt(i,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(t=t[1])[3],r=0;r<3;r++)a[r]=parseInt(t[r]+t[r],16);i&&(a[3]=parseInt(i+i,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(r=0;r<3;r++)a[r]=parseInt(t[r+1],0);t[4]&&(t[5]?a[3]=.01*parseFloat(t[4]):a[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:o.call(n,t[1])?((a=n[t[1]])[3]=1,a):null:null;for(r=0;r<3;r++)a[r]=Math.round(2.55*parseFloat(t[r+1]));t[4]&&(t[5]?a[3]=.01*parseFloat(t[4]):a[3]=parseFloat(t[4]))}for(r=0;r<3;r++)a[r]=u(a[r],0,255);return a[3]=u(a[3],0,1),a},c.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var r=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,u(parseFloat(t[2]),0,100),u(parseFloat(t[3]),0,100),u(isNaN(r)?1:r,0,1)]}return null},c.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var r=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,u(parseFloat(t[2]),0,100),u(parseFloat(t[3]),0,100),u(isNaN(r)?1:r,0,1)]}return null},c.to.hex=function(){var e=i(arguments);return"#"+l(e[0])+l(e[1])+l(e[2])+(e[3]<1?l(Math.round(255*e[3])):"")},c.to.rgb=function(){var e=i(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},c.to.rgb.percent=function(){var e=i(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"},c.to.hsl=function(){var e=i(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},c.to.hwb=function(){var e=i(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},c.to.keyword=function(e){return a[e.slice(0,3)]}},50922:(e,t,r)=>{const n=r(96340),i=r(70727),o=["keyword","gray","hex"],a={};for(const h of Object.keys(i))a[[...i[h].labels].sort().join("")]=h;const s={};function c(e,t){if(!(this instanceof c))return new c(e,t);if(t&&t in o&&(t=null),t&&!(t in i))throw new Error("Unknown model: "+t);let r,u;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof c)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"===typeof e){const t=n.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,u=i[this.model].channels,this.color=t.value.slice(0,u),this.valpha="number"===typeof t.value[u]?t.value[u]:1}else if(e.length>0){this.model=t||"rgb",u=i[this.model].channels;const r=Array.prototype.slice.call(e,0,u);this.color=f(r,u),this.valpha="number"===typeof e[u]?e[u]:1}else if("number"===typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"===typeof e.alpha?e.alpha:0);const n=t.sort().join("");if(!(n in a))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=a[n];const{labels:o}=i[this.model],s=[];for(r=0;r(e%360+360)%360)),saturationl:l("hsl",1,d(100)),lightness:l("hsl",2,d(100)),saturationv:l("hsv",1,d(100)),value:l("hsv",2,d(100)),chroma:l("hcg",1,d(100)),gray:l("hcg",2,d(100)),white:l("hwb",1,d(100)),wblack:l("hwb",2,d(100)),cyan:l("cmyk",0,d(100)),magenta:l("cmyk",1,d(100)),yellow:l("cmyk",2,d(100)),black:l("cmyk",3,d(100)),x:l("xyz",0,d(95.047)),y:l("xyz",1,d(100)),z:l("xyz",2,d(108.833)),l:l("lab",0,d(100)),a:l("lab",1),b:l("lab",2),keyword(e){return void 0!==e?new c(e):i[this.model].keyword(this.color)},hex(e){return void 0!==e?new c(e):n.to.hex(this.rgb().round().color)},hexa(e){if(void 0!==e)return new c(e);const t=this.rgb().round().color;let r=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===r.length&&(r="0"+r),n.to.hex(t)+r},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,t=[];for(const[r,n]of e.entries()){const e=n/255;t[r]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return c.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const r=e.rgb(),n=this.rgb(),i=void 0===t?.5:t,o=2*i-1,a=r.alpha()-n.alpha(),s=((o*a===-1?o:(o+a)/(1+o*a))+1)/2,u=1-s;return c.rgb(s*r.red()+u*n.red(),s*r.green()+u*n.green(),s*r.blue()+u*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(const h of Object.keys(i)){if(o.includes(h))continue;const{channels:e}=i[h];c.prototype[h]=function(){if(this.model===h)return new c(this);for(var e=arguments.length,t=new Array(e),r=0;r0?new c(t,h):new c([...(n=i[this.model][h].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],h);var n},c[h]=function(){for(var t=arguments.length,r=new Array(t),n=0;n{const n=r(20643),i={};for(const a of Object.keys(n))i[n[a]]=a;const o={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=o;for(const a of Object.keys(o)){if(!("channels"in o[a]))throw new Error("missing channels property: "+a);if(!("labels"in o[a]))throw new Error("missing channel labels property: "+a);if(o[a].labels.length!==o[a].channels)throw new Error("channel and label counts mismatch: "+a);const{channels:e,labels:t}=o[a];delete o[a].channels,delete o[a].labels,Object.defineProperty(o[a],"channels",{value:e}),Object.defineProperty(o[a],"labels",{value:t})}o.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=o-i;let s,c;o===i?s=0:t===o?s=(r-n)/a:r===o?s=2+(n-t)/a:n===o&&(s=4+(t-r)/a),s=Math.min(60*s,360),s<0&&(s+=360);const u=(i+o)/2;return c=o===i?0:u<=.5?a/(o+i):a/(2-o-i),[s,100*c,100*u]},o.rgb.hsv=function(e){let t,r,n,i,o;const a=e[0]/255,s=e[1]/255,c=e[2]/255,u=Math.max(a,s,c),l=u-Math.min(a,s,c),d=function(e){return(u-e)/6/l+.5};return 0===l?(i=0,o=0):(o=l/u,t=d(a),r=d(s),n=d(c),a===u?i=n-r:s===u?i=1/3+t-n:c===u&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*u]},o.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const i=o.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[i,100*a,100*n]},o.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n);return[100*((1-t-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},o.rgb.keyword=function(e){const t=i[e];if(t)return t;let r,o=1/0;for(const i of Object.keys(n)){const t=n[i],c=(s=t,((a=e)[0]-s[0])**2+(a[1]-s[1])**2+(a[2]-s[2])**2);c.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},o.rgb.lab=function(e){const t=o.rgb.xyz(e);let r=t[0],n=t[1],i=t[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*n-16,500*(r-n),200*(n-i)]},o.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let i,o,a;if(0===r)return a=255*n,[a,a,a];i=n<.5?n*(1+r):n+r-n*r;const s=2*n-i,c=[0,0,0];for(let u=0;u<3;u++)o=t+1/3*-(u-1),o<0&&o++,o>1&&o--,a=6*o<1?s+6*(i-s)*o:2*o<1?i:3*o<2?s+(i-s)*(2/3-o)*6:s,c[u]=255*a;return c},o.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,i=r;const o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;return[t,100*(0===n?2*i/(o+i):2*r/(n+r)),100*((n+r)/2)]},o.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),a=255*n*(1-r),s=255*n*(1-r*o),c=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,c,a];case 1:return[s,n,a];case 2:return[a,n,c];case 3:return[a,s,n];case 4:return[c,a,n];case 5:return[n,a,s]}},o.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,.01);let o,a;a=(2-r)*n;const s=(2-r)*i;return o=r*i,o/=s<=1?s:2-s,o=o||0,a/=2,[t,100*o,100*a]},o.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const i=r+n;let o;i>1&&(r/=i,n/=i);const a=Math.floor(6*t),s=1-n;o=6*t-a,0!==(1&a)&&(o=1-o);const c=r+o*(s-r);let u,l,d;switch(a){default:case 6:case 0:u=s,l=c,d=r;break;case 1:u=c,l=s,d=r;break;case 2:u=r,l=s,d=c;break;case 3:u=r,l=c,d=s;break;case 4:u=c,l=r,d=s;break;case 5:u=s,l=r,d=c}return[255*u,255*l,255*d]},o.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},o.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let i,o,a;return i=3.2406*t+-1.5372*r+-.4986*n,o=-.9689*t+1.8758*r+.0415*n,a=.0557*t+-.204*r+1.057*n,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[255*i,255*o,255*a]},o.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},o.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const i=r**3,o=t**3,a=n**3;return r=i>.008856?i:(r-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,n=a>.008856?a:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},o.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let i;i=360*Math.atan2(n,r)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(r*r+n*n),i]},o.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},o.rgb.ansi16=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const[r,n,i]=e;let a=null===t?o.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),0===a)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===a&&(s+=60),s},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];if(t===r&&r===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},o.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},o.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},o.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map((e=>e+e)).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},o.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),a=i-o;let s,c;return s=a<1?o/(1-a):0,c=a<=0?0:i===t?(r-n)/a%6:i===r?2+(n-t)/a:4+(t-r)/a,c/=6,c%=1,[360*c,100*a,100*s]},o.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},o.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},o.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const i=[0,0,0],o=t%1*6,a=o%1,s=1-a;let c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-r)*n,[255*(r*i[0]+c),255*(r*i[1]+c),255*(r*i[2]+c)]},o.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},o.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},o.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},o.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=function(e){return[0,0,e[0]]},o.gray.hsv=o.gray.hsl,o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},70727:(e,t,r)=>{const n=r(86318),i=r(93362),o={};Object.keys(n).forEach((e=>{o[e]={},Object.defineProperty(o[e],"channels",{value:n[e].channels}),Object.defineProperty(o[e],"labels",{value:n[e].labels});const t=i(e);Object.keys(t).forEach((r=>{const n=t[r];o[e][r]=function(e){const t=function(){for(var t=arguments.length,r=new Array(t),n=0;n1&&(r=i);const o=e(r);if("object"===typeof o)for(let e=o.length,a=0;a1&&(r=i),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})),e.exports=o},93362:(e,t,r)=>{const n=r(86318);function i(e){const t=function(){const e={},t=Object.keys(n);for(let r=t.length,n=0;n{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},63785:(e,t)=>{"use strict";t.parse=function(e,t){if("string"!==typeof e)throw new TypeError("argument str must be a string");for(var n={},i=t||{},a=e.split(";"),s=i.decode||r,c=0;c{"use strict";var n=r(59660),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var r,o,a,s,c,u,l=!1;t||(t={}),r=t.debug||!1;try{if(a=n(),s=document.createRange(),c=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),"undefined"===typeof n.clipboardData){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i.default;window.clipboardData.setData(o,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))})),document.body.appendChild(u),s.selectNodeContents(u),c.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(d){r&&console.error("unable to copy using execCommand: ",d),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){r&&console.error("unable to copy using clipboardData: ",d),r&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(s):c.removeAllRanges()),u&&document.body.removeChild(u),a()}return l}},68062:(e,t,r)=>{"use strict";var n=r(61596),i=r(53358),o=r(29453),a=r(88e3),s=r(82122);function c(e){s.call(this,"digest"),this._hash=e}n(c,s),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new c(a(e))}},4159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",o="minute",a="hour",s="day",c="week",u="month",l="quarter",d="year",f="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},y=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},v={s:y,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+y(n,2,"0")+":"+y(i,2,"0")},m:function e(t,r){if(t.date()1)return e(a[0])}else{var s=t.name;w[s]=t,i=s}return!n&&i&&(b=i),i||!n&&b},S=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new x(r)},k=v;k.l=E,k.i=_,k.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var x=function(){function m(e){this.$L=E(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[A]=!0}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(k.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(p);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(t)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var r=S(e);return this.startOf(t)<=r&&r<=this.endOf(t)},y.isAfter=function(e,t){return S(e)0,m<=g.r||!g.r){m<=1&&p>0&&(g=f[p-1]);var y=d[g.l];s&&(m=s(""+m)),u="string"==typeof y?y.replace("%d",m):y(m,n,g.l,l);break}}if(n)return u;var v=l?d.future:d.past;return"function"==typeof v?v(u):v.replace("%s",u)},n.to=function(e,t){return o(e,t,this,!0)},n.from=function(e,t){return o(e,t,this)};var a=function(e){return e.$u?r.utc():r()};n.toNow=function(e){return this.to(a(this),e)},n.fromNow=function(e){return this.from(a(this),e)}}}()},60111:function(e){e.exports=function(){"use strict";return function(e,t,r){r.updateLocale=function(e,t){var n=r.Ls[e];if(n)return(t?Object.keys(t):[]).forEach((function(e){n[e]=t[e]})),n}}}()},96844:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function i(e,t){try{return[decodeURIComponent(e.join(""))]}catch(o){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],i(r),i(n))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(r)||[],n=1;n{"use strict";var t=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)};var r="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?c((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function i(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function a(e,t){try{return t in e}catch(r){return!1}}function s(e,t,r){var i={};return r.isMergeableObject(e)&&o(e).forEach((function(t){i[t]=n(e[t],r)})),o(t).forEach((function(o){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(a(e,o)&&r.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return c;var r=t.customMerge(e);return"function"===typeof r?r:c}(o,r)(e[o],t[o],r):i[o]=n(t[o],r))})),i}function c(e,r,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=n;var a=Array.isArray(r);return a===Array.isArray(e)?a?o.arrayMerge(e,r,o):s(e,r,o):n(r,o)}c.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return c(e,r,t)}),{})};var u=c;e.exports=u},29411:(e,t,r)=>{"use strict";var n=r(96709),i=r(57430),o=r(37277),a=r(46934);e.exports=function(e,t,r){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new o("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],d=!!a&&a(e,t);if(n)n(e,t,{configurable:null===u&&d?d.configurable:!u,enumerable:null===s&&d?d.enumerable:!s,value:r,writable:null===c&&d?d.writable:!c});else{if(!l&&(s||c||u))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},96338:(e,t,r)=>{"use strict";r.d(t,{o0:()=>h});var n=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i{"use strict";var t={single_source_shortest_paths:function(e,r,n){var i={},o={};o[r]=0;var a,s,c,u,l,d,f,h=t.PriorityQueue.make();for(h.push(r,0);!h.empty();)for(c in s=(a=h.pop()).value,u=a.cost,l=e[s]||{})l.hasOwnProperty(c)&&(d=u+l[c],f=o[c],("undefined"===typeof o[c]||f>d)&&(o[c]=d,h.push(c,d),i[c]=s));if("undefined"!==typeof n&&"undefined"===typeof 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(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,r,n){var i=t.single_source_shortest_paths(e,r,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var r,n=t.PriorityQueue,i={};for(r in e=e||{},n)n.hasOwnProperty(r)&&(i[r]=n[r]);return i.queue=[],i.sorter=e.sorter||n.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},95239:(e,t,r)=>{"use strict";var n=t;n.version=r(1636).rE,n.utils=r(92121),n.rand=r(96587),n.curve=r(84116),n.curves=r(95454),n.ec=r(44393),n.eddsa=r(51576)},96155:(e,t,r)=>{"use strict";var n=r(24912),i=r(92121),o=i.getNAF,a=i.getJSF,s=i.assert;function c(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=a;l--)c=(c<<1)+n[l];u.push(c)}for(var d=this.jpoint(null,null,null),f=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;u--){for(var l=0;u>=0&&0===a[u];u--)l++;if(u>=0&&l++,c=c.dblp(l),u<0)break;var d=a[u];s(0!==d),c="affine"===e.type?d>0?c.mixedAdd(i[d-1>>1]):c.mixedAdd(i[-d-1>>1].neg()):d>0?c.add(i[d-1>>1]):c.add(i[-d-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,r,n,i){var s,c,u,l=this._wnafT1,d=this._wnafT2,f=this._wnafT3,h=0;for(s=0;s=1;s-=2){var g=s-1,m=s;if(1===l[g]&&1===l[m]){var y=[t[g],null,null,t[m]];0===t[g].y.cmp(t[m].y)?(y[1]=t[g].add(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg())):0===t[g].y.cmp(t[m].y.redNeg())?(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].add(t[m].neg())):(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=a(r[g],r[m]);for(h=Math.max(b[0].length,h),f[g]=new Array(h),f[m]=new Array(h),c=0;c=0;s--){for(var S=0;s>=0;){var k=!0;for(c=0;c=0&&S++,_=_.dblp(S),s<0)break;for(c=0;c0?u=d[c][x-1>>1]:x<0&&(u=d[c][-x-1>>1].neg()),_="affine"===u.type?_.mixedAdd(u):_.add(u))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i{"use strict";var n=r(92121),i=r(24912),o=r(61596),a=r(96155),s=n.assert;function c(e){this.twisted=1!==(0|e.a),this.mOneA=this.twisted&&-1===(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|e.c)}function u(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(c,a),e.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(t&&!c||!t&&c)&&(s=s.redNeg()),this.point(e,s)},c.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(u,a.BasePoint),c.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},c.prototype.point=function(e,t,r,n){return new u(this,e,t,r,n)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),c=i.redMul(a),u=o.redMul(s),l=i.redMul(s),d=a.redMul(o);return this.curve.point(c,u,d,l)},u.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(c);this.zOne?(e=a.redSub(s).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(c)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=a.redSub(s).redISub(c).redMul(o),t=u.redMul(n.redSub(c)),r=u.redMul(o))}else n=s.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(c)),r=n.redMul(o);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),c=r.redAdd(t),u=o.redMul(a),l=s.redMul(c),d=o.redMul(c),f=a.redMul(s);return this.curve.point(u,l,f,d)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),c=i.redSub(s),u=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(c).redMul(l);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=c.redMul(u)):(t=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(c).redMul(u)),this.curve.point(d,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},84116:(e,t,r)=>{"use strict";var n=t;n.base=r(96155),n.short=r(57594),n.mont=r(75120),n.edwards=r(38304)},75120:(e,t,r)=>{"use strict";var n=r(24912),i=r(61596),o=r(96155),a=r(92121);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(c,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new c(this,e,t)},s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),c=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},57594:(e,t,r)=>{"use strict";var n=r(92121),i=r(24912),o=r(61596),a=r(96155),s=n.assert;function c(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,a),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,c,u,l,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,h=this.n.clone(),p=new i(1),g=new i(0),m=new i(0),y=new i(1),v=0;0!==f.cmpn(0);){var b=h.div(f);u=h.sub(b.mul(f)),l=m.sub(b.mul(p));var w=y.sub(b.mul(g));if(!n&&u.cmp(d)<0)t=c.neg(),r=p,n=u.neg(),o=l;else if(n&&2===++v)break;c=u,h=f,f=u,m=p,p=l,y=g,g=w}a=u.neg(),s=l;var A=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(A)>=0&&(a=t,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}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:c.add(u).neg()}},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,a.BasePoint),c.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),d=n.redMul(u),f=c.redSqr().redIAdd(l).redISub(d).redISub(d),h=c.redMul(d.redISub(f)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=r.redMul(c),d=s.redSqr().redIAdd(u).redISub(l).redISub(l),f=s.redMul(l.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},l.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},95454:(e,t,r)=>{"use strict";var n,i=t,o=r(49166),a=r(84116),s=r(92121).assert;function c(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,u("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"]}),u("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"]}),u("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"]}),u("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"]}),u("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"]}),u("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"]}),u("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(88041)}catch(l){n=void 0}u("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]})},44393:(e,t,r)=>{"use strict";var n=r(24912),i=r(94033),o=r(92121),a=r(95454),s=r(96587),c=o.assert,u=r(33402),l=r(26607);function d(e){if(!(this instanceof d))return new d(e);"string"===typeof e&&(c(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=d,d.prototype.keyPair=function(e){return new u(this,e)},d.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,r,o){"object"===typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),u=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new n(1)),f=0;;f++){var h=o.k?o.k(f):new n(u.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var g=p.getX(),m=g.umod(this.n);if(0!==m.cmpn(0)){var y=h.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==g.cmp(m)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),v^=1),new l({r:m,s:y,recoveryParam:v})}}}}}},d.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new l(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),u=c.mul(e).umod(this.n),d=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),d)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,r.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(e,t,r,i){c((3&r)===r,"The recovery param is more than two bits"),t=new l(t,i);var o=this.n,a=new n(e),s=t.r,u=t.s,d=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),g=u.mul(h).umod(o);return this.g.mulAdd(p,s,g)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new l(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},33402:(e,t,r)=>{"use strict";var n=r(24912),i=r(92121).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},26607:(e,t,r)=>{"use strict";var n=r(24912),i=r(92121),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function c(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;if(0===e[t.place])return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=c(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=c(e,r);if(!1===a)return!1;if(0!==(128&e[r.place]))return!1;var u=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var l=c(e,r);if(!1===l)return!1;if(e.length!==l+r.place)return!1;if(0!==(128&e[r.place]))return!1;var d=e.slice(r.place,l+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(u),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];l(n,t.length),(n=n.concat(t)).push(2),l(n,r.length);var o=n.concat(r),a=[48];return l(a,o.length),a=a.concat(o),i.encode(a,e)}},51576:(e,t,r)=>{"use strict";var n=r(49166),i=r(95454),o=r(92121),a=o.assert,s=o.parseBytes,c=r(939),u=r(83158);function l(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=l,l.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),c=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},l.prototype.verify=function(e,t,r){if(e=s(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var n=r(92121),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},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 e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(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(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},83158:(e,t,r)=>{"use strict";var n=r(24912),i=r(92121),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function c(e,t){this.eddsa=e,"object"!==typeof t&&(t=s(t)),Array.isArray(t)&&(o(t.length===2*e.encodingLength,"Signature has invalid size"),t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=c},88041:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},92121:(e,t,r)=>{"use strict";var n=t,i=r(24912),o=r(77599),a=r(98869);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n,i=new Array(Math.max(e.bitLength(),r)+1);for(n=0;n(o>>1)-1?(o>>1)-c:c,a.isubn(s)):s=0,i[n]=s,a.iushrn(1)}return i},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,c=e.andln(3)+i&3,u=t.andln(3)+o&3;3===c&&(c=-1),3===u&&(u=-1),a=0===(1&c)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?c:-c,r[0].push(a),s=0===(1&u)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==c?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"===typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},24912:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(79368).Buffer}catch(k){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=c(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[u]=0|d,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=d[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?g+r:l[u-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,u=new e(o),l=this.clone();if(c){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],w=8191&b,A=b>>>13,_=0|a[4],E=8191&_,S=_>>>13,k=0|a[5],x=8191&k,C=k>>>13,I=0|a[6],T=8191&I,O=I>>>13,P=0|a[7],M=8191&P,R=P>>>13,N=0|a[8],L=8191&N,B=N>>>13,D=0|a[9],U=8191&D,j=D>>>13,F=0|s[0],z=8191&F,q=F>>>13,H=0|s[1],V=8191&H,$=H>>>13,K=0|s[2],W=8191&K,G=K>>>13,Q=0|s[3],Y=8191&Q,Z=Q>>>13,J=0|s[4],X=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],de=8191&le,fe=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(f,z)|0))<<13)|0;u=((o=Math.imul(f,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(g,z)|0,o=Math.imul(g,q);var ye=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(f,V)|0))<<13)|0;u=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(v,z)|0,o=Math.imul(v,q),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,$)|0;var ve=(u+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,W)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,G)|0;var be=(u+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,Y)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var we=(u+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var Ae=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;u=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(u+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;u=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,q))+Math.imul(R,z)|0,o=Math.imul(R,q),n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((o=o+Math.imul(f,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0;var Se=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,q))+Math.imul(j,z)|0,o=Math.imul(j,q),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,$)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,fe)|0;var ke=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ge)|0)+Math.imul(f,pe)|0))<<13)|0;u=((o=o+Math.imul(f,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,$))+Math.imul(j,V)|0,o=Math.imul(j,$),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(v,de)|0,o=o+Math.imul(v,fe)|0;var xe=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;u=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,G))+Math.imul(j,W)|0,o=Math.imul(j,G),n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,ue)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,fe)|0;var Ce=(u+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(v,pe)|0))<<13)|0;u=((o=o+Math.imul(v,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,Y),i=(i=Math.imul(U,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,ue)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,fe)|0;var Ie=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,X),i=(i=Math.imul(U,ee))+Math.imul(j,X)|0,o=Math.imul(j,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Te=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(S,pe)|0))<<13)|0;u=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(j,re)|0,o=Math.imul(j,ne),n=n+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(O,de)|0,o=o+Math.imul(O,fe)|0;var Oe=(u+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(C,pe)|0))<<13)|0;u=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,ae))+Math.imul(j,oe)|0,o=Math.imul(j,ae),n=n+Math.imul(L,ce)|0,i=(i=i+Math.imul(L,ue)|0)+Math.imul(B,ce)|0,o=o+Math.imul(B,ue)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(j,ce)|0,o=Math.imul(j,ue),n=n+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,fe)|0;var Me=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,de),i=(i=Math.imul(U,fe))+Math.imul(j,de)|0,o=Math.imul(j,fe);var Re=(u+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ge)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(u+(n=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul(j,pe)|0))<<13)|0;return u=((o=Math.imul(j,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=me,c[1]=ye,c[2]=ve,c[3]=be,c[4]=we,c[5]=Ae,c[6]=_e,c[7]=Ee,c[8]=Se,c[9]=ke,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Te,c[14]=Oe,c[15]=Pe,c[16]=Me,c[17]=Re,c[18]=Ne,0!==u&&(c[19]=u,r.length++),r};function g(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>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,e,t):g(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;0===(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>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(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(b,v),b.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var g=h,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var d=u>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,E),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},61053:e=>{function t(e){if(e)return function(e){for(var r in t.prototype)e[r]=t.prototype[r];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},t.prototype.once=function(e,t){var r=this;function n(){r.off(e,n),t.apply(this,arguments)}return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var i=0;i{"use strict";e.exports=function(e){for(var t=[],r=e.length,n=0;n=55296&&i<=56319&&r>n+1){var o=e.charCodeAt(n+1);o>=56320&&o<=57343&&(i=1024*(i-55296)+o-56320+65536,n+=1)}i<128?t.push(i):i<2048?(t.push(i>>6|192),t.push(63&i|128)):i<55296||i>=57344&&i<65536?(t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)):i>=65536&&i<=1114111?(t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},96709:(e,t,r)=>{"use strict";var n=r(37375)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(i){n=!1}e.exports=n},63123:e=>{"use strict";e.exports=EvalError},86953:e=>{"use strict";e.exports=Error},23780:e=>{"use strict";e.exports=RangeError},68768:e=>{"use strict";e.exports=ReferenceError},57430:e=>{"use strict";e.exports=SyntaxError},37277:e=>{"use strict";e.exports=TypeError},91619:e=>{"use strict";e.exports=URIError},28981:e=>{"use strict";var t,r="object"===typeof Reflect?Reflect:null,n=r&&"function"===typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"===typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!==e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"===typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"===typeof e.on&&g(e,"error",t,r)}(e,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(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,a,u;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"===typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){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 d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"===typeof c)n(c,this,t);else{var u=c.length,l=p(c,u);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},13128:e=>{"use strict";e.exports=class{constructor(e){let{uri:t,name:r,type:n}=e;this.uri=t,this.name=r,this.type=n}}},17096:(e,t,r)=>{"use strict";const n=r(61097);e.exports=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;const i=new Map,o=new Map;return{clone:function e(t,n,a){let s=t;if(r(t)){s=null;const e=i.get(t);e?e.push(n):i.set(t,[n])}else{const r=Array.isArray(t)||"undefined"!==typeof FileList&&t instanceof FileList,i=t&&t.constructor===Object;if(r||i){const i=o.has(t);if(i?s=o.get(t):(s=r?[]:{},o.set(t,s)),!a.has(t)){const o=n?`${n}.`:"",c=new Set(a).add(t);if(r){let r=0;for(const n of t){const t=e(n,o+r++,c);i||s.push(t)}}else for(const r in t){const n=e(t[r],o+r,c);i||(s[r]=n)}}}}return s}(e,t,new Set),files:i}}},61097:(e,t,r)=>{"use strict";const n=r(13128);e.exports=function(e){return"undefined"!==typeof File&&e instanceof File||"undefined"!==typeof Blob&&e instanceof Blob||e instanceof n}},14110:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"===typeof t&&(t={cmp:t});var r,n="boolean"===typeof t.cycles&&t.cycles,i=t.cmp&&(r=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},o={key:n,value:e[n]};return r(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"===typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!==typeof t)return JSON.stringify(t);var r,a;if(Array.isArray(t)){for(a="[",r=0;r{"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),o=0;o{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n{"use strict";var n=r(78307);e.exports=Function.prototype.bind||n},37375:(e,t,r)=>{"use strict";var n,i=r(86953),o=r(63123),a=r(23780),s=r(68768),c=r(57430),u=r(37277),l=r(91619),d=Function,f=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(t){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(L){h=null}var p=function(){throw new u},g=h?function(){try{return p}catch(e){try{return h(arguments,"callee").get}catch(t){return p}}}():p,m=r(90757)(),y=r(26442)(),v=Object.getPrototypeOf||(y?function(e){return e.__proto__}:null),b={},w="undefined"!==typeof Uint8Array&&v?v(Uint8Array):n,A={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":m&&v?v([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"===typeof Atomics?n:Atomics,"%BigInt%":"undefined"===typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"===typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":b,"%Int8Array%":"undefined"===typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&v?v(v([][Symbol.iterator]())):n,"%JSON%":"object"===typeof JSON?JSON:n,"%Map%":"undefined"===typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&m&&v?v((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%":a,"%ReferenceError%":s,"%Reflect%":"undefined"===typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&m&&v?v((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&v?v(""[Symbol.iterator]()):n,"%Symbol%":m?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":g,"%TypedArray%":w,"%TypeError%":u,"%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%":l,"%WeakMap%":"undefined"===typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?n:WeakSet};if(v)try{null.error}catch(L){var _=v(v(L));A["%Error.prototype%"]=_}var E=function e(t){var r;if("%AsyncFunction%"===t)r=f("async function () {}");else if("%GeneratorFunction%"===t)r=f("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=f("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&v&&(r=v(i.prototype))}return A[t]=r,r},S={__proto__:null,"%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"]},k=r(76989),x=r(42155),C=k.call(Function.call,Array.prototype.concat),I=k.call(Function.apply,Array.prototype.splice),T=k.call(Function.call,String.prototype.replace),O=k.call(Function.call,String.prototype.slice),P=k.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,N=function(e,t){var r,n=e;if(x(S,n)&&(n="%"+(r=S[n])[0]+"%"),x(A,n)){var i=A[n];if(i===b&&(i=E(n)),"undefined"===typeof i&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=O(e,0,1),r=O(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return T(e,M,(function(e,t,r,i){n[n.length]=r?T(i,R,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=N("%"+n+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(n=l[0],I(r,C([0,1],l)));for(var d=1,f=!0;d=r.length){var y=h(a,p);a=(f=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[p]}else f=x(a,p),a=a[p];f&&!s&&(A[o]=a)}}return a}},46934:(e,t,r)=>{"use strict";var n=r(37375)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(i){n=null}e.exports=n},55625:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(52178),t),i(r(78462),t),i(r(40616),t)},47734:(e,t,r)=>{"use strict";var n=r(96709),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},26442:e=>{"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},90757:(e,t,r)=>{"use strict";var n="undefined"!==typeof Symbol&&Symbol,i=r(93175);e.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},93175:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},11207:(e,t,r)=>{"use strict";var n=r(16047).Buffer,i=r(44833).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(61596)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(i){n=i}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!==typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++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(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},49166:(e,t,r)=>{var n=t;n.utils=r(80328),n.common=r(96876),n.sha=r(3131),n.ripemd=r(50018),n.hmac=r(12054),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},96876:(e,t,r)=>{"use strict";var n=r(80328),i=r(77599);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o{"use strict";var n=r(80328),i=r(77599);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(80328),i=r(96876),o=n.rotl32,a=n.sum32,s=n.sum32_3,c=n.sum32_4,u=i.BlockHash;function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function f(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,u),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],l=this.h[4],v=r,b=n,w=i,A=u,_=l,E=0;E<80;E++){var S=a(o(c(r,d(E,n,i,u),e[p[E]+t],f(E)),m[E]),l);r=l,l=u,u=o(i,10),i=n,n=S,S=a(o(c(v,d(79-E,b,w,A),e[g[E]+t],h(E)),y[E]),_),v=_,_=A,A=o(w,10),w=b,b=S}S=s(this.h[1],i,A),this.h[1]=s(this.h[2],u,_),this.h[2]=s(this.h[3],l,v),this.h[3]=s(this.h[4],r,b),this.h[4]=s(this.h[0],n,w),this.h[0]=S},l.prototype._digest=function(e){return"hex"===e?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],g=[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]},3131:(e,t,r)=>{"use strict";t.sha1=r(32151),t.sha224=r(25612),t.sha256=r(97273),t.sha384=r(98730),t.sha512=r(6652)},32151:(e,t,r)=>{"use strict";var n=r(80328),i=r(96876),o=r(21391),a=n.rotl32,s=n.sum32,c=n.sum32_5,u=o.ft_1,l=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(f,l),e.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(80328),i=r(97273);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},97273:(e,t,r)=>{"use strict";var n=r(80328),i=r(96876),o=r(21391),a=r(77599),s=n.sum32,c=n.sum32_4,u=n.sum32_5,l=o.ch32,d=o.maj32,f=o.s0_256,h=o.s1_256,p=o.g0_256,g=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 v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(v,m),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(80328),i=r(6652);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},6652:(e,t,r)=>{"use strict";var n=r(80328),i=r(96876),o=r(77599),a=n.rotr64_hi,s=n.rotr64_lo,c=n.shr64_hi,u=n.shr64_lo,l=n.sum64,d=n.sum64_hi,f=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,g=n.sum64_5_hi,m=n.sum64_5_lo,y=i.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function 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=v,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function S(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function k(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function C(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function I(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function T(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=a(e,t,19)^a(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}function P(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(b,y),e.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(80328).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},80328:(e,t,r)=>{"use strict";var n=r(77599),i=r(61596);function o(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,c,u){var l=0,d=t;return l+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,c,u){return t+n+o+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},42155:(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(76989);e.exports=o.call(n,i)},94033:(e,t,r)=>{"use strict";var n=r(49166),i=r(98869),o=r(77599);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length{"use strict";var n=r(26429),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return n.isMemo(e)?a:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var u=Object.defineProperty,l=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,n){if("string"!==typeof r){if(p){var i=h(r);i&&i!==p&&e(t,i,n)}var a=l(r);d&&(a=a.concat(d(r)));for(var s=c(t),g=c(r),m=0;m{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<>1,l=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+d],d+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=u}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,u-=8);e[r+h-p]|=128*g}},61596:e=>{"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},30195:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},62838:(e,t,r)=>{e.exports=self.fetch||(self.fetch=r(44244).default||r(44244))},8531:(e,t,r)=>{var n=r(578).stringify,i=r(89324);e.exports=function(e){return{parse:i(e),stringify:n}},e.exports.parse=i(),e.exports.stringify=n},89324:(e,t,r)=>{var n=null;const i=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,o=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(void 0!==e&&null!==e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,"undefined"!==typeof e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);t.constructorAction=e.constructorAction}if("undefined"!==typeof e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`);t.protoAction=e.protoAction}}var a,s,c,u,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},d=function(e){throw{name:"SyntaxError",message:e,at:a,text:c}},f=function(e){return e&&e!==s&&d("Expected '"+e+"' instead of '"+s+"'"),s=c.charAt(a),a+=1,s},h=function(){var e,i="";for("-"===s&&(i="-",f("-"));s>="0"&&s<="9";)i+=s,f();if("."===s)for(i+=".";f()&&s>="0"&&s<="9";)i+=s;if("e"===s||"E"===s)for(i+=s,f(),"-"!==s&&"+"!==s||(i+=s,f());s>="0"&&s<="9";)i+=s,f();if(e=+i,isFinite(e))return null==n&&(n=r(63160)),i.length>15?t.storeAsString?i:t.useNativeBigInt?BigInt(i):new n(i):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new n(e):e;d("Bad number")},p=function(){var e,t,r,n="";if('"'===s)for(var i=a;f();){if('"'===s)return a-1>i&&(n+=c.substring(i,a-1)),f(),n;if("\\"===s){if(a-1>i&&(n+=c.substring(i,a-1)),f(),"u"===s){for(r=0,t=0;t<4&&(e=parseInt(f(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!==typeof l[s])break;n+=l[s]}i=a}}d("Bad string")},g=function(){for(;s&&s<=" ";)f()};return u=function(){switch(g(),s){case"{":return function(){var e,r=Object.create(null);if("{"===s){if(f("{"),g(),"}"===s)return f("}"),r;for(;s;){if(e=p(),g(),f(":"),!0===t.strict&&Object.hasOwnProperty.call(r,e)&&d('Duplicate key "'+e+'"'),!0===i.test(e)?"error"===t.protoAction?d("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():r[e]=u():!0===o.test(e)?"error"===t.constructorAction?d("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():r[e]=u():r[e]=u(),g(),"}"===s)return f("}"),r;f(","),g()}}d("Bad object")}();case"[":return function(){var e=[];if("["===s){if(f("["),g(),"]"===s)return f("]"),e;for(;s;){if(e.push(u()),g(),"]"===s)return f("]"),e;f(","),g()}}d("Bad array")}();case'"':return p();case"-":return h();default:return s>="0"&&s<="9"?h():function(){switch(s){case"t":return f("t"),f("r"),f("u"),f("e"),!0;case"f":return f("f"),f("a"),f("l"),f("s"),f("e"),!1;case"n":return f("n"),f("u"),f("l"),f("l"),null}d("Unexpected '"+s+"'")}()}},function(e,t){var r;return c=e+"",a=0,s=" ",r=u(),g(),s&&d("Syntax error"),"function"===typeof t?function e(r,n){var i,o=r[n];return o&&"object"===typeof o&&Object.keys(o).forEach((function(t){void 0!==(i=e(o,t))?o[t]=i:delete o[t]})),t.call(r,n,o)}({"":r},""):r}}},578:(e,t,r)=>{var n=r(63160),i=e.exports;!function(){"use strict";var e,t,r,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(e){return o.lastIndex=0,o.test(e)?'"'+e.replace(o,(function(e){var t=a[e];return"string"===typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(i,o){var a,u,l,d,f,h=e,p=o[i],g=null!=p&&(p instanceof n||n.isBigNumber(p));switch(p&&"object"===typeof p&&"function"===typeof p.toJSON&&(p=p.toJSON(i)),"function"===typeof r&&(p=r.call(o,i,p)),typeof p){case"string":return g?p:s(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":case"bigint":return String(p);case"object":if(!p)return"null";if(e+=t,f=[],"[object Array]"===Object.prototype.toString.apply(p)){for(d=p.length,a=0;a{"use strict";var n=("undefined"!==typeof JSON?JSON:r(97117)).stringify,i=r(30195),o=r(27839),a=r(43629),s=r(41061),c=s("Array.prototype.join"),u=s("Array.prototype.push"),l=function(e,t){for(var r="",n=0;n1?arguments[1]:void 0,r=t&&t.space||"";"number"===typeof r&&(r=l(r," "));var s=!!t&&"boolean"===typeof t.cycles&&t.cycles,f=t&&t.replacer?a(t.replacer):d,h="function"===typeof t?t:t&&t.cmp,p=h&&function(e){var t=h.length>2&&function(t){return e[t]};return function(r,n){return h({key:r,value:e[r]},{key:n,value:e[n]},t?{__proto__:null,get:t}:void 0)}},g=[];return function e(t,a,d,h){var m=r?"\n"+l(h,r):"",y=r?": ":":";if(d&&d.toJSON&&"function"===typeof d.toJSON&&(d=d.toJSON()),void 0!==(d=f(t,a,d))){if("object"!==typeof d||null===d)return n(d);if(i(d)){for(var v=[],b=0;b{"use strict";t.parse=r(8602),t.stringify=r(84852)},8602:e=>{"use strict";var t,r,n,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function o(e){throw{name:"SyntaxError",message:e,at:t,text:n}}function a(e){return e&&e!==r&&o("Expected '"+e+"' instead of '"+r+"'"),r=n.charAt(t),t+=1,r}function s(){var e,t="";for("-"===r&&(t="-",a("-"));r>="0"&&r<="9";)t+=r,a();if("."===r)for(t+=".";a()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,a(),"-"!==r&&"+"!==r||(t+=r,a());r>="0"&&r<="9";)t+=r,a();return e=Number(t),isFinite(e)||o("Bad number"),e}function c(){var e,t,n,s="";if('"'===r)for(;a();){if('"'===r)return a(),s;if("\\"===r)if(a(),"u"===r){for(n=0,t=0;t<4&&(e=parseInt(a(),16),isFinite(e));t+=1)n=16*n+e;s+=String.fromCharCode(n)}else{if("string"!==typeof i[r])break;s+=i[r]}else s+=r}o("Bad string")}function u(){for(;r&&r<=" ";)a()}function l(){switch(u(),r){case"{":return function(){var e,t={};if("{"===r){if(a("{"),u(),"}"===r)return a("}"),t;for(;r;){if(e=c(),u(),a(":"),Object.prototype.hasOwnProperty.call(t,e)&&o('Duplicate key "'+e+'"'),t[e]=l(),u(),"}"===r)return a("}"),t;a(","),u()}}o("Bad object")}();case"[":return function(){var e=[];if("["===r){if(a("["),u(),"]"===r)return a("]"),e;for(;r;){if(e.push(l()),u(),"]"===r)return a("]"),e;a(","),u()}}o("Bad array")}();case'"':return c();case"-":return s();default:return r>="0"&&r<="9"?s():function(){switch(r){case"t":return a("t"),a("r"),a("u"),a("e"),!0;case"f":return a("f"),a("a"),a("l"),a("s"),a("e"),!1;case"n":return a("n"),a("u"),a("l"),a("l"),null;default:o("Unexpected '"+r+"'")}}()}}e.exports=function(e,i){var a;return n=e,t=0,r=" ",a=l(),u(),r&&o("Syntax error"),"function"===typeof i?function e(t,r){var n,o,a=t[r];if(a&&"object"===typeof a)for(n in l)Object.prototype.hasOwnProperty.call(a,n)&&("undefined"===typeof(o=e(a,n))?delete a[n]:a[n]=o);return i.call(t,r,a)}({"":a},""):a}},84852:e=>{"use strict";var t,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(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=o[e];return"string"===typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function s(e,i){var o,c,u,l,d,f=t,h=i[e];switch(h&&"object"===typeof h&&"function"===typeof h.toJSON&&(h=h.toJSON(e)),"function"===typeof n&&(h=n.call(i,e,h)),typeof h){case"string":return a(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(t+=r,d=[],"[object Array]"===Object.prototype.toString.apply(h)){for(l=h.length,o=0;o{e.exports=r(10722)(r(84599))},10722:(e,t,r)=>{const n=r(52438),i=r(14796);e.exports=function(e){const t=n(e),r=i(e);return function(e,n){switch("string"===typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(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: "+e)}}}},52438:(e,t,r)=>{const{Transform:n}=r(44833);e.exports=e=>class t extends n{constructor(t,r,n,i,o){super(o),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=o,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(i){n=i}r(n)}_flush(e){let t=null;try{this.push(this.digest())}catch(r){t=r}e(t)}update(e,t){if(!Buffer.isBuffer(e)&&"string"!==typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},14796:(e,t,r)=>{const{Transform:n}=r(44833);e.exports=e=>class t extends n{constructor(t,r,n,i){super(i),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(i){n=i}r(n)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!Buffer.isBuffer(e)&&"string"!==typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},8496:(e,t)=>{const r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(let t=0;t<24;++t){const n=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],f=e[9]^e[19]^e[29]^e[39]^e[49];let h=d^(o<<1|a>>>31),p=f^(a<<1|o>>>31);const g=e[0]^h,m=e[1]^p,y=e[10]^h,v=e[11]^p,b=e[20]^h,w=e[21]^p,A=e[30]^h,_=e[31]^p,E=e[40]^h,S=e[41]^p;h=n^(s<<1|c>>>31),p=i^(c<<1|s>>>31);const k=e[2]^h,x=e[3]^p,C=e[12]^h,I=e[13]^p,T=e[22]^h,O=e[23]^p,P=e[32]^h,M=e[33]^p,R=e[42]^h,N=e[43]^p;h=o^(u<<1|l>>>31),p=a^(l<<1|u>>>31);const L=e[4]^h,B=e[5]^p,D=e[14]^h,U=e[15]^p,j=e[24]^h,F=e[25]^p,z=e[34]^h,q=e[35]^p,H=e[44]^h,V=e[45]^p;h=s^(d<<1|f>>>31),p=c^(f<<1|d>>>31);const $=e[6]^h,K=e[7]^p,W=e[16]^h,G=e[17]^p,Q=e[26]^h,Y=e[27]^p,Z=e[36]^h,J=e[37]^p,X=e[46]^h,ee=e[47]^p;h=u^(n<<1|i>>>31),p=l^(i<<1|n>>>31);const te=e[8]^h,re=e[9]^p,ne=e[18]^h,ie=e[19]^p,oe=e[28]^h,ae=e[29]^p,se=e[38]^h,ce=e[39]^p,ue=e[48]^h,le=e[49]^p,de=g,fe=m,he=v<<4|y>>>28,pe=y<<4|v>>>28,ge=b<<3|w>>>29,me=w<<3|b>>>29,ye=_<<9|A>>>23,ve=A<<9|_>>>23,be=E<<18|S>>>14,we=S<<18|E>>>14,Ae=k<<1|x>>>31,_e=x<<1|k>>>31,Ee=I<<12|C>>>20,Se=C<<12|I>>>20,ke=T<<10|O>>>22,xe=O<<10|T>>>22,Ce=M<<13|P>>>19,Ie=P<<13|M>>>19,Te=R<<2|N>>>30,Oe=N<<2|R>>>30,Pe=B<<30|L>>>2,Me=L<<30|B>>>2,Re=D<<6|U>>>26,Ne=U<<6|D>>>26,Le=F<<11|j>>>21,Be=j<<11|F>>>21,De=z<<15|q>>>17,Ue=q<<15|z>>>17,je=V<<29|H>>>3,Fe=H<<29|V>>>3,ze=$<<28|K>>>4,qe=K<<28|$>>>4,He=G<<23|W>>>9,Ve=W<<23|G>>>9,$e=Q<<25|Y>>>7,Ke=Y<<25|Q>>>7,We=Z<<21|J>>>11,Ge=J<<21|Z>>>11,Qe=ee<<24|X>>>8,Ye=X<<24|ee>>>8,Ze=te<<27|re>>>5,Je=re<<27|te>>>5,Xe=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,nt=se<<8|ce>>>24,it=ce<<8|se>>>24,ot=ue<<14|le>>>18,at=le<<14|ue>>>18;e[0]=de^~Ee&Le,e[1]=fe^~Se&Be,e[10]=ze^~Xe&ge,e[11]=qe^~et&me,e[20]=Ae^~Re&$e,e[21]=_e^~Ne&Ke,e[30]=Ze^~he&ke,e[31]=Je^~pe&xe,e[40]=Pe^~He&tt,e[41]=Me^~Ve&rt,e[2]=Ee^~Le&We,e[3]=Se^~Be&Ge,e[12]=Xe^~ge&Ce,e[13]=et^~me&Ie,e[22]=Re^~$e&nt,e[23]=Ne^~Ke&it,e[32]=he^~ke&De,e[33]=pe^~xe&Ue,e[42]=He^~tt&ye,e[43]=Ve^~rt&ve,e[4]=Le^~We&ot,e[5]=Be^~Ge&at,e[14]=ge^~Ce&je,e[15]=me^~Ie&Fe,e[24]=$e^~nt&be,e[25]=Ke^~it&we,e[34]=ke^~De&Qe,e[35]=xe^~Ue&Ye,e[44]=tt^~ye&Te,e[45]=rt^~ve&Oe,e[6]=We^~ot&de,e[7]=Ge^~at&fe,e[16]=Ce^~je&ze,e[17]=Ie^~Fe&qe,e[26]=nt^~be&Ae,e[27]=it^~we&_e,e[36]=De^~Qe&Ze,e[37]=Ue^~Ye&Je,e[46]=ye^~Te&Pe,e[47]=ve^~Oe&Me,e[8]=ot^~de&Ee,e[9]=at^~fe&Se,e[18]=je^~ze&Xe,e[19]=Fe^~qe&et,e[28]=be^~Ae&Re,e[29]=we^~_e&Ne,e[38]=Qe^~Ze&he,e[39]=Ye^~Je&pe,e[48]=Te^~Pe&He,e[49]=Oe^~Me&Ve,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},84599:(e,t,r)=>{const n=r(8496);function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(let t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return t},i.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i},41314:e=>{e.exports=function(e,t,r){return e*(1-r)+t*r}},51812:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,s="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",l="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",g="[object Map]",m="[object Number]",y="[object Null]",v="[object Object]",b="[object Promise]",w="[object Proxy]",A="[object RegExp]",_="[object Set]",E="[object String]",S="[object Symbol]",k="[object Undefined]",x="[object WeakMap]",C="[object ArrayBuffer]",I="[object DataView]",T=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,P={};P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P[s]=P[c]=P[C]=P[l]=P[I]=P[d]=P[f]=P[h]=P[g]=P[m]=P[v]=P[A]=P[_]=P[E]=P[x]=!1;var M="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,R="object"==typeof self&&self&&self.Object===Object&&self,N=M||R||Function("return this")(),L=t&&!t.nodeType&&t,B=L&&e&&!e.nodeType&&e,D=B&&B.exports===L,U=D&&M.process,j=function(){try{return U&&U.binding&&U.binding("util")}catch(e){}}(),F=j&&j.isTypedArray;function z(e,t){for(var r=-1,n=null==e?0:e.length;++ru))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var f=-1,h=!0,p=r&o?new xe:void 0;for(s.set(e,t),s.set(t,e);++f-1},Se.prototype.set=function(e,t){var r=this.__data__,n=Te(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},ke.prototype.clear=function(){this.size=0,this.__data__={hash:new Ee,map:new(de||Se),string:new Ee}},ke.prototype.delete=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t},ke.prototype.get=function(e){return De(this,e).get(e)},ke.prototype.has=function(e){return De(this,e).has(e)},ke.prototype.set=function(e,t){var r=De(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},xe.prototype.add=xe.prototype.push=function(e){return this.__data__.set(e,n),this},xe.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.clear=function(){this.__data__=new Se,this.size=0},Ce.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Ce.prototype.get=function(e){return this.__data__.get(e)},Ce.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Se){var n=r.__data__;if(!de||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ke(n)}return r.set(e,t),this.size=r.size,this};var je=se?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r-1&&e%1==0&&e-1&&e%1==0&&e<=a}function Qe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ye(e){return null!=e&&"object"==typeof e}var Ze=F?function(e){return function(t){return e(t)}}(F):function(e){return Ye(e)&&Ge(e.length)&&!!P[Oe(e)]};function Je(e){return null!=(t=e)&&Ge(t.length)&&!We(t)?Ie(e):Ne(e);var t}e.exports=function(e,t){return Me(e,t)}},65687:function(e,t,r){var n,i;!function(){"use strict";n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},o=null;function a(e,t){var r=e[t];if("function"===typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(n){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?s:void 0!==console[n]?a(console,n):void 0!==console.log?a(console,"log"):e)}function u(){for(var r=this.getLevel(),i=0;i=0&&t<=l.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"===typeof e?f+=":"+e:"symbol"===typeof e&&(f=void 0),l.name=e,l.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},l.methodFactory=r||d,l.getLevel=function(){return null!=c?c:null!=s?s:a},l.setLevel=function(e,t){return c=m(e),!1!==t&&h(c),u.call(l)},l.setDefaultLevel=function(e){s=m(e),p()||l.setLevel(e,!1)},l.resetLevel=function(){c=null,g(),u.call(l)},l.enableAll=function(e){l.setLevel(l.levels.TRACE,e)},l.disableAll=function(e){l.setLevel(l.levels.SILENT,e)},l.rebuild=function(){if(o!==l&&(a=m(o.getLevel())),u.call(l),o===l)for(var e in i)i[e].rebuild()},a=m(o?o.getLevel():"WARN");var y=p();null!=y&&(c=m(y)),u.call(l)}(o=new f).getLogger=function(e){if("symbol"!==typeof e&&"string"!==typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new f(e,o.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=h),o},o.getLoggers=function(){return i},o.default=o,o},void 0===(i="function"===typeof n?n.call(t,r,t,e):n)||(e.exports=i)}()},53358:(e,t,r)=>{"use strict";var n=r(61596),i=r(11207),o=r(16047).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function c(e,t){return e<>>32-t}function u(e,t,r,n,i,o,a){return c(e+(t&r|~t&n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return c(e+(t&n|r&~n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return c(e+(t^r^n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return c(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),r=l(r,n=u(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=l(o,r,n,i,e[6],3225465664,9),i=l(i,o,r,n,e[11],643717713,14),n=l(n,i,o,r,e[0],3921069994,20),r=l(r,n,i,o,e[5],3593408605,5),o=l(o,r,n,i,e[10],38016083,9),i=l(i,o,r,n,e[15],3634488961,14),n=l(n,i,o,r,e[4],3889429448,20),r=l(r,n,i,o,e[9],568446438,5),o=l(o,r,n,i,e[14],3275163606,9),i=l(i,o,r,n,e[3],4107603335,14),n=l(n,i,o,r,e[8],1163531501,20),r=l(r,n,i,o,e[13],2850285829,5),o=l(o,r,n,i,e[2],4243563512,9),i=l(i,o,r,n,e[7],1735328473,14),r=d(r,n=l(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=d(o,r,n,i,e[8],2272392833,11),i=d(i,o,r,n,e[11],1839030562,16),n=d(n,i,o,r,e[14],4259657740,23),r=d(r,n,i,o,e[1],2763975236,4),o=d(o,r,n,i,e[4],1272893353,11),i=d(i,o,r,n,e[7],4139469664,16),n=d(n,i,o,r,e[10],3200236656,23),r=d(r,n,i,o,e[13],681279174,4),o=d(o,r,n,i,e[0],3936430074,11),i=d(i,o,r,n,e[3],3572445317,16),n=d(n,i,o,r,e[6],76029189,23),r=d(r,n,i,o,e[9],3654602809,4),o=d(o,r,n,i,e[12],3873151461,11),i=d(i,o,r,n,e[15],530742520,16),r=f(r,n=d(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=f(o,r,n,i,e[7],1126891415,10),i=f(i,o,r,n,e[14],2878612391,15),n=f(n,i,o,r,e[5],4237533241,21),r=f(r,n,i,o,e[12],1700485571,6),o=f(o,r,n,i,e[3],2399980690,10),i=f(i,o,r,n,e[10],4293915773,15),n=f(n,i,o,r,e[1],2240044497,21),r=f(r,n,i,o,e[8],1873313359,6),o=f(o,r,n,i,e[15],4264355552,10),i=f(i,o,r,n,e[6],2734768916,15),n=f(n,i,o,r,e[13],1309151649,21),r=f(r,n,i,o,e[4],4149444226,6),o=f(o,r,n,i,e[11],3174756917,10),i=f(i,o,r,n,e[2],718787259,15),n=f(n,i,o,r,e[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 e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},77599:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},98869:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},49831:e=>{function t(e,t){if(!e)throw new Error(t||"AssertionError")}t.notEqual=function(e,r,n){t(e!=r,n)},t.notOk=function(e,r){t(!e,r)},t.equal=function(e,r,n){t(e==r,n)},t.ok=t,e.exports=t},97981:(e,t,r)=>{"use strict";t.Q=void 0;const n=r(44414),i=r(9950),o=r(39298),a=r(40655);t.Q=()=>(e,t)=>{const r=(0,i.createContext)(null);return{Provider(t){let{children:a,initialState:s}=t;const c=(0,i.useRef)(null);return c.current||(c.current=(t=>(0,o.createStore)((function(){const r=e(...arguments),n="function"===typeof t?t(r):t;return{...r,...n}})))(s)),(0,n.jsx)(r.Provider,{value:c.current,children:a})},getUseStore:()=>function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;const o=(0,i.useContext)(r);if(!o)throw new Error("Store is missing the provider");return(0,a.useStoreWithEqualityFn)(o,e,n)}}}},93258:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(i){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(30543),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),u=s.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},f={$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},h=function(){if("undefined"===typeof window)return!1;for(var e in window)try{if(!f["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"===typeof window[e])try{d(window[e])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(e){var t=null!==e&&"object"===typeof e,r="[object Function]"===o.call(e),n=a(e),s=t&&"[object String]"===o.call(e),f=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=u&&r;if(s&&e.length>0&&!i.call(e,0))for(var g=0;g0)for(var m=0;m{"use strict";var n=Array.prototype.slice,i=r(30543),o=Object.keys,a=o?function(e){return o(e)}:r(70225),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?s(n.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},30543:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},34101:function(e,t,r){var n;e=r.nmd(e),function(){"use strict";var i={function:!0,object:!0},o=i[typeof window]&&window||this,a=i[typeof t]&&t,s=i.object&&e&&!e.nodeType&&e,c=a&&s&&"object"==typeof r.g&&r.g;!c||c.global!==c&&c.window!==c&&c.self!==c||(o=c);var u=Math.pow(2,53)-1,l=/\bOpera/,d=Object.prototype,f=d.hasOwnProperty,h=d.toString;function p(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function g(e){return e=w(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:p(e)}function m(e,t){for(var r in e)f.call(e,r)&&t(e[r],r,e)}function y(e){return null==e?p(e):h.call(e).slice(8,-1)}function v(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function b(e,t){var r=null;return function(e,t){var r=-1,n=e?e.length:0;if("number"==typeof n&&n>-1&&n<=u)for(;++r3?"WebKit":/\bOpera\b/.test(B)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test(L)&&"WebKit"||!L&&/\bMSIE\b/i.test(t)&&("Mac OS"==j?"Tasman":"Trident")||"WebKit"==L&&/\bPlayStation\b(?! Vita\b)/i.test(B)&&"NetFront")&&(L=[s]),"IE"==B&&(s=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(B+=" Mobile",j="Windows Phone "+(/\+$/.test(s)?s:s+".x"),P.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(B="IE Mobile",j="Windows Phone 8.x",P.unshift("desktop mode"),N||(N=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=B&&"Trident"==L&&(s=/\brv:([\d.]+)/.exec(t))&&(B&&P.push("identifying as "+B+(N?" "+N:"")),B="IE",N=s[1]),R){if(function(e,t){var r=null!=e?typeof e[t]:"number";return!/^(?:boolean|number|string|undefined)$/.test(r)&&("object"!=r||!!e[t])}(r,"global"))if(E&&(O=(s=E.lang.System).getProperty("os.arch"),j=j||s.getProperty("os.name")+" "+s.getProperty("os.version")),S){try{N=r.require("ringo/engine").version.join("."),B="RingoJS"}catch(H){(s=r.system)&&s.global.system==r.system&&(B="Narwhal",j||(j=s[0].os||null))}B||(B="Rhino")}else"object"==typeof r.process&&!r.process.browser&&(s=r.process)&&("object"==typeof s.versions&&("string"==typeof s.versions.electron?(P.push("Node "+s.versions.node),B="Electron",N=s.versions.electron):"string"==typeof s.versions.nw&&(P.push("Chromium "+N,"Node "+s.versions.node),B="NW.js",N=s.versions.nw)),B||(B="Node.js",O=s.arch,j=s.platform,N=(N=/[\d.]+/.exec(s.version))?N[0]:null));else y(s=r.runtime)==f?(B="Adobe AIR",j=s.flash.system.Capabilities.os):y(s=r.phantom)==_?(B="PhantomJS",N=(s=s.version||null)&&s.major+"."+s.minor+"."+s.patch):"number"==typeof C.documentMode&&(s=/\bTrident\/(\d+)/i.exec(t))?(N=[N,C.documentMode],(s=+s[1]+4)!=N[1]&&(P.push("IE "+N[1]+" mode"),L&&(L[1]=""),N[1]=s),N="IE"==B?String(N[1].toFixed(1)):N[0]):"number"==typeof C.documentMode&&/^(?:Chrome|Firefox)\b/.test(B)&&(P.push("masking as "+B+" "+N),B="IE",N="11.0",L=["Trident"],j="Windows");j=j&&g(j)}if(N&&(s=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(N)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(R&&i.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(M=/b/i.test(s)?"beta":"alpha",N=N.replace(RegExp(s+"\\+?$"),"")+("beta"==M?x:k)+(/\d+\+?/.exec(s)||"")),"Fennec"==B||"Firefox"==B&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(j))B="Firefox Mobile";else if("Maxthon"==B&&N)N=N.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(D))"Xbox 360"==D&&(j=null),"Xbox 360"==D&&/\bIEMobile\b/.test(t)&&P.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(B)&&(!B||D||/Browser|Mobi/.test(B))||"Windows CE"!=j&&!/Mobi/i.test(t))if("IE"==B&&R)try{null===r.external&&P.unshift("platform preview")}catch(H){P.unshift("embedded")}else(/\bBlackBerry\b/.test(D)||/\bBB10\b/.test(t))&&(s=(RegExp(D.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||N)?(j=((s=[s,/BB10/.test(t)])[1]?(D=null,U="BlackBerry"):"Device Software")+" "+s[0],N=null):this!=m&&"Wii"!=D&&(R&&I||/Opera/.test(B)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==B&&/\bOS X (?:\d+\.){2,}/.test(j)||"IE"==B&&(j&&!/^Win/.test(j)&&N>5.5||/\bWindows XP\b/.test(j)&&N>8||8==N&&!/\bTrident\b/.test(t)))&&!l.test(s=e.call(m,t.replace(l,"")+";"))&&s.name&&(s="ing as "+s.name+((s=s.version)?" "+s:""),l.test(B)?(/\bIE\b/.test(s)&&"Mac OS"==j&&(j=null),s="identify"+s):(s="mask"+s,B=T?g(T.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(s)&&(j=null),R||(N=null)),L=["Presto"],P.push(s));else B+=" Mobile";(s=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(s=[parseFloat(s.replace(/\.(\d)$/,".0$1")),s],"Safari"==B&&"+"==s[1].slice(-1)?(B="WebKit Nightly",M="alpha",N=s[1].slice(0,-1)):N!=s[1]&&N!=(s[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(N=null),s[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(t)||0)[1],537.36==s[0]&&537.36==s[2]&&parseFloat(s[1])>=28&&"WebKit"==L&&(L=["Blink"]),R&&(u||s[1])?(L&&(L[1]="like Chrome"),s=s[1]||((s=s[0])<530?1:s<532?2:s<532.05?3:s<533?4:s<534.03?5:s<534.07?6:s<534.1?7:s<534.13?8:s<534.16?9:s<534.24?10:s<534.3?11:s<535.01?12:s<535.02?"13+":s<535.07?15:s<535.11?16:s<535.19?17:s<536.05?18:s<536.1?19:s<537.01?20:s<537.11?"21+":s<537.13?23:s<537.18?24:s<537.24?25:s<537.36?26:"Blink"!=L?"27":"28")):(L&&(L[1]="like Safari"),s=(s=s[0])<400?1:s<500?2:s<526?3:s<533?4:s<534?"4+":s<535?5:s<537?6:s<538?7:s<601?8:s<602?9:s<604?10:s<606?11:s<608?12:"12"),L&&(L[1]+=" "+(s+="number"==typeof s?".x":/[.+]/.test(s)?"":"+")),"Safari"==B&&(!N||parseInt(N)>45)?N=s:"Chrome"==B&&/\bHeadlessChrome/i.test(t)&&P.unshift("headless")),"Opera"==B&&(s=/\bzbov|zvav$/.exec(j))?(B+=" ",P.unshift("desktop mode"),"zvav"==s?(B+="Mini",N=null):B+="Mobile",j=j.replace(RegExp(" *"+s+"$"),"")):"Safari"==B&&/\bChrome\b/.exec(L&&L[1])?(P.unshift("desktop mode"),B="Chrome Mobile",N=null,/\bOS X\b/.test(j)?(U="Apple",j="iOS 4.3+"):j=null):/\bSRWare Iron\b/.test(B)&&!N&&(N=z("Chrome")),N&&0==N.indexOf(s=/[\d.]+$/.exec(j))&&t.indexOf("/"+s+"-")>-1&&(j=w(j.replace(s,""))),j&&-1!=j.indexOf(B)&&!RegExp(B+" OS").test(j)&&(j=j.replace(RegExp(" *"+v(B)+" *"),"")),L&&!/\b(?:Avant|Nook)\b/.test(B)&&(/Browser|Lunascape|Maxthon/.test(B)||"Safari"!=B&&/^iOS/.test(j)&&/\bSafari\b/.test(L[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(B)&&L[1])&&(s=L[L.length-1])&&P.push(s),P.length&&(P=["("+P.join("; ")+")"]),U&&D&&D.indexOf(U)<0&&P.push("on "+U),D&&P.push((/^on /.test(P[P.length-1])?"":"on ")+D),j&&(s=/ ([\d.+]+)$/.exec(j),c=s&&"/"==j.charAt(j.length-s[0].length-1),j={architecture:32,family:s&&!c?j.replace(s[0],""):j,version:s?s[1]:null,toString:function(){var e=this.version;return this.family+(e&&!c?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(s=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(O))&&!/\bi686\b/i.test(O)?(j&&(j.architecture=64,j.family=j.family.replace(RegExp(" *"+s),"")),B&&(/\bWOW64\b/i.test(t)||R&&/\w(?:86|32)$/.test(i.cpuClass||i.platform)&&!/\bWin64; x64\b/i.test(t))&&P.unshift("32-bit")):j&&/^OS X/.test(j.family)&&"Chrome"==B&&parseFloat(N)>=39&&(j.architecture=64),t||(t=null);var q={};return q.description=t,q.layout=L&&L[0],q.manufacturer=U,q.name=B,q.prerelease=M,q.product=D,q.ua=t,q.version=B&&N,q.os=j||{architecture:null,family:null,version:null,toString:function(){return"null"}},q.parse=e,q.toString=function(){return this.description||""},q.version&&P.unshift(N),q.name&&P.unshift(B),j&&B&&(j!=String(j).split(" ")[0]||j!=B.split(" ")[0]&&!D)&&P.push(D?"("+j+")":"on "+j),P.length&&(q.description=P.join(" ")),q}();o.platform=A,void 0===(n=function(){return A}.call(t,r,t,e))||(e.exports=n)}.call(this)},85224:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"===typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,c=[],u=!1,l=-1;function d(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&f())}function f(){if(!u){var e=a(d);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l1)for(var r=1;r{"use strict";e.exports=r(60376)},60376:(e,t,r)=>{"use strict";var n=t;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(59647),n.BufferWriter=r(42472),n.Reader=r(79935),n.BufferReader=r(60552),n.util=r(77428),n.rpc=r(50421),n.roots=r(32759),n.configure=i,i()},79935:(e,t,r)=>{"use strict";e.exports=c;var n,i=r(77428),o=i.LongBits,a=i.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return i.Buffer?function(e){return(c.create=function(e){return i.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u};function d(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw s(this,8);return new o(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,c.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw s(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,r);if(t===r){var n=i.Buffer;return n?n.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,r)},c.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},c.prototype.skip=function(e){if("number"===typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){n=e,c.create=l(),n._configure();var t=i.Long?"toLong":"toNumber";i.merge(c.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},60552:(e,t,r)=>{"use strict";e.exports=o;var n=r(79935);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(77428);function o(e){n.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},32759:e=>{"use strict";e.exports={}},50421:(e,t,r)=>{"use strict";t.Service=r(76349)},76349:(e,t,r)=>{"use strict";e.exports=i;var n=r(77428);function i(e,t,r){if("function"!==typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,r,i,o);if(s.rpcImpl)try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,r){if(e)return s.emit("error",e,t),a(e);if(null!==r){if(!(r instanceof i))try{r=i[s.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",r,t),a(null,r)}s.end(!0)}))}catch(c){return s.emit("error",c,t),void setTimeout((function(){a(c)}),0)}else setTimeout((function(){a(Error("already ended"))}),0)},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},27069:(e,t,r)=>{"use strict";e.exports=i;var n=r(77428);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(e){if("number"===typeof e)return i.fromNumber(e);if(n.isString(e)){if(!n.Long)return i.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;i.fromHash=function(e){return e===a?o:new i((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},77428:function(e,t,r){"use strict";var n=t;function i(e,t,r){for(var n=Object.keys(t),i=0;i0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"===typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"===typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=i,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r{"use strict";e.exports=d;var n,i=r(77428),o=i.LongBits,a=i.base64,s=i.utf8;function c(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function u(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function d(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var f=function(){return i.Buffer?function(){return(d.create=function(){return new n})()}:function(){return new d}};function h(e,t,r){t[r]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function m(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}d.create=f(),d.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(d.alloc=i.pool(d.alloc,i.Array.prototype.subarray)),d.prototype._push=function(e,t,r){return this.tail=this.tail.next=new c(e,t,r),this.len+=t,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},d.prototype.int32=function(e){return e<0?this._push(g,10,o.fromNumber(e)):this.uint32(e)},d.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},d.prototype.uint64=function(e){var t=o.from(e);return this._push(g,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(g,t.length(),t)},d.prototype.bool=function(e){return this._push(h,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=o.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},d.prototype.sfixed64=d.prototype.fixed64,d.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},d.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var y=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n>>0;if(!t)return this._push(h,1,0);if(i.isString(e)){var r=d.alloc(t=a.length(e));a.decode(e,r,0),e=r}return this.uint32(t)._push(y,t,e)},d.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(h,1,0)},d.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new c(u,0,0),this.len=0,this},d.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},d.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},d.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},d._configure=function(e){n=e,d.create=f(),n._configure()}},42472:(e,t,r)=>{"use strict";e.exports=o;var n=r(59647);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(77428);function o(){n.call(this)}function a(e,t,r){e.length<40?i.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},o._configure()},23323:(e,t)=>{var r,n,i,o=function(){var e=function(e,t){var r=e,n=o[t],i=null,a=0,s=null,c=[],u={},l=function(e,t){i=function(e){for(var t=new Array(e),r=0;r=7&&g(e),null==s&&(s=x(r,n,c)),S(s,t)},d=function(e,t){for(var r=-1;r<=7;r+=1)if(!(e+r<=-1||a<=e+r))for(var n=-1;n<=7;n+=1)t+n<=-1||a<=t+n||(i[e+r][t+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},f=function(){for(var e=8;e>n&1);i[Math.floor(n/3)][n%3+a-8-3]=o}for(n=0;n<18;n+=1){o=!e&&1==(t>>n&1);i[n%3+a-8-3][Math.floor(n/3)]=o}},E=function(e,t){for(var r=n<<3|t,o=p.getBCHTypeInfo(r),s=0;s<15;s+=1){var c=!e&&1==(o>>s&1);s<6?i[s][8]=c:s<8?i[s+1][8]=c:i[a-15+s][8]=c}for(s=0;s<15;s+=1){c=!e&&1==(o>>s&1);s<8?i[8][a-s-1]=c:s<9?i[8][15-s-1+1]=c:i[8][15-s-1]=c}i[a-8][8]=!e},S=function(e,t){for(var r=-1,n=a-1,o=7,s=0,c=p.getMaskFunction(t),u=a-1;u>0;u-=2)for(6==u&&(u-=1);;){for(var l=0;l<2;l+=1)if(null==i[n][u-l]){var d=!1;s>>o&1)),c(n,u-l)&&(d=!d),i[n][u-l]=d,-1==(o-=1)&&(s+=1,o=7)}if((n+=r)<0||a<=n){n-=r,r=-r;break}}},x=function(e,t,r){for(var n=y.getRSBlocks(e,t),i=v(),o=0;o8*s)throw"code length overflow. ("+i.getLengthInBits()+">"+8*s+")";for(i.getLengthInBits()+4<=8*s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=8*s)&&(i.put(236,8),!(i.getLengthInBits()>=8*s));)i.put(17,8);return function(e,t){for(var r=0,n=0,i=0,o=new Array(t.length),a=new Array(t.length),s=0;s=0?f.getAt(h):0}}var g=0;for(l=0;ln)&&(e=n,t=r)}return t}())},u.createTableTag=function(e,t){e=e||2;var r="";r+='";for(var i=0;i';r+=""}return r+="",r+="
"},u.createSvgTag=function(e,t,r,n){var i={};"object"==typeof arguments[0]&&(e=(i=arguments[0]).cellSize,t=i.margin,r=i.alt,n=i.title),e=e||2,t="undefined"==typeof t?4*e:t,(r="string"===typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-description":null,(n="string"===typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-title":null;var o,a,s,c,l=u.getModuleCount()*e+2*t,d="";for(c="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",d+=''+C(n.text)+"":"",d+=r.text?''+C(r.text)+"":"",d+='',d+='":t+=">";break;case"&":t+="&";break;case'"':t+=""";break;default:t+=n}}return t};return u.createASCII=function(e,t){if((e=e||1)<2)return function(e){e="undefined"==typeof e?2:e;var t,r,n,i,o,a=1*u.getModuleCount()+2*e,s=e,c=a-e,l={"\u2588\u2588":"\u2588","\u2588 ":"\u2580"," \u2588":"\u2584"," ":" "},d={"\u2588\u2588":"\u2580","\u2588 ":"\u2580"," \u2588":" "," ":" "},f="";for(t=0;t=c?d[o]:l[o];f+="\n"}return a%2&&e>0?f.substring(0,f.length-a-1)+Array(a+1).join("\u2580"):f.substring(0,f.length-1)}(t);e-=1,t="undefined"==typeof t?2*e:t;var r,n,i,o,a=u.getModuleCount()*e+2*t,s=t,c=a-t,l=Array(e+1).join("\u2588\u2588"),d=Array(e+1).join(" "),f="",h="";for(r=0;r>>8),t.push(255&a)):t.push(n)}}return t}};var t=1,r=2,n=4,i=8,o={L:1,M:0,Q:3,H:2},a=0,s=1,c=2,u=3,l=4,d=5,f=6,h=7,p=function(){var e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],o=1335,p=7973,y={},v=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t};return y.getBCHTypeInfo=function(e){for(var t=e<<10;v(t)-v(o)>=0;)t^=o<=0;)t^=p<5&&(r+=3+o-5)}for(n=0;n=256;)t-=255;return e[t]}};return n}();function m(e,t){if("undefined"==typeof e.length)throw e.length+"/"+t;var r=function(){for(var r=0;r>>7-t%8&1)},put:function(e,t){for(var n=0;n>>t-n-1&1))},getLengthInBits:function(){return t},putBit:function(r){var n=Math.floor(t/8);e.length<=n&&e.push(0),r&&(e[n]|=128>>>t%8),t+=1}};return r},b=function(e){var r=t,n=e,i={getMode:function(){return r},getLength:function(e){return n.length},write:function(e){for(var t=n,r=0;r+2>>8&255)+(255&n),e.put(n,13),r+=2}if(r>>8)},writeBytes:function(e,r,n){r=r||0,n=n||e.length;for(var i=0;i0&&(t+=","),t+=e[r];return t+="]"}};return t},S=function(e){var t=e,r=0,n=0,i=0,o={read:function(){for(;i<8;){if(r>=t.length){if(0==i)return-1;throw"unexpected end of file./"+i}var e=t.charAt(r);if(r+=1,"="==e)return i=0,-1;e.match(/^\s$/)||(n=n<<6|a(e.charCodeAt(0)),i+=6)}var o=n>>>i-8&255;return i-=8,o}},a=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return o},k=function(e,t,r){for(var n=function(e,t){var r=e,n=t,i=new Array(e*t),o={setPixel:function(e,t,n){i[t*r+e]=n},write:function(e){e.writeString("GIF87a"),e.writeShort(r),e.writeShort(n),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(r),e.writeShort(n),e.writeByte(0);var t=a(2);e.writeByte(2);for(var i=0;t.length-i>255;)e.writeByte(255),e.writeBytes(t,i,255),i+=255;e.writeByte(t.length-i),e.writeBytes(t,i,t.length-i),e.writeByte(0),e.writeString(";")}},a=function(e){for(var t=1<>>i!=0)throw"length over";for(;r+i>=8;)t.writeByte(255&(e<>>=8-r,n=0,r=0;n|=e<0&&t.writeByte(n)}}}(c);u.write(t,n);var l=0,d=String.fromCharCode(i[l]);for(l+=1;l=6;)o(e>>>t-6),t-=6},i.flush=function(){if(t>0&&(o(e<<6-t),e=0,t=0),r%3!=0)for(var i=3-r%3,a=0;a>6,128|63&n):n<55296||n>=57344?t.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&e.charCodeAt(r)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return t}(e)},n=[],void 0===(i="function"===typeof(r=function(){return o})?r.apply(t,n):r)||(e.exports=i)},88021:(e,t,r)=>{const n=r(28007),i=r(30487),o=r(72237),a=r(64370);function s(e,t,r,o,a){const s=[].slice.call(arguments,1),c=s.length,u="function"===typeof s[c-1];if(!u&&!n())throw new Error("Callback required as last argument");if(!u){if(c<1)throw new Error("Too few arguments provided");return 1===c?(r=t,t=o=void 0):2!==c||t.getContext||(o=r,r=t,t=void 0),new Promise((function(n,a){try{const a=i.create(r,o);n(e(a,t,o))}catch(s){a(s)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(a=r,r=t,t=o=void 0):3===c&&(t.getContext&&"undefined"===typeof a?(a=o,o=void 0):(a=o,o=r,r=t,t=void 0));try{const n=i.create(r,o);a(null,e(n,t,o))}catch(l){a(l)}}t.create=i.create,t.toCanvas=s.bind(null,o.render),t.toDataURL=s.bind(null,o.renderToDataURL),t.toString=s.bind(null,(function(e,t,r){return a.render(e,r)}))},28007:e=>{e.exports=function(){return"function"===typeof Promise&&Promise.prototype&&Promise.prototype.then}},11043:(e,t,r)=>{const n=r(36580).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=n(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),o=[r-7];for(let n=1;n{const n=r(50794),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(e){this.mode=n.ALPHANUMERIC,this.data=e}o.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*i.indexOf(this.data[t]);r+=i.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=o},94549:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1===(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},2890:e=>{function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,n){const i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},67404:(e,t,r)=>{const n=r(50794);function i(e){this.mode=n.BYTE,this.data="string"===typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}i.getBitsLength=function(e){return 8*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(let t=0,r=this.data.length;t{const n=r(28415),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];t.getBlocksCount=function(e,t){switch(t){case n.L:return i[4*(e-1)+0];case n.M:return i[4*(e-1)+1];case n.Q:return i[4*(e-1)+2];case n.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case n.L:return o[4*(e-1)+0];case n.M:return o[4*(e-1)+1];case n.Q:return o[4*(e-1)+2];case n.H:return o[4*(e-1)+3];default:return}}},28415:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&"undefined"!==typeof e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(n){return r}}},91726:(e,t,r)=>{const n=r(36580).getSymbolSize;t.getPositions=function(e){const t=n(e);return[[0,0],[t-7,0],[0,t-7]]}},76695:(e,t,r)=>{const n=r(36580),i=n.getBCHDigit(1335);t.getEncodedBits=function(e,t){const r=e.bit<<3|t;let o=r<<10;for(;n.getBCHDigit(o)-i>=0;)o^=1335<{const r=new Uint8Array(512),n=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)r[t]=e,n[e]=t,e<<=1,256&e&&(e^=285);for(let t=255;t<512;t++)r[t]=r[t-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return n[e]},t.exp=function(e){return r[e]},t.mul=function(e,t){return 0===e||0===t?0:r[n[e]+n[t]]}},8647:(e,t,r)=>{const n=r(50794),i=r(36580);function o(e){this.mode=n.KANJI,this.data=e}o.getBitsLength=function(e){return 13*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},e.exports=o},96106:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const r=3,n=3,i=40,o=10;function a(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2===0;case t.Patterns.PATTERN001:return r%2===0;case t.Patterns.PATTERN010:return n%3===0;case t.Patterns.PATTERN011:return(r+n)%3===0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2===0;case t.Patterns.PATTERN101:return r*n%2+r*n%3===0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2===0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let n=0,i=0,o=0,a=null,s=null;for(let c=0;c=5&&(n+=r+(i-5)),a=t,i=1),t=e.get(u,c),t===s?o++:(o>=5&&(n+=r+(o-5)),s=t,o=1)}i>=5&&(n+=r+(i-5)),o>=5&&(n+=r+(o-5))}return n},t.getPenaltyN2=function(e){const t=e.size;let r=0;for(let n=0;n=10&&(1488===n||93===n)&&r++,o=o<<1&2047|e.get(a,i),a>=10&&(1488===o||93===o)&&r++}return r*i},t.getPenaltyN4=function(e){let t=0;const r=e.data.length;for(let n=0;n{const n=r(26432),i=r(89526);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!n.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(n){return r}}},93527:(e,t,r)=>{const n=r(50794);function i(e){this.mode=n.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%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(e){let t,r,n;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),n=parseInt(r,10),e.put(n,10);const i=this.data.length-t;i>0&&(r=this.data.substr(t),n=parseInt(r,10),e.put(n,3*i+1))},e.exports=i},31579:(e,t,r)=>{const n=r(48361);t.mul=function(e,t){const r=new Uint8Array(e.length+t.length-1);for(let i=0;i=0;){const e=r[0];for(let o=0;o{const n=r(36580),i=r(28415),o=r(94549),a=r(2890),s=r(11043),c=r(91726),u=r(96106),l=r(75956),d=r(50378),f=r(24553),h=r(76695),p=r(50794),g=r(81351);function m(e,t,r){const n=e.size,i=h.getEncodedBits(t,r);let o,a;for(o=0;o<15;o++)a=1===(i>>o&1),o<6?e.set(o,8,a,!0):o<8?e.set(o+1,8,a,!0):e.set(n-15+o,8,a,!0),o<8?e.set(8,n-o-1,a,!0):o<9?e.set(8,15-o-1+1,a,!0):e.set(8,15-o-1,a,!0);e.set(n-8,8,1,!0)}function y(e,t,r){const i=new o;r.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(i)}));const a=8*(n.getSymbolTotalCodewords(e)-l.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const s=(a-i.getLengthInBits())/8;for(let n=0;n=0&&n<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===n||6===n)||n>=2&&n<=4&&i>=2&&i<=4?e.set(t+n,o+i,!0,!0):e.set(t+n,o+i,!1,!0))}}(p,t),function(e){const t=e.size;for(let r=8;r=7&&function(e,t){const r=e.size,n=f.getEncodedBits(t);let i,o,a;for(let s=0;s<18;s++)i=Math.floor(s/3),o=s%3+r-8-3,a=1===(n>>s&1),e.set(i,o,a,!0),e.set(o,i,a,!0)}(p,t),function(e,t){const r=e.size;let n=-1,i=r-1,o=7,a=0;for(let s=r-1;s>0;s-=2)for(6===s&&s--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,s-r)){let n=!1;a>>o&1)),e.set(i,s-r,n),o--,-1===o&&(a++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}(p,d),isNaN(i)&&(i=u.getBestMask(p,m.bind(null,p,r))),u.applyMask(i,p),m(p,r,i),{modules:p,version:t,errorCorrectionLevel:r,maskPattern:i,segments:o}}t.create=function(e,t){if("undefined"===typeof e||""===e)throw new Error("No input text");let r,o,a=i.M;return"undefined"!==typeof t&&(a=i.from(t.errorCorrectionLevel,i.M),r=f.from(t.version),o=u.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),v(e,r,a,o)}},50378:(e,t,r)=>{const n=r(31579);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(r,i),e}return r},e.exports=i},89526:(e,t)=>{const r="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";t.KANJI=new RegExp(n,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(r,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+n+"$"),a=new RegExp("^"+r+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},81351:(e,t,r)=>{const n=r(50794),i=r(93527),o=r(54927),a=r(67404),s=r(8647),c=r(89526),u=r(36580),l=r(22238);function d(e){return unescape(encodeURIComponent(e)).length}function f(e,t,r){const n=[];let i;for(;null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function h(e){const t=f(c.NUMERIC,n.NUMERIC,e),r=f(c.ALPHANUMERIC,n.ALPHANUMERIC,e);let i,o;u.isKanjiModeEnabled()?(i=f(c.BYTE,n.BYTE,e),o=f(c.KANJI,n.KANJI,e)):(i=f(c.BYTE_KANJI,n.BYTE,e),o=[]);return t.concat(r,i,o).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function p(e,t){switch(t){case n.NUMERIC:return i.getBitsLength(e);case n.ALPHANUMERIC:return o.getBitsLength(e);case n.KANJI:return s.getBitsLength(e);case n.BYTE:return a.getBitsLength(e)}}function g(e,t){let r;const c=n.getBestModeForData(e);if(r=n.from(t,c),r!==n.BYTE&&r.bit=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(s))},t.rawSplit=function(e){return t.fromArray(h(e,u.isKanjiModeEnabled()))}},36580:(e,t)=>{let r;const 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];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return n[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!==typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return"undefined"!==typeof r},t.toSJIS=function(e){return r(e)}},26432:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},24553:(e,t,r)=>{const n=r(36580),i=r(75956),o=r(28415),a=r(50794),s=r(26432),c=n.getBCHDigit(7973);function u(e,t){return a.getCharCountIndicator(e,t)+4}function l(e,t){let r=0;return e.forEach((function(e){const n=u(e.mode,t);r+=n+e.getBitsLength()})),r}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!s.isValid(e))throw new Error("Invalid QR Code version");"undefined"===typeof r&&(r=a.BYTE);const o=8*(n.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(r===a.MIXED)return o;const c=o-u(r,e);switch(r){case a.NUMERIC:return Math.floor(c/10*3);case a.ALPHANUMERIC:return Math.floor(c/11*2);case a.KANJI:return Math.floor(c/13);case a.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,r){let n;const i=o.from(r,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,r){for(let n=1;n<=40;n++)if(l(e,n)<=t.getCapacity(n,r,a.MIXED))return n}(e,i);if(0===e.length)return 1;n=e[0]}else n=e;return function(e,r,n){for(let i=1;i<=40;i++)if(r<=t.getCapacity(i,n,e))return i}(n.mode,n.getLength(),i)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;n.getBCHDigit(t)-c>=0;)t^=7973<{const n=r(2168);t.render=function(e,t,r){let i=r,o=t;"undefined"!==typeof i||t&&t.getContext||(i=t,t=void 0),t||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);const a=n.getImageWidth(e.modules.size,i),s=o.getContext("2d"),c=s.createImageData(a,a);return n.qrToImageData(c.data,e,i),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(s,o,a),s.putImageData(c,0,0),o},t.renderToDataURL=function(e,r,n){let i=n;"undefined"!==typeof i||r&&r.getContext||(i=r,r=void 0),i||(i={});const o=t.render(e,r,i),a=i.type||"image/png",s=i.rendererOpts||{};return o.toDataURL(a,s.quality)}},64370:(e,t,r)=>{const n=r(2168);function i(e,t){const r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function o(e,t,r){let n=e+t;return"undefined"!==typeof r&&(n+=" "+r),n}t.render=function(e,t,r){const a=n.getOptions(t),s=e.modules.size,c=e.modules.data,u=s+2*a.margin,l=a.color.light.a?"':"",d="0&&u>0&&e[c-1]||(n+=a?o("M",u+r,.5+l+r):o("m",i,0),i=0,a=!1),u+1',f='viewBox="0 0 '+u+" "+u+'"',h=''+l+d+"\n";return"function"===typeof r&&r(null,h),h}},2168:(e,t)=>{function r(e){if("number"===typeof e&&(e=e.toString()),"string"!==typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t="undefined"===typeof e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){const n=t.getScale(e,r);return Math.floor((e+2*r.margin)*n)},t.qrToImageData=function(e,r,n){const i=r.modules.size,o=r.modules.data,a=t.getScale(i,n),s=Math.floor((i+2*n.margin)*a),c=n.margin*a,u=[n.color.light,n.color.dark];for(let t=0;t=c&&r>=c&&t{"use strict";const n=r(76102),i=r(96844),o=r(83942),a=r(68881),s=Symbol("encodeFragmentIdentifier");function c(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function u(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function l(e,t){return t.decode?i(e):e}function d(e){return Array.isArray(e)?e.sort():"object"===typeof e?d(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function f(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function h(e){const t=(e=f(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function g(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"colon-list-separator":return(e,r,n)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const i="string"===typeof r&&r.includes(e.arrayFormatSeparator),o="string"===typeof r&&!i&&l(r,e).includes(e.arrayFormatSeparator);r=o?l(r,e):r;const a=i||o?r.split(e.arrayFormatSeparator).map((t=>l(t,e))):null===r?r:l(r,e);n[t]=a};case"bracket-separator":return(t,r,n)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(n[t]=r?l(r,e):r);const o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>l(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!==typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const i of e.split("&")){if(""===i)continue;let[e,a]=o(t.decode?i.replace(/\+/g," "):i,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:l(a,t),r(l(e,t),a,n)}for(const i of Object.keys(n)){const e=n[i];if("object"===typeof e&&null!==e)for(const r of Object.keys(e))e[r]=p(e[r],t);else n[i]=p(e,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const r=n[t];return Boolean(r)&&"object"===typeof r&&!Array.isArray(r)?e[t]=d(r):e[t]=r,e}),Object.create(null))}t.extract=h,t.parse=g,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>{return t.skipNull&&(null===(n=e[r])||void 0===n)||t.skipEmptyString&&""===e[r];var n},n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),"[",i,"]"].join("")]:[...r,[u(t,e),"[",u(i,e),"]=",u(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),"[]"].join("")]:[...r,[u(t,e),"[]=",u(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),":list="].join("")]:[...r,[u(t,e),":list=",u(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[u(r,e),t,u(i,e)].join("")]:[[n,u(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,u(t,e)]:[...r,[u(t,e),"=",u(n,e)].join("")]}}(t),i={};for(const a of Object.keys(e))r(a)||(i[a]=e[a]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((r=>{const i=e[r];return void 0===i?"":null===i?u(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?u(r,t)+"[]":i.reduce(n(r),[]).join("&"):u(r,t)+"="+u(i,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=o(e,"#");return Object.assign({url:r.split("?")[0]||"",query:g(h(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:l(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[s]:!0},r);const n=f(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),a=Object.assign(o,e.query);let c=t.stringify(a,r);c&&(c=`?${c}`);let l=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(l=`#${r[s]?u(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${c}${l}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[s]:!1},n);const{url:i,query:o,fragmentIdentifier:c}=t.parseUrl(e,n);return t.stringifyUrl({url:i,query:a(o,r),fragmentIdentifier:c},n)},t.exclude=(e,r,n)=>{const i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,i,n)}},60079:e=>{"use strict";function t(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}e.exports=function(e,r,n){var i=n&&n.stringify||t;if("object"===typeof e&&null!==e){var o=r.length+1;if(1===o)return e;var a=new Array(o);a[0]=i(e);for(var s=1;s-1?d:0,e.charCodeAt(h+1)){case 100:case 102:if(l>=c)break;if(null==r[l])break;d=c)break;if(null==r[l])break;d=c)break;if(void 0===r[l])break;d",d=h+2,h++;break}u+=i(r[l]),d=h+2,h++;break;case 115:if(l>=c)break;d{"use strict";var n,i=r(9950),o=(n=i)&&"object"===typeof n&&"default"in n?n.default:n,a=r(62366),s=new a,c=s.getBrowser(),u=s.getCPU(),l=s.getDevice(),d=s.getEngine(),f=s.getOS(),h=s.getUA(),p=function(e){return s.setUA(e)},g=function(e){if(e){var t=new a(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}console.error("No userAgent string was provided")},m=Object.freeze({ClientUAInstance:s,browser:c,cpu:u,device:l,engine:d,os:f,ua:h,setUa:p,parseUserAgent:g});function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){return v="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(e,t){for(var r=0;r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(c){s=!0,i=c}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C(e,t)}(e,t)||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.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:"none")},j=function(){return!("undefined"===typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},F=function(e){var t=j();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},z=function(e,t,r,n){return function(e){for(var t=1;t1)&&!window.MSStream},ke=function(){return F("iPad")},xe=function(){return F("iPhone")},Ce=function(){return F("iPod")},Ie=function(e){return U(e)};function Te(e){var t=e||m,r=t.device,n=t.browser,i=t.os,o=t.engine,a=t.ua;return{isSmartTV:$(r),isConsole:G(r),isWearable:W(r),isEmbedded:Q(r),isMobileSafari:fe(n)||ke(),isChromium:ce(n),isMobile:V(r)||ke(),isMobileOnly:q(r),isTablet:H(r)||ke(),isBrowser:K(r),isDesktop:K(r),isAndroid:X(i),isWinPhone:re(i),isIOS:ne(i)||ke(),isChrome:ae(n),isFirefox:se(n),isSafari:de(n),isOpera:he(n),isIE:pe(n),osVersion:ie(i),osName:oe(i),fullBrowserVersion:ye(n),browserVersion:ve(n),browserName:be(n),mobileVendor:Y(r),mobileModel:Z(r),engineName:we(o),engineVersion:Ae(o),getUA:Ie(a),isEdge:ue(n)||Ee(a),isYandex:le(n),deviceType:J(r),isIOS13:Se(),isIPad13:ke(),isIPhone13:xe(),isIPod13:Ce(),isElectron:_e(),isEdgeChromium:Ee(a),isLegacyEdge:ue(n)&&!Ee(a),isWindows:ee(i),isMacOs:te(i),isMIUI:ge(n),isSamsungBrowser:me(n)}}var Oe=$(l),Pe=G(l),Me=W(l),Re=Q(l),Ne=fe(c)||ke(),Le=ce(c),Be=V(l)||ke(),De=q(l),Ue=H(l)||ke(),je=K(l),Fe=K(l),ze=X(f),qe=re(f),He=ne(f)||ke(),Ve=ae(c),$e=se(c),Ke=de(c),We=he(c),Ge=pe(c),Qe=ie(f),Ye=oe(f),Ze=ye(c),Je=ve(c),Xe=be(c),et=Y(l),tt=Z(l),rt=we(d),nt=Ae(d),it=Ie(h),ot=ue(c)||Ee(h),at=le(c),st=J(l),ct=Se(),ut=ke(),lt=xe(),dt=Ce(),ft=_e(),ht=Ee(h),pt=ue(c)&&!Ee(h),gt=ee(f),mt=te(f),yt=ge(c),vt=me(c);function bt(e){var t=e||window.navigator.userAgent;return g(t)}t.Fr=Be},38345:(e,t,r)=>{"use strict";var n=r(9950),i=r(75340);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,r,n){MSApp.execUnsafeLocalFunction((function(){return le(e,t)}))}:le);function fe(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType)return void(r.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function ge(e,t,r){return null==t||"boolean"===typeof t||""===t?"":r||"number"!==typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function me(e,t){for(var r in e=e.style,t)if(t.hasOwnProperty(r)){var n=0===r.indexOf("--"),i=ge(r,t[r],n);"float"===r&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}Object.keys(he).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]}))}));var ye=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function Ae(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var _e=null,Ee=null,Se=null;function ke(e){if(e=bi(e)){if("function"!==typeof _e)throw Error(o(280));var t=e.stateNode;t&&(t=Ai(t),_e(e.stateNode,e.type,t))}}function xe(e){Ee?Se?Se.push(e):Se=[e]:Ee=e}function Ce(){if(Ee){var e=Ee,t=Se;if(Se=Ee=null,ke(e),t)for(e=0;e>>=0,0===e?32:31-(st(e)/ct|0)|0},st=Math.log,ct=Math.LN2;var ut=64,lt=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var r=e.pendingLanes;if(0===r)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&r;if(0!==a){var s=a&~i;0!==s?n=dt(s):0!==(o&=a)&&(n=dt(o))}else 0!==(a=r&~i)?n=dt(a):0!==o&&(n=dt(o));if(0===n)return 0;if(0!==t&&t!==n&&0===(t&i)&&((i=n&-n)>=(o=t&-t)||16===i&&0!==(4194240&o)))return t;if(0!==(4&n)&&(n|=16&r),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function yt(e,t,r){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=r}function vt(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-at(r),i=1<=Nr),Dr=String.fromCharCode(32),Ur=!1;function jr(e,t){switch(e){case"keyup":return-1!==Mr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fr(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var zr=!1;var qr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qr[e.type]:"textarea"===t}function Vr(e,t,r,n){xe(n),0<(t=Kn(t,"onChange")).length&&(r=new ur("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var $r=null,Kr=null;function Wr(e){Un(e,0)}function Gr(e){if(W(wi(e)))return e}function Qr(e,t){if("change"===e)return t}var Yr=!1;if(l){var Zr;if(l){var Jr="oninput"in document;if(!Jr){var Xr=document.createElement("div");Xr.setAttribute("oninput","return;"),Jr="function"===typeof Xr.oninput}Zr=Jr}else Zr=!1;Yr=Zr&&(!document.documentMode||9=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=un(n)}}function dn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fn(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var r="string"===typeof t.contentWindow.location.href}catch(n){r=!1}if(!r)break;t=G((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pn(e){var t=fn(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&dn(r.ownerDocument.documentElement,r)){if(null!==n&&hn(r))if(t=n.start,void 0===(e=n.end)&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if((e=(t=r.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=void 0===n.end?o:Math.min(n.end,i),!e.extend&&o>n&&(i=n,n=o,o=i),i=ln(r,o);var a=ln(r,n);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=r;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof r.focus&&r.focus(),r=0;r=document.documentMode,mn=null,yn=null,vn=null,bn=!1;function wn(e,t,r){var n=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;bn||null==mn||mn!==G(n)||("selectionStart"in(n=mn)&&hn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},vn&&cn(vn,n)||(vn=n,0<(n=Kn(yn,"onSelect")).length&&(t=new ur("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=mn)))}function An(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var _n={animationend:An("Animation","AnimationEnd"),animationiteration:An("Animation","AnimationIteration"),animationstart:An("Animation","AnimationStart"),transitionend:An("Transition","TransitionEnd")},En={},Sn={};function kn(e){if(En[e])return En[e];if(!_n[e])return e;var t,r=_n[e];for(t in r)if(r.hasOwnProperty(t)&&t in Sn)return En[e]=r[t];return e}l&&(Sn=document.createElement("div").style,"AnimationEvent"in window||(delete _n.animationend.animation,delete _n.animationiteration.animation,delete _n.animationstart.animation),"TransitionEvent"in window||delete _n.transitionend.transition);var xn=kn("animationend"),Cn=kn("animationiteration"),In=kn("animationstart"),Tn=kn("transitionend"),On=new Map,Pn="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Mn(e,t){On.set(e,t),c(t,[e])}for(var Rn=0;RnEi||(e.current=_i[Ei],_i[Ei]=null,Ei--)}function xi(e,t){Ei++,_i[Ei]=e.current,e.current=t}var Ci={},Ii=Si(Ci),Ti=Si(!1),Oi=Ci;function Pi(e,t){var r=e.type.contextTypes;if(!r)return Ci;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in r)o[i]=t[i];return n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Mi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ri(){ki(Ti),ki(Ii)}function Ni(e,t,r){if(Ii.current!==Ci)throw Error(o(168));xi(Ii,t),xi(Ti,r)}function Li(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,"function"!==typeof n.getChildContext)return r;for(var i in n=n.getChildContext())if(!(i in t))throw Error(o(108,H(e)||"Unknown",i));return D({},r,n)}function Bi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ci,Oi=Ii.current,xi(Ii,e),xi(Ti,Ti.current),!0}function Di(e,t,r){var n=e.stateNode;if(!n)throw Error(o(169));r?(e=Li(e,t,Oi),n.__reactInternalMemoizedMergedChildContext=e,ki(Ti),ki(Ii),xi(Ii,e)):ki(Ti),xi(Ti,r)}var Ui=null,ji=!1,Fi=!1;function zi(e){null===Ui?Ui=[e]:Ui.push(e)}function qi(){if(!Fi&&null!==Ui){Fi=!0;var e=0,t=bt;try{var r=Ui;for(bt=1;e>=a,i-=a,Yi=1<<32-at(t)+i|r<g?(m=d,d=null):m=d.sibling;var y=h(i,d,s[g],c);if(null===y){null===d&&(d=m);break}e&&d&&null===y.alternate&&t(i,d),o=a(y,o,g),null===l?u=y:l.sibling=y,l=y,d=m}if(g===s.length)return r(i,d),io&&Ji(i,g),u;if(null===d){for(;gm?(y=g,g=null):y=g.sibling;var b=h(i,g,v.value,u);if(null===b){null===g&&(g=y);break}e&&g&&null===b.alternate&&t(i,g),s=a(b,s,m),null===d?l=b:d.sibling=b,d=b,g=y}if(v.done)return r(i,g),io&&Ji(i,m),l;if(null===g){for(;!v.done;m++,v=c.next())null!==(v=f(i,v.value,u))&&(s=a(v,s,m),null===d?l=v:d.sibling=v,d=v);return io&&Ji(i,m),l}for(g=n(i,g);!v.done;m++,v=c.next())null!==(v=p(g,i,m,v.value,u))&&(e&&null!==v.alternate&&g.delete(null===v.key?m:v.key),s=a(v,s,m),null===d?l=v:d.sibling=v,d=v);return e&&g.forEach((function(e){return t(i,e)})),io&&Ji(i,m),l}return function e(n,o,a,c){if("object"===typeof a&&null!==a&&a.type===E&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case A:e:{for(var u=a.key,l=o;null!==l;){if(l.key===u){if((u=a.type)===E){if(7===l.tag){r(n,l.sibling),(o=i(l,a.props.children)).return=n,n=o;break e}}else if(l.elementType===u||"object"===typeof u&&null!==u&&u.$$typeof===M&&bo(u)===l.type){r(n,l.sibling),(o=i(l,a.props)).ref=yo(n,l,a),o.return=n,n=o;break e}r(n,l);break}t(n,l),l=l.sibling}a.type===E?((o=Lu(a.props.children,n.mode,c,a.key)).return=n,n=o):((c=Nu(a.type,a.key,a.props,null,n.mode,c)).ref=yo(n,o,a),c.return=n,n=c)}return s(n);case _:e:{for(l=a.key;null!==o;){if(o.key===l){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){r(n,o.sibling),(o=i(o,a.children||[])).return=n,n=o;break e}r(n,o);break}t(n,o),o=o.sibling}(o=Uu(a,n.mode,c)).return=n,n=o}return s(n);case M:return e(n,o,(l=a._init)(a._payload),c)}if(te(a))return g(n,o,a,c);if(L(a))return m(n,o,a,c);vo(n,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==o&&6===o.tag?(r(n,o.sibling),(o=i(o,a)).return=n,n=o):(r(n,o),(o=Du(a,n.mode,c)).return=n,n=o),s(n)):r(n,o)}}var Ao=wo(!0),_o=wo(!1),Eo=Si(null),So=null,ko=null,xo=null;function Co(){xo=ko=So=null}function Io(e){var t=Eo.current;ki(Eo),e._currentValue=t}function To(e,t,r){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==n&&(n.childLanes|=t)):null!==n&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Oo(e,t){So=e,xo=ko=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Po(e){var t=e._currentValue;if(xo!==e)if(e={context:e,memoizedValue:t,next:null},null===ko){if(null===So)throw Error(o(308));ko=e,So.dependencies={lanes:0,firstContext:e}}else ko=ko.next=e;return t}var Mo=null;function Ro(e){null===Mo?Mo=[e]:Mo.push(e)}function No(e,t,r,n){var i=t.interleaved;return null===i?(r.next=r,Ro(t)):(r.next=i.next,i.next=r),t.interleaved=r,Lo(e,n)}function Lo(e,t){e.lanes|=t;var r=e.alternate;for(null!==r&&(r.lanes|=t),r=e,e=e.return;null!==e;)e.childLanes|=t,null!==(r=e.alternate)&&(r.childLanes|=t),r=e,e=e.return;return 3===r.tag?r.stateNode:null}var Bo=!1;function Do(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Uo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function jo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fo(e,t,r){var n=e.updateQueue;if(null===n)return null;if(n=n.shared,0!==(2&Ic)){var i=n.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Lo(e,r)}return null===(i=n.interleaved)?(t.next=t,Ro(n)):(t.next=i.next,i.next=t),n.interleaved=t,Lo(e,r)}function zo(e,t,r){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&r))){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,vt(e,r)}}function qo(e,t){var r=e.updateQueue,n=e.alternate;if(null!==n&&r===(n=n.updateQueue)){var i=null,o=null;if(null!==(r=r.firstBaseUpdate)){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};null===o?i=o=a:o=o.next=a,r=r.next}while(null!==r);null===o?i=o=t:o=o.next=t}else i=o=t;return r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},void(e.updateQueue=r)}null===(e=r.lastBaseUpdate)?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ho(e,t,r,n){var i=e.updateQueue;Bo=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var c=s,u=c.next;c.next=null,null===a?o=u:a.next=u,a=c;var l=e.alternate;null!==l&&((s=(l=l.updateQueue).lastBaseUpdate)!==a&&(null===s?l.firstBaseUpdate=u:s.next=u,l.lastBaseUpdate=c))}if(null!==o){var d=i.baseState;for(a=0,l=u=c=null,s=o;;){var f=s.lane,h=s.eventTime;if((n&f)===f){null!==l&&(l=l.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,g=s;switch(f=t,h=r,g.tag){case 1:if("function"===typeof(p=g.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(f="function"===typeof(p=g.payload)?p.call(h,d,f):p)||void 0===f)break e;d=D({},d,f);break e;case 2:Bo=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===l?(u=l=h,c=d):l=l.next=h,a|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===l&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=l,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Bc|=a,e.lanes=a,e.memoizedState=d}}function Vo(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;tr?r:4,e(!0);var n=oa.transition;oa.transition={};try{e(!1),t()}finally{bt=r,oa.transition=n}}function Ka(){return ba().memoizedState}function Wa(e,t,r){var n=tu(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Qa(e))Ya(t,r);else if(null!==(r=No(e,t,r,n))){ru(r,e,n,eu()),Za(r,t,n)}}function Ga(e,t,r){var n=tu(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Qa(e))Ya(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,r);if(i.hasEagerState=!0,i.eagerState=s,sn(s,a)){var c=t.interleaved;return null===c?(i.next=i,Ro(t)):(i.next=c.next,c.next=i),void(t.interleaved=i)}}catch(u){}null!==(r=No(e,t,i,n))&&(ru(r,e,n,i=eu()),Za(r,t,n))}}function Qa(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Ya(e,t){da=la=!0;var r=e.pending;null===r?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Za(e,t,r){if(0!==(4194240&r)){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,vt(e,r)}}var Ja={readContext:Po,useCallback:pa,useContext:pa,useEffect:pa,useImperativeHandle:pa,useInsertionEffect:pa,useLayoutEffect:pa,useMemo:pa,useReducer:pa,useRef:pa,useState:pa,useDebugValue:pa,useDeferredValue:pa,useTransition:pa,useMutableSource:pa,useSyncExternalStore:pa,useId:pa,unstable_isNewReconciler:!1},Xa={readContext:Po,useCallback:function(e,t){return va().memoizedState=[e,void 0===t?null:t],e},useContext:Po,useEffect:La,useImperativeHandle:function(e,t,r){return r=null!==r&&void 0!==r?r.concat([e]):null,Ra(4194308,4,ja.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ra(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ra(4,2,e,t)},useMemo:function(e,t){var r=va();return t=void 0===t?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=va();return t=void 0!==r?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Wa.bind(null,sa,e),[n.memoizedState,e]},useRef:function(e){return e={current:e},va().memoizedState=e},useState:Oa,useDebugValue:za,useDeferredValue:function(e){return va().memoizedState=e},useTransition:function(){var e=Oa(!1),t=e[0];return e=$a.bind(null,e[1]),va().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=sa,i=va();if(io){if(void 0===r)throw Error(o(407));r=r()}else{if(r=t(),null===Tc)throw Error(o(349));0!==(30&aa)||ka(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,La(Ca.bind(null,n,a,e),[e]),n.flags|=2048,Pa(9,xa.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=va(),t=Tc.identifierPrefix;if(io){var r=Zi;t=":"+t+"R"+(r=(Yi&~(1<<32-at(Yi)-1)).toString(32)+r),0<(r=fa++)&&(t+="H"+r.toString(32)),t+=":"}else t=":"+t+"r"+(r=ha++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Po,useCallback:qa,useContext:Po,useEffect:Ba,useImperativeHandle:Fa,useInsertionEffect:Da,useLayoutEffect:Ua,useMemo:Ha,useReducer:Aa,useRef:Ma,useState:function(){return Aa(wa)},useDebugValue:za,useDeferredValue:function(e){return Va(ba(),ca.memoizedState,e)},useTransition:function(){return[Aa(wa)[0],ba().memoizedState]},useMutableSource:Ea,useSyncExternalStore:Sa,useId:Ka,unstable_isNewReconciler:!1},ts={readContext:Po,useCallback:qa,useContext:Po,useEffect:Ba,useImperativeHandle:Fa,useInsertionEffect:Da,useLayoutEffect:Ua,useMemo:Ha,useReducer:_a,useRef:Ma,useState:function(){return _a(wa)},useDebugValue:za,useDeferredValue:function(e){var t=ba();return null===ca?t.memoizedState=e:Va(t,ca.memoizedState,e)},useTransition:function(){return[_a(wa)[0],ba().memoizedState]},useMutableSource:Ea,useSyncExternalStore:Sa,useId:Ka,unstable_isNewReconciler:!1};function rs(e,t){if(e&&e.defaultProps){for(var r in t=D({},t),e=e.defaultProps)void 0===t[r]&&(t[r]=e[r]);return t}return t}function ns(e,t,r,n){r=null===(r=r(n,t=e.memoizedState))||void 0===r?t:D({},t,r),e.memoizedState=r,0===e.lanes&&(e.updateQueue.baseState=r)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&qe(e)===e},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=eu(),i=tu(e),o=jo(n,i);o.payload=t,void 0!==r&&null!==r&&(o.callback=r),null!==(t=Fo(e,o,i))&&(ru(t,e,i,n),zo(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=eu(),i=tu(e),o=jo(n,i);o.tag=1,o.payload=t,void 0!==r&&null!==r&&(o.callback=r),null!==(t=Fo(e,o,i))&&(ru(t,e,i,n),zo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=eu(),n=tu(e),i=jo(r,n);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Fo(e,i,n))&&(ru(t,e,n,r),zo(t,e,n))}};function os(e,t,r,n,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!cn(r,n)||!cn(i,o))}function as(e,t,r){var n=!1,i=Ci,o=t.contextType;return"object"===typeof o&&null!==o?o=Po(o):(i=Mi(t)?Oi:Ii.current,o=(n=null!==(n=t.contextTypes)&&void 0!==n)?Pi(e,i):Ci),t=new t(r,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ss(e,t,r,n){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function cs(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},Do(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=Po(o):(o=Mi(t)?Oi:Ii.current,i.context=Pi(e,o)),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(ns(e,t,o,r),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Ho(e,r,i,n),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function us(e,t){try{var r="",n=t;do{r+=z(n),n=n.return}while(n);var i=r}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function ls(e,t,r){return{value:e,source:null,stack:null!=r?r:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(r){setTimeout((function(){throw r}))}}var fs="function"===typeof WeakMap?WeakMap:Map;function hs(e,t,r){(r=jo(-1,r)).tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Vc||(Vc=!0,$c=n),ds(0,t)},r}function ps(e,t,r){(r=jo(-1,r)).tag=3;var n=e.type.getDerivedStateFromError;if("function"===typeof n){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){ds(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(r.callback=function(){ds(0,t),"function"!==typeof n&&(null===Kc?Kc=new Set([this]):Kc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),r}function gs(e,t,r){var n=e.pingCache;if(null===n){n=e.pingCache=new fs;var i=new Set;n.set(t,i)}else void 0===(i=n.get(t))&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=ku.bind(null,e,t,r),t.then(e,e))}function ms(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,r,n,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,1===r.tag&&(null===r.alternate?r.tag=17:((t=jo(-1,1)).tag=2,Fo(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var vs=w.ReactCurrentOwner,bs=!1;function ws(e,t,r,n){t.child=null===e?_o(t,null,r,n):Ao(t,e.child,r,n)}function As(e,t,r,n,i){r=r.render;var o=t.ref;return Oo(t,i),n=ma(e,t,r,n,o,i),r=ya(),null===e||bs?(io&&r&&eo(t),t.flags|=1,ws(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function _s(e,t,r,n,i){if(null===e){var o=r.type;return"function"!==typeof o||Mu(o)||void 0!==o.defaultProps||null!==r.compare||void 0!==r.defaultProps?((e=Nu(r.type,null,n,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Es(e,t,o,n,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((r=null!==(r=r.compare)?r:cn)(a,n)&&e.ref===t.ref)return Vs(e,t,i)}return t.flags|=1,(e=Ru(o,n)).ref=t.ref,e.return=t,t.child=e}function Es(e,t,r,n,i){if(null!==e){var o=e.memoizedProps;if(cn(o,n)&&e.ref===t.ref){if(bs=!1,t.pendingProps=n=o,0===(e.lanes&i))return t.lanes=e.lanes,Vs(e,t,i);0!==(131072&e.flags)&&(bs=!0)}}return xs(e,t,r,n,i)}function Ss(e,t,r){var n=t.pendingProps,i=n.children,o=null!==e?e.memoizedState:null;if("hidden"===n.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xi(Rc,Mc),Mc|=r;else{if(0===(1073741824&r))return e=null!==o?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xi(Rc,Mc),Mc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=null!==o?o.baseLanes:r,xi(Rc,Mc),Mc|=n}else null!==o?(n=o.baseLanes|r,t.memoizedState=null):n=r,xi(Rc,Mc),Mc|=n;return ws(e,t,i,r),t.child}function ks(e,t){var r=t.ref;(null===e&&null!==r||null!==e&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function xs(e,t,r,n,i){var o=Mi(r)?Oi:Ii.current;return o=Pi(t,o),Oo(t,i),r=ma(e,t,r,n,o,i),n=ya(),null===e||bs?(io&&n&&eo(t),t.flags|=1,ws(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function Cs(e,t,r,n,i){if(Mi(r)){var o=!0;Bi(t)}else o=!1;if(Oo(t,i),null===t.stateNode)Hs(e,t),as(t,r,n),cs(t,r,n,i),n=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,u=r.contextType;"object"===typeof u&&null!==u?u=Po(u):u=Pi(t,u=Mi(r)?Oi:Ii.current);var l=r.getDerivedStateFromProps,d="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==n||c!==u)&&ss(t,a,n,u),Bo=!1;var f=t.memoizedState;a.state=f,Ho(t,n,a,i),c=t.memoizedState,s!==n||f!==c||Ti.current||Bo?("function"===typeof l&&(ns(t,r,l,n),c=t.memoizedState),(s=Bo||os(t,r,s,n,f,c,u))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),a.props=n,a.state=c,a.context=u,n=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,Uo(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:rs(t.type,s),a.props=u,d=t.pendingProps,f=a.context,"object"===typeof(c=r.contextType)&&null!==c?c=Po(c):c=Pi(t,c=Mi(r)?Oi:Ii.current);var h=r.getDerivedStateFromProps;(l="function"===typeof h||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||f!==c)&&ss(t,a,n,c),Bo=!1,f=t.memoizedState,a.state=f,Ho(t,n,a,i);var p=t.memoizedState;s!==d||f!==p||Ti.current||Bo?("function"===typeof h&&(ns(t,r,h,n),p=t.memoizedState),(u=Bo||os(t,r,u,n,f,p,c)||!1)?(l||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(n,p,c),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(n,p,c)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),a.props=n,a.state=p,a.context=c,n=u):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return Is(e,t,r,n,o,i)}function Is(e,t,r,n,i,o){ks(e,t);var a=0!==(128&t.flags);if(!n&&!a)return i&&Di(t,r,!1),Vs(e,t,o);n=t.stateNode,vs.current=t;var s=a&&"function"!==typeof r.getDerivedStateFromError?null:n.render();return t.flags|=1,null!==e&&a?(t.child=Ao(t,e.child,null,o),t.child=Ao(t,null,s,o)):ws(e,t,s,o),t.memoizedState=n.state,i&&Di(t,r,!0),t.child}function Ts(e){var t=e.stateNode;t.pendingContext?Ni(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ni(0,t.context,!1),Yo(e,t.containerInfo)}function Os(e,t,r,n,i){return po(),go(i),t.flags|=256,ws(e,t,r,n),t.child}var Ps,Ms,Rs,Ns,Ls={dehydrated:null,treeContext:null,retryLane:0};function Bs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ds(e,t,r){var n,i=t.pendingProps,a=ea.current,s=!1,c=0!==(128&t.flags);if((n=c)||(n=(null===e||null!==e.memoizedState)&&0!==(2&a)),n?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),xi(ea,1&a),null===e)return uo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(c=i.children,e=i.fallback,s?(i=t.mode,s=t.child,c={mode:"hidden",children:c},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=c):s=Bu(c,i,0,null),e=Lu(e,i,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Bs(r),t.memoizedState=Ls,e):Us(t,c));if(null!==(a=e.memoizedState)&&null!==(n=a.dehydrated))return function(e,t,r,n,i,a,s){if(r)return 256&t.flags?(t.flags&=-257,js(e,t,s,n=ls(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=Bu({mode:"visible",children:n.children},i,0,null),(a=Lu(a,i,s,null)).flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,0!==(1&t.mode)&&Ao(t,e.child,null,s),t.child.memoizedState=Bs(s),t.memoizedState=Ls,a);if(0===(1&t.mode))return js(e,t,s,null);if("$!"===i.data){if(n=i.nextSibling&&i.nextSibling.dataset)var c=n.dgst;return n=c,js(e,t,s,n=ls(a=Error(o(419)),n,void 0))}if(c=0!==(s&e.childLanes),bs||c){if(null!==(n=Tc)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(n.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,Lo(e,i),ru(n,e,i,-1))}return gu(),js(e,t,s,n=ls(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Cu.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,no=ui(i.nextSibling),ro=t,io=!0,oo=null,null!==e&&(Wi[Gi++]=Yi,Wi[Gi++]=Zi,Wi[Gi++]=Qi,Yi=e.id,Zi=e.overflow,Qi=t),t=Us(t,n.children),t.flags|=4096,t)}(e,t,c,i,n,a,r);if(s){s=i.fallback,c=t.mode,n=(a=e.child).sibling;var u={mode:"hidden",children:i.children};return 0===(1&c)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null):(i=Ru(a,u)).subtreeFlags=14680064&a.subtreeFlags,null!==n?s=Ru(n,s):(s=Lu(s,c,r,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,c=null===(c=e.child.memoizedState)?Bs(r):{baseLanes:c.baseLanes|r,cachePool:null,transitions:c.transitions},s.memoizedState=c,s.childLanes=e.childLanes&~r,t.memoizedState=Ls,i}return e=(s=e.child).sibling,i=Ru(s,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=r),i.return=t,i.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Us(e,t){return(t=Bu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function js(e,t,r,n){return null!==n&&go(n),Ao(t,e.child,null,r),(e=Us(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fs(e,t,r){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),To(e.return,t,r)}function zs(e,t,r,n,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function qs(e,t,r){var n=t.pendingProps,i=n.revealOrder,o=n.tail;if(ws(e,t,n.children,r),0!==(2&(n=ea.current)))n=1&n|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fs(e,r,t);else if(19===e.tag)Fs(e,r,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(xi(ea,n),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;null!==r;)null!==(e=r.alternate)&&null===ta(e)&&(i=r),r=r.sibling;null===(r=i)?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),zs(t,!1,i,r,o);break;case"backwards":for(r=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ta(e)){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}zs(t,!0,r,null,o);break;case"together":zs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vs(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Bc|=t.lanes,0===(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(r=Ru(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Ru(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function $s(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Ks(e){var t=null!==e.alternate&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;null!==i;)r|=i.lanes|i.childLanes,n|=14680064&i.subtreeFlags,n|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Ws(e,t,r){var n=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ks(t),null;case 1:case 17:return Mi(t.type)&&Ri(),Ks(t),null;case 3:return n=t.stateNode,Zo(),ki(Ti),ki(Ii),na(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(fo(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(au(oo),oo=null))),Ms(e,t),Ks(t),null;case 5:Xo(t);var i=Qo(Go.current);if(r=t.type,null!==e&&null!=t.stateNode)Rs(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(null===t.stateNode)throw Error(o(166));return Ks(t),null}if(e=Qo(Ko.current),fo(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[fi]=t,n[hi]=a,e=0!==(1&t.mode),r){case"dialog":jn("cancel",n),jn("close",n);break;case"iframe":case"object":case"embed":jn("load",n);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):"string"===typeof n.is?e=c.createElement(r,{is:n.is}):(e=c.createElement(r),"select"===r&&(c=e,n.multiple?c.multiple=!0:n.size&&(c.size=n.size))):e=c.createElementNS(e,r),e[fi]=t,e[hi]=n,Ps(e,t,!1,!1),t.stateNode=e;e:{switch(c=be(r,n),r){case"dialog":jn("cancel",e),jn("close",e),i=n;break;case"iframe":case"object":case"embed":jn("load",e),i=n;break;case"video":case"audio":for(i=0;iqc&&(t.flags|=128,n=!0,$s(a,!1),t.lanes=4194304)}else{if(!n)if(null!==(e=ta(c))){if(t.flags|=128,n=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),$s(a,!0),null===a.tail&&"hidden"===a.tailMode&&!c.alternate&&!io)return Ks(t),null}else 2*Ze()-a.renderingStartTime>qc&&1073741824!==r&&(t.flags|=128,n=!0,$s(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(null!==(r=a.last)?r.sibling=c:t.child=c,a.last=c)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ze(),t.sibling=null,r=ea.current,xi(ea,n?1&r|2:1&r),t):(Ks(t),null);case 22:case 23:return du(),n=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==n&&(t.flags|=8192),n&&0!==(1&t.mode)?0!==(1073741824&Mc)&&(Ks(t),6&t.subtreeFlags&&(t.flags|=8192)):Ks(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Gs(e,t){switch(to(t),t.tag){case 1:return Mi(t.type)&&Ri(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Zo(),ki(Ti),ki(Ii),na(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Xo(t),null;case 13:if(ki(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ki(ea),null;case 4:return Zo(),null;case 10:return Io(t.type._context),null;case 22:case 23:return du(),null;default:return null}}Ps=function(e,t){for(var r=t.child;null!==r;){if(5===r.tag||6===r.tag)e.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Ms=function(){},Rs=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,Qo(Ko.current);var o,a=null;switch(r){case"input":i=Q(e,i),n=Q(e,n),a=[];break;case"select":i=D({},i,{value:void 0}),n=D({},n,{value:void 0}),a=[];break;case"textarea":i=ne(e,i),n=ne(e,n),a=[];break;default:"function"!==typeof i.onClick&&"function"===typeof n.onClick&&(e.onclick=Xn)}for(l in ve(r,n),r=null,i)if(!n.hasOwnProperty(l)&&i.hasOwnProperty(l)&&null!=i[l])if("style"===l){var c=i[l];for(o in c)c.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(s.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in n){var u=n[l];if(c=null!=i?i[l]:void 0,n.hasOwnProperty(l)&&u!==c&&(null!=u||null!=c))if("style"===l)if(c){for(o in c)!c.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in u)u.hasOwnProperty(o)&&c[o]!==u[o]&&(r||(r={}),r[o]=u[o])}else r||(a||(a=[]),a.push(l,r)),r=u;else"dangerouslySetInnerHTML"===l?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(a=a||[]).push(l,u)):"children"===l?"string"!==typeof u&&"number"!==typeof u||(a=a||[]).push(l,""+u):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(s.hasOwnProperty(l)?(null!=u&&"onScroll"===l&&jn("scroll",e),a||c===u||(a=[])):(a=a||[]).push(l,u))}r&&(a=a||[]).push("style",r);var l=a;(t.updateQueue=l)&&(t.flags|=4)}},Ns=function(e,t,r,n){r!==n&&(t.flags|=4)};var Qs=!1,Ys=!1,Zs="function"===typeof WeakSet?WeakSet:Set,Js=null;function Xs(e,t){var r=e.ref;if(null!==r)if("function"===typeof r)try{r(null)}catch(n){Su(e,t,n)}else r.current=null}function ec(e,t,r){try{r()}catch(n){Su(e,t,n)}}var tc=!1;function rc(e,t,r){var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var i=n=n.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&ec(t,r,o)}i=i.next}while(i!==n)}}function nc(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function ic(e){var t=e.ref;if(null!==t){var r=e.stateNode;e.tag,e=r,"function"===typeof t?t(e):t.current=e}}function oc(e){var t=e.alternate;null!==t&&(e.alternate=null,oc(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fi],delete t[hi],delete t[gi],delete t[mi],delete t[yi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ac(e){return 5===e.tag||3===e.tag||4===e.tag}function sc(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ac(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function cc(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?8===r.nodeType?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(8===r.nodeType?(t=r.parentNode).insertBefore(e,r):(t=r).appendChild(e),null!==(r=r._reactRootContainer)&&void 0!==r||null!==t.onclick||(t.onclick=Xn));else if(4!==n&&null!==(e=e.child))for(cc(e,t,r),e=e.sibling;null!==e;)cc(e,t,r),e=e.sibling}function uc(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(4!==n&&null!==(e=e.child))for(uc(e,t,r),e=e.sibling;null!==e;)uc(e,t,r),e=e.sibling}var lc=null,dc=!1;function fc(e,t,r){for(r=r.child;null!==r;)hc(e,t,r),r=r.sibling}function hc(e,t,r){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,r)}catch(s){}switch(r.tag){case 5:Ys||Xs(r,t);case 6:var n=lc,i=dc;lc=null,fc(e,t,r),dc=i,null!==(lc=n)&&(dc?(e=lc,r=r.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)):lc.removeChild(r.stateNode));break;case 18:null!==lc&&(dc?(e=lc,r=r.stateNode,8===e.nodeType?ci(e.parentNode,r):1===e.nodeType&&ci(e,r),qt(e)):ci(lc,r.stateNode));break;case 4:n=lc,i=dc,lc=r.stateNode.containerInfo,dc=!0,fc(e,t,r),lc=n,dc=i;break;case 0:case 11:case 14:case 15:if(!Ys&&(null!==(n=r.updateQueue)&&null!==(n=n.lastEffect))){i=n=n.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!==(2&o)||0!==(4&o))&&ec(r,t,a),i=i.next}while(i!==n)}fc(e,t,r);break;case 1:if(!Ys&&(Xs(r,t),"function"===typeof(n=r.stateNode).componentWillUnmount))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Su(r,t,s)}fc(e,t,r);break;case 21:fc(e,t,r);break;case 22:1&r.mode?(Ys=(n=Ys)||null!==r.memoizedState,fc(e,t,r),Ys=n):fc(e,t,r);break;default:fc(e,t,r)}}function pc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var r=e.stateNode;null===r&&(r=e.stateNode=new Zs),t.forEach((function(t){var n=Iu.bind(null,e,t);r.has(t)||(r.add(t),t.then(n,n))}))}}function gc(e,t){var r=t.deletions;if(null!==r)for(var n=0;ni&&(i=s),n&=~a}if(n=i,10<(n=(120>(n=Ze()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Sc(n/1960))-n)){e.timeoutHandle=ni(Au.bind(null,e,Fc,Hc),n);break}Au(e,Fc,Hc);break;default:throw Error(o(329))}}}return nu(e,Ze()),e.callbackNode===r?iu.bind(null,e):null}function ou(e,t){var r=jc;return e.current.memoizedState.isDehydrated&&(fu(e,t).flags|=256),2!==(e=mu(e,t))&&(t=Fc,Fc=r,null!==t&&au(t)),e}function au(e){null===Fc?Fc=e:Fc.push.apply(Fc,e)}function su(e,t){for(t&=~Uc,t&=~Dc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0e?16:e,null===Gc)var n=!1;else{if(e=Gc,Gc=null,Qc=0,0!==(6&Ic))throw Error(o(331));var i=Ic;for(Ic|=4,Js=e.current;null!==Js;){var a=Js,s=a.child;if(0!==(16&Js.flags)){var c=a.deletions;if(null!==c){for(var u=0;uZe()-zc?fu(e,0):Uc|=r),nu(e,t)}function xu(e,t){0===t&&(0===(1&e.mode)?t=1:(t=lt,0===(130023424&(lt<<=1))&&(lt=4194304)));var r=eu();null!==(e=Lo(e,t))&&(yt(e,t,r),nu(e,r))}function Cu(e){var t=e.memoizedState,r=0;null!==t&&(r=t.retryLane),xu(e,r)}function Iu(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;null!==i&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(o(314))}null!==n&&n.delete(t),xu(e,r)}function Tu(e,t){return We(e,t)}function Ou(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pu(e,t,r,n){return new Ou(e,t,r,n)}function Mu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ru(e,t){var r=e.alternate;return null===r?((r=Pu(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=14680064&e.flags,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Nu(e,t,r,n,i,a){var s=2;if(n=e,"function"===typeof e)Mu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case E:return Lu(r.children,i,a,t);case S:s=8,i|=8;break;case k:return(e=Pu(12,r,t,2|i)).elementType=k,e.lanes=a,e;case T:return(e=Pu(13,r,t,i)).elementType=T,e.lanes=a,e;case O:return(e=Pu(19,r,t,i)).elementType=O,e.lanes=a,e;case R:return Bu(r,i,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case x:s=10;break e;case C:s=9;break e;case I:s=11;break e;case P:s=14;break e;case M:s=16,n=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Pu(s,r,t,i)).elementType=e,t.type=n,t.lanes=a,t}function Lu(e,t,r,n){return(e=Pu(7,e,n,t)).lanes=r,e}function Bu(e,t,r,n){return(e=Pu(22,e,n,t)).elementType=R,e.lanes=r,e.stateNode={isHidden:!1},e}function Du(e,t,r){return(e=Pu(6,e,null,t)).lanes=r,e}function Uu(e,t,r){return(t=Pu(4,null!==e.children?e.children:[],e.key,t)).lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ju(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fu(e,t,r,n,i,o,a,s,c){return e=new ju(e,t,r,s,c),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Pu(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Do(o),e}function zu(e){if(!e)return Ci;e:{if(qe(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Mi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var r=e.type;if(Mi(r))return Li(e,r,t)}return t}function qu(e,t,r,n,i,o,a,s,c){return(e=Fu(r,n,!0,e,0,o,0,s,c)).context=zu(null),r=e.current,(o=jo(n=eu(),i=tu(r))).callback=void 0!==t&&null!==t?t:null,Fo(r,o,i),e.current.lanes=i,yt(e,i,n),nu(e,n),e}function Hu(e,t,r,n){var i=t.current,o=eu(),a=tu(i);return r=zu(r),null===t.context?t.context=r:t.pendingContext=r,(t=jo(o,a)).payload={element:e},null!==(n=void 0===n?null:n)&&(t.callback=n),null!==(e=Fo(i,t,a))&&(ru(e,i,a,o),zo(e,i,a)),a}function Vu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function $u(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var r=e.retryLane;e.retryLane=0!==r&&r{"use strict";var n=r(17119);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},17119:(e,t,r)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=r(38345)},68577:(e,t)=>{"use strict";var r="function"===typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function A(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case l:case d:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case u:case f:case m:case g:case c:return e;default:return t}}case i:return t}}}function _(e){return A(e)===d}t.AsyncMode=l,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=c,t.Element=n,t.ForwardRef=f,t.Fragment=o,t.Lazy=m,t.Memo=g,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return _(e)||A(e)===l},t.isConcurrentMode=_,t.isContextConsumer=function(e){return A(e)===u},t.isContextProvider=function(e){return A(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return A(e)===f},t.isFragment=function(e){return A(e)===o},t.isLazy=function(e){return A(e)===m},t.isMemo=function(e){return A(e)===g},t.isPortal=function(e){return A(e)===i},t.isProfiler=function(e){return A(e)===s},t.isStrictMode=function(e){return A(e)===a},t.isSuspense=function(e){return A(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===d||e===s||e===a||e===h||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===v||e.$$typeof===b||e.$$typeof===w||e.$$typeof===y)},t.typeOf=A},26429:(e,t,r)=>{"use strict";e.exports=r(68577)},11554:function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=1&&r<=127?n+=e.charAt(t):r>2047?(n+=String.fromCharCode(224|r>>12&15),n+=String.fromCharCode(128|r>>6&63),n+=String.fromCharCode(128|63&r)):(n+=String.fromCharCode(192|r>>6&31),n+=String.fromCharCode(128|63&r));return n},t.prototype.drawRoundedSquare=function(e,t,r,n,i,o,a,s){s.lineWidth=e,s.fillStyle=i,s.strokeStyle=i,r+=e/2,t+=e/2,n-=e,Array.isArray(o)||(o=[o,o,o,o]);var c=(o=o.map((function(e){return(e=Math.min(e,n/2))<0?0:e})))[0]||0,u=o[1]||0,l=o[2]||0,d=o[3]||0;s.beginPath(),s.moveTo(t+c,r),s.lineTo(t+n-u,r),u&&s.quadraticCurveTo(t+n,r,t+n,r+u),s.lineTo(t+n,r+n-l),l&&s.quadraticCurveTo(t+n,r+n,t+n-l,r+n),s.lineTo(t+d,r+n),d&&s.quadraticCurveTo(t,r+n,t,r+n-d),s.lineTo(t,r+c),c&&s.quadraticCurveTo(t,r,t+c,r),s.closePath(),s.stroke(),a&&s.fill()},t.prototype.drawPositioningPattern=function(e,t,r,n,i,o,a){void 0===a&&(a=[0,0,0,0]);var s,c,u,l,d=Math.ceil(t);"number"===typeof a||Array.isArray(a)?c=s=a:(s=a.outer||0,c=a.inner||0),"string"!==typeof o?(u=o.outer,l=o.inner):(u=o,l=o);var f=n*t+r,h=i*t+r,p=7*t;this.drawRoundedSquare(d,h,f,p,u,s,!1,e),p=3*t,f+=2*t,h+=2*t,this.drawRoundedSquare(d,h,f,p,l,c,!0,e)},t.prototype.isInPositioninZone=function(e,t,r){return r.some((function(r){return t>=r.row&&t<=r.row+7&&e>=r.col&&e<=r.col+7}))},t.prototype.transformPixelLengthIntoNumberOfCells=function(e,t){return e/t},t.prototype.isCoordinateInImage=function(e,t,r,n,i,o,a,s){if(s){var c=this.transformPixelLengthIntoNumberOfCells(i,a),u=this.transformPixelLengthIntoNumberOfCells(o,a),l=this.transformPixelLengthIntoNumberOfCells(r,a)-1,d=this.transformPixelLengthIntoNumberOfCells(n,a)-1;return t>=c-2&&t<=c+l+2&&e>=u-2&&e<=u+d+2}return!1},t.prototype.shouldComponentUpdate=function(e){return!o(this.props,e)},t.prototype.componentDidMount=function(){this.update()},t.prototype.componentDidUpdate=function(){this.update()},t.prototype.update=function(){var e,t=this.props,r=t.value,n=t.ecLevel,i=t.enableCORS,o=t.bgColor,s=t.fgColor,c=t.logoImage,u=t.logoOpacity,l=t.logoOnLoad,d=t.removeQrCodeBehindLogo,f=t.qrStyle,h=t.eyeRadius,p=t.eyeColor,g=t.logoPaddingStyle,m=+this.props.size,y=+this.props.quietZone,v=this.props.logoWidth?+this.props.logoWidth:0,b=this.props.logoHeight?+this.props.logoHeight:0,w=this.props.logoPadding?+this.props.logoPadding:0,A=a(0,n);A.addData(this.utf16to8(r)),A.make();var _=null===(e=this.canvasRef)||void 0===e?void 0:e.current,E=_.getContext("2d"),S=m+2*y,k=A.getModuleCount(),x=m/k,C=window.devicePixelRatio||1;_.height=_.width=S*C,E.scale(C,C),E.fillStyle=o,E.fillRect(0,0,S,S);var I=y,T=[{row:0,col:0},{row:0,col:k-7},{row:k-7,col:0}];if(E.strokeStyle=s,"dots"===f){E.fillStyle=s;for(var O=x/2,P=0;P0&&!A.isDark(P-1,M)&&M>0&&!A.isDark(P,M-1)&&(R[0]=!0),P>0&&!A.isDark(P-1,M)&&M0&&!A.isDark(P,M-1)&&(R[3]=!0);var N=Math.ceil((M+1)*x)-Math.floor(M*x),L=Math.ceil((P+1)*x)-Math.floor(P*x);E.fillStyle=s,E.beginPath(),E.arc(Math.round(M*x)+O+I,Math.round(P*x)+O+I,O,0,2*Math.PI,!1),E.closePath(),E.fill(),R[0]||E.fillRect(Math.round(M*x)+I,Math.round(P*x)+I,N/2,L/2),R[1]||E.fillRect(Math.round(M*x)+I+Math.floor(N/2),Math.round(P*x)+I,N/2,L/2),R[2]||E.fillRect(Math.round(M*x)+I+Math.floor(N/2),Math.round(P*x)+I+Math.floor(L/2),N/2,L/2),R[3]||E.fillRect(Math.round(M*x)+I,Math.round(P*x)+I+Math.floor(L/2),N/2,L/2)}}else for(P=0;P{"use strict";var n=r(9950),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var n,o={},u=null,l=null;for(n in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(l=t.ref),t)a.call(t,n)&&!c.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:u,ref:l,props:o,_owner:s.current}}t.Fragment=o,t.jsx=u,t.jsxs=u},32049:(e,t)=>{"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function y(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||p}function v(){}function b(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var w=b.prototype=new v;w.constructor=b,g(w,y.prototype),w.isPureReactComponent=!0;var A=Array.isArray,_=Object.prototype.hasOwnProperty,E={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,n){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,i)&&!S.hasOwnProperty(i)&&(o[i]=t[i]);var c=arguments.length-2;if(1===c)o.children=n;else if(1{"use strict";e.exports=r(32049)},44414:(e,t,r)=>{"use strict";e.exports=r(32654)},97614:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"===typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,a,s;if("string"===typeof t&&(o="not ",t.substr(!a||a<0?0:+a,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var c=function(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(n(t,"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(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" 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(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},47544:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(93230),o=r(34306);r(61596)(u,i);for(var a=n(o.prototype),s=0;s{"use strict";e.exports=i;var n=r(15624);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(61596)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},93230:(e,t,r)=>{"use strict";var n;e.exports=S,S.ReadableState=E;r(28981).EventEmitter;var i=function(e,t){return e.listeners(t).length},o=r(44687),a=r(93325).Buffer,s=("undefined"!==typeof r.g?r.g:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var c,u=r(79838);c=u&&u.debuglog?u.debuglog("stream"):function(){};var l,d,f,h=r(94147),p=r(34822),g=r(2809).getHighWaterMark,m=r(97614).F,y=m.ERR_INVALID_ARG_TYPE,v=m.ERR_STREAM_PUSH_AFTER_EOF,b=m.ERR_METHOD_NOT_IMPLEMENTED,w=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(61596)(S,o);var A=p.errorOrDestroy,_=["error","close","destroy","pause","resume"];function E(e,t,i){n=n||r(47544),e=e||{},"boolean"!==typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new h,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!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(50923).StringDecoder),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function S(e){if(n=n||r(47544),!(this instanceof S))return new S(e);var t=this instanceof n;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function k(e,t,r,n,i){c("readableAddChunk",t);var o,u=e._readableState;if(null===t)u.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}(e,u);else if(i||(o=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof s||"string"===typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(u,t)),o)A(e,o);else if(u.objectMode||t&&t.length>0)if("string"===typeof t||u.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)u.endEmitted?A(e,new w):x(e,u,t,!0);else if(u.ended)A(e,new v);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?x(e,u,t,!1):P(e,u)):x(e,u,t,!1)}else n||(u.reading=!1,P(e,u));return!u.ended&&(u.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(O,e))}function O(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,B(e)}function P(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(M,e,t))}function M(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){c("readable nexttick read 0"),e.read(0)}function L(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),B(e),t.flowing&&!t.reading&&e.read(0)}function B(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function U(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(j,t,e))}function j(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function F(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):T(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&U(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&U(this)),null!==n&&this.emit("data",n),n},S.prototype._read=function(e){A(this,new b("_read()"))},S.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,c("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?s:g;function a(t,i){c("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,c("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",g),r.removeListener("data",d),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function s(){c("onend"),e.end()}n.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",a);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,B(e))}}(r);e.on("drain",u);var l=!1;function d(t){c("ondata");var i=e.write(t);c("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==F(n.pipes,e))&&!l&&(c("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function f(t){c("onerror",t),g(),e.removeListener("error",f),0===i(e,"error")&&A(e,t)}function h(){e.removeListener("finish",p),g()}function p(){c("onfinish"),e.removeListener("close",h),g()}function g(){c("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",h),e.once("finish",p),e.emit("pipe",r),n.flowing||(c("pipe resume"),r.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,c("on readable",n.length,n.reading),n.length?T(this):n.reading||process.nextTick(N,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(R,this),r},S.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(R,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(L,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"===typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=r(79733)),d(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=D,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(S.from=function(e,t){return void 0===f&&(f=r(9951)),f(S,e,t)})},15624:(e,t,r)=>{"use strict";e.exports=l;var n=r(97614).F,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(47544);function u(e,t){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!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=S,S.WritableState=E;var o={deprecate:r(91421)},a=r(44687),s=r(93325).Buffer,c=("undefined"!==typeof r.g?r.g:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};var u,l=r(34822),d=r(2809).getHighWaterMark,f=r(97614).F,h=f.ERR_INVALID_ARG_TYPE,p=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,b=f.ERR_STREAM_WRITE_AFTER_END,w=f.ERR_UNKNOWN_ENCODING,A=l.errorOrDestroy;function _(){}function E(e,t,o){i=i||r(47544),e=e||{},"boolean"!==typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!==typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(O,e,t),e._writableState.errorEmitted=!0,A(e,n)):(i(n),e._writableState.errorEmitted=!0,A(e,n),O(e,t))}(e,r,n,t,i);else{var o=I(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||C(e,r),n?process.nextTick(x,e,r,o,i):x(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function S(e){var t=this instanceof(i=i||r(47544));if(!t&&!u.call(S,this))return new S(e);this._writableState=new E(e,this,t),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),a.call(this)}function k(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function x(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function C(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,o=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var s=0,c=!0;r;)o[s]=r,r.isBuf||(c=!1),r=r.next,s+=1;o.allBuffers=c,k(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,d=r.callback;if(k(e,t,!1,t.objectMode?1:u.length,u,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function T(e,t){e._final((function(r){t.pendingcb--,r&&A(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var r=I(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!==typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(T,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(61596)(S,a),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===S&&(e&&e._writableState instanceof E)}})):u=function(e){return e instanceof this},S.prototype.pipe=function(){A(this,new m)},S.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,a=!i.objectMode&&(n=e,s.isBuffer(n)||n instanceof c);return a&&!s.isBuffer(e)&&(e=function(e){return s.from(e)}(e)),"function"===typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!==typeof r&&(r=_),i.ending?function(e,t){var r=new b;A(e,r),process.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i;return null===r?i=new v:"string"===typeof r||t.objectMode||(i=new h("chunk",["string","Buffer"],r)),!i||(A(e,i),process.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=s.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var c=t.objectMode?1:n.length;t.length+=c;var u=t.length-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,r){r(new p("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,r){var n=this._writableState;return"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=l.destroy,S.prototype._undestroy=l.undestroy,S.prototype._destroy=function(e,t){t(e)}},79733:(e,t,r)=>{"use strict";var n;function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(38172),a=Symbol("lastResolve"),s=Symbol("lastReject"),c=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),d=Symbol("handlePromise"),f=Symbol("stream");function h(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var r=e[f].read();null!==r&&(e[l]=null,e[a]=null,e[s]=null,t(h(r,!1)))}}function g(e){process.nextTick(p,e)}var m=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[c]?r(e[c]):t(h(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[u]?r(h(void 0,!0)):t[d](r,n)}),n)}}(n,this));else{var i=this[f].read();if(null!==i)return Promise.resolve(h(i,!1));r=new Promise(this[d])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[f].destroy(null,(function(e){e?r(e):t(h(void 0,!0))}))}))})),n),m);e.exports=function(e){var t,r=Object.create(y,(i(t={},f,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,d,{value:function(e,t){var n=r[f].read();n?(r[l]=null,r[a]=null,r[s]=null,e(h(n,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[l]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[l]=null,r[a]=null,r[s]=null,t(e)),void(r[c]=e)}var n=r[a];null!==n&&(r[l]=null,r[a]=null,r[s]=null,n(h(void 0,!0))),r[u]=!0})),e.on("readable",g.bind(null,r)),r}},94147:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t,r,n,i=c.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,c.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=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,t}},{key:l,value:function(e,t){return u(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},34822:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(r,o),i(e)):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(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},38172:(e,t,r)=>{"use strict";var n=r(97614).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"===typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},43648:(e,t,r)=>{"use strict";var n;var i=r(97614).F,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function c(e){e()}function u(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i0,(function(e){l||(l=e),e&&f.forEach(c),o||(f.forEach(c),d(l))}))}));return t.reduce(u)}},2809:(e,t,r)=>{"use strict";var n=r(97614).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,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 e.objectMode?16:16384}}},44687:(e,t,r)=>{e.exports=r(28981).EventEmitter},44833:(e,t,r)=>{(t=e.exports=r(93230)).Stream=t,t.Readable=t,t.Writable=r(34306),t.Duplex=r(47544),t.Transform=r(15624),t.PassThrough=r(32666),t.finished=r(38172),t.pipeline=r(43648)},73121:(e,t,r)=>{"use strict";e.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,e.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,e.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(e.exports,r(9950))},29453:(e,t,r)=>{"use strict";var n=r(93325).Buffer,i=r(61596),o=r(11207),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],c=[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],u=[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],l=[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],d=[0,1518500249,1859775393,2400959708,2840853838],f=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function g(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,A=0|this._b,_=0|this._c,E=0|this._d,S=0|this._e,k=0;k<80;k+=1){var x,C;k<16?(x=g(r,n,i,o,h,e[s[k]],d[0],u[k]),C=b(w,A,_,E,S,e[c[k]],f[0],l[k])):k<32?(x=m(r,n,i,o,h,e[s[k]],d[1],u[k]),C=v(w,A,_,E,S,e[c[k]],f[1],l[k])):k<48?(x=y(r,n,i,o,h,e[s[k]],d[2],u[k]),C=y(w,A,_,E,S,e[c[k]],f[2],l[k])):k<64?(x=v(r,n,i,o,h,e[s[k]],d[3],u[k]),C=m(w,A,_,E,S,e[c[k]],f[3],l[k])):(x=b(r,n,i,o,h,e[s[k]],d[4],u[k]),C=g(w,A,_,E,S,e[c[k]],f[4],l[k])),r=h,h=o,o=p(i,10),i=n,n=x,w=S,S=E,E=p(_,10),_=A,A=C}var I=this._b+i+E|0;this._b=this._c+o+S|0,this._c=this._d+h+w|0,this._d=this._e+r+A|0,this._e=this._a+n+_|0,this._a=I},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},16047:(e,t,r)=>{var n=r(93325),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},31761:(e,t)=>{"use strict";function r(e,t){var r=e.length;e.push(t);e:for(;0>>1,i=e[n];if(!(0>>1;no(c,r))uo(l,c)?(e[n]=l,e[u]=r,n=u):(e[n]=c,e[s]=r,n=s);else{if(!(uo(l,r)))break e;e[n]=l,e[u]=r,n=u}}}return t}function o(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}var u=[],l=[],d=1,f=null,h=3,p=!1,g=!1,m=!1,y="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=n(l);null!==t;){if(null===t.callback)i(l);else{if(!(t.startTime<=e))break;i(l),t.sortIndex=t.expirationTime,r(u,t)}t=n(l)}}function A(e){if(m=!1,w(e),!g)if(null!==n(u))g=!0,R(_);else{var t=n(l);null!==t&&N(A,t.startTime-e)}}function _(e,r){g=!1,m&&(m=!1,v(x),x=-1),p=!0;var o=h;try{for(w(r),f=n(u);null!==f&&(!(f.expirationTime>r)||e&&!T());){var a=f.callback;if("function"===typeof a){f.callback=null,h=f.priorityLevel;var s=a(f.expirationTime<=r);r=t.unstable_now(),"function"===typeof s?f.callback=s:f===n(u)&&i(u),w(r)}else i(u);f=n(u)}if(null!==f)var c=!0;else{var d=n(l);null!==d&&N(A,d.startTime-r),c=!1}return c}finally{f=null,h=o,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,k=null,x=-1,C=5,I=-1;function T(){return!(t.unstable_now()-Ie||125a?(e.sortIndex=o,r(l,e),null===n(u)&&e===n(l)&&(m?(v(x),x=-1):m=!0,N(A,o-a))):(e.sortIndex=s,r(u,e),g||p||(g=!0,R(_))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=h;return function(){var r=h;h=t;try{return e.apply(this,arguments)}finally{h=r}}}},75340:(e,t,r)=>{"use strict";e.exports=r(31761)},27825:e=>{"use strict";var t={decodeValues:!0,map:!1,silent:!1};function r(e){return"string"===typeof e&&!!e.trim()}function n(e,n){var i=e.split(";").filter(r),o=function(e){var t="",r="",n=e.split("=");n.length>1?(t=n.shift(),r=n.join("=")):r=e;return{name:t,value:r}}(i.shift()),a=o.name,s=o.value;n=n?Object.assign({},t,n):t;try{s=n.decodeValues?decodeURIComponent(s):s}catch(u){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+s+"'. Set options.decodeValues to false to disable this feature.",u)}var c={name:a,value:s};return i.forEach((function(e){var t=e.split("="),r=t.shift().trimLeft().toLowerCase(),n=t.join("=");"expires"===r?c.expires=new Date(n):"max-age"===r?c.maxAge=parseInt(n,10):"secure"===r?c.secure=!0:"httponly"===r?c.httpOnly=!0:"samesite"===r?c.sameSite=n:"partitioned"===r?c.partitioned=!0:c[r]=n})),c}function i(e,i){if(i=i?Object.assign({},t,i):t,!e)return i.map?{}:[];if(e.headers)if("function"===typeof e.headers.getSetCookie)e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var o=e.headers[Object.keys(e.headers).find((function(e){return"set-cookie"===e.toLowerCase()}))];o||!e.headers.cookie||i.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=o}if(Array.isArray(e)||(e=[e]),(i=i?Object.assign({},t,i):t).map){return e.filter(r).reduce((function(e,t){var r=n(t,i);return e[r.name]=r,e}),{})}return e.filter(r).map((function(e){return n(e,i)}))}e.exports=i,e.exports.parse=i,e.exports.parseString=n,e.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!==typeof e)return[];var t,r,n,i,o,a=[],s=0;function c(){for(;s=e.length)&&a.push(e.substring(t,e.length))}return a}},38259:(e,t,r)=>{"use strict";var n=r(37375),i=r(29411),o=r(47734)(),a=r(46934),s=r(37277),c=n("%Math.floor%");e.exports=function(e,t){if("function"!==typeof e)throw new s("`fn` is not a function");if("number"!==typeof t||t<0||t>4294967295||c(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(u=!1)}return(n||u||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},10330:(e,t,r)=>{var n=r(16047).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"===typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=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 e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},88e3:(e,t,r)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(94662),n.sha1=r(25899),n.sha224=r(52824),n.sha256=r(32541),n.sha384=r(85545),n.sha512=r(90920)},94662:(e,t,r)=>{var n=r(61596),i=r(10330),o=r(16047).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=r[d-3]^r[d-8]^r[d-14]^r[d-16];for(var f=0;f<80;++f){var h=~~(f/20),p=0|((t=n)<<5|t>>>27)+l(h,i,o,s)+c+r[f]+a[h];c=s,s=o,o=u(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=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},25899:(e,t,r)=>{var n=r(61596),i=r(10330),o=r(16047).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function d(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=(t=r[f-3]^r[f-8]^r[f-14]^r[f-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),g=u(n)+d(p,i,o,s)+c+r[h]+a[p]|0;c=s,s=o,o=l(i),i=n,n=g}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=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},52824:(e,t,r)=>{var n=r(61596),i=r(32541),o=r(10330),a=r(16047).Buffer,s=new Array(64);function c(){this.init(),this._w=s,o.call(this,64,56)}n(c,i),c.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},c.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c},32541:(e,t,r)=>{var n=r(61596),i=r(10330),o=r(16047).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 c(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function f(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(c,i),c.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},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,p=0|this._f,g=0|this._g,m=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+h(r[y-15])+r[y-16];for(var v=0;v<64;++v){var b=m+f(c)+u(c,p,g)+a[v]+r[v]|0,w=d(n)+l(n,i,o)|0;m=g,g=p,p=c,c=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=c+this._e|0,this._f=p+this._f|0,this._g=g+this._g|0,this._h=m+this._h|0},c.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},85545:(e,t,r)=>{var n=r(61596),i=r(90920),o=r(10330),a=r(16047).Buffer,s=new Array(160);function c(){this.init(),this._w=s,o.call(this,128,112)}n(c,i),c.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},c.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},90920:(e,t,r)=>{var n=r(61596),i=r(10330),o=r(16047).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 c(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function f(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0>>0?1:0}n(c,i),c.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},c.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,c=0|this._fh,v=0|this._gh,b=0|this._hh,w=0|this._al,A=0|this._bl,_=0|this._cl,E=0|this._dl,S=0|this._el,k=0|this._fl,x=0|this._gl,C=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var T=t[I-30],O=t[I-30+1],P=h(T,O),M=p(O,T),R=g(T=t[I-4],O=t[I-4+1]),N=m(O,T),L=t[I-14],B=t[I-14+1],D=t[I-32],U=t[I-32+1],j=M+B|0,F=P+L+y(j,M)|0;F=(F=F+R+y(j=j+N|0,N)|0)+D+y(j=j+U|0,U)|0,t[I]=F,t[I+1]=j}for(var z=0;z<160;z+=2){F=t[z],j=t[z+1];var q=l(r,n,i),H=l(w,A,_),V=d(r,w),$=d(w,r),K=f(s,S),W=f(S,s),G=a[z],Q=a[z+1],Y=u(s,c,v),Z=u(S,k,x),J=C+W|0,X=b+K+y(J,C)|0;X=(X=(X=X+Y+y(J=J+Z|0,Z)|0)+G+y(J=J+Q|0,Q)|0)+F+y(J=J+j|0,j)|0;var ee=$+H|0,te=V+q+y(ee,$)|0;b=v,C=x,v=c,x=k,c=s,k=S,s=o+X+y(S=E+J|0,E)|0,o=i,E=_,i=n,_=A,n=r,A=w,r=X+te+y(w=J+ee|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+A|0,this._cl=this._cl+_|0,this._dl=this._dl+E|0,this._el=this._el+S|0,this._fl=this._fl+k|0,this._gl=this._gl+x|0,this._hl=this._hl+C|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+n+y(this._bl,A)|0,this._ch=this._ch+i+y(this._cl,_)|0,this._dh=this._dh+o+y(this._dl,E)|0,this._eh=this._eh+s+y(this._el,S)|0,this._fh=this._fh+c+y(this._fl,k)|0,this._gh=this._gh+v+y(this._gl,x)|0,this._hh=this._hh+b+y(this._hl,C)|0},c.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},52959:(e,t,r)=>{"use strict";t.KN=void 0;var n,i=r(93325),o=(n=r(8615))&&n.__esModule?n:{default:n};var a=function(e){var t=e.allowedSizes,r=e.defaultSize,n=e.padding;return function e(){var a=this,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;if(!this||this.constructor!==e)return new e(s);if(t&&!t.includes(s))throw new Error("Unsupported hash length");var c=new o.default({capacity:s});return this.update=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";if(i.Buffer.isBuffer(e))return c.absorb(e),a;if("string"===typeof e)return a.update(i.Buffer.from(e,t));throw new TypeError("Not a string or buffer")},this.digest=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"binary",t="string"===typeof e?{format:e}:e,r=c.squeeze({buffer:t.buffer,padding:t.padding||n});return t.format&&"binary"!==t.format?r.toString(t.format):r},this.reset=function(){return c.reset(),a},this}},s=a({allowedSizes:[224,256,384,512],defaultSize:512,padding:1});var c=a({allowedSizes:[224,256,384,512],defaultSize:512,padding:6});t.KN=c,a({allowedSizes:[128,256],defaultSize:256,padding:31});var u=s;c.SHA3Hash=u},8615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=r(93325),o=(n=r(84582))&&n.__esModule?n:{default:n};var a=function(e,t){for(var r=0;r>>8,t[r+2]=e[n+1]>>>16,t[r+3]=e[n+1]>>>24,t[r+4]=e[n],t[r+5]=e[n]>>>8,t[r+6]=e[n]>>>16,t[r+7]=e[n]>>>24}return t},c=function(e){var t=this,r=e.capacity,n=e.padding,c=(0,o.default)(),u=r/8,l=200-r/4,d=0,f=new Uint32Array(50),h=i.Buffer.allocUnsafe(l);return this.absorb=function(e){for(var r=0;r=l&&(a(h,f),c(f),d=0);return t},this.squeeze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={buffer:e.buffer||i.Buffer.allocUnsafe(u),padding:e.padding||n,queue:i.Buffer.allocUnsafe(h.length),state:new Uint32Array(f.length)};h.copy(t.queue);for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(60602))&&n.__esModule?n:{default:n};var o=function(e){for(var t=e.A,r=e.C,n=0;n<25;n+=5){for(var o=0;o<5;o++)(0,i.default)(t,n+o)(r,o);for(var a=0;a<5;a++){var s=2*(n+a),c=(a+1)%5*2,u=(a+2)%5*2;t[s]^=~r[c]&r[u],t[s+1]^=~r[c+1]&r[u+1]}}};t.default=o},60602:e=>{"use strict";e.exports=function(e,t){return function(r,n){var i=2*n,o=2*t;r[i]=e[o],r[i+1]=e[o+1]}}},84582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(r(24403)),i=s(r(22736)),o=s(r(40370)),a=s(r(75241));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(){var e=new Uint32Array(10),t=new Uint32Array(10),r=new Uint32Array(2);return function(s){for(var c=0;c<24;c++)(0,a.default)({A:s,C:e,D:t,W:r}),(0,o.default)({A:s,C:e,W:r}),(0,n.default)({A:s,C:e}),(0,i.default)({A:s,roundIndex:c});e.fill(0),t.fill(0),r.fill(0)}};t.default=c},22736:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(30311))&&n.__esModule?n:{default:n};var o=function(e){var t=e.A,r=2*e.roundIndex;t[0]^=i.default[r],t[1]^=i.default[r+1]};t.default=o},30311:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=new Uint32Array([0,1,0,32898,2147483648,32906,2147483648,2147516416,0,32907,0,2147483649,2147483648,2147516545,2147483648,32777,0,138,0,136,0,2147516425,0,2147483658,0,2147516555,2147483648,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,0,32778,2147483648,2147483658,2147483648,2147516545,2147483648,32896,0,2147483649,2147483648,2147516424]);t.default=r},40370:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(51441)),i=a(r(94727)),o=a(r(60602));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var t=e.A,r=e.C,a=e.W;(0,o.default)(t,1)(a,0);for(var s=0,c=0,u=0,l=32,d=0;d<24;d++){var f=n.default[d],h=i.default[d];(0,o.default)(t,f)(r,0),s=a[0],c=a[1],l=32-h,a[u=h<32?0:1]=s<>>l,a[(u+1)%2]=c<>>l,(0,o.default)(a,0)(t,f),(0,o.default)(r,0)(a,0)}};t.default=s},51441:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=[10,7,11,17,18,3,5,16,8,21,24,4,15,23,19,13,12,2,20,14,22,9,6,1];t.default=r},94727:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=[1,3,6,10,15,21,28,36,45,55,2,14,27,41,56,8,25,43,62,18,39,61,20,44];t.default=r},75241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(60602))&&n.__esModule?n:{default:n};var o=function(e){for(var t=e.A,r=e.C,n=e.D,o=e.W,a=0,s=0,c=0;c<5;c++){var u=2*c,l=2*(c+5),d=2*(c+10),f=2*(c+15),h=2*(c+20);r[u]=t[u]^t[l]^t[d]^t[f]^t[h],r[u+1]=t[u+1]^t[l+1]^t[d+1]^t[f+1]^t[h+1]}for(var p=0;p<5;p++){(0,i.default)(r,(p+1)%5)(o,0),a=o[0],s=o[1],o[0]=a<<1|s>>>31,o[1]=s<<1|a>>>31,n[2*p]=r[(p+4)%5*2]^o[0],n[2*p+1]=r[(p+4)%5*2+1]^o[1];for(var g=0;g<25;g+=5)t[2*(g+p)]^=n[2*p],t[2*(g+p)+1]^=n[2*p+1]}};t.default=o},40403:e=>{e.exports=function(e,t,r,n){var i=r?r.call(n,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c{"use strict";var n=r(45546),i=Array.prototype.concat,o=Array.prototype.slice,a=e.exports=function(e){for(var t=[],r=0,a=e.length;r{e.exports=function(e){return!(!e||"string"===typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},83942:e=>{"use strict";e.exports=(e,t)=>{if("string"!==typeof e||"string"!==typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},84451:(e,t,r)=>{var n=r(61053);function i(){n.call(this)}i.prototype=new n,e.exports=i,i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,"function"===typeof e.destroy&&e.destroy())}function c(e){if(u(),!this.hasListeners("error"))throw e}function u(){r.off("data",n),e.off("drain",i),r.off("end",a),r.off("close",s),r.off("error",c),e.off("error",c),r.off("end",u),r.off("close",u),e.off("end",u),e.off("close",u)}return r.on("error",c),e.on("error",c),r.on("end",u),r.on("close",u),e.on("end",u),e.on("close",u),e.emit("pipe",r),e}},76102:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},50923:(e,t,r)=>{"use strict";var n=r(16047).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},19335:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ServerStyleSheet:()=>ze,StyleSheetConsumer:()=>oe,StyleSheetContext:()=>ie,StyleSheetManager:()=>de,ThemeConsumer:()=>Re,ThemeContext:()=>Me,ThemeProvider:()=>Ne,__PRIVATE__:()=>Ve,createGlobalStyle:()=>je,css:()=>Ae,default:()=>$e,isStyledComponent:()=>A,keyframes:()=>Fe,useTheme:()=>He,version:()=>E,withTheme:()=>qe});var n=r(26429),i=r(9950),o=r(40403),a=r.n(o);const s=function(e){function t(e,n,c,u,f){for(var h,p,g,m,w,_=0,E=0,S=0,k=0,x=0,M=0,N=g=h=0,B=0,D=0,U=0,j=0,F=c.length,z=F-1,q="",H="",V="",$="";Bh)&&(j=(q=q.replace(" ",":")).length),0n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*r&&0c.charCodeAt(8))break;case 115:a=a.replace(c,"-webkit-"+c)+";"+a;break;case 207:case 102:a=a.replace(c,"-webkit-"+(102n.charCodeAt(0)&&(n=n.trim()),n=[n],01?t-1:0),n=1;n0?" Args: "+r.join(", "):""))}var I=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;e>=i;)(i<<=1)<0&&C(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=n;o=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),i=n+r,o=n;o=P&&(P=t+1),T.set(e,t),O.set(t,e)},L="style["+_+'][data-styled-version="5.3.11"]',B=new RegExp("^"+_+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),D=function(e,t,r){for(var n,i=r.split(","),o=0,a=i.length;o=0;r--){var n=t[r];if(n&&1===n.nodeType&&n.hasAttribute(_))return n}}(r),o=void 0!==i?i.nextSibling:null;n.setAttribute(_,"active"),n.setAttribute("data-styled-version","5.3.11");var a=j();return a&&n.setAttribute("nonce",a),r.insertBefore(n,o),n},z=function(){function e(e){var t=this.element=F(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r=0){var r=document.createTextNode(t),n=this.nodes[e];return this.element.insertBefore(r,n||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(u+=e+",")})),n+=""+s+c+'{content:"'+u+'"}/*!sc*/\n'}}}return n}(this)},e}(),W=/(a)(d)/gi,G=function(e){return String.fromCharCode(e+(e>25?39:97))};function Q(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=G(t%52)+r;return(G(t%52)+r).replace(W,"$1-$2")}var Y=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Z=function(e){return Y(5381,e)};function J(e){for(var t=0;t>>0);if(!t.hasNameForId(n,a)){var s=r(o,"."+a,void 0,n);t.insertRules(n,a,s)}i.push(a),this.staticRulesId=a}else{for(var c=this.rules.length,u=Y(this.baseHash,r.hash),l="",d=0;d>>0);if(!t.hasNameForId(n,g)){var m=r(l,"."+g,void 0,n);t.insertRules(n,g,m)}i.push(g)}}return i.join(" ")},e}(),te=/^\s*\/\/.*$/gm,re=[":","[",".","#"];function ne(e){var t,r,n,i,o=void 0===e?v:e,a=o.options,c=void 0===a?v:a,u=o.plugins,l=void 0===u?y:u,d=new s(c),f=[],h=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(r,n,i,o,a,s,c,u,l,d){switch(r){case 1:if(0===l&&64===n.charCodeAt(0))return e(n+";"),"";break;case 2:if(0===u)return n+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(i[0]+n),"";default:return n+(0===d?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),p=function(e,n,o){return 0===n&&-1!==re.indexOf(o[r.length])||o.match(i)?e:"."+t};function g(e,o,a,s){void 0===s&&(s="&");var c=e.replace(te,""),u=o&&a?a+" "+o+" { "+c+" }":c;return t=s,r=o,n=new RegExp("\\"+r+"\\b","g"),i=new RegExp("(\\"+r+"\\b){2,}"),d(a||!o?"":o,u)}return d.use([].concat(l,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(r)>0&&(i[0]=i[0].replace(n,p))},h,function(e){if(-2===e){var t=f;return f=[],t}}])),g.hash=l.length?l.reduce((function(e,t){return t.name||C(15),Y(e,t.name)}),5381).toString():"",g}var ie=i.createContext(),oe=ie.Consumer,ae=i.createContext(),se=(ae.Consumer,new K),ce=ne();function ue(){return(0,i.useContext)(ie)||se}function le(){return(0,i.useContext)(ae)||ce}function de(e){var t=(0,i.useState)(e.stylisPlugins),r=t[0],n=t[1],o=ue(),s=(0,i.useMemo)((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),c=(0,i.useMemo)((function(){return ne({options:{prefix:!e.disableVendorPrefixes},plugins:r})}),[e.disableVendorPrefixes,r]);return(0,i.useEffect)((function(){a()(r,e.stylisPlugins)||n(e.stylisPlugins)}),[e.stylisPlugins]),i.createElement(ie.Provider,{value:s},i.createElement(ae.Provider,{value:c},e.children))}var fe=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=ce);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){return C(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=ce),this.name+e.hash},e}(),he=/([A-Z])/,pe=/([A-Z])/g,ge=/^ms-/,me=function(e){return"-"+e.toLowerCase()};function ye(e){return he.test(e)?e.replace(pe,me).replace(ge,"-ms-"):e}var ve=function(e){return null==e||!1===e||""===e};function be(e,t,r,n){if(Array.isArray(e)){for(var i,o=[],a=0,s=e.length;a1?t-1:0),n=1;n?@[\\\]^`{|}~-]+/g,Se=/(^-|-$)/g;function ke(e){return e.replace(Ee,"-").replace(Se,"")}var xe=function(e){return Q(Z(e)>>>0)};function Ce(e){return"string"==typeof e&&!0}var Ie=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Te=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Oe(e,t,r){var n=e[r];Ie(t)&&Ie(n)?Pe(n,t):e[r]=t}function Pe(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0||(i[r]=e[r]);return i}(t,["componentId"]),o=n&&n+"-"+(Ce(e)?e:ke(w(e)));return Be(e,p({},i,{attrs:m,componentId:o}),r)},Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=n?Pe({},e.defaultProps,t):t}}),Object.defineProperty(E,"toString",{value:function(){return"."+E.styledComponentId}}),o&&h()(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),E}var De=function(e){return function e(t,r,i){if(void 0===i&&(i=v),!(0,n.isValidElementType)(r))return C(1,String(r));var o=function(){return t(r,i,Ae.apply(void 0,arguments))};return o.withConfig=function(n){return e(t,r,p({},i,{},n))},o.attrs=function(n){return e(t,r,p({},i,{attrs:Array.prototype.concat(i.attrs,n).filter(Boolean)}))},o}(Be,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){De[e]=De(e)}));var Ue=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=J(e),K.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,r,n){var i=n(be(this.rules,t,r,n).join(""),""),o=this.componentId+e;r.insertRules(o,o,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,r,n){e>2&&K.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)},e}();function je(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n"+t+""},this.getStyleTags=function(){return e.sealed?C(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return C(2);var r=((t={})[_]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),n=j();return n&&(r.nonce=n),[i.createElement("style",p({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new K({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?C(2):i.createElement(de,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return C(3)},e}(),qe=function(e){var t=i.forwardRef((function(t,r){var n=(0,i.useContext)(Me),o=e.defaultProps,a=_e(t,n,o);return i.createElement(e,p({},t,{theme:a,ref:r}))}));return h()(t,e),t.displayName="WithTheme("+w(e)+")",t},He=function(){return(0,i.useContext)(Me)},Ve={StyleSheet:K,masterSheet:se};const $e=De},50311:(e,t,r)=>{"use strict";t.S8=void 0;var n=r(19335),i=(0,n.css)(['html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0;}main{display:block;}h1{font-size:2em;margin:0.67em 0;}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace,monospace;font-size:1em;}a{background-color:transparent;}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder;}code,kbd,samp{font-family:monospace,monospace;font-size:1em;}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sub{bottom:-0.25em;}sup{top:-0.5em;}img{border-style:none;}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible;}button,select{text-transform:none;}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button;}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0;}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText;}fieldset{padding:0.35em 0.75em 0.625em;}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline;}textarea{overflow:auto;}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto;}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block;}summary{display:list-item;}template{display:none;}[hidden]{display:none;}']);t.S8=i;var o=(0,n.createGlobalStyle)(i);o.displayName="Normalize"},98011:(e,t,r)=>{"use strict";r.r(t),r.d(t,{alignContent:()=>Ce,alignItems:()=>xe,alignSelf:()=>De,background:()=>M,backgroundImage:()=>ot,backgroundPosition:()=>st,backgroundRepeat:()=>ct,backgroundSize:()=>at,border:()=>T,borderBottom:()=>rt,borderColor:()=>Xe,borderLeft:()=>nt,borderRadius:()=>it,borderRight:()=>tt,borderStyle:()=>Je,borderTop:()=>et,borderWidth:()=>Ze,borders:()=>O,bottom:()=>ft,boxShadow:()=>$,buttonStyle:()=>ne,color:()=>b,colorStyle:()=>oe,compose:()=>g,createParser:()=>l,createStyleFunction:()=>h,display:()=>pe,flex:()=>Me,flexBasis:()=>Le,flexDirection:()=>Pe,flexGrow:()=>Re,flexShrink:()=>Ne,flexWrap:()=>Oe,flexbox:()=>E,fontFamily:()=>we,fontSize:()=>be,fontStyle:()=>Se,fontWeight:()=>Ae,get:()=>u,grid:()=>x,gridArea:()=>Ye,gridAutoColumns:()=>$e,gridAutoFlow:()=>Ve,gridAutoRows:()=>Ke,gridColumn:()=>qe,gridColumnGap:()=>Fe,gridGap:()=>je,gridRow:()=>He,gridRowGap:()=>ze,gridTemplateAreas:()=>Qe,gridTemplateColumns:()=>We,gridTemplateRows:()=>Ge,height:()=>se,justifyContent:()=>Te,justifyItems:()=>Ie,justifySelf:()=>Be,layout:()=>m,left:()=>ht,letterSpacing:()=>ke,lineHeight:()=>_e,margin:()=>z,maxHeight:()=>de,maxWidth:()=>le,minHeight:()=>ue,minWidth:()=>ce,opacity:()=>ve,order:()=>Ue,overflow:()=>ge,overflowX:()=>me,overflowY:()=>ye,padding:()=>q,position:()=>L,right:()=>dt,shadow:()=>V,size:()=>fe,space:()=>H,style:()=>pt,system:()=>p,textAlign:()=>Ee,textShadow:()=>$,textStyle:()=>ie,top:()=>lt,typography:()=>A,variant:()=>re,verticalAlign:()=>he,width:()=>ae,zIndex:()=>ut});var n=r(26470),i=r.n(n),o=function(e,t){var r=i()({},e,t);for(var n in e){var o;e[n]&&"object"===typeof t[n]&&i()(r,((o={})[n]=i()(e[n],t[n]),o))}return r},a={breakpoints:[40,52,64].map((function(e){return e+"em"}))},s=function(e){return"@media screen and (min-width: "+e+")"},c=function(e,t){return u(t,e,e)},u=function(e,t,r,n,i){for(t=t&&t.split?t.split("."):[t],n=0;n1&&c.forEach((function(r){var i;n[r]=e(((i={})[r]=t[r],i))})),n},d=function(e,t,r,n,o){var a={};return n.slice(0,e.length).forEach((function(n,s){var c,u=e[s],l=t(n,r,o);u?i()(a,((c={})[u]=i()({},a[u],l),c)):i()(a,l)})),a},f=function(e,t,r,n,o){var a={};for(var c in n){var u=e[c],l=t(n[c],r,o);if(u){var d,f=s(u);i()(a,((d={})[f]=i()({},a[f],l),d))}else i()(a,l)}return a},h=function(e){var t=e.properties,r=e.property,n=e.scale,i=e.transform,o=void 0===i?c:i,a=e.defaultScale;t=t||[r];var s=function(e,r,n){var i={},a=o(e,r,n);if(null!==a)return t.forEach((function(e){i[e]=a})),i};return s.scale=n,s.defaults=a,s},p=function(e){void 0===e&&(e={});var t={};return Object.keys(e).forEach((function(r){var n=e[r];t[r]=!0!==n?"function"!==typeof n?h(n):n:h({property:r,scale:r})})),l(t)},g=function(){for(var e={},t=arguments.length,r=new Array(t),n=0;n1?e:100*e+"%")}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0});const y=m;var v={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},opacity:!0};v.bg=v.backgroundColor;var b=p(v);const w=b;var A=p({fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes",defaultScale:[12,14,16,20,24,32,48,64,72]},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0});const _=A;var E=p({alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0,flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0});const S=E;var k={space:[0,4,8,16,32,64,128,256,512]},x=p({gridGap:{property:"gridGap",scale:"space",defaultScale:k.space},gridColumnGap:{property:"gridColumnGap",scale:"space",defaultScale:k.space},gridRowGap:{property:"gridRowGap",scale:"space",defaultScale:k.space},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0});const C=x;var I={border:{property:"border",scale:"borders"},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders"},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders"},borderBottom:{property:"borderBottom",scale:"borders"},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders"},borderX:{properties:["borderLeft","borderRight"],scale:"borders"},borderY:{properties:["borderTop","borderBottom"],scale:"borders"},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"}};I.borderTopLeftRadius={property:"borderTopLeftRadius",scale:"radii"},I.borderTopRightRadius={property:"borderTopRightRadius",scale:"radii"},I.borderBottomWidth={property:"borderBottomWidth",scale:"borderWidths"},I.borderBottomColor={property:"borderBottomColor",scale:"colors"},I.borderBottomStyle={property:"borderBottomStyle",scale:"borderStyles"},I.borderBottomLeftRadius={property:"borderBottomLeftRadius",scale:"radii"},I.borderBottomRightRadius={property:"borderBottomRightRadius",scale:"radii"},I.borderLeftWidth={property:"borderLeftWidth",scale:"borderWidths"},I.borderLeftColor={property:"borderLeftColor",scale:"colors"},I.borderLeftStyle={property:"borderLeftStyle",scale:"borderStyles"},I.borderRightWidth={property:"borderRightWidth",scale:"borderWidths"},I.borderRightColor={property:"borderRightColor",scale:"colors"},I.borderRightStyle={property:"borderRightStyle",scale:"borderStyles"};var T=p(I);const O=T;var P={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};P.bgImage=P.backgroundImage,P.bgSize=P.backgroundSize,P.bgPosition=P.backgroundPosition,P.bgRepeat=P.backgroundRepeat;var M=p(P);const R=M;var N={space:[0,4,8,16,32,64,128,256,512]},L=p({position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",defaultScale:N.space},right:{property:"right",scale:"space",defaultScale:N.space},bottom:{property:"bottom",scale:"space",defaultScale:N.space},left:{property:"left",scale:"space",defaultScale:N.space}});const B=L;var D={space:[0,4,8,16,32,64,128,256,512]},U=function(e){return"number"===typeof e&&!isNaN(e)},j=function(e,t){if(!U(e))return u(t,e,e);var r=e<0,n=Math.abs(e),i=u(t,n,n);return U(i)?i*(r?-1:1):r?"-"+i:i},F={};F.margin={margin:{property:"margin",scale:"space",transform:j,defaultScale:D.space},marginTop:{property:"marginTop",scale:"space",transform:j,defaultScale:D.space},marginRight:{property:"marginRight",scale:"space",transform:j,defaultScale:D.space},marginBottom:{property:"marginBottom",scale:"space",transform:j,defaultScale:D.space},marginLeft:{property:"marginLeft",scale:"space",transform:j,defaultScale:D.space},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:j,defaultScale:D.space},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:j,defaultScale:D.space}},F.margin.m=F.margin.margin,F.margin.mt=F.margin.marginTop,F.margin.mr=F.margin.marginRight,F.margin.mb=F.margin.marginBottom,F.margin.ml=F.margin.marginLeft,F.margin.mx=F.margin.marginX,F.margin.my=F.margin.marginY,F.padding={padding:{property:"padding",scale:"space",defaultScale:D.space},paddingTop:{property:"paddingTop",scale:"space",defaultScale:D.space},paddingRight:{property:"paddingRight",scale:"space",defaultScale:D.space},paddingBottom:{property:"paddingBottom",scale:"space",defaultScale:D.space},paddingLeft:{property:"paddingLeft",scale:"space",defaultScale:D.space},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",defaultScale:D.space},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",defaultScale:D.space}},F.padding.p=F.padding.padding,F.padding.pt=F.padding.paddingTop,F.padding.pr=F.padding.paddingRight,F.padding.pb=F.padding.paddingBottom,F.padding.pl=F.padding.paddingLeft,F.padding.px=F.padding.paddingX,F.padding.py=F.padding.paddingY;var z=p(F.margin),q=p(F.padding),H=g(z,q);var V=p({boxShadow:{property:"boxShadow",scale:"shadows"},textShadow:{property:"textShadow",scale:"shadows"}});const $=V;function K(){return K=Object.assign||function(e){for(var t=1;t=0)return W(e,t,t);var r=Math.abs(t),n=W(e,r,r);return"string"===typeof n?"-"+n:-1*n},ee=["margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","top","bottom","left","right"].reduce((function(e,t){var r;return K({},e,((r={})[t]=X,r))}),{});const te=function e(t){return function(r){void 0===r&&(r={});var n=K({},Q,{},r.theme||r),i={},o=function(e){return function(t){var r={},n=W(t,"breakpoints",G),i=[null].concat(n.map((function(e){return"@media screen and (min-width: "+e+")"})));for(var o in e){var a="function"===typeof e[o]?e[o](t):e[o];if(null!=a)if(Array.isArray(a))for(var s=0;s{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function g(e,t,r,n,i){var o,a=0;for(o=0;o>>8)-1}function m(e,t,r,n){return g(e,t,r,n,16)}function y(e,t,r,n){return g(e,t,r,n,32)}function v(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,A=o,_=a,E=s,S=c,k=u,x=l,C=d,I=f,T=h,O=p,P=g,M=m,R=y,N=v,L=b,B=w,D=0;D<20;D+=2)A^=(i=(R^=(i=(T^=(i=(k^=(i=A+R|0)<<7|i>>>25)+A|0)<<9|i>>>23)+k|0)<<13|i>>>19)+T|0)<<18|i>>>14,x^=(i=(_^=(i=(N^=(i=(O^=(i=x+_|0)<<7|i>>>25)+x|0)<<9|i>>>23)+O|0)<<13|i>>>19)+N|0)<<18|i>>>14,P^=(i=(C^=(i=(E^=(i=(L^=(i=P+C|0)<<7|i>>>25)+P|0)<<9|i>>>23)+L|0)<<13|i>>>19)+E|0)<<18|i>>>14,B^=(i=(M^=(i=(I^=(i=(S^=(i=B+M|0)<<7|i>>>25)+B|0)<<9|i>>>23)+S|0)<<13|i>>>19)+I|0)<<18|i>>>14,A^=(i=(S^=(i=(E^=(i=(_^=(i=A+S|0)<<7|i>>>25)+A|0)<<9|i>>>23)+_|0)<<13|i>>>19)+E|0)<<18|i>>>14,x^=(i=(k^=(i=(I^=(i=(C^=(i=x+k|0)<<7|i>>>25)+x|0)<<9|i>>>23)+C|0)<<13|i>>>19)+I|0)<<18|i>>>14,P^=(i=(O^=(i=(T^=(i=(M^=(i=P+O|0)<<7|i>>>25)+P|0)<<9|i>>>23)+M|0)<<13|i>>>19)+T|0)<<18|i>>>14,B^=(i=(L^=(i=(N^=(i=(R^=(i=B+L|0)<<7|i>>>25)+B|0)<<9|i>>>23)+R|0)<<13|i>>>19)+N|0)<<18|i>>>14;A=A+o|0,_=_+a|0,E=E+s|0,S=S+c|0,k=k+u|0,x=x+l|0,C=C+d|0,I=I+f|0,T=T+h|0,O=O+p|0,P=P+g|0,M=M+m|0,R=R+y|0,N=N+v|0,L=L+b|0,B=B+w|0,e[0]=A>>>0&255,e[1]=A>>>8&255,e[2]=A>>>16&255,e[3]=A>>>24&255,e[4]=_>>>0&255,e[5]=_>>>8&255,e[6]=_>>>16&255,e[7]=_>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=k>>>0&255,e[17]=k>>>8&255,e[18]=k>>>16&255,e[19]=k>>>24&255,e[20]=x>>>0&255,e[21]=x>>>8&255,e[22]=x>>>16&255,e[23]=x>>>24&255,e[24]=C>>>0&255,e[25]=C>>>8&255,e[26]=C>>>16&255,e[27]=C>>>24&255,e[28]=I>>>0&255,e[29]=I>>>8&255,e[30]=I>>>16&255,e[31]=I>>>24&255,e[32]=T>>>0&255,e[33]=T>>>8&255,e[34]=T>>>16&255,e[35]=T>>>24&255,e[36]=O>>>0&255,e[37]=O>>>8&255,e[38]=O>>>16&255,e[39]=O>>>24&255,e[40]=P>>>0&255,e[41]=P>>>8&255,e[42]=P>>>16&255,e[43]=P>>>24&255,e[44]=M>>>0&255,e[45]=M>>>8&255,e[46]=M>>>16&255,e[47]=M>>>24&255,e[48]=R>>>0&255,e[49]=R>>>8&255,e[50]=R>>>16&255,e[51]=R>>>24&255,e[52]=N>>>0&255,e[53]=N>>>8&255,e[54]=N>>>16&255,e[55]=N>>>24&255,e[56]=L>>>0&255,e[57]=L>>>8&255,e[58]=L>>>16&255,e[59]=L>>>24&255,e[60]=B>>>0&255,e[61]=B>>>8&255,e[62]=B>>>16&255,e[63]=B>>>24&255}(e,t,r,n)}function b(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,A=0;A<20;A+=2)o^=(i=(y^=(i=(h^=(i=(u^=(i=o+y|0)<<7|i>>>25)+o|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,l^=(i=(a^=(i=(v^=(i=(p^=(i=l+a|0)<<7|i>>>25)+l|0)<<9|i>>>23)+p|0)<<13|i>>>19)+v|0)<<18|i>>>14,g^=(i=(d^=(i=(s^=(i=(b^=(i=g+d|0)<<7|i>>>25)+g|0)<<9|i>>>23)+b|0)<<13|i>>>19)+s|0)<<18|i>>>14,w^=(i=(m^=(i=(f^=(i=(c^=(i=w+m|0)<<7|i>>>25)+w|0)<<9|i>>>23)+c|0)<<13|i>>>19)+f|0)<<18|i>>>14,o^=(i=(c^=(i=(s^=(i=(a^=(i=o+c|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+s|0)<<18|i>>>14,l^=(i=(u^=(i=(f^=(i=(d^=(i=l+u|0)<<7|i>>>25)+l|0)<<9|i>>>23)+d|0)<<13|i>>>19)+f|0)<<18|i>>>14,g^=(i=(p^=(i=(h^=(i=(m^=(i=g+p|0)<<7|i>>>25)+g|0)<<9|i>>>23)+m|0)<<13|i>>>19)+h|0)<<18|i>>>14,w^=(i=(b^=(i=(v^=(i=(y^=(i=w+b|0)<<7|i>>>25)+w|0)<<9|i>>>23)+y|0)<<13|i>>>19)+v|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=d>>>0&255,e[17]=d>>>8&255,e[18]=d>>>16&255,e[19]=d>>>24&255,e[20]=f>>>0&255,e[21]=f>>>8&255,e[22]=f>>>16&255,e[23]=f>>>24&255,e[24]=h>>>0&255,e[25]=h>>>8&255,e[26]=h>>>16&255,e[27]=h>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function A(e,t,r,n,i,o,a){var s,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=o[c];for(;i>=64;){for(v(l,u,a,w),c=0;c<64;c++)e[t+c]=r[n+c]^l[c];for(s=1,c=8;c<16;c++)s=s+(255&u[c])|0,u[c]=255&s,s>>>=8;i-=64,t+=64,n+=64}if(i>0)for(v(l,u,a,w),c=0;c=64;){for(v(c,s,i,w),a=0;a<64;a++)e[t+a]=c[a];for(o=1,a=8;a<16;a++)o=o+(255&s[a])|0,s[a]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(v(c,s,i,w),a=0;a>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function x(e,t,r,n,i,o){var a=new k(o);return a.update(r,n,i),a.finish(e,t),0}function C(e,t,r,n,i,o){var a=new Uint8Array(16);return x(a,0,r,n,i,o),m(e,t,a,0)}function I(e,t,r,n,i){var o;if(r<32)return-1;for(S(e,0,t,0,r,n,i),x(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function T(e,t,r,n,i){var o,a=new Uint8Array(32);if(r<32)return-1;if(E(a,0,32,n,i),0!==C(t,16,t,32,r-32,a))return-1;for(S(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function O(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function P(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function M(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function R(e,r){var n,i,o,a=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(P(s),P(s),P(s),i=0;i<2;i++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),o=a[15]>>16&1,a[14]&=65535,M(s,a,1-o)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function N(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return R(r,e),R(n,t),y(r,0,n,0)}function L(e){var t=new Uint8Array(32);return R(t,e),1&t[0]}function B(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function D(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function U(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function j(e,t,r){var n,i,o=0,a=0,s=0,c=0,u=0,l=0,d=0,f=0,h=0,p=0,g=0,m=0,y=0,v=0,b=0,w=0,A=0,_=0,E=0,S=0,k=0,x=0,C=0,I=0,T=0,O=0,P=0,M=0,R=0,N=0,L=0,B=r[0],D=r[1],U=r[2],j=r[3],F=r[4],z=r[5],q=r[6],H=r[7],V=r[8],$=r[9],K=r[10],W=r[11],G=r[12],Q=r[13],Y=r[14],Z=r[15];o+=(n=t[0])*B,a+=n*D,s+=n*U,c+=n*j,u+=n*F,l+=n*z,d+=n*q,f+=n*H,h+=n*V,p+=n*$,g+=n*K,m+=n*W,y+=n*G,v+=n*Q,b+=n*Y,w+=n*Z,a+=(n=t[1])*B,s+=n*D,c+=n*U,u+=n*j,l+=n*F,d+=n*z,f+=n*q,h+=n*H,p+=n*V,g+=n*$,m+=n*K,y+=n*W,v+=n*G,b+=n*Q,w+=n*Y,A+=n*Z,s+=(n=t[2])*B,c+=n*D,u+=n*U,l+=n*j,d+=n*F,f+=n*z,h+=n*q,p+=n*H,g+=n*V,m+=n*$,y+=n*K,v+=n*W,b+=n*G,w+=n*Q,A+=n*Y,_+=n*Z,c+=(n=t[3])*B,u+=n*D,l+=n*U,d+=n*j,f+=n*F,h+=n*z,p+=n*q,g+=n*H,m+=n*V,y+=n*$,v+=n*K,b+=n*W,w+=n*G,A+=n*Q,_+=n*Y,E+=n*Z,u+=(n=t[4])*B,l+=n*D,d+=n*U,f+=n*j,h+=n*F,p+=n*z,g+=n*q,m+=n*H,y+=n*V,v+=n*$,b+=n*K,w+=n*W,A+=n*G,_+=n*Q,E+=n*Y,S+=n*Z,l+=(n=t[5])*B,d+=n*D,f+=n*U,h+=n*j,p+=n*F,g+=n*z,m+=n*q,y+=n*H,v+=n*V,b+=n*$,w+=n*K,A+=n*W,_+=n*G,E+=n*Q,S+=n*Y,k+=n*Z,d+=(n=t[6])*B,f+=n*D,h+=n*U,p+=n*j,g+=n*F,m+=n*z,y+=n*q,v+=n*H,b+=n*V,w+=n*$,A+=n*K,_+=n*W,E+=n*G,S+=n*Q,k+=n*Y,x+=n*Z,f+=(n=t[7])*B,h+=n*D,p+=n*U,g+=n*j,m+=n*F,y+=n*z,v+=n*q,b+=n*H,w+=n*V,A+=n*$,_+=n*K,E+=n*W,S+=n*G,k+=n*Q,x+=n*Y,C+=n*Z,h+=(n=t[8])*B,p+=n*D,g+=n*U,m+=n*j,y+=n*F,v+=n*z,b+=n*q,w+=n*H,A+=n*V,_+=n*$,E+=n*K,S+=n*W,k+=n*G,x+=n*Q,C+=n*Y,I+=n*Z,p+=(n=t[9])*B,g+=n*D,m+=n*U,y+=n*j,v+=n*F,b+=n*z,w+=n*q,A+=n*H,_+=n*V,E+=n*$,S+=n*K,k+=n*W,x+=n*G,C+=n*Q,I+=n*Y,T+=n*Z,g+=(n=t[10])*B,m+=n*D,y+=n*U,v+=n*j,b+=n*F,w+=n*z,A+=n*q,_+=n*H,E+=n*V,S+=n*$,k+=n*K,x+=n*W,C+=n*G,I+=n*Q,T+=n*Y,O+=n*Z,m+=(n=t[11])*B,y+=n*D,v+=n*U,b+=n*j,w+=n*F,A+=n*z,_+=n*q,E+=n*H,S+=n*V,k+=n*$,x+=n*K,C+=n*W,I+=n*G,T+=n*Q,O+=n*Y,P+=n*Z,y+=(n=t[12])*B,v+=n*D,b+=n*U,w+=n*j,A+=n*F,_+=n*z,E+=n*q,S+=n*H,k+=n*V,x+=n*$,C+=n*K,I+=n*W,T+=n*G,O+=n*Q,P+=n*Y,M+=n*Z,v+=(n=t[13])*B,b+=n*D,w+=n*U,A+=n*j,_+=n*F,E+=n*z,S+=n*q,k+=n*H,x+=n*V,C+=n*$,I+=n*K,T+=n*W,O+=n*G,P+=n*Q,M+=n*Y,R+=n*Z,b+=(n=t[14])*B,w+=n*D,A+=n*U,_+=n*j,E+=n*F,S+=n*z,k+=n*q,x+=n*H,C+=n*V,I+=n*$,T+=n*K,O+=n*W,P+=n*G,M+=n*Q,R+=n*Y,N+=n*Z,w+=(n=t[15])*B,a+=38*(_+=n*U),s+=38*(E+=n*j),c+=38*(S+=n*F),u+=38*(k+=n*z),l+=38*(x+=n*q),d+=38*(C+=n*H),f+=38*(I+=n*V),h+=38*(T+=n*$),p+=38*(O+=n*K),g+=38*(P+=n*W),m+=38*(M+=n*G),y+=38*(R+=n*Q),v+=38*(N+=n*Y),b+=38*(L+=n*Z),o=(n=(o+=38*(A+=n*D))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=d,e[7]=f,e[8]=h,e[9]=p,e[10]=g,e[11]=m,e[12]=y,e[13]=v,e[14]=b,e[15]=w}function F(e,t){j(e,t,t)}function z(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&j(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function q(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)F(i,i),1!==n&&j(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function H(e,r,n){var i,o,a=new Uint8Array(32),s=new Float64Array(80),u=t(),l=t(),d=t(),f=t(),h=t(),p=t();for(o=0;o<31;o++)a[o]=r[o];for(a[31]=127&r[31]|64,a[0]&=248,B(s,n),o=0;o<16;o++)l[o]=s[o],f[o]=u[o]=d[o]=0;for(u[0]=f[0]=1,o=254;o>=0;--o)M(u,l,i=a[o>>>3]>>>(7&o)&1),M(d,f,i),D(h,u,d),U(u,u,d),D(d,l,f),U(l,l,f),F(f,h),F(p,u),j(u,d,u),j(d,l,h),D(h,u,d),U(u,u,d),F(l,u),U(d,f,p),j(u,d,c),D(u,u,f),j(d,d,u),j(u,f,p),j(f,l,s),F(l,h),M(u,l,i),M(d,f,i);for(o=0;o<16;o++)s[o+16]=u[o],s[o+32]=d[o],s[o+48]=l[o],s[o+64]=f[o];var g=s.subarray(32),m=s.subarray(16);return z(g,g),j(m,m,g),R(e,m),0}function V(e,t){return H(e,t,o)}function $(e,t){return n(t,32),V(e,t)}function K(e,t,r){var n=new Uint8Array(32);return H(n,r,t),b(e,i,n,w)}k.prototype.blocks=function(e,t,r){for(var n,i,o,a,s,c,u,l,d,f,h,p,g,m,y,v,b,w,A,_=this.fin?0:2048,E=this.h[0],S=this.h[1],k=this.h[2],x=this.h[3],C=this.h[4],I=this.h[5],T=this.h[6],O=this.h[7],P=this.h[8],M=this.h[9],R=this.r[0],N=this.r[1],L=this.r[2],B=this.r[3],D=this.r[4],U=this.r[5],j=this.r[6],F=this.r[7],z=this.r[8],q=this.r[9];r>=16;)f=d=0,f+=(E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*R,f+=(S+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*q),f+=(k+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*z),f+=(x+=8191&(o>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),d=(f+=(C+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*j))>>>13,f&=8191,f+=(I+=s>>>1&8191)*(5*U),f+=(T+=8191&(s>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*D),f+=(O+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*B),f+=(P+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*L),h=d+=(f+=(M+=l>>>5|_)*(5*N))>>>13,h+=E*N,h+=S*R,h+=k*(5*q),h+=x*(5*z),d=(h+=C*(5*F))>>>13,h&=8191,h+=I*(5*j),h+=T*(5*U),h+=O*(5*D),h+=P*(5*B),d+=(h+=M*(5*L))>>>13,h&=8191,p=d,p+=E*L,p+=S*N,p+=k*R,p+=x*(5*q),d=(p+=C*(5*z))>>>13,p&=8191,p+=I*(5*F),p+=T*(5*j),p+=O*(5*U),p+=P*(5*D),g=d+=(p+=M*(5*B))>>>13,g+=E*B,g+=S*L,g+=k*N,g+=x*R,d=(g+=C*(5*q))>>>13,g&=8191,g+=I*(5*z),g+=T*(5*F),g+=O*(5*j),g+=P*(5*U),m=d+=(g+=M*(5*D))>>>13,m+=E*D,m+=S*B,m+=k*L,m+=x*N,d=(m+=C*R)>>>13,m&=8191,m+=I*(5*q),m+=T*(5*z),m+=O*(5*F),m+=P*(5*j),y=d+=(m+=M*(5*U))>>>13,y+=E*U,y+=S*D,y+=k*B,y+=x*L,d=(y+=C*N)>>>13,y&=8191,y+=I*R,y+=T*(5*q),y+=O*(5*z),y+=P*(5*F),v=d+=(y+=M*(5*j))>>>13,v+=E*j,v+=S*U,v+=k*D,v+=x*B,d=(v+=C*L)>>>13,v&=8191,v+=I*N,v+=T*R,v+=O*(5*q),v+=P*(5*z),b=d+=(v+=M*(5*F))>>>13,b+=E*F,b+=S*j,b+=k*U,b+=x*D,d=(b+=C*B)>>>13,b&=8191,b+=I*L,b+=T*N,b+=O*R,b+=P*(5*q),w=d+=(b+=M*(5*z))>>>13,w+=E*z,w+=S*F,w+=k*j,w+=x*U,d=(w+=C*D)>>>13,w&=8191,w+=I*B,w+=T*L,w+=O*N,w+=P*R,A=d+=(w+=M*(5*q))>>>13,A+=E*q,A+=S*z,A+=k*F,A+=x*j,d=(A+=C*U)>>>13,A&=8191,A+=I*D,A+=T*B,A+=O*L,A+=P*N,E=f=8191&(d=(d=((d+=(A+=M*R)>>>13)<<2)+d|0)+(f&=8191)|0),S=h+=d>>>=13,k=p&=8191,x=g&=8191,C=m&=8191,I=y&=8191,T=v&=8191,O=b&=8191,P=w&=8191,M=A&=8191,t+=16,r-=16;this.h[0]=E,this.h[1]=S,this.h[2]=k,this.h[3]=x,this.h[4]=C,this.h[5]=I,this.h[6]=T,this.h[7]=O,this.h[8]=P,this.h[9]=M},k.prototype.finish=function(e,t){var r,n,i,o,a=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this.h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|a[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},k.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n=128;){for(_=0;_<16;_++)E=8*_+G,O[_]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],P[_]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(_=0;_<80;_++)if(i=M,o=R,a=N,s=L,c=B,u=D,l=U,j,f=F,h=z,p=q,g=H,m=V,y=$,v=K,W,x=65535&(k=W),C=k>>>16,I=65535&(S=j),T=S>>>16,x+=65535&(k=(V>>>14|B<<18)^(V>>>18|B<<14)^(B>>>9|V<<23)),C+=k>>>16,I+=65535&(S=(B>>>14|V<<18)^(B>>>18|V<<14)^(V>>>9|B<<23)),T+=S>>>16,x+=65535&(k=V&$^~V&K),C+=k>>>16,I+=65535&(S=B&D^~B&U),T+=S>>>16,S=Q[2*_],x+=65535&(k=Q[2*_+1]),C+=k>>>16,I+=65535&S,T+=S>>>16,S=O[_%16],C+=(k=P[_%16])>>>16,I+=65535&S,T+=S>>>16,I+=(C+=(x+=65535&k)>>>16)>>>16,x=65535&(k=A=65535&x|C<<16),C=k>>>16,I=65535&(S=w=65535&I|(T+=I>>>16)<<16),T=S>>>16,x+=65535&(k=(F>>>28|M<<4)^(M>>>2|F<<30)^(M>>>7|F<<25)),C+=k>>>16,I+=65535&(S=(M>>>28|F<<4)^(F>>>2|M<<30)^(F>>>7|M<<25)),T+=S>>>16,C+=(k=F&z^F&q^z&q)>>>16,I+=65535&(S=M&R^M&N^R&N),T+=S>>>16,d=65535&(I+=(C+=(x+=65535&k)>>>16)>>>16)|(T+=I>>>16)<<16,b=65535&x|C<<16,x=65535&(k=g),C=k>>>16,I=65535&(S=s),T=S>>>16,C+=(k=A)>>>16,I+=65535&(S=w),T+=S>>>16,R=i,N=o,L=a,B=s=65535&(I+=(C+=(x+=65535&k)>>>16)>>>16)|(T+=I>>>16)<<16,D=c,U=u,j=l,M=d,z=f,q=h,H=p,V=g=65535&x|C<<16,$=m,K=y,W=v,F=b,_%16===15)for(E=0;E<16;E++)S=O[E],x=65535&(k=P[E]),C=k>>>16,I=65535&S,T=S>>>16,S=O[(E+9)%16],x+=65535&(k=P[(E+9)%16]),C+=k>>>16,I+=65535&S,T+=S>>>16,w=O[(E+1)%16],x+=65535&(k=((A=P[(E+1)%16])>>>1|w<<31)^(A>>>8|w<<24)^(A>>>7|w<<25)),C+=k>>>16,I+=65535&(S=(w>>>1|A<<31)^(w>>>8|A<<24)^w>>>7),T+=S>>>16,w=O[(E+14)%16],C+=(k=((A=P[(E+14)%16])>>>19|w<<13)^(w>>>29|A<<3)^(A>>>6|w<<26))>>>16,I+=65535&(S=(w>>>19|A<<13)^(A>>>29|w<<3)^w>>>6),T+=S>>>16,T+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,O[E]=65535&I|T<<16,P[E]=65535&x|C<<16;x=65535&(k=F),C=k>>>16,I=65535&(S=M),T=S>>>16,S=e[0],C+=(k=t[0])>>>16,I+=65535&S,T+=S>>>16,T+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[0]=M=65535&I|T<<16,t[0]=F=65535&x|C<<16,x=65535&(k=z),C=k>>>16,I=65535&(S=R),T=S>>>16,S=e[1],C+=(k=t[1])>>>16,I+=65535&S,T+=S>>>16,T+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[1]=R=65535&I|T<<16,t[1]=z=65535&x|C<<16,x=65535&(k=q),C=k>>>16,I=65535&(S=N),T=S>>>16,S=e[2],C+=(k=t[2])>>>16,I+=65535&S,T+=S>>>16,T+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[2]=N=65535&I|T<<16,t[2]=q=65535&x|C<<16,x=65535&(k=H),C=k>>>16,I=65535&(S=L),T=S>>>16,S=e[3],C+=(k=t[3])>>>16,I+=65535&S,T+=S>>>16,T+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[3]=L=65535&I|T<<16,t[3]=H=65535&x|C<<16,x=65535&(k=V),C=k>>>16,I=65535&(S=B),T=S>>>16,S=e[4],C+=(k=t[4])>>>16,I+=65535&S,T+=S>>>16,T+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[4]=B=65535&I|T<<16,t[4]=V=65535&x|C<<16,x=65535&(k=$),C=k>>>16,I=65535&(S=D),T=S>>>16,S=e[5],C+=(k=t[5])>>>16,I+=65535&S,T+=S>>>16,T+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[5]=D=65535&I|T<<16,t[5]=$=65535&x|C<<16,x=65535&(k=K),C=k>>>16,I=65535&(S=U),T=S>>>16,S=e[6],C+=(k=t[6])>>>16,I+=65535&S,T+=S>>>16,T+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[6]=U=65535&I|T<<16,t[6]=K=65535&x|C<<16,x=65535&(k=W),C=k>>>16,I=65535&(S=j),T=S>>>16,S=e[7],C+=(k=t[7])>>>16,I+=65535&S,T+=S>>>16,T+=(I+=(C+=(x+=65535&k)>>>16)>>>16)>>>16,e[7]=j=65535&I|T<<16,t[7]=W=65535&x|C<<16,G+=128,n-=128}return n}function Z(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),a=new Uint8Array(256),s=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Y(i,o,t,r),r%=128,n=0;n=0;--i)X(e,t,n=r[i/8|0]>>(7&i)&1),J(t,e),J(e,e),X(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];O(n[0],d),O(n[1],f),O(n[2],s),j(n[3],d,f),te(e,n,r)}function ne(e,r,i){var o,a=new Uint8Array(64),s=[t(),t(),t(),t()];for(i||n(r,32),Z(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,re(s,a),ee(e,s),o=0;o<32;o++)r[o+32]=e[o];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function oe(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>4)*ie[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ie[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ae(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}function se(e,r,n,i){var o,a,s=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),d=[t(),t(),t(),t()];Z(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64;var f=n+64;for(o=0;o>7&&U(e[0],a,e[0]),j(e[3],e[0],e[1]),0)}(f,i))return-1;for(o=0;o=0},e.sign.keyPair=function(){var e=new Uint8Array(de),t=new Uint8Array(fe);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(pe(e),e.length!==fe)throw new Error("bad secret key size");for(var t=new Uint8Array(de),r=0;r{e.exports=function(e){return ArrayBuffer.isView(e)?Buffer.from(e.buffer,e.byteOffset,e.byteLength):Buffer.from(e)}},62366:function(e,t,r){var n;!function(i,o){"use strict";var a="function",s="undefined",c="object",u="string",l="major",d="model",f="name",h="type",p="vendor",g="version",m="architecture",y="console",v="mobile",b="tablet",w="smarttv",A="wearable",_="embedded",E="Amazon",S="Apple",k="ASUS",x="BlackBerry",C="Browser",I="Chrome",T="Firefox",O="Google",P="Huawei",M="LG",R="Microsoft",N="Motorola",L="Opera",B="Samsung",D="Sharp",U="Sony",j="Xiaomi",F="Zebra",z="Facebook",q="Chromium OS",H="Mac OS",V=function(e){for(var t={},r=0;r0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):o:this[s[0]]=l?s[1].call(this,l,s[2]):o:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):o):this[s]=l||o;d+=2}},Q=function(e,t){for(var r in t)if(typeof t[r]===c&&t[r].length>0){for(var n=0;n2&&(e[d]="iPad",e[h]=b),e},this.getEngine=function(){var e={};return e[f]=o,e[g]=o,G.call(e,n,w.engine),e},this.getOS=function(){var e={};return e[f]=o,e[g]=o,G.call(e,n,w.os),A&&!e[f]&&y&&y.platform&&"Unknown"!=y.platform&&(e[f]=y.platform.replace(/chrome os/i,q).replace(/macos/i,H)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===u&&e.length>500?W(e,500):e,this},this.setUA(n),this};J.VERSION="1.0.38",J.BROWSER=V([f,g,l]),J.CPU=V([m]),J.DEVICE=V([d,p,h,y,v,w,b,A,_]),J.ENGINE=J.OS=V([f,g]),typeof t!==s?(e.exports&&(t=e.exports=J),t.UAParser=J):r.amdO?(n=function(){return J}.call(t,r,t,e))===o||(e.exports=n):typeof i!==s&&(i.UAParser=J);var X=typeof i!==s&&(i.jQuery||i.Zepto);if(X&&!X.ua){var ee=new J;X.ua=ee.getResult(),X.ua.get=function(){return ee.getUA()},X.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var r in t)X.ua[r]=t[r]}}}("object"===typeof window?window:this)},87946:function(e,t,r){var n;!function(i,o){"use strict";var a="function",s="undefined",c="object",u="string",l="major",d="model",f="name",h="type",p="vendor",g="version",m="architecture",y="console",v="mobile",b="tablet",w="smarttv",A="wearable",_="embedded",E="Amazon",S="Apple",k="ASUS",x="BlackBerry",C="Browser",I="Chrome",T="Firefox",O="Google",P="Huawei",M="LG",R="Microsoft",N="Motorola",L="Opera",B="Samsung",D="Sharp",U="Sony",j="Xiaomi",F="Zebra",z="Facebook",q="Chromium OS",H="Mac OS",V=function(e){for(var t={},r=0;r0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):o:this[s[0]]=l?s[1].call(this,l,s[2]):o:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):o):this[s]=l||o;d+=2}},Q=function(e,t){for(var r in t)if(typeof t[r]===c&&t[r].length>0){for(var n=0;n2&&(e[d]="iPad",e[h]=b),e},this.getEngine=function(){var e={};return e[f]=o,e[g]=o,G.call(e,n,w.engine),e},this.getOS=function(){var e={};return e[f]=o,e[g]=o,G.call(e,n,w.os),A&&!e[f]&&y&&y.platform&&"Unknown"!=y.platform&&(e[f]=y.platform.replace(/chrome os/i,q).replace(/macos/i,H)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===u&&e.length>500?W(e,500):e,this},this.setUA(n),this};J.VERSION="1.0.38",J.BROWSER=V([f,g,l]),J.CPU=V([m]),J.DEVICE=V([d,p,h,y,v,w,b,A,_]),J.ENGINE=J.OS=V([f,g]),typeof t!==s?(e.exports&&(t=e.exports=J),t.UAParser=J):r.amdO?(n=function(){return J}.call(t,r,t,e))===o||(e.exports=n):typeof i!==s&&(i.UAParser=J);var X=typeof i!==s&&(i.jQuery||i.Zepto);if(X&&!X.ua){var ee=new J;X.ua=ee.getResult(),X.ua.get=function(){return ee.getUA()},X.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var r in t)X.ua[r]=t[r]}}}("object"===typeof window?window:this)},44244:(e,t,r)=>{"use strict";function n(e,t){return t=t||{},new Promise((function(r,n){var i=new XMLHttpRequest,o=[],a=[],s={},c=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:c,headers:{keys:function(){return o},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var u in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,r){o.push(t=t.toLowerCase()),a.push([t,r]),s[t]=s[t]?s[t]+","+r:r})),r(c())},i.onerror=n,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(u,t.headers[u]);i.send(t.body||null)}))}r.r(t),r.d(t,{default:()=>n})},87737:(e,t,r)=>{"use strict";var n=r(9950);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},o=n.useState,a=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(n){return!0}}var l="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,l=n[1];return s((function(){i.value=r,i.getSnapshot=t,u(i)&&l({inst:i})}),[e,r,t]),a((function(){return u(i)&&l({inst:i}),e((function(){u(i)&&l({inst:i})}))}),[e]),c(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},7286:(e,t,r)=>{"use strict";var n=r(9950),i=r(6538);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=i.useSyncExternalStore,s=n.useRef,c=n.useEffect,u=n.useMemo,l=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=u((function(){function e(e){if(!c){if(c=!0,a=e,e=n(e),void 0!==i&&f.hasValue){var t=f.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var r=n(e);return void 0!==i&&i(t,r)?t:(a=e,s=r)}var a,s,c=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,r,n,i]);var h=a(e,d[0],d[1]);return c((function(){f.hasValue=!0,f.value=h}),[h]),l(h),h}},6538:(e,t,r)=>{"use strict";e.exports=r(87737)},53044:(e,t,r)=>{"use strict";e.exports=r(7286)},91421:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(n){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},57413:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},1964:e=>{var t;self,t=()=>(()=>{var e={81645:(e,t,r)=>{"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.chains=t._getInitializedChains=void 0;var i=n(r(87295)),o=n(r(31227)),a=n(r(40439)),s=n(r(37098)),c=n(r(17687)),u=n(r(49422));function l(e){var t,r,n={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli",11155111:"sepolia"},l={mainnet:i.default,ropsten:o.default,rinkeby:a.default,kovan:s.default,goerli:c.default,sepolia:u.default};if(e)try{for(var d=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),f=d.next();!f.done;f=d.next()){var h=f.value,p=h.name;n[h.chainId.toString()]=p,l[p]=h}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}return l.names=n,l}t._getInitializedChains=l,t.chains=l()},425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIPs=void 0,t.EIPs={1153:r(96561),1559:r(77523),2315:r(83339),2537:r(26769),2565:r(17897),2718:r(62170),2929:r(88436),2930:r(96213),3198:r(25491),3529:r(20070),3540:r(52256),3541:r(21871),3554:r(47225),3607:r(3968),3651:r(29496),3670:r(74290),3675:r(98571),3855:r(64551),3860:r(94300),4345:r(74818),4399:r(68372),5133:r(4759)}},7002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=void 0,t.hardforks=[["chainstart",r(60114)],["homestead",r(62800)],["dao",r(7197)],["tangerineWhistle",r(22302)],["spuriousDragon",r(90716)],["byzantium",r(26985)],["constantinople",r(35993)],["petersburg",r(4064)],["istanbul",r(83166)],["muirGlacier",r(42946)],["berlin",r(20015)],["london",r(61250)],["shanghai",r(5553)],["arrowGlacier",r(51971)],["grayGlacier",r(31088)],["mergeForkIdTransition",r(49347)],["merge",r(88648)]]},3863:(e,t,r)=>{"use strict";var n,i=r(29033).Buffer,o=r(28847)(r(3355)),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsensusAlgorithm=t.ConsensusType=t.Hardfork=t.Chain=t.CustomChain=void 0;var u,l,d,f,h,p=r(38291),g=r(64628),m=r(33062),y=r(81645),v=r(7002),b=r(425);!function(e){e.PolygonMainnet="polygon-mainnet",e.PolygonMumbai="polygon-mumbai",e.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",e.xDaiChain="x-dai-chain",e.OptimisticKovan="optimistic-kovan",e.OptimisticEthereum="optimistic-ethereum"}(u=t.CustomChain||(t.CustomChain={})),(h=t.Chain||(t.Chain={}))[h.Mainnet=1]="Mainnet",h[h.Ropsten=3]="Ropsten",h[h.Rinkeby=4]="Rinkeby",h[h.Kovan=42]="Kovan",h[h.Goerli=5]="Goerli",h[h.Sepolia=11155111]="Sepolia",function(e){e.Chainstart="chainstart",e.Homestead="homestead",e.Dao="dao",e.TangerineWhistle="tangerineWhistle",e.SpuriousDragon="spuriousDragon",e.Byzantium="byzantium",e.Constantinople="constantinople",e.Petersburg="petersburg",e.Istanbul="istanbul",e.MuirGlacier="muirGlacier",e.Berlin="berlin",e.London="london",e.ArrowGlacier="arrowGlacier",e.GrayGlacier="grayGlacier",e.MergeForkIdTransition="mergeForkIdTransition",e.Merge="merge",e.Shanghai="shanghai"}(l=t.Hardfork||(t.Hardfork={})),(f=t.ConsensusType||(t.ConsensusType={})).ProofOfStake="pos",f.ProofOfWork="pow",f.ProofOfAuthority="poa",(d=t.ConsensusAlgorithm||(t.ConsensusAlgorithm={})).Ethash="ethash",d.Clique="clique",d.Casper="casper";var w=function(e){function t(t){var r,n,i,o,a=this;(a=e.call(this)||this)._supportedHardforks=[],a._eips=[],a._customChains=null!==(i=t.customChains)&&void 0!==i?i:[],a._chainParams=a.setChain(t.chain),a.DEFAULT_HARDFORK=null!==(o=a._chainParams.defaultHardfork)&&void 0!==o?o:l.Istanbul;try{for(var s=c(a._chainParams.hardforks),u=s.next();!u.done;u=s.next()){var d=u.value;d.forkHash||(d.forkHash=a._calcForkHash(d.name))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return a._hardfork=a.DEFAULT_HARDFORK,t.supportedHardforks&&(a._supportedHardforks=t.supportedHardforks),t.hardfork&&a.setHardfork(t.hardfork),t.eips&&a.setEIPs(t.eips),a}return a(t,e),t.custom=function(e,r){var n;void 0===r&&(r={});var i=null!==(n=r.baseChain)&&void 0!==n?n:"mainnet",o=s({},t._getChainParams(i));if(o.name="custom-chain","string"!=typeof e)return new t(s({chain:s(s({},o),e)},r));if(e===u.PolygonMainnet)return t.custom({name:u.PolygonMainnet,chainId:137,networkId:137},r);if(e===u.PolygonMumbai)return t.custom({name:u.PolygonMumbai,chainId:80001,networkId:80001},r);if(e===u.ArbitrumRinkebyTestnet)return t.custom({name:u.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611},r);if(e===u.xDaiChain)return t.custom({name:u.xDaiChain,chainId:100,networkId:100},r);if(e===u.OptimisticKovan)return t.custom({name:u.OptimisticKovan,chainId:69,networkId:69},s({hardfork:l.Berlin},r));if(e===u.OptimisticEthereum)return t.custom({name:u.OptimisticEthereum,chainId:10,networkId:10},s({hardfork:l.Berlin},r));throw new Error("Custom chain ".concat(e," not supported"))},t.forCustomChain=function(e,r,n,i){var o=t._getChainParams(e);return new t({chain:s(s({},o),r),hardfork:n,supportedHardforks:i})},t.isSupportedChainId=function(e){var t=(0,y._getInitializedChains)();return Boolean(t.names[e.toString()])},t._getChainParams=function(e,t){var r=(0,y._getInitializedChains)(t);if("number"==typeof e||m.BN.isBN(e)){if(e=e.toString(),r.names[e])return r[r.names[e]];throw new Error("Chain with ID ".concat(e," not supported"))}if(r[e])return r[e];throw new Error("Chain with name ".concat(e," not supported"))},t.prototype.setChain=function(e){var r,n;if("number"==typeof e||"string"==typeof e||m.BN.isBN(e)){var i;i=this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0])?this._customChains.map((function(e){return e[0]})):this._customChains,this._chainParams=t._getChainParams(e,i)}else{if("object"!==(0,o.default)(e))throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");try{for(var a=c(["networkId","genesis","hardforks","bootstrapNodes"]),s=a.next();!s.done;s=a.next()){var u=s.value;if(void 0===e[u])throw new Error("Missing required chain parameter: ".concat(u))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}this._chainParams=e}return this._chainParams},t.prototype.setHardfork=function(e){var t,r;if(!this._isSupportedHardfork(e))throw new Error("Hardfork ".concat(e," not set as supported in supportedHardforks"));var n=!1;try{for(var i=c(v.hardforks),o=i.next();!o.done;o=i.next())o.value[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),n=!0)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}if(!n)throw new Error("Hardfork with name ".concat(e," not supported"))},t.prototype.getHardforkByBlockNumber=function(e,t){var r,n;e=(0,m.toType)(e,m.TypeOutput.BN),t=(0,m.toType)(t,m.TypeOutput.BN);var i,o,a,s=l.Chainstart;try{for(var u=c(this.hardforks()),d=u.next();!d.done;d=u.next()){var f=d.value;if(null!==f.block)e.gte(new m.BN(f.block))&&(s=f.name),t&&f.td&&(t.gte(new m.BN(f.td))?i=f.name:o=a),a=f.name;else if(null!=t&&void 0!==f.td&&null!==f.td&&t.gte(new m.BN(f.td)))return f.name}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(t){var h="block number: ".concat(e," (-> ").concat(s,"), ");if(i&&!this.hardforkGteHardfork(s,i)){var p="HF determined by block number is lower than the minimum total difficulty HF";throw h+="total difficulty: ".concat(t," (-> ").concat(i,")"),new Error("".concat(p,": ").concat(h))}if(o&&!this.hardforkGteHardfork(o,s))throw p="Maximum HF determined by total difficulty is lower than the block number HF",h+="total difficulty: ".concat(t," (-> ").concat(o,")"),new Error("".concat(p,": ").concat(h))}return s},t.prototype.setHardforkByBlockNumber=function(e,t){var r=this.getHardforkByBlockNumber(e,t);return this.setHardfork(r),r},t.prototype._chooseHardfork=function(e,t){if(void 0===t&&(t=!0),e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork ".concat(e," not set as supported in supportedHardforks"))}else e=this._hardfork;return e},t.prototype._getHardfork=function(e){var t,r,n=this.hardforks();try{for(var i=c(n),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.name===e)return a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}throw new Error("Hardfork ".concat(e," not defined for chain ").concat(this.chainName()))},t.prototype._isSupportedHardfork=function(e){var t,r;if(!(this._supportedHardforks.length>0))return!0;try{for(var n=c(this._supportedHardforks),i=n.next();!i.done;i=n.next())if(e===i.value)return!0}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.setEIPs=function(e){var t,r,n=this;void 0===e&&(e=[]);var i=function(t){if(!(t in b.EIPs))throw new Error("".concat(t," not supported"));var r=o.gteHardfork(b.EIPs[t].minimumHardfork);if(!r)throw new Error("".concat(t," cannot be activated on hardfork ").concat(o.hardfork(),", minimumHardfork: ").concat(r));b.EIPs[t].requiredEIPs&&b.EIPs[t].requiredEIPs.forEach((function(r){if(!e.includes(r)&&!n.isActivatedEIP(r))throw new Error("".concat(t," requires EIP ").concat(r,", but is not included in the EIP list"))}))},o=this;try{for(var a=c(e),s=a.next();!s.done;s=a.next())i(s.value)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}this._eips=e},t.prototype.param=function(e,t){var r,n,i=null;try{for(var o=c(this._eips),a=o.next();!a.done;a=o.next()){var s=a.value;if(null!==(i=this.paramByEIP(e,t,s)))return i}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this.paramByHardfork(e,t,this._hardfork)},t.prototype.paramByHardfork=function(e,t,r){var n,i,o,a;r=this._chooseHardfork(r);var s=null;try{for(var u=c(v.hardforks),l=u.next();!l.done;l=u.next()){var d=l.value;if("eips"in d[1]){var f=d[1].eips;try{for(var h=(o=void 0,c(f)),p=h.next();!p.done;p=h.next()){var g=p.value,m=this.paramByEIP(e,t,g);s=null!==m?m:s}}catch(e){o={error:e}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}else{if(!d[1][e])throw new Error("Topic ".concat(e," not defined"));void 0!==d[1][e][t]&&(s=d[1][e][t].v)}if(d[0]===r)break}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return s},t.prototype.paramByEIP=function(e,t,r){if(!(r in b.EIPs))throw new Error("".concat(r," not supported"));var n=b.EIPs[r];if(!(e in n))throw new Error("Topic ".concat(e," not defined"));return void 0===n[e][t]?null:n[e][t].v},t.prototype.paramByBlock=function(e,t,r){var n=this.activeHardforks(r),i=n[n.length-1].name;return this.paramByHardfork(e,t,i)},t.prototype.isActivatedEIP=function(e){var t,r;if(this.eips().includes(e))return!0;try{for(var n=c(v.hardforks),i=n.next();!i.done;i=n.next()){var o=i.value[1];if(this.gteHardfork(o.name)&&"eips"in o&&o.eips.includes(e))return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.hardforkIsActiveOnBlock=function(e,t,r){var n;void 0===r&&(r={}),t=(0,m.toType)(t,m.TypeOutput.BN);var i=null!==(n=r.onlySupported)&&void 0!==n&&n;e=this._chooseHardfork(e,i);var o=this.hardforkBlockBN(e);return!(!o||!t.gte(o))},t.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},t.prototype.hardforkGteHardfork=function(e,t,r){var n,i;void 0===r&&(r={});var o,a=void 0!==r.onlyActive&&r.onlyActive;e=this._chooseHardfork(e,r.onlySupported),o=a?this.activeHardforks(null,r):this.hardforks();var s=-1,u=-1,l=0;try{for(var d=c(o),f=d.next();!f.done;f=d.next()){var h=f.value;h.name===e&&(s=l),h.name===t&&(u=l),l+=1}}catch(e){n={error:e}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return s>=u&&-1!==u},t.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},t.prototype.hardforkIsActiveOnChain=function(e,t){var r,n,i;void 0===t&&(t={});var o=null!==(i=t.onlySupported)&&void 0!==i&&i;e=this._chooseHardfork(e,o);try{for(var a=c(this.hardforks()),s=a.next();!s.done;s=a.next()){var u=s.value;if(u.name===e&&null!==u.block)return!0}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!1},t.prototype.activeHardforks=function(e,t){var r,n;void 0===t&&(t={});var i=[],o=this.hardforks();try{for(var a=c(o),s=a.next();!s.done;s=a.next()){var u=s.value;if(null!==u.block){if(null!=e&&e0)return r[r.length-1].name;throw new Error("No (supported) active hardfork found")},t.prototype.hardforkBlock=function(e){var t=this.hardforkBlockBN(e);return(0,m.toType)(t,m.TypeOutput.Number)},t.prototype.hardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).block;return null==t?null:new m.BN(t)},t.prototype.hardforkTD=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).td;return null==t?null:new m.BN(t)},t.prototype.isHardforkBlock=function(e,t){e=(0,m.toType)(e,m.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.hardforkBlockBN(t);return!!r&&r.eq(e)},t.prototype.nextHardforkBlock=function(e){var t=this.nextHardforkBlockBN(e);return(0,m.toType)(t,m.TypeOutput.Number)},t.prototype.nextHardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this.hardforkBlockBN(e);return null===t?null:this.hardforks().reduce((function(e,r){var n=new m.BN(r.block);return n.gt(t)&&null===e?n:e}),null)},t.prototype.isNextHardforkBlock=function(e,t){e=(0,m.toType)(e,m.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.nextHardforkBlockBN(t);return null!==r&&r.eq(e)},t.prototype._calcForkHash=function(e){var t,r,n=i.from(this.genesis().hash.substr(2),"hex"),o=i.alloc(0),a=0;try{for(var s=c(this.hardforks()),u=s.next();!u.done;u=s.next()){var l=u.value,d=l.block;if(0!==d&&null!==d&&d!==a){var f=i.from(d.toString(16).padStart(16,"0"),"hex");o=i.concat([o,f])}if(l.name===e)break;null!==d&&(a=d)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}var h=i.concat([n,o]),p=(0,m.intToBuffer)((0,g.buf)(h)>>>0).toString("hex");return"0x".concat(p)},t.prototype.forkHash=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e);if(null===t.block&&void 0===t.td)throw new Error("No fork hash calculation possible for future hardfork");return void 0!==t.forkHash?t.forkHash:this._calcForkHash(e)},t.prototype.hardforkForForkHash=function(e){var t=this.hardforks().filter((function(t){return t.forkHash===e}));return t.length>=1?t[t.length-1]:null},t.prototype.genesis=function(){return this._chainParams.genesis},t.prototype.genesisState=function(){var e,t;switch(this.chainName()){case"mainnet":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/mainnet.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"ropsten":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/ropsten.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"rinkeby":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/rinkeby.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"kovan":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/kovan.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"goerli":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/goerli.json'");throw e.code="MODULE_NOT_FOUND",e}()));case"sepolia":return r(Object(function(){var e=new Error("Cannot find module './genesisStates/sepolia.json'");throw e.code="MODULE_NOT_FOUND",e}()))}if(this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0]))try{for(var n=c(this._customChains),i=n.next();!i.done;i=n.next()){var o=i.value;if(o[0].name===this.chainName())return o[1]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return{}},t.prototype.hardforks=function(){return this._chainParams.hardforks},t.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},t.prototype.dnsNetworks=function(){return this._chainParams.dnsNetworks},t.prototype.hardfork=function(){return this._hardfork},t.prototype.chainId=function(){return(0,m.toType)(this.chainIdBN(),m.TypeOutput.Number)},t.prototype.chainIdBN=function(){return new m.BN(this._chainParams.chainId)},t.prototype.chainName=function(){return this._chainParams.name},t.prototype.networkId=function(){return(0,m.toType)(this.networkIdBN(),m.TypeOutput.Number)},t.prototype.networkIdBN=function(){return new m.BN(this._chainParams.networkId)},t.prototype.eips=function(){return this._eips},t.prototype.consensusType=function(){var e,t,r,n=this.hardfork();try{for(var i=c(v.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus.type),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.type},t.prototype.consensusAlgorithm=function(){var e,t,r,n=this.hardfork();try{for(var i=c(v.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus.algorithm),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.algorithm},t.prototype.consensusConfig=function(){var e,t,r,n=this.hardfork();try{for(var i=c(v.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus[a[1].consensus.algorithm]),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}if(r)return r;var s=this.consensusAlgorithm();return this._chainParams.consensus[s]},t.prototype.copy=function(){var e=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return e.removeAllListeners(),e},t}(p.EventEmitter);t.default=w},89658:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));function i(e){if(Array.isArray(e)){for(var t=[],r=0,n=0;ne.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function a(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return f(d(e))}function s(e,t){if(e<56)return Uint8Array.from([e+t]);var r=m(e),n=m(t+55+r.length/2);return Uint8Array.from(h(n+r))}function c(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==e||0===e.length)return Uint8Array.from([]);var r=u(v(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}function u(e){var t,r,n,i,s,c=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,n=128===l?Uint8Array.from([]):o(e,1,t),2===t&&n[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:n,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1e.length)throw new Error("invalid RLP: total length is larger than the data");for(i=o(e,r,d);i.length;)s=u(i),c.push(s.data),i=s.remainder;return{data:c,remainder:e.slice(d)}}Object.defineProperty(t,"__esModule",{value:!0}),t.RLP=t.utils=t.decode=t.encode=void 0,t.encode=i,t.decode=c;var l=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));function d(e){for(var t="",r=0;r=2&&"0"===e[0]&&"x"===e[1]}function v(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return y(e)?h((t="string"!=typeof(r=e)?r:y(r)?r.slice(2):r).length%2?"0".concat(t):t):g(e);var t,r;if("number"==typeof e||"bigint"==typeof e)return e?h(m(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+(0,n.default)(e))}t.utils={bytesToHex:d,concatBytes:p,hexToBytes:h,utf8ToBytes:g},t.RLP={encode:i,decode:c}},75058:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTransaction=void 0;var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t}(r(3863)),s=r(33062),c=r(87325),u=function(){function e(e,t){this.cache={hash:void 0,dataFee:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=a.Chain.Mainnet,this.DEFAULT_HARDFORK=a.Hardfork.Istanbul;var r=e.nonce,n=e.gasLimit,i=e.to,o=e.value,c=e.data,u=e.v,l=e.r,d=e.s,f=e.type;this._type=new s.BN((0,s.toBuffer)(f)).toNumber(),this.txOptions=t;var h=(0,s.toBuffer)(""===i?"0x":i),p=(0,s.toBuffer)(""===u?"0x":u),g=(0,s.toBuffer)(""===l?"0x":l),m=(0,s.toBuffer)(""===d?"0x":d);this.nonce=new s.BN((0,s.toBuffer)(""===r?"0x":r)),this.gasLimit=new s.BN((0,s.toBuffer)(""===n?"0x":n)),this.to=h.length>0?new s.Address(h):void 0,this.value=new s.BN((0,s.toBuffer)(""===o?"0x":o)),this.data=(0,s.toBuffer)(""===c?"0x":c),this.v=p.length>0?new s.BN(p):void 0,this.r=g.length>0?new s.BN(g):void 0,this.s=m.length>0?new s.BN(m):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0)}return Object.defineProperty(e.prototype,"transactionType",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e.prototype.supports=function(e){return this.activeCapabilities.includes(e)},e.prototype.validate=function(e){void 0===e&&(e=!1);var t=[];return this.getBaseFee().gt(this.gasLimit)&&t.push("gasLimit is too low. given ".concat(this.gasLimit,", need at least ").concat(this.getBaseFee())),this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),e?t:0===t.length},e.prototype.getBaseFee=function(){var e=this.getDataFee().addn(this.common.param("gasPrices","tx"));return this.common.gteHardfork("homestead")&&this.toCreationAddress()&&e.iaddn(this.common.param("gasPrices","txCreation")),e},e.prototype.getDataFee=function(){for(var e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero"),r=0,n=0;n-1&&this.activeCapabilities.splice(d,1)}return l},e.prototype._getCommon=function(e,t){var r;if(t){var n=new s.BN((0,s.toBuffer)(t));if(e){if(!e.chainIdBN().eq(n)){var i=this._errorMsg("The chain ID does not match the chain ID of Common");throw new Error(i)}return e.copy()}return a.default.isSupportedChainId(n)?new a.default({chain:n,hardfork:this.DEFAULT_HARDFORK}):a.default.forCustomChain(this.DEFAULT_CHAIN,{name:"custom-chain",networkId:n,chainId:n},this.DEFAULT_HARDFORK)}return null!==(r=null==e?void 0:e.copy())&&void 0!==r?r:new a.default({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})},e.prototype._validateCannotExceedMaxInteger=function(e,t,r){var n,i;void 0===t&&(t=256),void 0===r&&(r=!1);try{for(var a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),c=a.next();!c.done;c=a.next()){var u=o(c.value,2),l=u[0],d=u[1];switch(t){case 64:if(r){if(null==d?void 0:d.gte(s.MAX_UINT64)){var f=this._errorMsg("".concat(l," cannot equal or exceed MAX_UINT64 (2^64-1), given ").concat(d));throw new Error(f)}}else if(null==d?void 0:d.gt(s.MAX_UINT64))throw f=this._errorMsg("".concat(l," cannot exceed MAX_UINT64 (2^64-1), given ").concat(d)),new Error(f);break;case 256:if(r){if(null==d?void 0:d.gte(s.MAX_INTEGER))throw f=this._errorMsg("".concat(l," cannot equal or exceed MAX_INTEGER (2^256-1), given ").concat(d)),new Error(f)}else if(null==d?void 0:d.gt(s.MAX_INTEGER))throw f=this._errorMsg("".concat(l," cannot exceed MAX_INTEGER (2^256-1), given ").concat(d)),new Error(f);break;default:throw f=this._errorMsg("unimplemented bits value"),new Error(f)}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype._getSharedErrorPostfix=function(){var e="";try{e=this.isSigned()?(0,s.bufferToHex)(this.hash()):"not available (unsigned)"}catch(t){e="error"}var t="";try{t=this.isSigned().toString()}catch(t){e="error"}var r="";try{r=this.common.hardfork()}catch(e){r="error"}return"tx type=".concat(this.type," hash=").concat(e," nonce=").concat(this.nonce," value=").concat(this.value," ")+"signed=".concat(t," hf=").concat(r)},e}();t.BaseTransaction=u},660:(e,t,r)=>{"use strict";var n,i=r(29033).Buffer,o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(e,12),i=n[0],o=n[1],a=n[2],c=n[3],u=n[4],l=n[5],d=n[6],f=n[7],h=n[8],p=n[9],g=n[10],m=n[11];return(0,s.validateNoLeadingZeroes)({nonce:o,maxPriorityFeePerGas:a,maxFeePerGas:c,gasLimit:u,value:d,v:p,r:g,s:m}),new t({chainId:new s.BN(i),nonce:o,maxPriorityFeePerGas:a,maxFeePerGas:c,gasLimit:u,to:l,value:d,data:f,accessList:null!=h?h:[],v:void 0!==p?new s.BN(p):void 0,r:g,s:m},r)},t.prototype.getDataFee=function(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;var t=e.prototype.getDataFee.call(this);return t.iaddn(l.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t},t.prototype.getUpfrontCost=function(e){void 0===e&&(e=new s.BN(0));var t=s.BN.min(this.maxPriorityFeePerGas,this.maxFeePerGas.sub(e)).add(e);return this.gasLimit.mul(t).add(this.value)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,s.bnToUnpaddedBuffer)(this.maxFeePerGas),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):i.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):i.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):i.from([])]},t.prototype.serialize=function(){var e=this.raw();return i.concat([d,s.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,9),r=i.concat([d,s.rlp.encode(t)]);return e?(0,s.keccak256)(r):r},t.prototype.hash=function(){if(!this.isSigned()){var e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned()){var t=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(t)}var r=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2)))throw t=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid"),new Error(t);var n=this,i=n.v,o=n.r,a=n.s;try{return(0,s.ecrecover)(r,i.addn(27),(0,s.bnToUnpaddedBuffer)(o),(0,s.bnToUnpaddedBuffer)(a))}catch(e){throw t=this._errorMsg("Invalid Signature"),new Error(t)}},t.prototype._processSignature=function(e,r,n){var i=a(a({},this.txOptions),{common:this.common});return t.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(r),s:new s.BN(n)},i)},t.prototype.toJSON=function(){var e=l.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),maxPriorityFeePerGas:(0,s.bnToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,s.bnToHex)(this.maxFeePerGas),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype.errorStr=function(){return this._getSharedErrorPostfix()+" maxFeePerGas=".concat(this.maxFeePerGas," maxPriorityFeePerGas=").concat(this.maxPriorityFeePerGas)},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(c.BaseTransaction);t.default=f},97613:(e,t,r)=>{"use strict";var n,i=r(29033).Buffer,o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(e,11),i=n[0],o=n[1],a=n[2],c=n[3],u=n[4],l=n[5],d=n[6],f=n[7],h=n[8],p=n[9],g=n[10];return(0,s.validateNoLeadingZeroes)({nonce:o,gasPrice:a,gasLimit:c,value:l,v:h,r:p,s:g}),new t({chainId:new s.BN(i),nonce:o,gasPrice:a,gasLimit:c,to:u,value:l,data:d,accessList:null!=f?f:[],v:void 0!==h?new s.BN(h):void 0,r:p,s:g},r)},t.prototype.getDataFee=function(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;var t=e.prototype.getDataFee.call(this);return t.iaddn(l.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):i.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):i.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):i.from([])]},t.prototype.serialize=function(){var e=this.raw();return i.concat([d,s.rlp.encode(e)])},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this.raw().slice(0,8),r=i.concat([d,s.rlp.encode(t)]);return e?(0,s.keccak256)(r):r},t.prototype.hash=function(){if(!this.isSigned()){var e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},t.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},t.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned()){var t=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(t)}var r=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2)))throw t=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid"),new Error(t);var n=this,i=n.yParity,o=n.r,a=n.s;try{return(0,s.ecrecover)(r,i.addn(27),(0,s.bnToUnpaddedBuffer)(o),(0,s.bnToUnpaddedBuffer)(a))}catch(e){throw t=this._errorMsg("Invalid Signature"),new Error(t)}},t.prototype._processSignature=function(e,r,n){var i=a(a({},this.txOptions),{common:this.common});return t.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(r),s:new s.BN(n)},i)},t.prototype.toJSON=function(){var e=l.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype.errorStr=function(){var e,t;return this._getSharedErrorPostfix()+" gasPrice=".concat(this.gasPrice," accessListCount=").concat(null!==(t=null===(e=this.accessList)||void 0===e?void 0:e.length)&&void 0!==t?t:0)},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(c.BaseTransaction);t.default=f},42339:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FeeMarketEIP1559Transaction=t.TransactionFactory=t.AccessListEIP2930Transaction=t.Transaction=void 0;var o=r(53088);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return i(o).default}});var a=r(97613);Object.defineProperty(t,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return i(a).default}});var s=r(89562);Object.defineProperty(t,"TransactionFactory",{enumerable:!0,get:function(){return i(s).default}});var c=r(660);Object.defineProperty(t,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return i(c).default}}),function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)}(r(87325),t)},53088:(e,t,r)=>{"use strict";var n,i=r(29033).Buffer,o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(e,9),i=n[0],o=n[1],a=n[2],c=n[3],u=n[4],l=n[5],d=n[6],f=n[7],h=n[8];return(0,s.validateNoLeadingZeroes)({nonce:i,gasPrice:o,gasLimit:a,value:u,v:d,r:f,s:h}),new t({nonce:i,gasPrice:o,gasLimit:a,to:c,value:u,data:l,v:d,r:f,s:h},r)},t.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):i.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):i.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):i.from([])]},t.prototype.serialize=function(){return s.rlp.encode(this.raw())},t.prototype._getMessageToSign=function(){var e=[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:i.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data];return this.supports(c.Capability.EIP155ReplayProtection)&&(e.push((0,s.toBuffer)(this.common.chainIdBN())),e.push((0,s.unpadBuffer)((0,s.toBuffer)(0))),e.push((0,s.unpadBuffer)((0,s.toBuffer)(0)))),e},t.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this._getMessageToSign();return e?(0,s.rlphash)(t):t},t.prototype.getDataFee=function(){return this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork()?this.cache.dataFee.value:(Object.isFrozen(this)&&(this.cache.dataFee={value:e.prototype.getDataFee.call(this),hardfork:this.common.hardfork()}),e.prototype.getDataFee.call(this))},t.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},t.prototype.hash=function(){return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.rlphash)(this.raw())),this.cache.hash):(0,s.rlphash)(this.raw())},t.prototype.getMessageToVerifySignature=function(){if(!this.isSigned()){var e=this._errorMsg("This transaction is not signed");throw new Error(e)}var t=this._getMessageToSign();return(0,s.rlphash)(t)},t.prototype.getSenderPublicKey=function(){var e,t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(c.N_DIV_2))){var r=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(r)}var n=this,i=n.v,o=n.r,a=n.s;try{return(0,s.ecrecover)(t,i,(0,s.bnToUnpaddedBuffer)(o),(0,s.bnToUnpaddedBuffer)(a),this.supports(c.Capability.EIP155ReplayProtection)?this.common.chainIdBN():void 0)}catch(e){throw r=this._errorMsg("Invalid Signature"),new Error(r)}},t.prototype._processSignature=function(e,r,n){var i=new s.BN(e);this.supports(c.Capability.EIP155ReplayProtection)&&i.iadd(this.common.chainIdBN().muln(2).addn(8));var o=a(a({},this.txOptions),{common:this.common});return t.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:i,r:new s.BN(r),s:new s.BN(n)},o)},t.prototype.toJSON=function(){return{nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},t.prototype._validateTxV=function(e,t){if(void 0!==e&&e.ltn(37)&&!e.eqn(27)&&!e.eqn(28))throw new Error("Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ".concat(e));var r;if(void 0!==e&&(!t||t.gteHardfork("spuriousDragon"))&&!e.eqn(27)&&!e.eqn(28))if(t){var n=t.chainIdBN().muln(2);if(!e.eq(n.addn(35))&&!e.eq(n.addn(36)))throw new Error("Incompatible EIP155-based V ".concat(e," and chain id ").concat(t.chainIdBN(),". See the Common parameter of the Transaction constructor to set the chain id."))}else{var i;i=e.subn(35).isEven()?35:36,r=e.subn(i).divn(2)}return this._getCommon(t,r)},t.prototype._unsignedTxImplementsEIP155=function(){return this.common.gteHardfork("spuriousDragon")},t.prototype._signedTxImplementsEIP155=function(){if(!this.isSigned()){var e=this._errorMsg("This transaction is not signed");throw new Error(e)}var t=this.common.gteHardfork("spuriousDragon"),r=this.v,n=this.common.chainIdBN().muln(2);return(r.eq(n.addn(35))||r.eq(n.addn(36)))&&t},t.prototype.errorStr=function(){return this._getSharedErrorPostfix()+" gasPrice=".concat(this.gasPrice)},t.prototype._errorMsg=function(e){return"".concat(e," (").concat(this.errorStr(),")")},t}(u.BaseTransaction);t.default=d},89562:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var i=r(33062),o=r(42339),a=function(){function e(){}return e.fromTxData=function(e,t){if(void 0===t&&(t={}),"type"in e&&void 0!==e.type){var r=new i.BN((0,i.toBuffer)(e.type)).toNumber();if(0===r)return o.Transaction.fromTxData(e,t);if(1===r)return o.AccessListEIP2930Transaction.fromTxData(e,t);if(2===r)return o.FeeMarketEIP1559Transaction.fromTxData(e,t);throw new Error("Tx instantiation with type ".concat(r," not supported"))}return o.Transaction.fromTxData(e,t)},e.fromSerializedData=function(e,t){if(void 0===t&&(t={}),e[0]<=127){var r=void 0;switch(e[0]){case 1:r=2930;break;case 2:r=1559;break;default:throw new Error("TypedTransaction with ID ".concat(e[0]," unknown"))}return 1559===r?o.FeeMarketEIP1559Transaction.fromSerializedTx(e,t):o.AccessListEIP2930Transaction.fromSerializedTx(e,t)}return o.Transaction.fromSerializedTx(e,t)},e.fromBlockBodyData=function(e,t){if(void 0===t&&(t={}),n.isBuffer(e))return this.fromSerializedData(e,t);if(Array.isArray(e))return o.Transaction.fromValuesArray(e,t);throw new Error("Cannot decode transaction: unknown type input")},e.getTransactionClass=function(e,t){if(void 0===e&&(e=0),0==e||e>=128&&e<=255)return o.Transaction;switch(e){case 1:return o.AccessListEIP2930Transaction;case 2:return o.FeeMarketEIP1559Transaction;default:throw new Error("TypedTransaction with ID ".concat(e," unknown"))}},e}();t.default=a},87325:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.N_DIV_2=t.isAccessList=t.isAccessListBuffer=t.Capability=void 0;var n,i=r(33062);function o(e){if(0===e.length)return!0;var t=e[0];return!!Array.isArray(t)}(n=t.Capability||(t.Capability={}))[n.EIP155ReplayProtection=155]="EIP155ReplayProtection",n[n.EIP1559FeeMarket=1559]="EIP1559FeeMarket",n[n.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",n[n.EIP2930AccessLists=2930]="EIP2930AccessLists",t.isAccessListBuffer=o,t.isAccessList=function(e){return!o(e)},t.N_DIV_2=new i.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16)},53789:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessLists=t.checkMaxInitCodeSize=void 0;var n=r(33062),i=r(87325);t.checkMaxInitCodeSize=function(e,t){if(t>e.param("vm","maxInitCodeSize"))throw new Error("the initcode size of this transaction is too large: it is ".concat(t," while the max is ").concat(e.param("vm","maxInitCodeSize")))};var o=function(){function e(){}return e.getAccessListData=function(e){var t,r;if(e&&(0,i.isAccessList)(e)){t=e;for(var o=[],a=0;a{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(74519)),a=i(r(69721)),s=i(r(58985));Object.defineProperty(t,"__esModule",{value:!0}),t.accountBodyToRLP=t.accountBodyToSlim=t.accountBodyFromSlim=t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var c=r(89658),u=r(1243),l=r(86992),d=r(40890),f=r(55803),h=r(21449),p=r(99047),g=r(72560),m=BigInt(0),y=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.KECCAK256_RLP,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h.KECCAK256_NULL;(0,a.default)(this,e),this.nonce=t,this.balance=r,this.storageRoot=n,this.codeHash=i,this._validate()}return(0,s.default)(e,[{key:"_validate",value:function(){if(this.nonce=8?s+=r[c].toUpperCase():s+=r[c];return s},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){return(0,p.assertIsBuffer)(e),(0,p.assertIsBuffer)(t),(0,f.bufferToBigInt)(t)===BigInt(0)?n.from((0,u.keccak256)(c.RLP.encode((0,f.bufArrToArr)([e,null])))).slice(-20):n.from((0,u.keccak256)(c.RLP.encode((0,f.bufArrToArr)([e,t])))).slice(-20)},t.generateAddress2=function(e,t,r){if((0,p.assertIsBuffer)(e),(0,p.assertIsBuffer)(t),(0,p.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");var i=(0,u.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,u.keccak256)(r)]));return(0,f.toBuffer)(i).slice(-20)},t.isValidPrivate=function(e){return l.secp256k1.utils.isValidPrivateKey(e)},t.isValidPublic=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,p.assertIsBuffer)(e),64===e.length)try{return l.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),e])),!0}catch(e){return!1}if(!t)return!1;try{return l.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}},t.pubToAddress=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,p.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from(l.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return n.from((0,u.keccak256)(e)).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,p.assertIsBuffer)(e),n.from(l.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,p.assertIsBuffer)(e),64!==e.length&&(e=n.from(l.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e},t.zeroAddress=function(){var e=(0,f.zeros)(20);return(0,f.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,p.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e},t.accountBodyFromSlim=v;var b=new Uint8Array(0);t.accountBodyToSlim=function(e){var t=(0,o.default)(e,4),r=t[0],n=t[1],i=t[2],a=t[3];return[r,n,(0,f.arrToBufArr)(i).equals(h.KECCAK256_RLP)?b:i,(0,f.arrToBufArr)(a).equals(h.KECCAK256_NULL)?b:a]},t.accountBodyToRLP=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:v(e);return(0,f.arrToBufArr)(c.RLP.encode(t))}},78718:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(69721)),a=i(r(58985));Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var s=r(59786),c=r(55803),u=function(){function e(t){if((0,o.default)(this,e),20!==t.length)throw new Error("Invalid address length");this.buf=t}return(0,a.default)(e,[{key:"equals",value:function(e){return this.buf.equals(e.buf)}},{key:"isZero",value:function(){return this.equals(e.zero())}},{key:"isPrecompileOrSystemAddress",value:function(){var e=(0,c.bufferToBigInt)(this.buf),t=BigInt(0),r=BigInt("0xffff");return e>=t&&e<=r}},{key:"toString",value:function(){return"0x"+this.buf.toString("hex")}},{key:"toBuffer",value:function(){return n.from(this.buf)}}],[{key:"zero",value:function(){return new e((0,c.zeros)(20))}},{key:"fromString",value:function(t){if(!(0,s.isValidAddress)(t))throw new Error("Invalid address");return new e((0,c.toBuffer)(t))}},{key:"fromPublicKey",value:function(t){if(!n.isBuffer(t))throw new Error("Public key should be Buffer");return new e((0,s.pubToAddress)(t))}},{key:"fromPrivateKey",value:function(t){if(!n.isBuffer(t))throw new Error("Private key should be Buffer");return new e((0,s.privateToAddress)(t))}},{key:"generate",value:function(t,r){if("bigint"!=typeof r)throw new Error("Expected nonce to be a bigint");return new e((0,s.generateAddress)(t.buf,(0,c.bigIntToBuffer)(r)))}},{key:"generate2",value:function(t,r,i){if(!n.isBuffer(r))throw new Error("Expected salt to be a Buffer");if(!n.isBuffer(i))throw new Error("Expected initCode to be a Buffer");return new e((0,s.generateAddress2)(t.buf,r,i))}}]),e}();t.Address=u},77692:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(69721)),a=n(r(58985)),s=n(r(119)),c=n(r(15163)),u=n(r(34650)),l=n(r(21949)),d=n(r(94571));function f(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new h(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function h(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return h=function(e){this.s=e,this.n=e.next},h.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new h(e)}function p(){return(p=(0,d.default)(i.default.mark((function e(t,r,n){var o,a,s,c,u,l,d;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=!1,s=!1,e.prev=2,u=i.default.mark((function e(){var r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=d.value,e.prev=1,!(r.length<2)){e.next=6;break}r.call(t,n),e.next=8;break;case 6:return e.next=8,new Promise((function(e,i){r.call(t,n,(function(t){t?i(t):e()}))}));case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(1),o=e.t0;case 13:case"end":return e.stop()}}),e,null,[[1,10]])})),l=f(r);case 5:return e.next=7,l.next();case 7:if(!(a=!(d=e.sent).done)){e.next=12;break}return e.delegateYield(u(),"t0",9);case 9:a=!1,e.next=5;break;case 12:e.next=18;break;case 14:e.prev=14,e.t1=e.catch(2),s=!0,c=e.t1;case 18:if(e.prev=18,e.prev=19,!a||null==l.return){e.next=23;break}return e.next=23,l.return();case 23:if(e.prev=23,!s){e.next=26;break}throw c;case 26:return e.finish(23);case 27:return e.finish(18);case 28:if(!o){e.next=30;break}throw o;case 30:case"end":return e.stop()}}),e,null,[[2,14,18,28],[19,,23,27]])})))).apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEventEmitter=void 0;var g=function(e){(0,c.default)(i,e);var t,r,n=(t=i,r=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(e){return!1}}(),function(){var e,n=(0,l.default)(t);if(r){var i=(0,l.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,u.default)(this,e)});function i(){return(0,o.default)(this,i),n.apply(this,arguments)}return(0,a.default)(i,[{key:"emit",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i0}},{key:"once",value:function(e,t){var r,n=this;if("function"!=typeof t)throw new TypeError("listener must be a function");return r=t.length>=2?function(i,o){n.removeListener(e,r),t(i,o)}:function(i){n.removeListener(e,r),t(i,r)},n.on(e,r),n}},{key:"first",value:function(e,t){var r,n=null!==(r=this._events[e])&&void 0!==r?r:[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(n)||(this._events[e]=n=[n]),n.unshift(t),this}},{key:"before",value:function(e,t,r){return this.beforeOrAfter(e,t,r)}},{key:"after",value:function(e,t,r){return this.beforeOrAfter(e,t,r,"after")}},{key:"beforeOrAfter",value:function(e,t,r,n){var i,o,a,s=null!==(i=this._events[e])&&void 0!==i?i:[],c="after"===n?1:0;if("function"!=typeof r)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(s)||(this._events[e]=s=[s]),a=s.length,o=s.length;o--;)if(s[o]===t){a=o+c;break}return s.splice(a,0,r),this}},{key:"on",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"on",this).call(this,e,t)}},{key:"addListener",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"addListener",this).call(this,e,t)}},{key:"prependListener",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"prependListener",this).call(this,e,t)}},{key:"prependOnceListener",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"prependOnceListener",this).call(this,e,t)}},{key:"removeAllListeners",value:function(e){return(0,s.default)((0,l.default)(i.prototype),"removeAllListeners",this).call(this,e)}},{key:"removeListener",value:function(e,t){return(0,s.default)((0,l.default)(i.prototype),"removeListener",this).call(this,e,t)}},{key:"eventNames",value:function(){return(0,s.default)((0,l.default)(i.prototype),"eventNames",this).call(this)}},{key:"listeners",value:function(e){return(0,s.default)((0,l.default)(i.prototype),"listeners",this).call(this,e)}},{key:"listenerCount",value:function(e){return(0,s.default)((0,l.default)(i.prototype),"listenerCount",this).call(this,e)}},{key:"getMaxListeners",value:function(){return(0,s.default)((0,l.default)(i.prototype),"getMaxListeners",this).call(this)}},{key:"setMaxListeners",value:function(e){return(0,s.default)((0,l.default)(i.prototype),"setMaxListeners",this).call(this,e)}}]),i}(r(38291).EventEmitter);t.AsyncEventEmitter=g},55803:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847)(r(74519));Object.defineProperty(t,"__esModule",{value:!0}),t.intToUnpaddedBuffer=t.bigIntToUnpaddedBuffer=t.bigIntToHex=t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.short=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToInt=t.bigIntToBuffer=t.bufferToBigInt=t.bufferToHex=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var o=r(99047),a=r(72560);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))},t.intToBuffer=function(e){var r=(0,t.intToHex)(e);return n.from((0,a.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};var s=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};function u(e){var r=(0,t.bufferToHex)(e);return"0x"===r?BigInt(0):BigInt(r)}function l(e){return(0,t.toBuffer)("0x"+e.toString(16))}t.unpadBuffer=function(e){return(0,o.assertIsBuffer)(e),c(e)},t.unpadArray=function(e){return(0,o.assertIsArray)(e),c(e)},t.unpadHexString=function(e){return(0,o.assertIsHexString)(e),e=(0,a.stripHexPrefix)(e),"0x"+c(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,a.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return n.from((0,a.padToEven)((0,a.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if("bigint"==typeof e){if(e1&&void 0!==arguments[1]?arguments[1]:50,r=n.isBuffer(e)?e.toString("hex"):e;return r.length<=t?r:r.slice(0,t)+"\u2026"},t.toUtf8=function(e){if((e=(0,a.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var r=[],i=0;i0&&0===a[0])throw new Error("".concat(o," cannot have leading zeroes, received: ").concat(a.toString("hex")))}},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):Uint8Array.from(null!=t?t:[])},t.bigIntToHex=function(e){return"0x"+e.toString(16)},t.bigIntToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)(l(e))},t.intToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)((0,t.intToBuffer)(e))}},21449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_WITHDRAWALS_PER_PAYLOAD=t.RLP_EMPTY_STRING=t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.SECP256K1_ORDER_DIV_2=t.SECP256K1_ORDER=t.MAX_INTEGER_BIGINT=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(29033),i=r(86992);t.MAX_UINT64=BigInt("0xffffffffffffffff"),t.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),t.SECP256K1_ORDER=i.secp256k1.CURVE.n,t.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),t.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex"),t.RLP_EMPTY_STRING=n.Buffer.from([128]),t.MAX_WITHDRAWALS_PER_PAYLOAD=16},89890:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactBytesToNibbles=t.bytesToNibbles=t.nibblesToCompactBytes=t.nibblesToBytes=t.hasTerminator=void 0,t.hasTerminator=function(e){return e.length>0&&16===e[e.length-1]},t.nibblesToBytes=function(e,t){for(var r=0,n=0;n{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var i=r(72560);t.assertIsHexString=function(e){if(!(0,i.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}},t.assertIsBuffer=function(e){if(!n.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}},t.assertIsArray=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}},t.assertIsString=function(e){if("string"!=typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}}},65907:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.toAscii=t.stripHexPrefix=t.padToEven=t.isHexString=t.isHexPrefixed=t.getKeys=t.getBinarySize=t.fromUtf8=t.fromAscii=t.arrayContainsArray=void 0,i(r(21449),t),i(r(44205),t),i(r(59786),t),i(r(78718),t),i(r(1313),t),i(r(65404),t),i(r(55803),t),i(r(62198),t),i(r(89890),t),i(r(77692),t);var o=r(72560);Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),i(r(35651),t),i(r(6449),t)},72560:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847)(r(3355));function o(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat((0,i.default)(e)));return"0"===e[0]&&"x"===e[1]}function a(e){var t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat((0,i.default)(t)));return t.length%2&&(t="0".concat(t)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=o,t.stripHexPrefix=function(e){if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat((0,i.default)(e)));return o(e)?e.slice(2):e},t.padToEven=a,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', received ".concat((0,i.default)(e)));return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat((0,i.default)(e),"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat((0,i.default)(t),"'"));return t[!0===r?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r0&&e.length!==2+2*t)}},35651:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(94571)),a=n(r(69721)),s=n(r(58985));Object.defineProperty(t,"__esModule",{value:!0}),t.Lock=void 0;var c=function(){function e(){(0,a.default)(this,e),this.permits=1,this.promiseResolverQueue=[]}var t;return(0,s.default)(e,[{key:"acquire",value:(t=(0,o.default)(i.default.mark((function e(){var t=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.permits>0)){e.next=3;break}return this.permits-=1,e.abrupt("return",Promise.resolve(!0));case 3:return e.abrupt("return",new Promise((function(e){return t.promiseResolverQueue.push(e)})));case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"release",value:function(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;var e=this.promiseResolverQueue.shift();e&&e(!0)}}}]),e}();t.Lock=c},6449:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(94571));Object.defineProperty(t,"__esModule",{value:!0}),t.getProvider=t.fetchFromProvider=void 0;var a=r(37441),s=function(){var e=(0,o.default)(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,a.default)(t,{headers:{"content-type":"application/json"},type:"json",data:{method:r.method,params:r.params,jsonrpc:"2.0",id:1}});case 2:return n=e.sent,e.abrupt("return",n.result);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();t.fetchFromProvider=s,t.getProvider=function(e){var t;if("string"==typeof e)return e;if(void 0!==(null==e||null===(t=e.connection)||void 0===t?void 0:t.url))return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},65404:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var i=r(1243),o=r(86992),a=r(55803),s=r(21449),c=r(99047);function u(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function l(e){return e===BigInt(0)||e===BigInt(1)}t.ecsign=function(e,t,r){var i=o.secp256k1.sign(e,t),a=i.toCompactRawBytes();return{r:n.from(a.slice(0,32)),s:n.from(a.slice(32,64)),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2)}},t.ecrecover=function(e,t,r,i,s){var c=n.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(i,32)],64),d=u(t,s);if(!l(d))throw new Error("Invalid signature v value");var f=o.secp256k1.Signature.fromCompact(c).addRecoveryBit(Number(d)).recoverPublicKey(e);return n.from(f.toRawBytes(!1).slice(1))},t.toRpcSig=function(e,t,r,i){if(!l(u(e,i)))throw new Error("Invalid signature v value");return(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(r,32),(0,a.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,i){if(!l(u(e,i)))throw new Error("Invalid signature v value");var o=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&((o=n.from(r))[0]|=128),(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(o,32)]))},t.fromRpcSig=function(e){var t,r,n,i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToBigInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");t=i.slice(0,32),r=i.slice(32,64),n=BigInt((0,a.bufferToInt)(i.slice(32,33))>>7),r[0]&=127}return n<27&&(n+=BigInt(27)),{v:n,r:t,s:r}},t.isValidSignature=function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4?arguments[4]:void 0;if(32!==t.length||32!==r.length)return!1;if(!l(u(e,i)))return!1;var o=(0,a.bufferToBigInt)(t),c=(0,a.bufferToBigInt)(r);return!(o===BigInt(0)||o>=s.SECP256K1_ORDER||c===BigInt(0)||c>=s.SECP256K1_ORDER||n&&c>=s.SECP256K1_ORDER_DIV_2)},t.hashPersonalMessage=function(e){(0,c.assertIsBuffer)(e);var t=n.from("\x19Ethereum Signed Message:\n".concat(e.length),"utf-8");return n.from((0,i.keccak256)(n.concat([t,e])))}},62198:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=void 0;var n,i=r(55803),o=r(72560);!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(n=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"==typeof e&&!(0,o.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(e));if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,i.toBuffer)(e);switch(t){case n.Buffer:return r;case n.BigInt:return(0,i.bufferToBigInt)(r);case n.Number:var a=(0,i.bufferToBigInt)(r);if(a>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(a);case n.PrefixedHexString:return(0,i.bufferToHex)(r);default:throw new Error("unknown outputType")}}}},44205:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GWEI_TO_WEI=void 0,t.GWEI_TO_WEI=BigInt(1e9)},1313:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(74519)),a=i(r(69721)),s=i(r(58985));Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawal=void 0;var c=r(78718),u=r(55803),l=r(62198),d=function(){function e(t,r,n,i){(0,a.default)(this,e),this.index=t,this.validatorIndex=r,this.address=n,this.amount=i}return(0,s.default)(e,[{key:"raw",value:function(){return e.toBufferArray(this)}},{key:"toValue",value:function(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}},{key:"toJSON",value:function(){return{index:(0,u.bigIntToHex)(this.index),validatorIndex:(0,u.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,u.bigIntToHex)(this.amount)}}}],[{key:"fromWithdrawalData",value:function(t){var r=t.index,n=t.validatorIndex,i=t.address,o=t.amount;return new e((0,l.toType)(r,l.TypeOutput.BigInt),(0,l.toType)(n,l.TypeOutput.BigInt),new c.Address((0,l.toType)(i,l.TypeOutput.Buffer)),(0,l.toType)(o,l.TypeOutput.BigInt))}},{key:"fromValuesArray",value:function(t){if(4!==t.length)throw Error("Invalid withdrawalArray length expected=4 actual=".concat(t.length));var r=(0,o.default)(t,4),n=r[0],i=r[1],a=r[2],s=r[3];return e.fromWithdrawalData({index:n,validatorIndex:i,address:a,amount:s})}},{key:"toBufferArray",value:function(e){var t=e.index,r=e.validatorIndex,i=e.address,o=e.amount;return[(0,l.toType)(t,l.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,l.toType)(t,l.TypeOutput.Buffer),(0,l.toType)(r,l.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,l.toType)(r,l.TypeOutput.Buffer),i instanceof c.Address?i.buf:(0,l.toType)(i,l.TypeOutput.Buffer),(0,l.toType)(o,l.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,l.toType)(o,l.TypeOutput.Buffer)]}}]),e}();t.Withdrawal=d},98067:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="abi/5.7.0"},44937:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.defaultAbiCoder=t.AbiCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=r(908),s=r(23694),c=r(64327),u=r(98067),l=r(17316),d=r(49146),f=r(4341),h=r(30024),p=r(53861),g=r(90028),m=r(4522),y=r(88287),v=r(48040),b=r(52010),w=r(60800),A=new c.Logger(u.version),_=new RegExp(/^bytes([0-9]*)$/),E=new RegExp(/^(u?int)([0-9]*)$/),S=function(){function e(t){(0,i.default)(this,e),(0,s.defineReadOnly)(this,"coerceFunc",t||null)}return(0,o.default)(e,[{key:"_getCoder",value:function(e){var t=this;switch(e.baseType){case"address":return new d.AddressCoder(e.name);case"bool":return new h.BooleanCoder(e.name);case"string":return new v.StringCoder(e.name);case"bytes":return new p.BytesCoder(e.name);case"array":return new f.ArrayCoder(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new b.TupleCoder((e.components||[]).map((function(e){return t._getCoder(e)})),e.name);case"":return new m.NullCoder(e.name)}var r=e.type.match(E);if(r){var n=parseInt(r[2]||"256");return(0===n||n>256||n%8!=0)&&A.throwArgumentError("invalid "+r[1]+" bit length","param",e),new y.NumberCoder(n/8,"int"===r[1],e.name)}if(r=e.type.match(_)){var i=parseInt(r[1]);return(0===i||i>32)&&A.throwArgumentError("invalid bytes length","param",e),new g.FixedBytesCoder(i,e.name)}return A.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new l.Reader(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new l.Writer(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(w.ParamType.from(e))}));return new b.TupleCoder(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&A.throwError("types/values length mismatch",c.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var n=e.map((function(e){return r._getCoder(w.ParamType.from(e))})),i=new b.TupleCoder(n,"_"),o=this._getWriter();return i.encode(o,t),o.data}},{key:"decode",value:function(e,t,r){var n=this,i=e.map((function(e){return n._getCoder(w.ParamType.from(e))}));return new b.TupleCoder(i,"_").decode(this._getReader((0,a.arrayify)(t),r))}}]),e}();t.AbiCoder=S;var k=new S;t.defaultAbiCoder=k},17316:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.Writer=t.Reader=t.Coder=void 0,t.checkResultErrors=function(e){var t=[];return function e(r,n){if(Array.isArray(n))for(var i in n){var o=r.slice();o.push(i);try{e(o,n[i])}catch(e){t.push({path:o,error:e})}}}([],e),t};var i=n(r(69721)),o=n(r(58985)),a=r(908),s=r(34952),c=r(23694),u=r(64327),l=r(98067),d=new u.Logger(l.version),f=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.type=r,this.localName=n,this.dynamic=o}return(0,o.default)(e,[{key:"_throwError",value:function(e,t){d.throwArgumentError(e,this.localName,t)}}]),e}();t.Coder=f;var h=function(){function e(t){(0,i.default)(this,e),(0,c.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return(0,o.default)(e,[{key:"data",get:function(){return(0,a.hexConcat)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData((0,a.concat)(e._data))}},{key:"writeBytes",value:function(e){var t=(0,a.arrayify)(e),r=t.length%this.wordSize;return r&&(t=(0,a.concat)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=(0,a.arrayify)(s.BigNumber.from(e));return t.length>this.wordSize&&d.throwError("value out-of-bounds",u.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,a.concat)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}();t.Writer=h;var p=function(){function e(t,r,n,o){(0,i.default)(this,e),(0,c.defineReadOnly)(this,"_data",(0,a.arrayify)(t)),(0,c.defineReadOnly)(this,"wordSize",r||32),(0,c.defineReadOnly)(this,"_coerceFunc",n),(0,c.defineReadOnly)(this,"allowLoose",o),this._offset=0}return(0,o.default)(e,[{key:"data",get:function(){return(0,a.hexlify)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:d.throwError("data out-of-bounds",u.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return s.BigNumber.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}();t.Reader=p},49146:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949)),u=r(77921),l=r(908),d=function(e){(0,a.default)(d,e);var t,r,n=(t=d,r=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(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function d(e){return(0,i.default)(this,d),n.call(this,"address","address",e,!1)}return(0,o.default)(d,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{t=(0,u.getAddress)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return(0,u.getAddress)((0,l.hexZeroPad)(e.readValue().toHexString(),20))}}]),d}(r(17316).Coder);t.AddressCoder=d},58090:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949)),u=function(e){(0,a.default)(u,e);var t,r,n=(t=u,r=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(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function u(e){var t;return(0,i.default)(this,u),(t=n.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,t}return(0,o.default)(u,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(e,t){return this.coder.encode(e,t)}},{key:"decode",value:function(e){return this.coder.decode(e)}}]),u}(r(17316).Coder);t.AnonymousCoder=u},4341:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=void 0,t.pack=g,t.unpack=m;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949)),u=n(r(3355)),l=r(64327),d=r(98067),f=r(17316),h=r(58090),p=new l.Logger(d.version);function g(e,t,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===(0,u.default)(r)){var i={};n=t.map((function(e){var t=e.localName;return t||p.throwError("cannot encode object for signature with missing names",l.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]&&p.throwError("cannot encode object for signature with duplicate names",l.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]=!0,r[t]}))}else p.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&p.throwArgumentError("types/value length mismatch","tuple",r);var o=new f.Writer(e.wordSize),a=new f.Writer(e.wordSize),s=[];return t.forEach((function(e,t){var r=n[t];if(e.dynamic){var i=a.length;e.encode(a,r);var c=o.writeUpdatableValue();s.push((function(e){c(e+i)}))}else e.encode(o,r)})),s.forEach((function(e){e(o.length)})),e.appendWriter(o)+e.appendWriter(a)}function m(e,t){var r=[],n=e.subReader(0);t.forEach((function(t){var i=null;if(t.dynamic){var o=e.readValue(),a=n.subReader(o.toNumber());try{i=t.decode(a)}catch(e){if(e.code===l.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===l.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&r.push(i)}));var i=t.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach((function(e,t){var n=e.localName;if(n&&1===i[n]&&("length"===n&&(n="_length"),null==r[n])){var o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:function(){throw o}}):r[n]=o}}));for(var o=function(e){var t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:function(){throw t}})},a=0;a=0?t:"")+"]",s=-1===t||e.dynamic;return(o=n.call(this,"array",a,r,s)).coder=e,o.length=t,o}return(0,o.default)(u,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;re._data.length&&p.throwError("insufficient data length",l.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949)),u=function(e){(0,a.default)(u,e);var t,r,n=(t=u,r=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(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function u(e){return(0,i.default)(this,u),n.call(this,"bool","bool",e,!1)}return(0,o.default)(u,[{key:"defaultValue",value:function(){return!1}},{key:"encode",value:function(e,t){return e.writeValue(t?1:0)}},{key:"decode",value:function(e){return e.coerce(this.type,!e.readValue().isZero())}}]),u}(r(17316).Coder);t.BooleanCoder=u},53861:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.DynamicBytesCoder=t.BytesCoder=void 0;var i=n(r(119)),o=n(r(69721)),a=n(r(58985)),s=n(r(15163)),c=n(r(34650)),u=n(r(21949)),l=r(908);function d(e){var t=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(e){return!1}}();return function(){var r,n=(0,u.default)(e);if(t){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,c.default)(this,r)}}var f=function(e){(0,s.default)(r,e);var t=d(r);function r(e,n){return(0,o.default)(this,r),t.call(this,e,e,n,!0)}return(0,a.default)(r,[{key:"defaultValue",value:function(){return"0x"}},{key:"encode",value:function(e,t){return t=(0,l.arrayify)(t),e.writeValue(t.length)+e.writeBytes(t)}},{key:"decode",value:function(e){return e.readBytes(e.readValue().toNumber(),!0)}}]),r}(r(17316).Coder);t.DynamicBytesCoder=f;var h=function(e){(0,s.default)(r,e);var t=d(r);function r(e){return(0,o.default)(this,r),t.call(this,"bytes",e)}return(0,a.default)(r,[{key:"decode",value:function(e){return e.coerce(this.name,(0,l.hexlify)((0,i.default)((0,u.default)(r.prototype),"decode",this).call(this,e)))}}]),r}(f);t.BytesCoder=h},90028:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedBytesCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949)),u=r(908),l=function(e){(0,a.default)(l,e);var t,r,n=(t=l,r=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(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function l(e,t){var r;(0,i.default)(this,l);var o="bytes"+String(e);return(r=n.call(this,o,o,t,!1)).size=e,r}return(0,o.default)(l,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}},{key:"encode",value:function(e,t){var r=(0,u.arrayify)(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}},{key:"decode",value:function(e){return e.coerce(this.name,(0,u.hexlify)(e.readBytes(this.size)))}}]),l}(r(17316).Coder);t.FixedBytesCoder=l},4522:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.NullCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949)),u=function(e){(0,a.default)(u,e);var t,r,n=(t=u,r=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(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function u(e){return(0,i.default)(this,u),n.call(this,"null","",e,!1)}return(0,o.default)(u,[{key:"defaultValue",value:function(){return null}},{key:"encode",value:function(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}},{key:"decode",value:function(e){return e.readBytes(0),e.coerce(this.name,null)}}]),u}(r(17316).Coder);t.NullCoder=u},88287:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.NumberCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949)),u=r(34952),l=r(5465),d=function(e){(0,a.default)(d,e);var t,r,n=(t=d,r=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(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function d(e,t,r){var o;(0,i.default)(this,d);var a=(t?"int":"uint")+8*e;return(o=n.call(this,a,a,r,!1)).size=e,o.signed=t,o}return(0,o.default)(d,[{key:"defaultValue",value:function(){return 0}},{key:"encode",value:function(e,t){var r=u.BigNumber.from(t),n=l.MaxUint256.mask(8*e.wordSize);if(this.signed){var i=n.mask(8*this.size-1);(r.gt(i)||r.lt(i.add(l.One).mul(l.NegativeOne)))&&this._throwError("value out-of-bounds",t)}else(r.lt(l.Zero)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}},{key:"decode",value:function(e){var t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}]),d}(r(17316).Coder);t.NumberCoder=d},48040:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.StringCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(119)),s=n(r(15163)),c=n(r(34650)),u=n(r(21949)),l=r(78627),d=function(e){(0,s.default)(d,e);var t,r,n=(t=d,r=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(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,c.default)(this,e)});function d(e){return(0,i.default)(this,d),n.call(this,"string",e)}return(0,o.default)(d,[{key:"defaultValue",value:function(){return""}},{key:"encode",value:function(e,t){return(0,a.default)((0,u.default)(d.prototype),"encode",this).call(this,e,(0,l.toUtf8Bytes)(t))}},{key:"decode",value:function(e){return(0,l.toUtf8String)((0,a.default)((0,u.default)(d.prototype),"decode",this).call(this,e))}}]),d}(r(53861).DynamicBytesCoder);t.StringCoder=d},52010:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.TupleCoder=void 0;var i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949)),u=r(17316),l=r(4341),d=function(e){(0,a.default)(u,e);var t,r,n=(t=u,r=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(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function u(e,t){var r;(0,i.default)(this,u);var o=!1,a=[];e.forEach((function(e){e.dynamic&&(o=!0),a.push(e.type)}));var s="tuple("+a.join(",")+")";return(r=n.call(this,"tuple",s,t,o)).coders=e,r}return(0,o.default)(u,[{key:"defaultValue",value:function(){var e=[];this.coders.forEach((function(t){e.push(t.defaultValue())}));var t=this.coders.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach((function(r,n){var i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}},{key:"encode",value:function(e,t){return(0,l.pack)(e,this.coders,t)}},{key:"decode",value:function(e){return e.coerce(this.name,(0,l.unpack)(e,this.coders))}}]),u}(u.Coder);t.TupleCoder=d},60800:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.ParamType=t.FunctionFragment=t.Fragment=t.FormatTypes=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=void 0;var i=n(r(15163)),o=n(r(34650)),a=n(r(21949)),s=n(r(69721)),c=n(r(58985)),u=r(34952),l=r(23694),d=r(64327),f=r(98067);function h(e){var t=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(e){return!1}}();return function(){var r,n=(0,a.default)(e);if(t){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}var p=new d.Logger(f.version),g={},m={calldata:!0,memory:!0,storage:!0},y={calldata:!0,memory:!0};function v(e,t){if("bytes"===e||"string"===e){if(m[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&y[t])return!0;return(m[t]||"payable"===t)&&p.throwArgumentError("invalid modifier","name",t),!1}function b(e,t){for(var r in t)(0,l.defineReadOnly)(e,r,t[r])}var w=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"});t.FormatTypes=w;var A=new RegExp(/^(.*)\[([0-9]*)\]$/),_=function(){function e(t,r){(0,s.default)(this,e),t!==g&&p.throwError("use fromString",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),b(this,r);var n=this.type.match(A);b(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return(0,c.default)(e,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==w.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+")"):r+=this.type,e!==w.sighash&&(!0===this.indexed&&(r+=" indexed"),e===w.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"==typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(g,{name:t.name||null,type:R(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return n=function(e,t){var r=e;function n(t){p.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var o={type:"",name:"",state:{allowType:!0}},a=o,s=0;s2&&p.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||p.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=u.BigNumber.from(r[1]),r[0]):e}function C(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function I(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&p.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&p.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||p.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&p.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&p.throwArgumentError("unable to determine stateMutability","value",e),t}t.EventFragment=k;var T=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,c.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===w.sighash&&p.throwError("cannot format a constructor for sighash",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&p.throwArgumentError("invalid constructor object","value",e);var t=I(e);t.constant&&p.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(_.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?u.BigNumber.from(e.gas):null};return new r(g,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=x(e,t)).match(B);return n&&"constructor"===n[1].trim()||p.throwArgumentError("invalid constructor string","value",e),t.inputs=E(n[2].trim(),!1),C(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(S);t.ConstructorFragment=T;var O=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,c.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ",e!==w.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&p.throwArgumentError("invalid function object","value",e);var t=I(e),n={type:e.type,name:L(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(_.fromObject):[],outputs:e.outputs?e.outputs.map(_.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?u.BigNumber.from(e.gas):null};return new r(g,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=x(e,t)).split(" returns ");n.length>2&&p.throwArgumentError("invalid function string","value",e);var i=n[0].match(B);if(i||p.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&L(t.name),t.inputs=E(i[2],!1),C(i[3].trim(),t),n.length>1){var o=n[1].match(B);""==o[1].trim()&&""==o[3].trim()||p.throwArgumentError("unexpected tokens","value",e),t.outputs=E(o[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(T);function P(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||p.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}t.FunctionFragment=O;var M=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,c.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&p.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:L(e.name),inputs:e.inputs?e.inputs.map(_.fromObject):[]};return P(new r(g,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(B);return n||p.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&L(t.name),t.inputs=E(n[2],!1),P(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(S);function R(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}t.ErrorFragment=M;var N=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function L(e){return e&&e.match(N)||p.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var B=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},62914:(e,t,r)=>{"use strict";Object.defineProperty(t,"RQ",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"_R",{enumerable:!0,get:function(){return n.ParamType}});var n=r(60800),i=r(44937);r(69044)},69044:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDescription=t.LogDescription=t.Interface=t.Indexed=t.ErrorDescription=void 0,Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return m.checkResultErrors}});var i=n(r(58985)),o=n(r(69721)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949)),u=r(77921),l=r(34952),d=r(908),f=r(37515),h=r(64642),p=r(23694),g=r(44937),m=r(17316),y=r(60800),v=r(64327),b=r(98067);function w(e){var t=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(e){return!1}}();return function(){var r,n=(0,c.default)(e);if(t){var i=(0,c.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var A=new v.Logger(b.version),_=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r)}(p.Description);t.LogDescription=_;var E=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r)}(p.Description);t.TransactionDescription=E;var S=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r)}(p.Description);t.ErrorDescription=S;var k=function(e){(0,a.default)(r,e);var t=w(r);function r(){return(0,o.default)(this,r),t.apply(this,arguments)}return(0,i.default)(r,null,[{key:"isIndexed",value:function(e){return!(!e||!e._isIndexed)}}]),r}(p.Description);t.Indexed=k;var x={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function C(e,t){var r=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return r.error=t,r}var I=function(){function e(t){var r=this;(0,o.default)(this,e);var n=[];n="string"==typeof t?JSON.parse(t):t,(0,p.defineReadOnly)(this,"fragments",n.map((function(e){return y.Fragment.from(e)})).filter((function(e){return null!=e}))),(0,p.defineReadOnly)(this,"_abiCoder",(0,p.getStatic)(this instanceof e?this.constructor:void 0,"getAbiCoder")()),(0,p.defineReadOnly)(this,"functions",{}),(0,p.defineReadOnly)(this,"errors",{}),(0,p.defineReadOnly)(this,"events",{}),(0,p.defineReadOnly)(this,"structs",{}),this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":return r.deploy?void A.warn("duplicate definition - constructor"):void(0,p.defineReadOnly)(r,"deploy",e);case"function":t=r.functions;break;case"event":t=r.events;break;case"error":t=r.errors;break;default:return}var n=e.format();t[n]?A.warn("duplicate definition - "+n):t[n]=e})),this.deploy||(0,p.defineReadOnly)(this,"deploy",y.ConstructorFragment.from({payable:!1,type:"constructor"})),(0,p.defineReadOnly)(this,"_isInterface",!0)}return(0,i.default)(e,[{key:"format",value:function(e){e||(e=y.FormatTypes.full),e===y.FormatTypes.sighash&&A.throwArgumentError("interface does not support formatting sighash","format",e);var t=this.fragments.map((function(t){return t.format(e)}));return e===y.FormatTypes.json?JSON.stringify(t.map((function(e){return JSON.parse(e)}))):t}},{key:"getFunction",value:function(e){if((0,d.isHexString)(e)){for(var t in this.functions)if(e===this.getSighash(t))return this.functions[t];A.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){var r=e.trim(),n=Object.keys(this.functions).filter((function(e){return e.split("(")[0]===r}));return 0===n.length?A.throwArgumentError("no matching function","name",r):n.length>1&&A.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var i=this.functions[y.FunctionFragment.fromString(e).format()];return i||A.throwArgumentError("no matching function","signature",e),i}},{key:"getEvent",value:function(e){if((0,d.isHexString)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];A.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.events).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?A.throwArgumentError("no matching event","name",n):i.length>1&&A.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}var o=this.events[y.EventFragment.fromString(e).format()];return o||A.throwArgumentError("no matching event","signature",e),o}},{key:"getError",value:function(e){if((0,d.isHexString)(e)){var t=(0,p.getStatic)(this.constructor,"getSighash");for(var r in this.errors)if(e===t(this.errors[r]))return this.errors[r];A.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?A.throwArgumentError("no matching error","name",n):i.length>1&&A.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}var o=this.errors[y.FunctionFragment.fromString(e).format()];return o||A.throwArgumentError("no matching error","signature",e),o}},{key:"getSighash",value:function(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,p.getStatic)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,p.getStatic)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeErrorResult",value:function(e,t){"string"==typeof e&&(e=this.getError(e));var r=(0,d.arrayify)(t);return(0,d.hexlify)(r.slice(0,4))!==this.getSighash(e)&&A.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",(0,d.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,d.hexlify)((0,d.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,d.arrayify)(t);return(0,d.hexlify)(r.slice(0,4))!==this.getSighash(e)&&A.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",(0,d.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,d.hexlify)((0,d.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,d.arrayify)(t),n=null,i="",o=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(l){}break;case 4:var c=(0,d.hexlify)(r.slice(0,4)),u=x[c];if(u)o=this._abiCoder.decode(u.inputs,r.slice(4)),a=u.name,s=u.signature,u.reason&&(n=o[0]),"Error"===a?i="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(o[0])):"Panic"===a&&(i="; VM Exception while processing transaction: reverted with panic code ".concat(o[0]));else try{var l=this.getError(c);o=this._abiCoder.decode(l.inputs,r.slice(4)),a=l.name,s=l.format()}catch(l){}}return A.throwError("call revert exception"+i,v.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,d.hexlify)(t),errorArgs:o,errorName:a,errorSignature:s,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,d.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&A.throwError("too many arguments for "+e.format(),v.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var n=[];e.anonymous||n.push(this.getEventTopic(e));var i=function(e,t){return"string"===e.type?(0,f.id)(t):"bytes"===e.type?(0,h.keccak256)((0,d.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=l.BigNumber.from(t).toHexString()),"address"===e.type&&r._abiCoder.encode(["address"],[t]),(0,d.hexZeroPad)((0,d.hexlify)(t),32))};for(t.forEach((function(t,r){var o=e.inputs[r];o.indexed?null==t?n.push(null):"array"===o.baseType||"tuple"===o.baseType?A.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?n.push(t.map((function(e){return i(o,e)}))):n.push(i(o,t)):null!=t&&A.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e));var n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&A.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,a){var s=t[a];if(e.indexed)if("string"===e.type)n.push((0,f.id)(s));else if("bytes"===e.type)n.push((0,h.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[s]))}else i.push(e),o.push(s)})),{data:this._abiCoder.encode(i,o),topics:n}}},{key:"decodeEventLog",value:function(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){var n=this.getEventTopic(e);(0,d.isHexString)(r[0],32)&&r[0].toLowerCase()===n||A.throwError("fragment/topic mismatch",v.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var i=[],o=[],a=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(i.push(y.ParamType.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(i.push(e),a.push(!1)):(o.push(e),a.push(!1))}));var s=null!=r?this._abiCoder.decode(i,(0,d.concat)(r)):null,c=this._abiCoder.decode(o,t,!0),u=[],l=0,f=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)u[t]=new k({_isIndexed:!0,hash:null});else if(a[t])u[t]=new k({_isIndexed:!0,hash:s[f++]});else try{u[t]=s[f++]}catch(e){u[t]=e}else try{u[t]=c[l++]}catch(e){u[t]=e}if(e.name&&null==u[e.name]){var r=u[t];r instanceof Error?Object.defineProperty(u,e.name,{enumerable:!0,get:function(){throw C("property ".concat(JSON.stringify(e.name)),r)}}):u[e.name]=r}}));for(var h=function(e){var t=u[e];t instanceof Error&&Object.defineProperty(u,e,{enumerable:!0,get:function(){throw C("index ".concat(e),t)}})},p=0;p{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="address/5.7.0"},77921:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddress=y,t.getContractAddress=function(e){var t=null;try{t=y(e.from)}catch(t){u.throwArgumentError("missing from address","transaction",e)}var r=(0,n.stripZeros)((0,n.arrayify)(i.BigNumber.from(e.nonce).toHexString()));return y((0,n.hexDataSlice)((0,o.keccak256)((0,a.encode)([t,r])),12))},t.getCreate2Address=function(e,t,r){return 32!==(0,n.hexDataLength)(t)&&u.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.hexDataLength)(r)&&u.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),y((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",y(e),t,r])),12))},t.getIcapAddress=function(e){for(var t=(0,i._base16To36)(y(e).substring(2)).toUpperCase();t.length<30;)t="0"+t;return"XE"+m("XE00"+t)+t},t.isAddress=function(e){try{return y(e),!0}catch(e){}return!1};var n=r(908),i=r(34952),o=r(64642),a=r(55265),s=r(64327),c=r(88222),u=new s.Logger(c.version);function l(e){(0,n.isHexString)(e,20)||u.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),i=0;i<40;i++)r[i]=t[i].charCodeAt(0);for(var a=(0,n.arrayify)((0,o.keccak256)(r)),s=0;s<40;s+=2)a[s>>1]>>4>=8&&(t[s]=t[s].toUpperCase()),(15&a[s>>1])>=8&&(t[s+1]=t[s+1].toUpperCase());return"0x"+t.join("")}for(var d={},f=0;f<10;f++)d[String(f)]=String(f);for(var h=0;h<26;h++)d[String.fromCharCode(65+h)]=String(10+h);var p,g=Math.floor((p=9007199254740991,Math.log10?Math.log10(p):Math.log(p)/Math.LN10));function m(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return d[e]})).join("");t.length>=g;){var r=t.substring(0,g);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function y(e){var t=null;if("string"!=typeof e&&u.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=l(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==m(e)&&u.throwArgumentError("bad icap checksum","address",e),t=(0,i._base36To16)(e.substring(4));t.length<40;)t="0"+t;t=l("0x"+t)}else u.throwArgumentError("invalid address","address",e);return t}},75798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){e=atob(e);for(var t=[],r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"decode",{enumerable:!0,get:function(){return n.decode}}),Object.defineProperty(t,"encode",{enumerable:!0,get:function(){return n.encode}});var n=r(75798)},3042:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="bignumber/5.7.0"},1872:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.BigNumber=void 0,t._base16To36=function(e){return new l(e,16).toString(36)},t._base36To16=function(e){return new l(e,36).toString(16)},t.isBigNumberish=function(e){return null!=e&&(g.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,s.isHexString)(e)||"bigint"==typeof e||(0,s.isBytes)(e))};var i=n(r(69721)),o=n(r(58985)),a=n(r(31734)),s=r(908),c=r(64327),u=r(3042),l=a.default.BN,d=new c.Logger(u.version),f={},h=9007199254740991,p=!1,g=function(){function e(t,r){(0,i.default)(this,e),t!==f&&d.throwError("cannot call constructor directly; use BigNumber.from",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return(0,o.default)(e,[{key:"fromTwos",value:function(e){return y(v(this).fromTwos(e))}},{key:"toTwos",value:function(e){return y(v(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return y(v(this).add(v(e)))}},{key:"sub",value:function(e){return y(v(this).sub(v(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&b("division-by-zero","div"),y(v(this).div(v(t)))}},{key:"mul",value:function(e){return y(v(this).mul(v(e)))}},{key:"mod",value:function(e){var t=v(e);return t.isNeg()&&b("division-by-zero","mod"),y(v(this).umod(t))}},{key:"pow",value:function(e){var t=v(e);return t.isNeg()&&b("negative-power","pow"),y(v(this).pow(t))}},{key:"and",value:function(e){var t=v(e);return(this.isNegative()||t.isNeg())&&b("unbound-bitwise-result","and"),y(v(this).and(t))}},{key:"or",value:function(e){var t=v(e);return(this.isNegative()||t.isNeg())&&b("unbound-bitwise-result","or"),y(v(this).or(t))}},{key:"xor",value:function(e){var t=v(e);return(this.isNegative()||t.isNeg())&&b("unbound-bitwise-result","xor"),y(v(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&b("negative-width","mask"),y(v(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&b("negative-width","shl"),y(v(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&b("negative-width","shr"),y(v(this).shrn(e))}},{key:"eq",value:function(e){return v(this).eq(v(e))}},{key:"lt",value:function(e){return v(this).lt(v(e))}},{key:"lte",value:function(e){return v(this).lte(v(e))}},{key:"gt",value:function(e){return v(this).gt(v(e))}},{key:"gte",value:function(e){return v(this).gte(v(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return v(this).isZero()}},{key:"toNumber",value:function(){try{return v(this).toNumber()}catch(e){b("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return d.throwError("this platform does not support BigInt",c.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?p||(p=!0,d.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?d.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",c.Logger.errors.UNEXPECTED_ARGUMENT,{}):d.throwError("BigNumber.toString does not accept parameters",c.Logger.errors.UNEXPECTED_ARGUMENT,{})),v(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(f,m(t)):t.match(/^-?[0-9]+$/)?new e(f,m(new l(t))):d.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&b("underflow","BigNumber.from",t),(t>=h||t<=-h)&&b("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"==typeof r)return e.from(r.toString());if((0,s.isBytes)(r))return e.from((0,s.hexlify)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"==typeof n)return e.from(n)}else{var i=r._hex;if(null==i&&"BigNumber"===r.type&&(i=r.hex),"string"==typeof i&&((0,s.isHexString)(i)||"-"===i[0]&&(0,s.isHexString)(i.substring(1))))return e.from(i)}return d.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function m(e){if("string"!=typeof e)return m(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&d.throwArgumentError("invalid hex","value",e),"0x00"===(e=m(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function y(e){return g.from(m(e))}function v(e){var t=g.from(e).toHexString();return"-"===t[0]?new l("-"+t.substring(3),16):new l(t.substring(2),16)}function b(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),d.throwError(e,c.Logger.errors.NUMERIC_FAULT,n)}t.BigNumber=g},68390:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=t.FixedFormat=void 0,t.formatFixed=v,t.parseFixed=b;var i=n(r(3355)),o=n(r(69721)),a=n(r(58985)),s=r(908),c=r(64327),u=r(3042),l=r(1872),d=new c.Logger(u.version),f={},h=l.BigNumber.from(0),p=l.BigNumber.from(-1);function g(e,t,r,n){var i={fault:t,operation:r};return void 0!==n&&(i.value=n),d.throwError(e,c.Logger.errors.NUMERIC_FAULT,i)}for(var m="0";m.length<256;)m+=m;function y(e){if("number"!=typeof e)try{e=l.BigNumber.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+m.substring(0,e):d.throwArgumentError("invalid decimal size","decimals",e)}function v(e,t){null==t&&(t=0);var r=y(t),n=(e=l.BigNumber.from(e)).lt(h);n&&(e=e.mul(p));for(var i=e.mod(r).toString();i.length2&&d.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&g("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length80&&d.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",o),new e(f,r,n,o)}}]),e}();t.FixedFormat=w;var A=function(){function e(t,r,n,i){(0,o.default)(this,e),t!==f&&d.throwError("cannot use FixedNumber constructor; use FixedNumber.from",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return(0,a.default)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&d.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=b(this._value,this.format.decimals),n=b(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=b(this._value,this.format.decimals),n=b(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=b(this._value,this.format.decimals),n=b(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=b(this._value,this.format.decimals),n=b(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(_.toFormat(r.format))),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(_.toFormat(r.format))),r}},{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&d.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+m.substring(0,t),this.format),i=E.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&d.throwArgumentError("invalid byte width","width",e);var t=l.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,s.hexZeroPad)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||(0,l.isBigNumberish)(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(v(t,r),w.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=w.from(r),i=b(t,n.decimals);!n.signed&&i.lt(h)&&g("unsigned value cannot be negative","overflow","value",t);var o=null;n.signed?o=i.toTwos(n.width).toHexString():(o=i.toHexString(),o=(0,s.hexZeroPad)(o,n.width/8));var a=v(i,n.decimals);return new e(f,o,a,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=w.from(r);if((0,s.arrayify)(t).length>n.width/8)throw new Error("overflow");var i=l.BigNumber.from(t);n.signed&&(i=i.fromTwos(n.width));var o=i.toTwos((n.signed?0:1)+n.width).toHexString(),a=v(i,n.decimals);return new e(f,o,a,n)}},{key:"from",value:function(t,r){if("string"==typeof t)return e.fromString(t,r);if((0,s.isBytes)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(e){if(e.code!==c.Logger.errors.INVALID_ARGUMENT)throw e}return d.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}();t.FixedNumber=A;var _=A.from(1),E=A.from("0.5")},34952:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BigNumber",{enumerable:!0,get:function(){return n.BigNumber}}),Object.defineProperty(t,"FixedFormat",{enumerable:!0,get:function(){return i.FixedFormat}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return i.FixedNumber}}),Object.defineProperty(t,"_base16To36",{enumerable:!0,get:function(){return n._base16To36}}),Object.defineProperty(t,"_base36To16",{enumerable:!0,get:function(){return n._base36To16}}),Object.defineProperty(t,"formatFixed",{enumerable:!0,get:function(){return i.formatFixed}}),Object.defineProperty(t,"parseFixed",{enumerable:!0,get:function(){return i.parseFixed}});var n=r(1872),i=r(68390)},8729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="bytes/5.7.0"},908:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayify=d,t.concat=f,t.hexConcat=function(e){var t="0x";return e.forEach((function(e){t+=m(e).substring(2)})),t},t.hexDataLength=function(e){if("string"!=typeof e)e=m(e);else if(!p(e)||e.length%2)return null;return(e.length-2)/2},t.hexDataSlice=function(e,t,r){return"string"!=typeof e?e=m(e):(!p(e)||e.length%2)&&o.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)},t.hexStripZeros=y,t.hexValue=function(e){var t=y(m(e,{hexPad:"left"}));return"0x"===t?"0x0":t},t.hexZeroPad=v,t.hexlify=m,t.isBytes=l,t.isBytesLike=c,t.isHexString=p,t.joinSignature=function(e){return m(f([(e=b(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))},t.splitSignature=b,t.stripZeros=function(e){var t=d(e);if(0===t.length)return t;for(var r=0;r=256)return!1}return!0}function d(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),s(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),p(e)){var n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":o.throwArgumentError("hex data is odd-length","value",e));for(var i=[],c=0;ct&&o.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),s(r)}function p(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}var g="0123456789abcdef";function m(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r=g[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":o.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(l(e)){for(var n="0x",i=0;i>4]+g[15&s]}return n}return o.throwArgumentError("invalid hexlify value","value",e)}function y(e){"string"!=typeof e&&(e=m(e)),p(e)||o.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&o.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function b(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(c(e)){var r=d(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64))):65===r.length?(t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64)),t.v=r[64]):o.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:o.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=m(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var n=h(d(t._vs),32);t._vs=m(n);var i=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&o.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;var a=m(n);null==t.s?t.s=a:t.s!==a&&o.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?o.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var s=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==s&&o.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=v(t.r,32):o.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=v(t.s,32):o.throwArgumentError("signature missing or invalid s","signature",e);var u=d(t.s);u[0]>=128&&o.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(u[0]|=128);var l=m(u);t._vs&&(p(t._vs)||o.throwArgumentError("signature invalid _vs","signature",e),t._vs=v(t._vs,32)),null==t._vs?t._vs=l:t._vs!==l&&o.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},48721:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressZero=void 0,t.AddressZero="0x0000000000000000000000000000000000000000"},22997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Zero=t.WeiPerEther=t.Two=t.One=t.NegativeOne=t.MinInt256=t.MaxUint256=t.MaxInt256=void 0;var n=r(34952),i=n.BigNumber.from(-1);t.NegativeOne=i;var o=n.BigNumber.from(0);t.Zero=o;var a=n.BigNumber.from(1);t.One=a;var s=n.BigNumber.from(2);t.Two=s;var c=n.BigNumber.from("1000000000000000000");t.WeiPerEther=c;var u=n.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxUint256=u;var l=n.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");t.MinInt256=l;var d=n.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxInt256=d},90396:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashZero=void 0,t.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"},5465:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AddressZero",{enumerable:!0,get:function(){return n.AddressZero}}),Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return a.EtherSymbol}}),Object.defineProperty(t,"HashZero",{enumerable:!0,get:function(){return o.HashZero}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return i.MaxInt256}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return i.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return i.MinInt256}}),Object.defineProperty(t,"NegativeOne",{enumerable:!0,get:function(){return i.NegativeOne}}),Object.defineProperty(t,"One",{enumerable:!0,get:function(){return i.One}}),Object.defineProperty(t,"Two",{enumerable:!0,get:function(){return i.Two}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return i.WeiPerEther}}),Object.defineProperty(t,"Zero",{enumerable:!0,get:function(){return i.Zero}});var n=r(48721),i=r(22997),o=r(90396),a=r(68347)},68347:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherSymbol=void 0,t.EtherSymbol="\u039e"},33989:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="hash/5.7.0"},33731:(e,t)=>{"use strict";function r(e,t){null==t&&(t=1);var r=[],n=r.forEach;return function e(t,i){n.call(t,(function(t){i>0&&Array.isArray(t)?e(t,i-1):r.push(t)}))}(e,t),r}function n(e){var t=0;function r(){return e[t++]<<8|e[t++]}for(var n=r(),i=1,o=[0,1],a=1;a>--u&1}for(var f=Math.pow(2,31),h=f>>>1,p=h>>1,g=f-1,m=0,y=0;y<31;y++)m=m<<1|d();for(var v=[],b=0,w=f;;){for(var A=Math.floor(((m-b+1)*i-1)/w),_=0,E=n;E-_>1;){var S=_+E>>>1;A>>1|d(),k=k<<1^h,x=(x^h)<<1|h|1;b=k,w=1+x-k}var C=n-4;return v.map((function(t){switch(t-C){case 3:return C+65792+(e[c++]<<16|e[c++]<<8|e[c++]);case 2:return C+256+(e[c++]<<8|e[c++]);case 1:return C+e[c++];default:return t-1}}))}function i(e){var t=0;return function(){return e[t++]}}function o(e){return 1&e?~e>>1:e>>1}function a(e,t){for(var r=Array(e),n=0,i=-1;n>=1),check:2==o}}()},t.read_mapped_map=function(e){for(var t=[];;){var n=e();if(0==n)break;t.push(d(n,e))}for(;;){var i=e()-1;if(i<0)break;t.push(f(i,e))}return function(e){for(var t={},r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=function(){return(0,i.read_compressed_payload)((0,n.decode)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))};var n=r(80997),i=r(33731)},17032:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.ens_normalize=function(e){return v(function(e,t){for(var r=m(e).reverse(),n=[];r.length;){var o=b(r);if(o)n.push.apply(n,(0,i.default)(t(o)));else{var a=r.pop();if(l.has(a))n.push(a);else if(!d.has(a)){var s=f[a];if(!s)throw new Error("Disallowed codepoint: 0x".concat(a.toString(16).toUpperCase()));n.push.apply(n,(0,i.default)(s))}}}return v(String.fromCodePoint.apply(String,n).normalize("NFC"))}(e,y))},t.ens_normalize_post_check=v;var i=n(r(93106)),o=r(78627),a=r(63961),s=r(33731);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}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 i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(e.split("."));try{for(r.s();!(t=r.n()).done;){var n=t.value,i=m(n);try{for(var o=i.lastIndexOf(g)-1;o>=0;o--)if(i[o]!==g)throw new Error("underscore only allowed at start");if(i.length>=4&&i.every((function(e){return e<128}))&&i[2]===p&&i[3]===p)throw new Error("invalid label extension")}catch(e){throw new Error('Invalid label "'.concat(n,'": ').concat(e.message))}}}catch(e){r.e(e)}finally{r.f()}return e}function b(e,t){var r,n,o,a=h,s=[],c=e.length;t&&(t.length=0);for(var u=function(){var u=e[--c];if(!(a=null===(r=a.branches.find((function(e){return e.set.has(u)})))||void 0===r?void 0:r.node))return"break";if(a.save)o=u;else if(a.check&&u===o)return"break";s.push(u),a.fe0f&&(s.push(65039),c>0&&65039==e[c-1]&&c--),a.valid&&(n=s.slice(),2==a.valid&&n.splice(1,1),t&&t.push.apply(t,(0,i.default)(e.slice(c).reverse())),e.length=c)};c&&"break"!==u(););return n}},57901:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=function(e){return(0,n.keccak256)((0,i.toUtf8Bytes)(e))};var n=r(64642),i=r(78627)},37515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return a.TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return i.dnsEncode}}),Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return i.ensNormalize}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return o.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return n.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return i.isValidName}}),Object.defineProperty(t,"messagePrefix",{enumerable:!0,get:function(){return o.messagePrefix}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return i.namehash}});var n=r(57901),i=r(84898),o=r(34443),a=r(12171)},34443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashMessage=function(e){return"string"==typeof e&&(e=(0,o.toUtf8Bytes)(e)),(0,i.keccak256)((0,n.concat)([(0,o.toUtf8Bytes)(a),(0,o.toUtf8Bytes)(String(e.length)),e]))},t.messagePrefix=void 0;var n=r(908),i=r(64642),o=r(78627),a="\x19Ethereum Signed Message:\n";t.messagePrefix=a},84898:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsEncode=function(e){return(0,n.hexlify)((0,n.concat)(f(e).map((function(e){if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"},t.ensNormalize=function(e){return f(e).map((function(e){return(0,i.toUtf8String)(e)})).join(".")},t.isValidName=function(e){try{return 0!==f(e).length}catch(e){}return!1},t.namehash=function(e){"string"!=typeof e&&u.throwArgumentError("invalid ENS name; not a string","name",e);for(var t=l,r=f(e);r.length;)t=(0,o.keccak256)((0,n.concat)([t,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(t)};var n=r(908),i=r(78627),o=r(64642),a=r(64327),s=r(33989),c=r(17032),u=new a.Logger(s.version),l=new Uint8Array(32);function d(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function f(e){var t=(0,i.toUtf8Bytes)((0,c.ens_normalize)(e)),r=[];if(0===e.length)return r;for(var n=0,o=0;o=t.length)throw new Error("invalid ENS name; empty component");return r.push(d(t.slice(n))),r}l.fill(0)},12171:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.TypedDataEncoder=void 0;var i=n(r(82247)),o=n(r(69721)),a=n(r(58985)),s=r(77921),c=r(34952),u=r(908),l=r(64642),d=r(23694),f=r(64327),h=r(33989),p=r(57901),g=new f.Logger(h.version),m=new Uint8Array(32);m.fill(0);var y=c.BigNumber.from(-1),v=c.BigNumber.from(0),b=c.BigNumber.from(1),w=c.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),A=(0,u.hexZeroPad)(b.toHexString(),32),_=(0,u.hexZeroPad)(v.toHexString(),32),E={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},S=["name","version","chainId","verifyingContract","salt"];function k(e){return function(t){return"string"!=typeof t&&g.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var x={name:k("name"),version:k("version"),chainId:function(e){try{return c.BigNumber.from(e).toString()}catch(e){}return g.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,s.getAddress)(e).toLowerCase()}catch(e){}return g.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=(0,u.arrayify)(e);if(32!==t.length)throw new Error("bad length");return(0,u.hexlify)(t)}catch(e){}return g.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function C(e){var t=e.match(/^(u?)int(\d*)$/);if(t){var r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&g.throwArgumentError("invalid numeric width","type",e);var i=w.mask(r?n-1:n),o=r?i.add(b).mul(y):v;return function(t){var r=c.BigNumber.from(t);return(r.lt(o)||r.gt(i))&&g.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),(0,u.hexZeroPad)(r.toTwos(256).toHexString(),32)}}var a=e.match(/^bytes(\d+)$/);if(a){var d=parseInt(a[1]);return(0===d||d>32||a[1]!==String(d))&&g.throwArgumentError("invalid bytes width","type",e),function(t){return(0,u.arrayify)(t).length!==d&&g.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=(0,u.arrayify)(e),r=t.length%32;return r?(0,u.hexConcat)([t,m.slice(r)]):(0,u.hexlify)(t)}(t)}}switch(e){case"address":return function(e){return(0,u.hexZeroPad)((0,s.getAddress)(e),32)};case"bool":return function(e){return e?A:_};case"bytes":return function(e){return(0,l.keccak256)(e)};case"string":return function(e){return(0,p.id)(e)}}return null}function I(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var T=function(){function e(t){(0,o.default)(this,e),(0,d.defineReadOnly)(this,"types",Object.freeze((0,d.deepCopy)(t))),(0,d.defineReadOnly)(this,"_encoderCache",{}),(0,d.defineReadOnly)(this,"_types",{});var r={},n={},i={};Object.keys(t).forEach((function(e){r[e]={},n[e]=[],i[e]={}}));var a=function(e){var i={};t[e].forEach((function(o){i[o.name]&&g.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(e)),"types",t),i[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===e&&g.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),C(a)||(n[a]||g.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),n[a].push(e),r[e][a]=!0)}))};for(var s in t)a(s);var c=Object.keys(n).filter((function(e){return 0===n[e].length}));for(var u in 0===c.length?g.throwArgumentError("missing primary type","types",t):c.length>1&&g.throwArgumentError("ambiguous primary types or unused types: ".concat(c.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),(0,d.defineReadOnly)(this,"primaryType",c[0]),function e(o,a){a[o]&&g.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),a[o]=!0,Object.keys(r[o]).forEach((function(t){n[t]&&(e(t,a),Object.keys(a).forEach((function(e){i[e][t]=!0})))})),delete a[o]}(this.primaryType,{}),i){var l=Object.keys(i[u]);l.sort(),this._types[u]=I(u,t[u])+l.map((function(e){return I(e,t[e])})).join("")}}return(0,a.default)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,r=C(e);if(r)return r;var n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var i=n[1],o=this.getEncoder(i),a=parseInt(n[3]);return function(e){a>=0&&e.length!==a&&g.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var r=e.map(o);return t._types[i]&&(r=r.map(l.keccak256)),(0,l.keccak256)((0,u.hexConcat)(r))}}var s=this.types[e];if(s){var c=(0,p.id)(this._types[e]);return function(e){var r=s.map((function(r){var n=r.name,i=r.type,o=t.getEncoder(i)(e[n]);return t._types[i]?(0,l.keccak256)(o):o}));return r.unshift(c),(0,u.hexConcat)(r)}}return g.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||g.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return(0,l.keccak256)(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,r){var n=this;if(C(e))return r(e,t);var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&g.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return n._visit(o,e,r)}))}var s=this.types[e];return s?s.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=n._visit(a,t[o],r),e}),{}):g.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,r,n){return e.from(r).hashStruct(t,n)}},{key:"hashDomain",value:function(t){var r=[];for(var n in t){var i=E[n];i||g.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",t),r.push({name:n,type:i})}return r.sort((function(e,t){return S.indexOf(e.name)-S.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:r},t)}},{key:"encode",value:function(t,r,n){return(0,u.hexConcat)(["0x1901",e.hashDomain(t),e.from(r).hash(n)])}},{key:"hash",value:function(t,r,n){return(0,l.keccak256)(e.encode(t,r,n))}},{key:"resolveNames",value:function(t,r,n,o){return a=this,s=void 0,c=i.default.mark((function a(){var s,c,l;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:t=(0,d.shallowCopy)(t),s={},t.verifyingContract&&!(0,u.isHexString)(t.verifyingContract,20)&&(s[t.verifyingContract]="0x"),(c=e.from(r)).visit(n,(function(e,t){return"address"!==e||(0,u.isHexString)(t,20)||(s[t]="0x"),t})),a.t0=i.default.keys(s);case 6:if((a.t1=a.t0()).done){a.next=13;break}return l=a.t1.value,a.next=10,o(l);case 10:s[l]=a.sent,a.next=6;break;case 13:return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),n=c.visit(n,(function(e,t){return"address"===e&&s[t]?s[t]:t})),a.abrupt("return",{domain:t,value:n});case 16:case"end":return a.stop()}}),a)})),new(s||(s=Promise))((function(e,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function n(e){try{i(c.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(r,n)}i((c=c.apply(a,[])).next())}));var a,s,c}},{key:"getPayload",value:function(t,r,n){e.hashDomain(t);var i={},o=[];S.forEach((function(e){var r=t[e];null!=r&&(i[e]=x[e](r),o.push({name:e,type:E[e]}))}));var a=e.from(r),s=(0,d.shallowCopy)(r);return s.EIP712Domain?g.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(e,t){if(e.match(/^bytes(\d*)/))return(0,u.hexlify)((0,u.arrayify)(t));if(e.match(/^u?int/))return c.BigNumber.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&g.throwArgumentError("invalid string","value",t),t}return g.throwArgumentError("unsupported type","type",e)}))}}}]),e}();t.TypedDataEncoder=T},64642:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e){return"0x"+i.default.keccak_256((0,o.arrayify)(e))};var i=n(r(95975)),o=r(908)},95975:(e,t,r)=>{"use strict";e=r.nmd(e);var n,i=r(19142),o=r(28847)(r(3355));!function(){var a="input is invalid type",s="object"===("undefined"==typeof window?"undefined":(0,o.default)(window)),c=s?window:{};c.JS_SHA3_NO_WINDOW&&(s=!1);var u=!s&&"object"===("undefined"==typeof self?"undefined":(0,o.default)(self));!c.JS_SHA3_NO_NODE_JS&&"object"===(void 0===i?"undefined":(0,o.default)(i))&&i.versions&&i.versions.node?c=r.g:u&&(c=self);var l=!c.JS_SHA3_NO_COMMON_JS&&"object"===(0,o.default)(e)&&e.exports,d=r.amdO,f=!c.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),p=[4,1024,262144,67108864],g=[0,8,16,24],m=[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],y=[224,256,384,512],v=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!c.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!f||!c.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,o.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var A=function(e,t,r){return function(n){return new B(e,t,e).update(n)[r]()}},_=function(e,t,r){return function(n,i){return new B(e,t,i).update(n)[r]()}},E=function(e,t,r){return function(t,n,i,o){return I["cshake"+e].update(t,n,i,o)[r]()}},S=function(e,t,r){return function(t,n,i,o){return I["kmac"+e].update(t,n,i,o)[r]()}},k=function(e,t,r,n){for(var i=0;i>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 D(e,t,r){B.call(this,e,t,r)}B.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}for(var n,i,s=this.blocks,c=this.byteCount,u=e.length,l=this.blockCount,d=0,h=this.s;d>2]|=e[d]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=c){for(this.start=n-c,this.block=s[l],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},B.prototype.encodeString=function(e){var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}var n=0,i=e.length;if(t)n=i;else for(var s=0;s=57344?n+=3:(c=65536+((1023&c)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},B.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];a%t==0&&(U(r),o=0)}return i&&(e=r[o],s+=h[e>>4&15]+h[15&e],i>1&&(s+=h[e>>12&15]+h[e>>8&15]),i>2&&(s+=h[e>>20&15]+h[e>>16&15])),s},B.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);a>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%r==0&&U(n)}return o&&(e=s<<2,t=n[a],c[e]=255&t,o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c},D.prototype=new B,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),B.prototype.finalize.call(this)};var U=function(e){var t,r,n,i,o,a,s,c,u,l,d,f,h,p,g,y,v,b,w,A,_,E,S,k,x,C,I,T,O,P,M,R,N,L,B,D,U,j,F,z,q,H,V,$,K,W,G,Q,Y,Z,J,X,ee,te,re,ne,ie,oe,ae,se,ce,ue,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(f=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|u>>>31),r=o^(u<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|d>>>31),r=s^(d<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(f<<1|h>>>31),r=u^(h<<1|f>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],g=e[1],W=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,V=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,P=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,D=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,$=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=p^~y&b,e[1]=g^~v&w,e[10]=k^~C&T,e[11]=x^~I&O,e[20]=L^~D&j,e[21]=B^~U&F,e[30]=$^~W&Q,e[31]=K^~G&Y,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~b&A,e[3]=v^~w&_,e[12]=C^~T&P,e[13]=I^~O&M,e[22]=D^~j&z,e[23]=U^~F&q,e[32]=W^~Q&Z,e[33]=G^~Y&J,e[42]=ne^~oe&se,e[43]=ie^~ae&ce,e[4]=b^~A&E,e[5]=w^~_&S,e[14]=T^~P&R,e[15]=O^~M&N,e[24]=j^~z&H,e[25]=F^~q&V,e[34]=Q^~Z&X,e[35]=Y^~J&ee,e[44]=oe^~se&ue,e[45]=ae^~ce&le,e[6]=A^~E&p,e[7]=_^~S&g,e[16]=P^~R&k,e[17]=M^~N&x,e[26]=z^~H&L,e[27]=q^~V&B,e[36]=Z^~X&$,e[37]=J^~ee&K,e[46]=se^~ue&te,e[47]=ce^~le&re,e[8]=E^~p&y,e[9]=S^~g&v,e[18]=R^~k&C,e[19]=N^~x&I,e[28]=H^~L&D,e[29]=V^~B&U,e[38]=X^~$&W,e[39]=ee^~K&G,e[48]=ue^~te&ne,e[49]=le^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(l)e.exports=I;else{for(O=0;O{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="logger/5.7.0"},64327:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LogLevel=t.ErrorCode=void 0;var i,o,a=n(r(69721)),s=n(r(58985)),c=r(37252),u=!1,l=!1,d={debug:1,default:2,info:2,warning:3,error:4,off:5},f=d.default,h=null,p=function(){try{var e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();t.LogLevel=i,function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(i||(t.LogLevel=i={})),t.ErrorCode=o,function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(o||(t.ErrorCode=o={}));var g="0123456789abcdef",m=function(){function e(t){(0,a.default)(this,e),Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}return(0,s.default)(e,[{key:"_log",value:function(e,t){var r=e.toLowerCase();null==d[r]&&this.throwArgumentError("invalid log level name","logLevel",e),f>d[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=g[15&t[o]];i.push(e+"=Uint8Array(0x"+r+")")}else i.push(e+"="+JSON.stringify(t))}catch(t){i.push(e+"="+JSON.stringify(n[e].toString()))}})),i.push("code=".concat(r)),i.push("version=".concat(this.version));var a=t,s="";switch(r){case o.NUMERIC_FAULT:s="NUMERIC_FAULT";var c=t;switch(c){case"overflow":case"underflow":case"division-by-zero":s+="-"+c;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case o.CALL_EXCEPTION:case o.INSUFFICIENT_FUNDS:case o.MISSING_NEW:case o.NONCE_EXPIRED:case o.REPLACEMENT_UNDERPRICED:case o.TRANSACTION_REPLACED:case o.UNPREDICTABLE_GAS_LIMIT:s=r}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var u=new Error(t);return u.reason=a,u.code=r,Object.keys(n).forEach((function(e){u[e]=n[e]})),u}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}},{key:"checkSafeUint53",value:function(t,r){"number"==typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return h||(h=new e(c.version)),h}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),u){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}l=!!t,u=!!r}},{key:"setLogLevel",value:function(t){var r=d[t.toLowerCase()];null!=r?f=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();t.Logger=m,m.errors=o,m.levels=i},64071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="properties/5.7.0"},23694:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.Description=void 0,t.checkProperties=function(e,t){e&&"object"===(0,s.default)(e)||d.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((function(r){t[r]||d.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))},t.deepCopy=m,t.defineReadOnly=f,t.getStatic=function(e,t){for(var r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==(0,s.default)(e.prototype))break;e=Object.getPrototypeOf(e.prototype).constructor}return null},t.resolveProperties=function(e){return l(this,void 0,void 0,i.default.mark((function t(){var r,n;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.keys(e).map((function(t){var r=e[t];return Promise.resolve(r).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(r);case 3:return n=t.sent,t.abrupt("return",n.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))},t.shallowCopy=function(e){var t={};for(var r in e)t[r]=e[r];return t};var i=n(r(82247)),o=n(r(58985)),a=n(r(69721)),s=n(r(3355)),c=r(64327),u=r(64071),l=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},d=new c.Logger(u.version);function f(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}var h={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function p(e){if(null==e||h[(0,s.default)(e)])return!0;if(Array.isArray(e)||"object"===(0,s.default)(e)){if(!Object.isFrozen(e))return!1;for(var t=Object.keys(e),r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="rlp/5.7.0"},55265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){var t=(0,n.arrayify)(e),r=d(t,0);return r.consumed!==t.length&&a.throwArgumentError("invalid rlp data","data",e),r.result},t.encode=function(e){return(0,n.hexlify)(u(e))};var n=r(908),i=r(64327),o=r(61466),a=new i.Logger(o.version);function s(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function c(e,t,r){for(var n=0,i=0;it+1+n&&a.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function d(e,t){if(0===e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&a.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});var o=c(e,t+1,r);return t+1+r+o>e.length&&a.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),l(e,t,t+1+r,r+o)}if(e[t]>=192){var s=e[t]-192;return t+1+s>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),l(e,t,t+1,s)}if(e[t]>=184){var u=e[t]-183;t+1+u>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});var d=c(e,t+1,u);return t+1+u+d>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+u+d,result:(0,n.hexlify)(e.slice(t+1+u,t+1+u+d))}}if(e[t]>=128){var f=e[t]-128;return t+1+f>e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+f,result:(0,n.hexlify)(e.slice(t+1,t+1+f))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}},48100:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="signing-key/5.7.0"},36918:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.EC=void 0;var i=n(r(3355)),o=n(r(31734)),a=n(r(37198));function s(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var c=u;function u(e,t){if(!e)throw new Error(t||"Assertion failed")}u.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var l=s((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),d=s((function(e,t){var r=t;r.assert=c,r.toArray=l.toArray,r.zero2=l.zero2,r.toHex=l.toHex,r.encode=l.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,c=e.andln(3)+i&3,u=t.andln(3)+o&3;3===c&&(c=-1),3===u&&(u=-1),a=0==(1&c)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==u?c:-c,r[0].push(a),s=0==(1&u)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==c?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new o.default(e,"hex","le")}})),f=d.getNAF,h=d.getJSF,p=d.assert;function g(e,t){this.type=e,this.p=new o.default(t.p,16),this.red=t.prime?o.default.red(t.prime):o.default.mont(this.p),this.zero=new o.default(0).toRed(this.red),this.one=new o.default(1).toRed(this.red),this.two=new o.default(2).toRed(this.red),this.n=t.n&&new o.default(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var m=g;function y(e,t){this.curve=e,this.type=t,this.precomputed=null}g.prototype.point=function(){throw new Error("Not implemented")},g.prototype.validate=function(){throw new Error("Not implemented")},g.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=f(t,1,this._bitLength),i=(1<=o;c--)a=(a<<1)+n[c];s.push(a)}for(var u=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(o=0;o=0;s--){for(var c=0;s>=0&&0===o[s];s--)c++;if(s>=0&&c++,a=a.dblp(c),s<0)break;var u=o[s];p(0!==u),a="affine"===e.type?u>0?a.mixedAdd(i[u-1>>1]):a.mixedAdd(i[-u-1>>1].neg()):u>0?a.add(i[u-1>>1]):a.add(i[-u-1>>1].neg())}return"affine"===e.type?a.toP():a},g.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,c=this._wnafT1,u=this._wnafT2,l=this._wnafT3,d=0;for(o=0;o=1;o-=2){var g=o-1,m=o;if(1===c[g]&&1===c[m]){var y=[t[g],null,null,t[m]];0===t[g].y.cmp(t[m].y)?(y[1]=t[g].add(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg())):0===t[g].y.cmp(t[m].y.redNeg())?(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].add(t[m].neg())):(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=h(r[g],r[m]);for(d=Math.max(b[0].length,d),l[g]=new Array(d),l[m]=new Array(d),a=0;a=0;o--){for(var S=0;o>=0;){var k=!0;for(a=0;a=0&&S++,_=_.dblp(S),o<0)break;for(a=0;a0?s=u[a][x-1>>1]:x<0&&(s=u[a][-x-1>>1].neg()),_="affine"===s.type?_.mixedAdd(s):_.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},y.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(a=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a:a,b:s}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:c.add(u).neg()}},w.prototype.pointFromX=function(e,t){(e=new o.default(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},_.prototype.isInfinity=function(){return this.inf},_.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},_.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},_.prototype.getX=function(){return this.x.fromRed()},_.prototype.getY=function(){return this.y.fromRed()},_.prototype.mul=function(e){return e=new o.default(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},_.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},_.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},_.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},_.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},_.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},v(E,m.BasePoint),w.prototype.jpoint=function(e,t,r){return new E(this,e,t,r)},E.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},E.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},E.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),d=n.redMul(u),f=c.redSqr().redIAdd(l).redISub(d).redISub(d),h=c.redMul(d.redISub(f)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},E.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=r.redMul(c),d=s.redSqr().redIAdd(u).redISub(l).redISub(l),f=s.redMul(l.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},E.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},E.prototype.inspect=function(){return this.isInfinity()?"":""},E.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var S=s((function(e,t){var r=t;r.base=m,r.short=A,r.mont=null,r.edwards=null})),k=s((function(e,t){var r,n=t,i=d.assert;function o(e){"short"===e.type?this.curve=new S.short(e):"edwards"===e.type?this.curve=new S.edwards(e):this.curve=new S.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.default.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.default.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.default.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function x(e){if(!(this instanceof x))return new x(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=l.toArray(e.entropy,e.entropyEnc||"hex"),r=l.toArray(e.nonce,e.nonceEnc||"hex"),n=l.toArray(e.pers,e.persEnc||"hex");c(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var C=x;x.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},x.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=l.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var P=d.assert;function M(e,t){if(e instanceof M)return e;this._importDER(e,t)||(P(e.r&&e.s,"Signature without r or s"),this.r=new o.default(e.r,16),this.s=new o.default(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var R=M;function N(){this.place=0}function L(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function B(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}M.prototype._importDER=function(e,t){e=d.toArray(e,t);var r=new N;if(48!==e[r.place++])return!1;var n=L(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=L(e,r);if(!1===i)return!1;var a=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var s=L(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var c=e.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}return this.r=new o.default(a),this.s=new o.default(c),this.recoveryParam=null,!0},M.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=B(t),r=B(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];D(n,t.length),(n=n.concat(t)).push(2),D(n,r.length);var i=n.concat(r),o=[48];return D(o,i.length),o=o.concat(i),d.encode(o,e)};var U=function(){throw new Error("unsupported")},j=d.assert;function F(e){if(!(this instanceof F))return new F(e);"string"==typeof e&&(j(Object.prototype.hasOwnProperty.call(k,e),"Unknown curve "+e),e=k[e]),e instanceof k.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var z=F;F.prototype.keyPair=function(e){return new O(this,e)},F.prototype.keyFromPrivate=function(e,t){return O.fromPrivate(this,e,t)},F.prototype.keyFromPublic=function(e,t){return O.fromPublic(this,e,t)},F.prototype.genKeyPair=function(e){e||(e={});for(var t=new C({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||U(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new o.default(2));;){var i=new o.default(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},F.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},F.prototype.sign=function(e,t,r,n){"object"===(0,i.default)(r)&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new o.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),u=new C({hash:this.hash,entropy:s,nonce:c,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new o.default(1)),d=0;;d++){var f=n.k?n.k(d):new o.default(u.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(l)>=0)){var h=this.g.mul(f);if(!h.isInfinity()){var p=h.getX(),g=p.umod(this.n);if(0!==g.cmpn(0)){var m=f.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var y=(h.getY().isOdd()?1:0)|(0!==p.cmp(g)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),y^=1),new R({r:g,s:m,recoveryParam:y})}}}}}},F.prototype.verify=function(e,t,r,n){e=this._truncateToN(new o.default(e,16)),r=this.keyFromPublic(r,n);var i=(t=new R(t,"hex")).r,a=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),u=c.mul(e).umod(this.n),l=c.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),l)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(u,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},F.prototype.recoverPubKey=function(e,t,r,n){j((3&r)===r,"The recovery param is more than two bits"),t=new R(t,n);var i=this.n,a=new o.default(e),s=t.r,c=t.s,u=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),u):this.curve.pointFromX(s,u);var d=t.r.invm(i),f=i.sub(a).mul(d).umod(i),h=c.mul(d).umod(i);return this.g.mulAdd(f,s,h)},F.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new R(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var q=s((function(e,t){var r=t;r.version="6.5.4",r.utils=d,r.rand=function(){throw new Error("unsupported")},r.curve=S,r.curves=k,r.ec=z,r.eddsa=null})),H=q.ec;t.EC=H},17612:(e,t,r)=>{"use strict";var n=r(28847);Object.defineProperty(t,"__esModule",{value:!0}),t.SigningKey=void 0,t.computePublicKey=g,t.recoverPublicKey=function(e,t){var r=(0,s.splitSignature)(t),n={r:(0,s.arrayify)(r.r),s:(0,s.arrayify)(r.s)};return"0x"+h().recoverPubKey((0,s.arrayify)(e),n,r.recoveryParam).encode("hex",!1)};var i=n(r(69721)),o=n(r(58985)),a=r(36918),s=r(908),c=r(23694),u=r(64327),l=r(48100),d=new u.Logger(l.version),f=null;function h(){return f||(f=new a.EC("secp256k1")),f}var p=function(){function e(t){(0,i.default)(this,e),(0,c.defineReadOnly)(this,"curve","secp256k1"),(0,c.defineReadOnly)(this,"privateKey",(0,s.hexlify)(t)),32!==(0,s.hexDataLength)(this.privateKey)&&d.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=h().keyFromPrivate((0,s.arrayify)(this.privateKey));(0,c.defineReadOnly)(this,"publicKey","0x"+r.getPublic(!1,"hex")),(0,c.defineReadOnly)(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),(0,c.defineReadOnly)(this,"_isSigningKey",!0)}return(0,o.default)(e,[{key:"_addPoint",value:function(e){var t=h().keyFromPublic((0,s.arrayify)(this.publicKey)),r=h().keyFromPublic((0,s.arrayify)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=h().keyFromPrivate((0,s.arrayify)(this.privateKey)),r=(0,s.arrayify)(e);32!==r.length&&d.throwArgumentError("bad digest length","digest",e);var n=t.sign(r,{canonical:!0});return(0,s.splitSignature)({recoveryParam:n.recoveryParam,r:(0,s.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,s.hexZeroPad)("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=h().keyFromPrivate((0,s.arrayify)(this.privateKey)),r=h().keyFromPublic((0,s.arrayify)(g(e)));return(0,s.hexZeroPad)("0x"+t.derive(r.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function g(e,t){var r=(0,s.arrayify)(e);if(32===r.length){var n=new p(r);return t?"0x"+h().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}return 33===r.length?t?(0,s.hexlify)(r):"0x"+h().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+h().keyFromPublic(r).getPublic(!0,"hex"):(0,s.hexlify)(r):d.throwArgumentError("invalid public or private key","key","[REDACTED]")}t.SigningKey=p},56518:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="strings/5.7.0"},95856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=function(e){var t=(0,o.toUtf8Bytes)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([t,n.HashZero]).slice(0,32))},t.parseBytes32String=function(e){var t=(0,i.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===t[r-1];)r--;return(0,o.toUtf8String)(t.slice(0,r))};var n=r(5465),i=r(908),o=r(34997)},68645:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._nameprepTableA1=p,t._nameprepTableB2=g,t._nameprepTableC=m,t.nameprep=function(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();var t,r=(0,n.toUtf8CodePoints)(e);t=r.map((function(e){return c.indexOf(e)>=0||e>=65024&&e<=65039?[]:g(e)||[e]})),r=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(r=(0,n.toUtf8CodePoints)((0,n._toUtf8String)(r),n.UnicodeNormalizationForm.NFKC)).forEach((function(e){if(m(e))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(e){if(p(e))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var i=(0,n._toUtf8String)(r);if("-"===i.substring(0,1)||"--"===i.substring(2,4)||"-"===i.substring(i.length-1))throw new Error("invalid hyphen");return i};var n=r(34997);function i(e,t){t||(t=function(e){return[parseInt(e,16)]});var r=0,n={};return e.split(",").forEach((function(e){var i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function o(e){var t=0;return e.split(",").map((function(e){var r=e.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:t+parseInt(r[0],16),h:t=parseInt(r[1],16)}}))}function a(e,t){for(var r=0,n=0;n=(r+=i.l)&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}var s=o("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"),c="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),u=[{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}],l=i("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"),d=i("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"),f=i("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(e){if(e.length%4!=0)throw new Error("bad data");for(var t=[],r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return o.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return o.Utf8ErrorFuncs}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return o.Utf8ErrorReason}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return o._toEscapedUtf8String}}),Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return n.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return i.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return n.parseBytes32String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return o.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return o.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return o.toUtf8String}});var n=r(95856),i=r(68645),o=r(34997)},34997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ErrorReason=t.Utf8ErrorFuncs=t.UnicodeNormalizationForm=void 0,t._toEscapedUtf8String=function(e,t){return'"'+d(e,t).map((function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?h(e):h(55296+((e-=65536)>>10&1023))+h(56320+(1023&e))})).join("")+'"'},t._toUtf8String=p,t.toUtf8Bytes=f,t.toUtf8CodePoints=function(e){return d(f(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current))},t.toUtf8String=function(e,t){return p(d(e,t))};var n,i,o=r(908),a=r(64327),s=r(56518),c=new a.Logger(s.version);function u(e,t,r,n,o){if(e===i.BAD_PREFIX||e===i.UNEXPECTED_CONTINUE){for(var a=0,s=t+1;s>6==2;s++)a++;return a}return e===i.OVERRUN?r.length-t-1:0}t.UnicodeNormalizationForm=n,function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n||(t.UnicodeNormalizationForm=n={})),t.Utf8ErrorReason=i,function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(i||(t.Utf8ErrorReason=i={}));var l=Object.freeze({error:function(e,t,r,n,i){return c.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:u,replace:function(e,t,r,n,o){return e===i.OVERLONG?(n.push(o),0):(n.push(65533),u(e,t,r))}});function d(e,t){null==t&&(t=l.error),e=(0,o.arrayify)(e);for(var r=[],n=0;n>7!=0){var s=null,c=null;if(192==(224&a))s=1,c=127;else if(224==(240&a))s=2,c=2047;else{if(240!=(248&a)){n+=t(128==(192&a)?i.UNEXPECTED_CONTINUE:i.BAD_PREFIX,n-1,e,r);continue}s=3,c=65535}if(n-1+s>=e.length)n+=t(i.OVERRUN,n-1,e,r);else{for(var u=a&(1<<8-s-1)-1,d=0;d1114111?n+=t(i.OUT_OF_RANGE,n-1-s,e,r,u):u>=55296&&u<=57343?n+=t(i.UTF16_SURROGATE,n-1-s,e,r,u):u<=c?n+=t(i.OVERLONG,n-1-s,e,r,u):r.push(u))}}else r.push(a)}return r}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;t!=n.current&&(c.checkNormalize(),e=e.normalize(t));for(var r=[],i=0;i>6|192),r.push(63&a|128);else if(55296==(64512&a)){i++;var s=e.charCodeAt(i);if(i>=e.length||56320!=(64512&s))throw new Error("invalid utf-8 string");var u=65536+((1023&a)<<10)+(1023&s);r.push(u>>18|240),r.push(u>>12&63|128),r.push(u>>6&63|128),r.push(63&u|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return(0,o.arrayify)(r)}function h(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function p(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}t.Utf8ErrorFuncs=l},96783:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="transactions/5.7.0"},21936:(e,t,r)=>{"use strict";var n=r(3355);Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionTypes=void 0,t.accessListify=k,t.computeAddress=A,t.parse=function(e){var t=(0,a.arrayify)(e);if(t[0]>127)return function(e){var t=l.decode(e);9!==t.length&&6!==t.length&&m.throwArgumentError("invalid raw transaction","rawTransaction",e);var r={nonce:v(t[0]).toNumber(),gasPrice:v(t[1]),gasLimit:v(t[2]),to:y(t[3]),value:v(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=o.BigNumber.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,a.hexZeroPad)(t[7],32),r.s=(0,a.hexZeroPad)(t[8],32),o.BigNumber.from(r.r).isZero()&&o.BigNumber.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=t.slice(0,6);0!==r.chainId&&(i.push((0,a.hexlify)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);var s=(0,c.keccak256)(l.encode(i));try{r.from=_(s,{r:(0,a.hexlify)(r.r),s:(0,a.hexlify)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,c.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){var t=l.decode(e.slice(1));8!==t.length&&11!==t.length&&m.throwArgumentError("invalid component count for transaction type: 1","payload",(0,a.hexlify)(e));var r={type:1,chainId:v(t[0]).toNumber(),nonce:v(t[1]).toNumber(),gasPrice:v(t[2]),gasLimit:v(t[3]),to:y(t[4]),value:v(t[5]),data:t[6],accessList:k(t[7])};return 8===t.length||(r.hash=(0,c.keccak256)(e),T(r,t.slice(8),I)),r}(t);case 2:return function(e){var t=l.decode(e.slice(1));9!==t.length&&12!==t.length&&m.throwArgumentError("invalid component count for transaction type: 2","payload",(0,a.hexlify)(e));var r=v(t[2]),n=v(t[3]),i={type:2,chainId:v(t[0]).toNumber(),nonce:v(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:v(t[4]),to:y(t[5]),value:v(t[6]),data:t[7],accessList:k(t[8])};return 9===t.length||(i.hash=(0,c.keccak256)(e),T(i,t.slice(9),C)),i}(t)}return m.throwError("unsupported transaction type: ".concat(t[0]),f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})},t.recoverAddress=_,t.serialize=function(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&m.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,u.checkProperties)(e,w);var r=[];b.forEach((function(t){var n=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),n=(0,a.arrayify)((0,a.hexlify)(n,i)),t.length&&n.length!==t.length&&n.length>0&&m.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,a.stripZeros)(n)).length>t.maxLength&&m.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push((0,a.hexlify)(n))}));var n=0;if(null!=e.chainId?"number"!=typeof(n=e.chainId)&&m.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!(0,a.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,a.hexlify)(n)),r.push("0x"),r.push("0x")),!t)return l.encode(r);var i=(0,a.splitSignature)(t),o=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&m.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&m.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,a.hexlify)(o)),r.push((0,a.stripZeros)((0,a.arrayify)(i.r))),r.push((0,a.stripZeros)((0,a.arrayify)(i.s))),l.encode(r)}(e,t);switch(e.type){case 1:return I(e,t);case 2:return C(e,t)}return m.throwError("unsupported transaction type: ".concat(e.type),f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})};var i=r(77921),o=r(34952),a=r(908),s=r(5465),c=r(64642),u=r(23694),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=p(void 0);if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,t&&t.set(e,r),r}(r(55265)),d=r(17612),f=r(64327),h=r(96783);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}var g,m=new f.Logger(h.version);function y(e){return"0x"===e?null:(0,i.getAddress)(e)}function v(e){return"0x"===e?s.Zero:o.BigNumber.from(e)}t.TransactionTypes=g,function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(g||(t.TransactionTypes=g={}));var b=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],w={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function A(e){var t=(0,d.computePublicKey)(e);return(0,i.getAddress)((0,a.hexDataSlice)((0,c.keccak256)((0,a.hexDataSlice)(t,1)),12))}function _(e,t){return A((0,d.recoverPublicKey)((0,a.arrayify)(e),t))}function E(e,t){var r=(0,a.stripZeros)(o.BigNumber.from(e).toHexString());return r.length>32&&m.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function S(e,t){return{address:(0,i.getAddress)(e),storageKeys:(t||[]).map((function(t,r){return 32!==(0,a.hexDataLength)(t)&&m.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase()}))}}function k(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&m.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),S(e[0],e[1])):S(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var r=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return S(t,Object.keys(r).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function x(e){return k(e).map((function(e){return[e.address,e.storageKeys]}))}function C(e,t){if(null!=e.gasPrice){var r=o.BigNumber.from(e.gasPrice),n=o.BigNumber.from(e.maxFeePerGas||0);r.eq(n)||m.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var s=[E(e.chainId||0,"chainId"),E(e.nonce||0,"nonce"),E(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),E(e.maxFeePerGas||0,"maxFeePerGas"),E(e.gasLimit||0,"gasLimit"),null!=e.to?(0,i.getAddress)(e.to):"0x",E(e.value||0,"value"),e.data||"0x",x(e.accessList||[])];if(t){var c=(0,a.splitSignature)(t);s.push(E(c.recoveryParam,"recoveryParam")),s.push((0,a.stripZeros)(c.r)),s.push((0,a.stripZeros)(c.s))}return(0,a.hexConcat)(["0x02",l.encode(s)])}function I(e,t){var r=[E(e.chainId||0,"chainId"),E(e.nonce||0,"nonce"),E(e.gasPrice||0,"gasPrice"),E(e.gasLimit||0,"gasLimit"),null!=e.to?(0,i.getAddress)(e.to):"0x",E(e.value||0,"value"),e.data||"0x",x(e.accessList||[])];if(t){var n=(0,a.splitSignature)(t);r.push(E(n.recoveryParam,"recoveryParam")),r.push((0,a.stripZeros)(n.r)),r.push((0,a.stripZeros)(n.s))}return(0,a.hexConcat)(["0x01",l.encode(r)])}function T(e,t,r){try{var n=v(t[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");e.v=n}catch(e){m.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,a.hexZeroPad)(t[1],32),e.s=(0,a.hexZeroPad)(t[2],32);try{var i=(0,c.keccak256)(r(e));e.from=_(i,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}},96546:(e,t,r)=>{"use strict";var n=r(28847)(r(90775));function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t1?r-1:0),i=1;i{"use strict";var n=r(28847)(r(90775));function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;tc;)r&u&&(n=n.add(i)),i=i.double(),r>>=u;return n},precomputeWindow:function(e,t){for(var r=n(t),i=r.windows,o=r.windowSize,a=[],s=e,c=s,u=0;u>=p,y>c&&(y-=h,o+=u);var v=m,b=m+Math.abs(y)-1,w=g%2!=0,A=y<0;0===y?d=d.add(r(w,i[v])):l=l.add(r(A,i[b]))}return{p:l,f:d}},wNAFCached:function(e,t,r,n){var i=e._WINDOW_SIZE||1,o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,a.validateField)(e.Fp),(0,s.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze(o(o(o({},(0,a.nLength)(e.n,e.nBitLength)),e),{p:e.Fp.ORDER}))}},19751:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(90775)),o=n(r(74519));function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=1<<8*t)throw new Error("bad I2OSP call: value=".concat(e," length=").concat(t));for(var r=Array.from({length:t}).fill(0),n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function f(e,t){for(var r=new Uint8Array(e.length),n=0;n255&&(t=n((0,u.concatBytes)((0,u.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));var i=n.outputLen,o=n.blockLen,a=Math.ceil(r/i);if(a>255)throw new Error("Invalid xmd length");var s=(0,u.concatBytes)(t,d(t.length,1)),c=d(0,o),l=d(r,2),g=new Array(a),m=n((0,u.concatBytes)(c,e,l,d(0,1),s));g[0]=n((0,u.concatBytes)(m,d(1,1),s));for(var y=1;y<=a;y++){var v=[f(m,g[y-1]),d(y+1,1),s];g[y]=n(u.concatBytes.apply(void 0,v))}return u.concatBytes.apply(void 0,g).slice(0,r)}function m(e,t,r,n,i){if(h(e),h(t),p(r),t.length>255){var o=Math.ceil(2*n/8);t=i.create({dkLen:o}).update((0,u.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(e).update(d(r,2)).update(t).update(d(t.length,1)).digest()}function y(e,t,r){(0,u.validateObject)(r,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});var n=r.p,i=r.k,o=r.m,a=r.hash,s=r.expand,d=r.DST;h(e),p(t);var f,y=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,u.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(d),v=n.toString(2).length,b=Math.ceil((v+i)/8),w=t*o*b;if("xmd"===s)f=g(e,y,w,a);else if("xof"===s)f=m(e,y,w,i,a);else{if("_internal_pass"!==s)throw new Error('expand must be "xmd" or "xof"');f=e}for(var A=new Array(t),_=0;_{"use strict";var n=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;var i=r(46928),o=BigInt(0),a=BigInt(1),s=BigInt(2),c=BigInt(3),u=BigInt(4),l=BigInt(5),d=BigInt(8);function f(e,t){var r=e%t;return r>=o?r:t+r}function h(e,t,r){if(r<=o||t 0");if(r===a)return o;for(var n=a;t>o;)t&a&&(n=n*e%r),e=e*e%r,t>>=a;return n}function p(e,t){if(e===o||t<=o)throw new Error("invert: expected positive integers, got n=".concat(e," mod=").concat(t));for(var r=f(e,t),n=t,i=o,s=a,c=a,u=o;r!==o;){var l=n/r,d=n%r,h=i-c*l,p=s-u*l;n=r,r=d,i=c,s=u,c=h,u=p}if(n!==a)throw new Error("invert: does not exist");return f(i,t)}function g(e){var t,r,n,i=(e-a)/s;for(t=e-a,r=0;t%s===o;t/=s,r++);for(n=s;no;)n*=n,n%=r;return n},t.invert=p,t.tonelliShanks=g,t.FpSqrt=m,t.isNegativeLE=function(e,t){return(f(e,t)&a)===a};var y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function v(e,t,r){if(r 0");if(r===o)return e.ONE;if(r===a)return t;for(var n=e.ONE,i=t;r>o;)r&a&&(n=e.mul(n,i)),i=e.sqr(i),r>>=a;return n}function b(e,t){var r=new Array(t.length),n=t.reduce((function(t,n,i){return e.is0(n)?t:(r[i]=t,e.mul(t,n))}),e.ONE),i=e.inv(n);return t.reduceRight((function(t,n,i){return e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))}),i),r}function w(e,t){var r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}t.validateField=function(e){var t=y.reduce((function(e,t){return e[t]="function",e}),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,i.validateObject)(e,t)},t.FpPow=v,t.FpInvertBatch=b,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?p(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){var t=(e.ORDER-a)/s;return function(r){var n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=w,t.Field=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=o)throw new Error("Expected Fp ORDER > 0, got ".concat(e));var c=w(e,t),u=c.nBitLength,l=c.nByteLength;if(l>2048)throw new Error("Field lengths over 2048 bytes are not supported");var d=m(e),h=Object.freeze({ORDER:e,BITS:u,BYTES:l,MASK:(0,i.bitMask)(u),ZERO:o,ONE:a,create:function(t){return f(t,e)},isValid:function(t){if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got ".concat((0,n.default)(t)));return o<=t&&t2&&void 0!==arguments[2]&&arguments[2],n=(e=(0,i.ensureBytes)("privateHash",e)).length,o=w(t).nByteLength+8;if(o<24||n1024)throw new Error("hashToPrivateScalar: expected ".concat(o,"-1024 bytes of input, got ").concat(n));return f(r?(0,i.bytesToNumberLE)(e):(0,i.bytesToNumberBE)(e),t-a)+a}},46928:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(74519)),o=n(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;var a=BigInt(0),s=BigInt(1),c=BigInt(2),u=function(e){return e instanceof Uint8Array},l=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));function d(e){if(!u(e))throw new Error("Uint8Array expected");for(var t="",r=0;ra;e>>=s,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&s},t.bitSet=function(e,t,r){return e|(r?s:a)<0&&void 0!==arguments[0]?arguments[0]:y();i=s(v([0]),e),n=s(),0!==e.length&&(i=s(v([1]),e),n=s())},u=function(){if(o++>=1e3)throw new Error("drbg: tried 1000 values");for(var e=0,r=[];e2&&void 0!==arguments[2]?arguments[2]:{},n=function(t,r,n){var i=b[r];if("function"!=typeof i)throw new Error('Invalid validator "'.concat(r,'", expected function'));var a=e[t];if(!(n&&void 0===a||i(a,e)))throw new Error("Invalid param ".concat(String(t),"=").concat(a," (").concat((0,o.default)(a),"), expected ").concat(r))},a=0,s=Object.entries(t);a{"use strict";var n=r(28847),i=n(r(58985)),o=n(r(69721)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949)),u=n(r(22940)),l=n(r(90775)),d=n(r(3355));function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";return(0,o.default)(this,u),n.call(this,e)}return(0,i.default)(u)}((0,u.default)(Error)),_parseInt:function(e){var r=t.DER.Err;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");var n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:v(i),l:e.subarray(n+2)}},toSig:function(e){var r=t.DER.Err,n="string"==typeof e?b(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");var i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");var o=t.DER._parseInt(n.subarray(2)),a=o.d,s=o.l,c=t.DER._parseInt(s),u=c.d;if(c.l.length)throw new r("Invalid signature: left bytes after parsing");return{r:a,s:u}},hexFromSig:function(e){var t=function(e){return 8&Number.parseInt(e[0],16)?"00"+e:e},r=function(e){var t=e.toString(16);return 1&t.length?"0".concat(t):t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,a=i.length/2,s=r(o),c=r(a);return"30".concat(r(a+o+4),"02").concat(c).concat(i,"02").concat(s).concat(n)}};var w=BigInt(0),A=BigInt(1),_=BigInt(2),E=BigInt(3),S=BigInt(4);function k(e){var t=function(e){var t=(0,y.validateBasic)(e);g.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});var r=t.endo,n=t.Fp,i=t.a;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==(0,d.default)(r)||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze(h({},t))}(e),r=t.Fp,n=t.toBytes||function(e,t,n){var i=t.toAffine();return g.concatBytes(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))},a=t.fromBytes||function(e){var t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}};function s(e){var n=t.a,i=t.b,o=r.sqr(e),a=r.mul(o,e);return r.add(r.add(a,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function c(e){return"bigint"==typeof e&&ww||d>w;)c&A&&(f=f.add(p)),d&A&&(h=h.add(p)),p=p.double(),c>>=A,d>>=A;return s&&(f=f.negate()),l&&(h=h.negate()),h=new e(r.mul(h.px,o.beta),h.py,h.pz),f.add(h)}},{key:"multiply",value:function(n){u(n);var i,o,a=n,s=t.endo;if(s){var c=s.splitScalar(a),l=c.k1neg,d=c.k1,f=c.k2neg,h=c.k2,p=this.wNAF(d),g=p.p,m=p.f,y=this.wNAF(h),v=y.p,b=y.f;g=S.constTimeNegate(l,g),v=S.constTimeNegate(f,v),v=new e(r.mul(v.px,s.beta),v.py,v.pz),i=g.add(v),o=m.add(b)}else{var w=this.wNAF(a);i=w.p,o=w.f}return e.normalizeZ([i,o])[0]}},{key:"multiplyAndAddUnsafe",value:function(t,r,n){var i=e.BASE,o=function(e,t){return t!==w&&t!==A&&e.equals(i)?e.multiply(t):e.multiplyUnsafe(t)},a=o(this,r).add(o(t,n));return a.is0()?void 0:a}},{key:"toAffine",value:function(e){var t=this.px,n=this.py,i=this.pz,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));var a=r.mul(t,e),s=r.mul(n,e),c=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:a,y:s}}},{key:"isTorsionFree",value:function(){var r=t.h,n=t.isTorsionFree;if(r===A)return!0;if(n)return n(e,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}},{key:"clearCofactor",value:function(){var r=t.h,n=t.clearCofactor;return r===A?this:n?n(e,this):this.multiplyUnsafe(t.h)}},{key:"toRawBytes",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.assertValidity(),n(e,this,t)}},{key:"toHex",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return g.bytesToHex(this.toRawBytes(e))}}],[{key:"fromAffine",value:function(t){var n=t||{},i=n.x,o=n.y;if(!t||!r.isValid(i)||!r.isValid(o))throw new Error("invalid affine point");if(t instanceof e)throw new Error("projective point not allowed");var a=function(e){return r.eql(e,r.ZERO)};return a(i)&&a(o)?e.ZERO:new e(i,o,r.ONE)}},{key:"normalizeZ",value:function(t){var n=r.invertBatch(t.map((function(e){return e.pz})));return t.map((function(e,t){return e.toAffine(n[t])})).map(e.fromAffine)}},{key:"fromHex",value:function(t){var r=e.fromAffine(a((0,m.ensureBytes)("pointHex",t)));return r.assertValidity(),r}},{key:"fromPrivateKey",value:function(t){return e.BASE.multiply(l(t))}}]),e}();b.BASE=new b(t.Gx,t.Gy,r.ONE),b.ZERO=new b(r.ZERO,r.ONE,r.ZERO);var _=t.nBitLength,S=(0,y.wNAF)(b,t.endo?Math.ceil(_/2):_);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:l,weierstrassEquation:s,isWithinCurveOrder:c}}function x(e,t){for(var r=e.ORDER,n=w,i=r-A;i%_===w;i/=_)n+=A;var o=n,a=_<A;g--){var m=g-_;m=_<c>>A}var T=function(e,t,r){return g.bytesToNumberBE(e.slice(t,r))},O=function(){function e(t,r,n){(0,o.default)(this,e),this.r=t,this.s=r,this.recovery=n,this.assertValidity()}return(0,i.default)(e,[{key:"assertValidity",value:function(){if(!x(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!x(this.s))throw new Error("s must be 0 < s < CURVE.n")}},{key:"addRecoveryBit",value:function(t){return new e(this.r,this.s,t)}},{key:"recoverPublicKey",value:function(e){var t=this.r,r=this.s,n=this.recovery,i=N((0,m.ensureBytes)("msgHash",e));if(null==n||![0,1,2,3].includes(n))throw new Error("recovery id invalid");var o=2===n||3===n?t+a.n:t;if(o>=s.ORDER)throw new Error("recovery id 2 or 3 invalid");var c=0==(1&n)?"02":"03",u=_.fromHex(c+C(o)),l=v(o),d=f(-i*l),h=f(r*l),p=_.BASE.multiplyAndAddUnsafe(u,d,h);if(!p)throw new Error("point at infinify");return p.assertValidity(),p}},{key:"hasHighS",value:function(){return I(this.s)}},{key:"normalizeS",value:function(){return this.hasHighS()?new e(this.r,f(-this.s),this.recovery):this}},{key:"toDERRawBytes",value:function(){return g.hexToBytes(this.toDERHex())}},{key:"toDERHex",value:function(){return t.DER.hexFromSig({r:this.r,s:this.s})}},{key:"toCompactRawBytes",value:function(){return g.hexToBytes(this.toCompactHex())}},{key:"toCompactHex",value:function(){return C(this.r)+C(this.s)}}],[{key:"fromCompact",value:function(t){var r=a.nByteLength;return t=(0,m.ensureBytes)("compactSignature",t,2*r),new e(T(t,0,r),T(t,r,2*r))}},{key:"fromDER",value:function(r){var n=t.DER.toSig((0,m.ensureBytes)("DER",r));return new e(n.r,n.s)}}]),e}(),P={isValidPrivateKey:function(e){try{return E(e),!0}catch(e){return!1}},normPrivateKeyToScalar:E,randomPrivateKey:function(){var e=a.randomBytes(s.BYTES+8),t=p.hashToPrivateScalar(e,c);return g.numberToBytesBE(t,a.nByteLength)},precompute:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.BASE;return t._setWindowSize(e),t.multiply(BigInt(3)),t}};function M(e){var t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===u||n===l:r?n===2*u||n===2*l:e instanceof _}var R=a.bits2int||function(e){var t=g.bytesToNumberBE(e),r=8*e.length-a.nBitLength;return r>0?t>>BigInt(r):t},N=a.bits2int_modN||function(e){return f(R(e))},L=g.bitMask(a.nBitLength);function B(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(w<=e&&e1&&void 0!==arguments[1])||arguments[1];return _.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(M(e))throw new Error("first arg must be private key");if(!M(t))throw new Error("second arg must be public key");return _.fromHex(t).multiply(E(e)).toRawBytes(r)},sign:function(e,t){var r=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D;if(["recovered","canonical"].some((function(e){return e in r})))throw new Error("sign() legacy options not supported");var n=a.hash,i=a.randomBytes,o=r.lowS,c=r.prehash,u=r.extraEntropy;null==o&&(o=!0),e=(0,m.ensureBytes)("msgHash",e),c&&(e=(0,m.ensureBytes)("prehashed msgHash",n(e)));var l=N(e),d=E(t),h=[B(d),B(l)];if(null!=u){var p=!0===u?i(s.BYTES):u;h.push((0,m.ensureBytes)("extraEntropy",p,s.BYTES))}var y=g.concatBytes.apply(g,h),b=l;return{seed:y,k2sig:function(e){var t=R(e);if(x(t)){var r=v(t),n=_.BASE.multiply(t).toAffine(),i=f(n.x);if(i!==w){var a=f(r*f(b+i*d));if(a!==w){var s=(n.x===i?0:2)|Number(n.y&A),c=a;return o&&I(a)&&(c=function(e){return I(e)?f(-e):e}(a),s^=1),new O(i,c,s)}}}}}}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:D),n=r.seed,i=r.k2sig,o=a;return g.createHmacDrbg(o.hash.outputLen,o.nByteLength,o.hmac)(n,i)},verify:function(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:U,s=e;if(r=(0,m.ensureBytes)("msgHash",r),n=(0,m.ensureBytes)("publicKey",n),"strict"in o)throw new Error("options.strict was renamed to lowS");var c,u=o.lowS,l=o.prehash,h=void 0;try{if("string"==typeof s||s instanceof Uint8Array)try{h=O.fromDER(s)}catch(e){if(!(e instanceof t.DER.Err))throw e;h=O.fromCompact(s)}else{if("object"!==(0,d.default)(s)||"bigint"!=typeof s.r||"bigint"!=typeof s.s)throw new Error("PARSE");var p=s.r,g=s.s;h=new O(p,g)}c=_.fromHex(n)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&h.hasHighS())return!1;l&&(r=a.hash(r));var y=h,b=y.r,w=y.s,A=N(r),E=v(w),S=f(A*E),k=f(b*E),x=null===(i=_.BASE.multiplyAndAddUnsafe(c,S,k))||void 0===i?void 0:i.toAffine();return!!x&&f(x.x)===b},ProjectivePoint:_,Signature:O,utils:P}},t.SWUFpSqrtRatio=x,t.mapToCurveSimpleSWU=function(e,t){if(p.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");var r=x(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return function(n){var i,o,a,s,c,u,l,d;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),a=e.add(o,e.ONE),a=e.mul(a,t.B),s=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),s=e.mul(s,t.A),o=e.sqr(a),u=e.sqr(s),c=e.mul(u,t.A),o=e.add(o,c),o=e.mul(o,a),u=e.mul(u,s),c=e.mul(u,t.B),o=e.add(o,c),l=e.mul(i,a);var f=r(o,u),h=f.isValid,p=f.value;d=e.mul(i,n),d=e.mul(d,p),l=e.cmov(l,a,h),d=e.cmov(d,p,h);var g=e.isOdd(n)===e.isOdd(d);return d=e.cmov(e.neg(d),d,g),{x:l=e.div(l,s),y:d}}}},4158:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;var n=r(61241),i=r(72434),o=r(3970),a=r(16573),s=r(46928),c=r(19751),u=r(96546),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f=BigInt(1),h=BigInt(2),p=function(e,t){return(e+t/h)/t};function g(e){var t=l,r=BigInt(3),n=BigInt(6),i=BigInt(11),a=BigInt(22),s=BigInt(23),c=BigInt(44),u=BigInt(88),d=e*e*e%t,f=d*d*e%t,p=(0,o.pow2)(f,r,t)*f%t,g=(0,o.pow2)(p,r,t)*f%t,y=(0,o.pow2)(g,h,t)*d%t,v=(0,o.pow2)(y,i,t)*y%t,b=(0,o.pow2)(v,a,t)*v%t,w=(0,o.pow2)(b,c,t)*b%t,A=(0,o.pow2)(w,u,t)*w%t,_=(0,o.pow2)(A,c,t)*b%t,E=(0,o.pow2)(_,r,t)*f%t,S=(0,o.pow2)(E,s,t)*v%t,k=(0,o.pow2)(S,n,t)*d%t,x=(0,o.pow2)(k,h,t);if(!m.eql(m.sqr(x),e))throw new Error("Cannot find square root");return x}var m=(0,o.Field)(l,void 0,void 0,{sqrt:g});t.secp256k1=(0,u.createCurve)({a:BigInt(0),b:BigInt(7),Fp:m,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:function(e){var t=d,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,s=BigInt("0x100000000000000000000000000000000"),c=p(a*e,t),u=p(-n*e,t),l=(0,o.mod)(e-c*r-u*i,t),h=(0,o.mod)(-c*n-u*a,t),g=l>s,m=h>s;if(g&&(l=t-l),m&&(h=t-h),l>s||h>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:g,k1:l,k2neg:m,k2:h}}}},n.sha256);var y=BigInt(0),v=function(e){return"bigint"==typeof e&&y1?i-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:(0,i.randomBytes)(32),n=(0,s.ensureBytes)("message",e),o=C(t),a=o.bytes,c=o.scalar,u=(0,s.ensureBytes)("auxRand",r,32),l=E(c^(0,s.bytesToNumberBE)(A("BIP0340/aux",u))),d=A("BIP0340/nonce",l,a,n),f=k((0,s.bytesToNumberBE)(d));if(f===y)throw new Error("sign failed: k is zero");var h=C(f),p=h.bytes,g=h.scalar,m=T(p,a,n),v=new Uint8Array(64);if(v.set(p,0),v.set(E(k(g+m*c)),32),!O(v,n,a))throw new Error("sign: Invalid signature produced");return v},verify:O,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:I,pointToBytes:_,numberToBytesBE:s.numberToBytesBE,bytesToNumberBE:s.bytesToNumberBE,taggedHash:A,mod:o.mod}};var P=(0,c.isogenyMap)(m,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((function(e){return e.map((function(e){return BigInt(e)}))}))),M=(0,a.mapToCurveSimpleSWU)(m,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:m.create(BigInt("-11"))}),R=(0,c.createHasher)(t.secp256k1.ProjectivePoint,(function(e){var t=M(m.create(e[0])),r=t.x,n=t.y;return P(r,n)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:m.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256});t.hashToCurve=R.hashToCurve,t.encodeToCurve=R.encodeToCurve},96822:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Wrong positive integer: ".concat(e))}function n(e){if("boolean"!=typeof e)throw new Error("Expected boolean, not ".concat(e))}function i(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&!r.includes(e.length))throw new Error("Expected Uint8Array of length ".concat(r,", not of length=").concat(e.length))}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function s(e,t){i(e);var r=t.outputLen;if(e.length{"use strict";var n=r(28847),i=n(r(93106)),o=n(r(69721)),a=n(r(58985)),s=n(r(15163)),c=n(r(34650)),u=n(r(21949));Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;var l=r(96822),d=r(72434),f=function(e){(0,s.default)(f,e);var t,r,n=(t=f,r=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(e){return!1}}(),function(){var e,n=(0,u.default)(t);if(r){var i=(0,u.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,c.default)(this,e)});function f(e,t,r,i){var a;return(0,o.default)(this,f),(a=n.call(this)).blockLen=e,a.outputLen=t,a.padOffset=r,a.isLE=i,a.finished=!1,a.length=0,a.pos=0,a.destroyed=!1,a.buffer=new Uint8Array(e),a.view=(0,d.createView)(a.buffer),a}return(0,a.default)(f,[{key:"update",value:function(e){l.default.exists(this);for(var t=this.view,r=this.buffer,n=this.blockLen,i=(e=(0,d.toBytes)(e)).length,o=0;on-o&&(this.process(r,0),o=0);for(var a=o;a>i&o),s=Number(r&o),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,s,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);var s=(0,d.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");var u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(var h=0;h{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.toBig=t.split=t.fromBig=void 0;var r=BigInt(Math.pow(2,32)-1),n=BigInt(32);function i(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Uint32Array(e.length),n=new Uint32Array(e.length),o=0;o>>0)+(n>>>0);return{h:e+r+(i/Math.pow(2,32)|0)|0,l:0|i}}t.fromBig=i,t.split=o,t.toBig=function(e,t){return BigInt(e>>>0)<>>0)},t.add=a;var s={fromBig:i,split:o,toBig:t.toBig,shrSH:function(e,t,r){return e>>>r},shrSL:function(e,t,r){return e<<32-r|t>>>r},rotrSH:function(e,t,r){return e>>>r|t<<32-r},rotrSL:function(e,t,r){return e<<32-r|t>>>r},rotrBH:function(e,t,r){return e<<64-r|t>>>r-32},rotrBL:function(e,t,r){return e>>>r-32|t<<64-r},rotr32H:function(e,t){return t},rotr32L:function(e,t){return e},rotlSH:function(e,t,r){return e<>>32-r},rotlSL:function(e,t,r){return t<>>32-r},rotlBH:function(e,t,r){return t<>>64-r},rotlBL:function(e,t,r){return e<>>64-r},add:a,add3L:function(e,t,r){return(e>>>0)+(t>>>0)+(r>>>0)},add3H:function(e,t,r,n){return t+r+n+(e/Math.pow(2,32)|0)|0},add4L:function(e,t,r,n){return(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)},add4H:function(e,t,r,n,i){return t+r+n+i+(e/Math.pow(2,32)|0)|0},add5H:function(e,t,r,n,i,o){return t+r+n+i+o+(e/Math.pow(2,32)|0)|0},add5L:function(e,t,r,n,i){return(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0)}};t.default=s},39712:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))&&"crypto"in globalThis?globalThis.crypto:void 0},45896:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949));Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;var u=r(96822),l=r(72434),d=function(e){(0,a.default)(d,e);var t,r,n=(t=d,r=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(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function d(e,t){var r;(0,i.default)(this,d),(r=n.call(this)).finished=!1,r.destroyed=!1,u.default.hash(e);var o=(0,l.toBytes)(t);if(r.iHash=e.create(),"function"!=typeof r.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");r.blockLen=r.iHash.blockLen,r.outputLen=r.iHash.outputLen;var a=r.blockLen,s=new Uint8Array(a);s.set(o.length>a?e.create().update(o).digest():o);for(var c=0;c{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949));function u(e){var t=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(e){return!1}}();return function(){var r,n=(0,c.default)(e);if(t){var i=(0,c.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;var l=r(20330),d=r(72434),f=function(e,t,r){return e&t^e&r^t&r},h=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),p=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),g=new Uint32Array(64),m=function(e){(0,a.default)(r,e);var t=u(r);function r(){var e;return(0,i.default)(this,r),(e=t.call(this,64,32,8,!1)).A=0|p[0],e.B=0|p[1],e.C=0|p[2],e.D=0|p[3],e.E=0|p[4],e.F=0|p[5],e.G=0|p[6],e.H=0|p[7],e}return(0,o.default)(r,[{key:"get",value:function(){return[this.A,this.B,this.C,this.D,this.E,this.F,this.G,this.H]}},{key:"set",value:function(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}},{key:"process",value:function(e,t){for(var r=0;r<16;r++,t+=4)g[r]=e.getUint32(t,!1);for(var n=16;n<64;n++){var i=g[n-15],o=g[n-2],a=(0,d.rotr)(i,7)^(0,d.rotr)(i,18)^i>>>3,s=(0,d.rotr)(o,17)^(0,d.rotr)(o,19)^o>>>10;g[n]=s+g[n-7]+a+g[n-16]|0}var c,u=this.A,l=this.B,p=this.C,m=this.D,y=this.E,v=this.F,b=this.G,w=this.H;for(r=0;r<64;r++){var A=w+((0,d.rotr)(y,6)^(0,d.rotr)(y,11)^(0,d.rotr)(y,25))+((c=y)&v^~c&b)+h[r]+g[r]|0,_=((0,d.rotr)(u,2)^(0,d.rotr)(u,13)^(0,d.rotr)(u,22))+f(u,l,p)|0;w=b,b=v,v=y,y=m+A|0,m=p,p=l,l=u,u=A+_|0}u=u+this.A|0,l=l+this.B|0,p=p+this.C|0,m=m+this.D|0,y=y+this.E|0,v=v+this.F|0,b=b+this.G|0,w=w+this.H|0,this.set(u,l,p,m,y,v,b,w)}},{key:"roundClean",value:function(){g.fill(0)}},{key:"destroy",value:function(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}]),r}(l.SHA2),y=function(e){(0,a.default)(r,e);var t=u(r);function r(){var e;return(0,i.default)(this,r),(e=t.call(this)).A=-1056596264,e.B=914150663,e.C=812702999,e.D=-150054599,e.E=-4191439,e.F=1750603025,e.G=1694076839,e.H=-1090891868,e.outputLen=28,e}return(0,o.default)(r)}(m);t.sha256=(0,d.wrapConstructor)((function(){return new m})),t.sha224=(0,d.wrapConstructor)((function(){return new y}))},64376:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=n(r(15163)),s=n(r(34650)),c=n(r(21949)),u=n(r(74519));Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;for(var l=r(96822),d=r(64356),f=r(72434),h=[],p=[],g=[],m=BigInt(0),y=BigInt(1),v=BigInt(2),b=BigInt(7),w=BigInt(256),A=BigInt(113),_=0,E=y,S=1,k=0;_<24;_++){var x=[k,(2*S+3*k)%5];S=x[0],k=x[1],h.push(2*(5*k+S)),p.push((_+1)*(_+2)/2%64);for(var C=m,I=0;I<7;I++)(E=(E<>b)*A)%w)&v&&(C^=y<<(y<32?d.default.rotlBH(e,t,r):d.default.rotlSH(e,t,r)},N=function(e,t,r){return r>32?d.default.rotlBL(e,t,r):d.default.rotlSL(e,t,r)};function L(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,r=new Uint32Array(10),n=24-t;n<24;n++){for(var i=0;i<10;i++)r[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(var o=0;o<10;o+=2)for(var a=(o+8)%10,s=(o+2)%10,c=r[s],u=r[s+1],l=R(c,u,1)^r[a],d=N(c,u,1)^r[a+1],f=0;f<50;f+=10)e[o+f]^=l,e[o+f+1]^=d;for(var g=e[2],m=e[3],y=0;y<24;y++){var v=p[y],b=R(g,m,v),w=N(g,m,v),A=h[y];g=e[A],m=e[A+1],e[A]=b,e[A+1]=w}for(var _=0;_<50;_+=10){for(var E=0;E<10;E++)r[E]=e[_+E];for(var S=0;S<10;S++)e[_+S]^=~r[(S+2)%10]&r[(S+4)%10]}e[0]^=P[n],e[1]^=M[n]}r.fill(0)}t.keccakP=L;var B=function(e){(0,a.default)(u,e);var t,r,n=(t=u,r=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(e){return!1}}(),function(){var e,n=(0,c.default)(t);if(r){var i=(0,c.default)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,s.default)(this,e)});function u(e,t,r){var o,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if((0,i.default)(this,u),(o=n.call(this)).blockLen=e,o.suffix=t,o.outputLen=r,o.enableXOF=a,o.rounds=s,o.pos=0,o.posOut=0,o.finished=!1,o.destroyed=!1,l.default.number(r),0>=o.blockLen||o.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");return o.state=new Uint8Array(200),o.state32=(0,f.u32)(o.state),o}return(0,o.default)(u,[{key:"keccak",value:function(){L(this.state32,this.rounds),this.posOut=0,this.pos=0}},{key:"update",value:function(e){l.default.exists(this);for(var t=this.blockLen,r=this.state,n=(e=(0,f.toBytes)(e)).length,i=0;i=r&&this.keccak();var o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}},{key:"xofInto",value:function(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}},{key:"xof",value:function(e){return l.default.number(e),this.xofInto(new Uint8Array(e))}},{key:"digestInto",value:function(e){if(l.default.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}},{key:"digest",value:function(){return this.digestInto(new Uint8Array(this.outputLen))}},{key:"destroy",value:function(){this.destroyed=!0,this.state.fill(0)}},{key:"_cloneInto",value:function(e){var t=this.blockLen,r=this.suffix,n=this.outputLen,i=this.rounds,o=this.enableXOF;return e||(e=new u(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}]),u}(f.Hash);t.Keccak=B;var D=function(e,t,r){return(0,f.wrapConstructor)((function(){return new B(t,e,r)}))};t.sha3_224=D(6,144,28),t.sha3_256=D(6,136,32),t.sha3_384=D(6,104,48),t.sha3_512=D(6,72,64),t.keccak_224=D(1,144,28),t.keccak_256=D(1,136,32),t.keccak_384=D(1,104,48),t.keccak_512=D(1,72,64);var U=function(e,t,r){return(0,f.wrapXOFConstructorWithOpts)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new B(t,e,void 0===n.dkLen?r:n.dkLen,!0)}))};t.shake128=U(31,168,16),t.shake256=U(31,136,32)},72434:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(69721)),a=n(r(58985)),s=n(r(94571)),c=n(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;var u=r(39712),l=function(e){return e instanceof Uint8Array};if(t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");var d=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));t.bytesToHex=function(e){if(!l(e))throw new Error("Uint8Array expected");for(var t="",r=0;r=0&&c0&&void 0!==arguments[0]?arguments[0]:32;if(u.crypto&&"function"==typeof u.crypto.getRandomValues)return u.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},53368:(e,t,r)=>{"use strict";var n,i,o=r(28847)(r(3355));void 0===(i="function"==typeof(n=function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r{"use strict";var n=t;n.bignum=r(31734),n.define=r(41568).define,n.base=r(12412),n.constants=r(79387),n.decoders=r(61500),n.encoders=r(47506)},41568:(e,t,r)=>{"use strict";var n=r(47506),i=r(61500),o=r(41736);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){var t=this.name;function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},90585:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(41736),o=r(32719).b,a=r(11755).Buffer;function s(e,t){o.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function c(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return c.isEncoderBuffer(e)||(e=new c(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+(0,n.default)(e));this.value=e,this.length=e.length}}i(s,o),t.C=s,s.isDecoderBuffer=function(e){return e instanceof s||"object"===(0,n.default)(e)&&a.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=c,c.isEncoderBuffer=function(e){return e instanceof c||"object"===(0,n.default)(e)&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},c.prototype.join=function(e,t){return e||(e=a.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},12412:(e,t,r)=>{"use strict";var n=t;n.Reporter=r(32719).b,n.DecoderBuffer=r(90585).C,n.EncoderBuffer=r(90585).R,n.Node=r(51371)},51371:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(32719).b,o=r(90585).R,a=r(90585).C,s=r(94504),c=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(c);function l(e,t,r){var n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=l;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){var e=this._baseState,t={};d.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},l.prototype._wrap=function(){var e=this._baseState;u.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},l.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==(0,n.default)(e)||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){l.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),c.forEach((function(e){l.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}})),l.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},l.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},l.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},l.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},l.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},l.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},l.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,o=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var c=null;if(null!==r.explicit?c=r.explicit:null!==r.implicit?c=r.implicit:null!==r.tag&&(c=r.tag),null!==c||r.any){if(o=this._peekTag(e,c,r.any),e.isError(o))return o}else{var u=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(u)}}if(r.obj&&o&&(n=e.enterObject()),o){if(null!==r.explicit){var l=this._decodeTag(e,r.explicit);if(e.isError(l))return l;e=l}var d=e.offset;if(null===r.use&&null===r.choice){var f;r.any&&(f=e.save());var h=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(h))return h;r.any?i=e.raw(f):e=h}if(t&&t.track&&null!==r.tag&&t.track(e.path(),d,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new a(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(p,t)}}return r.obj&&o&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},l.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},l.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},l.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var a=e.save(),s=r.choice[o];try{var c=s._decode(e,t);if(e.isError(c))return!1;n={type:o,value:c},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},l.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},l.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},l.prototype._encodeValue=function(e,t,r){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new i);var a=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}var s=null,c=!1;if(o.any)a=this._createEncoderBuffer(e);else if(o.choice)a=this._encodeChoice(e,t);else if(o.contains)s=this._getUse(o.contains,r)._encode(e,t),c=!0;else if(o.children)s=o.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var i=t.enterKey(r._baseState.key);if("object"!==(0,n.default)(e))return t.error("Child expected, but input is not object");var o=r._encode(e[r._baseState.key],t,e);return t.leaveKey(i),o}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),u))}else null!==o.use?a=this._getUse(o.use,r)._encode(e,t):(s=this._encodePrimitive(o.tag,e),c=!0);if(!o.any&&null===o.choice){var l=null!==o.implicit?o.implicit:o.tag,d=null===o.implicit?"universal":"context";null===l?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(a=this._encodeComposite(l,c,d,s))}return null!==o.explicit&&(a=this._encodeComposite(o.explicit,!1,"context",a)),a},l.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},l.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},l.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},l.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},32719:(e,t,r)=>{"use strict";var n=r(41736);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},6520:(e,t)=>{"use strict";function r(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},79387:(e,t,r)=>{"use strict";var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(6520)},92387:(e,t,r)=>{"use strict";var n=r(41736),i=r(31734),o=r(90585).C,a=r(51371),s=r(6520);function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){a.call(this,"der",e)}function l(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=s.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function d(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o{"use strict";var n=t;n.der=r(92387),n.pem=r(50529)},50529:(e,t,r)=>{"use strict";var n=r(41736),i=r(11755).Buffer,o=r(92387);function a(e){o.call(this,e),this.enc="pem"}n(a,o),e.exports=a,a.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,c=-1,u=0;u{"use strict";var n=r(41736),i=r(11755).Buffer,o=r(51371),a=r(6520);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.call(this,"der",e)}function u(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(c,o),c.prototype._encodeComposite=function(e,t,r,n){var o=function(e,t,r,n){var i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=a.tagClassByName[r||"universal"]<<6)}(e,t,r,this.reporter);if(n.length<128){var s=i.alloc(2);return s[0]=o,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var c=1,u=n.length;u>=256;u>>=8)c++;var l=i.alloc(2+c);l[0]=o,l[1]=128|c;for(var d=1+c,f=n.length;f>0;d--,f>>=8)l[d]=255&f;return this._createEncoderBuffer([l,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=i.alloc(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var a=0,s=0;s=128;c>>=7)a++}for(var u=i.alloc(a),l=u.length-1,d=e.length-1;d>=0;d--){var f=e[d];for(u[l--]=127&f;(f>>=7)>0;)u[l--]=128|127&f}return this._createEncoderBuffer(u)},c.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[u(n.getUTCFullYear()),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(n.getUTCFullYear()%100),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=i.from(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=i.alloc(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var a=1,s=e;s>=256;s>>=8)a++;for(var c=new Array(a),u=c.length-1;u>=0;u--)c[u]=255&e,e>>=8;return 128&c[0]&&c.unshift(0),this._createEncoderBuffer(i.from(c))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n{"use strict";var n=t;n.der=r(11068),n.pem=r(38520)},38520:(e,t,r)=>{"use strict";var n=r(41736),i=r(11068);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){for(var r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],o=0;o{"use strict";var n=r(28847)(r(3355)),i=r(33103);function o(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i=0;c--)if(l[c]!==d[c])return!1;for(c=l.length-1;c>=0;c--)if(!w(e[a=l[c]],t[a],r,n))return!1;return!0}(e,t,r,i))}return r?e===t:e==t}function A(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function _(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&v(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!e&&i&&!r;if((!e&&s.isError(i)&&o&&_(i,r)||a)&&v(i,r,"Got unwanted exception"+n),e&&i&&r&&!_(i,r)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(y(e.actual),128)+" "+e.operator+" "+m(y(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=g(t),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},s.inherits(h.AssertionError,Error),h.fail=v,h.ok=b,h.equal=function(e,t,r){e!=t&&v(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&v(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){w(e,t,!1)||v(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){w(e,t,!0)||v(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){w(e,t,!1)&&v(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){w(t,r,!0)&&v(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&v(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&v(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){E(!0,e,t,r)},h.doesNotThrow=function(e,t,r){E(!1,e,t,r)},h.ifError=function(e){if(e)throw e},h.strict=i((function e(t,r){t||v(t,!0,r,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var S=Object.keys||function(e){var t=[];for(var r in e)c.call(e,r)&&t.push(r);return t}},94074:e=>{"use strict";"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},86732:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports=function(e){return e&&"object"===(0,n.default)(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},69954:(e,t,r)=>{"use strict";var n=r(19142),i=r(28847)(r(3355)),o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._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=u),d(n,e,n.depth)}function u(e,t){var r=c.styles[t];return r?"\x1b["+c.colors[r][0]+"m"+e+"\x1b["+c.colors[r][1]+"m":e}function l(e,t){return e}function d(e,r,n){if(e.customInspect&&r&&S(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return v(i)||(i=d(e,i,n)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),E(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(r);if(0===a.length){if(S(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return f(r)}var u,l="",A=!1,k=["{","}"];return p(r)&&(A=!0,k=["[","]"]),S(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(l=" "+RegExp.prototype.toString.call(r)),_(r)&&(l=" "+Date.prototype.toUTCString.call(r)),E(r)&&(l=" "+f(r)),0!==a.length||A&&0!=r.length?n<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=A?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(u,l,k)):k[0]+l+k[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),I(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=m(r)?d(e,c.value,null):d(e,c.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.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=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function w(e){return A(e)&&"[object RegExp]"===k(e)}function A(e){return"object"===(0,i.default)(e)&&null!==e}function _(e){return A(e)&&"[object Date]"===k(e)}function E(e){return A(e)&&("[object Error]"===k(e)||e instanceof Error)}function S(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=g,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"===(0,i.default)(e)},t.isUndefined=b,t.isRegExp=w,t.isObject=A,t.isDate=_,t.isError=E,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(0,i.default)(e)||void 0===e},t.isBuffer=r(86732);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[x((e=new Date).getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":"),[e.getDate(),C[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(94074),t._extend=function(e,t){if(!t||!A(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},27548:(e,t,r)=>{"use strict";var n=r(48850).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,l=new Uint8Array(a);e[r];){var d=t[e.charCodeAt(r)];if(255===d)return;for(var f=0,h=a-1;(0!==d||f>>0,l[h]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");o=f,r++}for(var p=a-o;p!==a&&0===l[p];)p++;var g=n.allocUnsafe(i+(a-p));g.fill(0,0,i);for(var m=i;p!==a;)g[m++]=l[p++];return g}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,a=t.length;o!==a&&0===t[o];)o++,r++;for(var u=(a-o)*l+1>>>0,d=new Uint8Array(u);o!==a;){for(var f=t[o],h=0,p=u-1;(0!==f||h>>0,d[p]=f%s>>>0,f=f/s>>>0;if(0!==f)throw new Error("Non-zero carry");i=h,o++}for(var g=u-i;g!==u&&0===d[g];)g++;for(var m=c.repeat(r);g{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],c=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,c)),l=0,d=c>0?a-4:a;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;su?u:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},31734:(e,t,r)=>{"use strict";e=r.nmd(e);var n=r(28847)(r(3355));!function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===(0,n.default)(e)?e.exports=o:(void 0).BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(29033).Buffer}catch(e){}function s(e,r){var n=e.charCodeAt(r);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void t(!1,"Invalid character in "+e)}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function u(e,r,n,i){for(var o=0,a=0,s=Math.min(e.length,n),c=r;c=49?u-49+10:u>=17?u-17+10:u,t(u>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,r,i){if("number"==typeof e)return this._initNumber(e,r,i);if("object"===(0,n.default)(e))return this._initArray(e,r,i);"hex"===r&&(r=16),t(r===(0|r)&&r>=2&&r<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=c(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,l=r;l1&&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")]=d}catch(e){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?""}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"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],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];function g(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[u]=0|d,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}o.prototype.toString=function(e,r){var n;if(r=0|r||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?f[6-c.length]+c+n:c+n}for(0!==o&&(n=o.toString(16)+n);n.length%r!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],l=p[e];n="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modrn(l).toString(e);n=(d=d.idivn(l)).isZero()?g+n:f[u-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%r!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}t(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,r,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);t(i<=o,"byte array longer than desired length"),t(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===r?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){t("number"==typeof e&&e>=0);var r=0|Math.ceil(e/26),n=e%26;this._expand(r),n>0&&r--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,r){t("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=r?this.words[n]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],w=8191&b,A=b>>>13,_=0|a[4],E=8191&_,S=_>>>13,k=0|a[5],x=8191&k,C=k>>>13,I=0|a[6],T=8191&I,O=I>>>13,P=0|a[7],M=8191&P,R=P>>>13,N=0|a[8],L=8191&N,B=N>>>13,D=0|a[9],U=8191&D,j=D>>>13,F=0|s[0],z=8191&F,q=F>>>13,H=0|s[1],V=8191&H,$=H>>>13,K=0|s[2],W=8191&K,G=K>>>13,Q=0|s[3],Y=8191&Q,Z=Q>>>13,J=0|s[4],X=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],de=8191&le,fe=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(f,z)|0))<<13)|0;u=((o=Math.imul(f,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(g,z)|0,o=Math.imul(g,q);var ye=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(f,V)|0))<<13)|0;u=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(v,z)|0,o=Math.imul(v,q),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,$)|0;var ve=(u+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,W)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,G)|0;var be=(u+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,Y)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var we=(u+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var Ae=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;u=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(u+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;u=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,q))+Math.imul(R,z)|0,o=Math.imul(R,q),n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((o=o+Math.imul(f,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0;var Se=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,q))+Math.imul(j,z)|0,o=Math.imul(j,q),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,$)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,fe)|0;var ke=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ge)|0)+Math.imul(f,pe)|0))<<13)|0;u=((o=o+Math.imul(f,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,$))+Math.imul(j,V)|0,o=Math.imul(j,$),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(v,de)|0,o=o+Math.imul(v,fe)|0;var xe=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;u=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,G))+Math.imul(j,W)|0,o=Math.imul(j,G),n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,ue)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,fe)|0;var Ce=(u+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(v,pe)|0))<<13)|0;u=((o=o+Math.imul(v,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,Y),i=(i=Math.imul(U,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,ue)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,fe)|0;var Ie=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,X),i=(i=Math.imul(U,ee))+Math.imul(j,X)|0,o=Math.imul(j,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Te=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(S,pe)|0))<<13)|0;u=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(j,re)|0,o=Math.imul(j,ne),n=n+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(O,de)|0,o=o+Math.imul(O,fe)|0;var Oe=(u+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(C,pe)|0))<<13)|0;u=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,ae))+Math.imul(j,oe)|0,o=Math.imul(j,ae),n=n+Math.imul(L,ce)|0,i=(i=i+Math.imul(L,ue)|0)+Math.imul(B,ce)|0,o=o+Math.imul(B,ue)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(j,ce)|0,o=Math.imul(j,ue),n=n+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,fe)|0;var Me=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,de),i=(i=Math.imul(U,fe))+Math.imul(j,de)|0,o=Math.imul(j,fe);var Re=(u+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ge)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(u+(n=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul(j,pe)|0))<<13)|0;return u=((o=Math.imul(j,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=me,c[1]=ye,c[2]=ve,c[3]=be,c[4]=we,c[5]=Ae,c[6]=_e,c[7]=Ee,c[8]=Se,c[9]=ke,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Te,c[14]=Oe,c[15]=Pe,c[16]=Me,c[17]=Re,c[18]=Ne,0!==u&&(c[19]=u,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>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 v(e,t,r){return y(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(m=g),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?g(this,e,t):r<1024?y(this,e,t):v(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*r;a>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),r?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var r,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(r=0;r>>26-n}a&&(this.words[r]=a,this.length++)}if(0!==i){for(r=this.length-1;r>=0;r--)this.words[r+i]=this.words[r];for(r=0;r=0),i=r?(r-r%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,r,n){return t(0===this.negative),this.iushrn(e,r,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){t("number"==typeof e&&e>=0);var r=e%26,n=(e-r)/26,i=1<=0);var r=e%26,n=(e-r)/26;if(t(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==r&&n++,this.length=Math.min(n,this.length),0!==r){var i=67108863^67108863>>>r<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(t("number"==typeof e),t(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var r=0;r>26)-(c/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(t(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,r,n){return t(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,r),"mod"!==r&&(i=s.div.neg()),"div"!==r&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),r),"mod"!==r&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),r),"div"!==r&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===r?{div:this.divn(e.words[0]),mod:null}:"mod"===r?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,r);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var r=e<0;r&&(e=-e),t(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return r?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var r=e<0;r&&(e=-e),t(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),r?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){t(0===e.negative),t(!e.isZero());var r=this,n=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),u=0;r.isEven()&&n.isEven();)r.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),d=r.clone();!r.isZero();){for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0==(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(d)),s.iushrn(1),c.iushrn(1);r.cmp(n)>=0?(r.isub(n),i.isub(s),a.isub(c)):(n.isub(r),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:n.iushln(u)}},o.prototype._invmp=function(e){t(0===e.negative),t(!e.isZero());var r=this,n=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var i,a=new o(1),s=new o(0),c=n.clone();r.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,l=1;0==(r.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);r.cmp(n)>=0?(r.isub(n),a.isub(s)):(n.isub(r),s.isub(a))}return(i=0===r.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){t("number"==typeof e);var r=e%26,n=(e-r)/26,i=1<>>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(e){var r,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)r=1;else{n&&(e=-e),t(e<=67108863,"Number is too big");var i=0|this.words[0];r=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new x(e)},o.prototype.toRed=function(e){return t(!this.red,"Already a number in reduction context"),t(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return t(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return t(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var r=o._prime(e);this.m=r.p,this.prime=r}else t(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(_,A),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return w[e]=t,t},x.prototype._verify1=function(e){t(0===e.negative,"red works only with positives"),t(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,r){t(0==(e.negative|r.negative),"red works only with positives"),t(e.red&&e.red===r.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var r=this.m.andln(3);if(t(r%2==1),3===r){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);t(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var g=h,m=0;0!==g.cmp(s);m++)g=g.redSqr();t(m=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var d=u>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4==++s||0===n&&0===l)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new C(e)},i(C,x),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),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)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e)},82202:(e,t,r)=>{"use strict";var n,i=r(28847)(r(3355));function o(e){this.rand=e}if(e.exports=function(e){return n||(n=new o(null)),n.generate(e)},e.exports.Rand=o,o.prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r{"use strict";var n=r(48850).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i>>24]^l[p>>>16&255]^d[g>>>8&255]^f[255&m]^t[y++],a=u[p>>>24]^l[g>>>16&255]^d[m>>>8&255]^f[255&h]^t[y++],s=u[g>>>24]^l[m>>>16&255]^d[h>>>8&255]^f[255&p]^t[y++],c=u[m>>>24]^l[h>>>16&255]^d[p>>>8&255]^f[255&g]^t[y++],h=o,p=a,g=s,m=c;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[g>>>8&255]<<8|n[255&m])^t[y++],a=(n[p>>>24]<<24|n[g>>>16&255]<<16|n[m>>>8&255]<<8|n[255&h])^t[y++],s=(n[g>>>24]<<24|n[m>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[y++],c=(n[m>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&g])^t[y++],[o>>>=0,a>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,r[a]=u,n[u]=a;var l=e[a],d=e[l],f=e[d],h=257*e[u]^16843008*u;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*f^65537*d^257*l^16843008*a,o[0][u]=h<<24|h>>>8,o[1][u]=h<<16|h>>>16,o[2][u]=h<<8|h>>>24,o[3][u]=h,0===a?a=s=1:(a=l^e[e[e[f^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]),i[o]=i[o-t]^a}for(var u=[],l=0;l>>24]]^c.INV_SUB_MIX[1][c.SBOX[f>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[f>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&f]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=u},10426:(e,t,r)=>{"use strict";var n=r(37494),i=r(48850).Buffer,o=r(93013),a=r(41736),s=r(26626),c=r(96316),u=r(67557);function l(e,t,r,a){o.call(this);var c=i.alloc(4,0);this._cipher=new n.AES(t);var l=this._cipher.encryptBlock(c);this._ghash=new s(l),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),o=t.length,a=o%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var c=8*o,l=i.alloc(8);l.writeUIntBE(c,0,8),n.update(l),e._finID=n.state;var d=i.from(e._finID);return u(d),d}(this,r,l),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(l,o),l.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i{"use strict";var n=r(85478),i=r(32184),o=r(44946);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},32184:(e,t,r)=>{"use strict";var n=r(10426),i=r(48850).Buffer,o=r(58408),a=r(21408),s=r(93013),c=r(37494),u=r(27085);function l(e,t,r){s.call(this),this._cache=new d,this._last=void 0,this._cipher=new c.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function d(){this.cache=i.allocUnsafe(0)}function f(e,t,r){var s=o[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new a(s.module,t,r,!0):"auth"===s.type?new n(s.module,t,r,!0):new l(s.module,t,r)}r(41736)(l,s),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},d.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(t,!1,r.key,r.iv);return f(e,n.key,n.iv)},t.createDecipheriv=f},85478:(e,t,r)=>{"use strict";var n=r(58408),i=r(10426),o=r(48850).Buffer,a=r(21408),s=r(93013),c=r(37494),u=r(27085);function l(e,t,r){s.call(this),this._cache=new f,this._cipher=new c.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(41736)(l,s),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var d=o.alloc(16,16);function f(){this.cache=o.allocUnsafe(0)}function h(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new l(s.module,t,r)}l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(d))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=o.concat([this.cache,e])},f.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},f.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r{"use strict";var n=r(48850).Buffer,i=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},67557:e=>{"use strict";e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},77427:(e,t,r)=>{"use strict";var n=r(96316);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},44030:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(96316);function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}t.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)]);break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},13206:(e,t,r)=>{"use strict";var n=r(48850).Buffer;function i(e,t,r){for(var n,i,a=-1,s=0;++a<8;)n=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s{"use strict";var n=r(48850).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s{"use strict";var n=r(96316),i=r(48850).Buffer,o=r(67557);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var s=0;s{"use strict";t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},58408:(e,t,r)=>{"use strict";var n={ECB:r(59297),CBC:r(77427),CFB:r(44030),CFB8:r(14726),CFB1:r(13206),OFB:r(91962),CTR:r(32802),GCM:r(32802)},i=r(44946);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},91962:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(96316);function o(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length{"use strict";var n=r(37494),i=r(48850).Buffer,o=r(93013);function a(e,t,r,a){o.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}r(41736)(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},56805:(e,t,r)=>{"use strict";var n=r(19120),i=r(98073),o=r(58408),a=r(30867),s=r(27085);function c(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return c(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=c,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return u(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=u,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},19120:(e,t,r)=>{"use strict";var n=r(93013),i=r(75626),o=r(41736),a=r(48850).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function c(e){n.call(this);var t,r=e.mode.toLowerCase(),i=s[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=a.concat([o,o.slice(0,8)]));var c=e.iv;a.isBuffer(c)||(c=a.from(c)),this._des=i.create({key:o,iv:c,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=c,o(c,n),c.prototype._update=function(e){return a.from(this._des.update(e))},c.prototype._final=function(){return a.from(this._des.final())}},30867:(e,t)=>{"use strict";t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},99782:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(31734),o=r(75010);function a(e){var t,r=e.modulus.byteLength();do{t=new i(o(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,t){var r=function(e){var t=a(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),o=t.modulus.byteLength(),s=new i(e).mul(r.blinder).umod(t.modulus),c=s.toRed(i.mont(t.prime1)),u=s.toRed(i.mont(t.prime2)),l=t.coefficient,d=t.prime1,f=t.prime2,h=c.redPow(t.exponent1).fromRed(),p=u.redPow(t.exponent2).fromRed(),g=h.isub(p).imul(l).umod(d).imul(f);return p.iadd(g).imul(r.unblinder).umod(t.modulus).toArrayLike(n,"be",o)}s.getr=a,e.exports=s},26561:(e,t,r)=>{"use strict";e.exports=r(75207)},79527:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(35866),o=r(86505),a=r(41736),s=r(11628),c=r(15410),u=r(75207);function l(e){o.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){o.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){return new l(e)}function h(e){return new d(e)}Object.keys(u).forEach((function(e){u[e].id=n.from(u[e].id,"hex"),u[e.toLowerCase()]=u[e]})),a(l,o.Writable),l.prototype._write=function(e,t,r){this._hash.update(e),r()},l.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},l.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=s(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},a(d,o.Writable),d.prototype._write=function(e,t,r){this._hash.update(e),r()},d.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},d.prototype.verify=function(e,t,r){var i="string"==typeof t?n.from(t,r):t;this.end();var o=this._hash.digest();return c(i,o,e,this._signType,this._tag)},e.exports={Sign:f,Verify:h,createSign:f,createVerify:h}},11628:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(34424),o=r(99782),a=r(36597).ec,s=r(31734),c=r(27552),u=r(1308);function l(e,t,r,o){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function f(e,t,r){var o,a;do{for(o=n.alloc(0);8*o.length{"use strict";var n=r(48850).Buffer,i=r(31734),o=r(36597).ec,a=r(27552),s=r(1308);function c(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}e.exports=function(e,t,r,u,l){var d=a(r);if("ec"===d.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,d)}if("dsa"===d.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,s=r.data.g,u=r.data.pub_key,l=a.signature.decode(e,"der"),d=l.s,f=l.r;c(d,o),c(f,o);var h=i.mont(n),p=d.invm(o);return 0===s.toRed(h).redPow(new i(t).mul(p).mod(o)).fromRed().mul(u.toRed(h).redPow(f.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(f)}(e,t,d)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");t=n.concat([l,t]);for(var f=d.modulus.byteLength(),h=[1],p=0;t.length+h.length+2{"use strict";var n=r(29033).Buffer,i=r(19142),o=r(3894),a=r(47563),s=r(54151),c=r(63534),u=r(29806);for(var l in u)t[l]=u[l];function d(e){if("number"!=typeof e||et.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7,d.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?s.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||c.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},d.prototype.write=function(e,t,r,n,i,o,a){return this._write(!0,e,t,r,n,i,o,a)},d.prototype.writeSync=function(e,t,r,n,i,o,a){return this._write(!1,e,t,r,n,i,o,a)},d.prototype._write=function(e,r,a,s,c,u,l,d){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==t.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===r,"must provide flush value"),this.write_in_progress=!0,r!==t.Z_NO_FLUSH&&r!==t.Z_PARTIAL_FLUSH&&r!==t.Z_SYNC_FLUSH&&r!==t.Z_FULL_FLUSH&&r!==t.Z_FINISH&&r!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==a&&(a=n.alloc(0),c=0,s=0),this.strm.avail_in=c,this.strm.input=a,this.strm.next_in=s,this.strm.avail_out=d,this.strm.output=u,this.strm.next_out=l,this.flush=r,!e)return this._process(),this._checkError()?this._afterSync():void 0;var f=this;return i.nextTick((function(){f._process(),f._after()})),this},d.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},d.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=c.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=c.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=c.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=c.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},d.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},d.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},d.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},d.prototype.init=function(e,r,n,i,a){o(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(e>=8&&e<=15,"invalid windowBits"),o(r>=-1&&r<=9,"invalid compression level"),o(n>=1&&n<=9,"invalid memlevel"),o(i===t.Z_FILTERED||i===t.Z_HUFFMAN_ONLY||i===t.Z_RLE||i===t.Z_FIXED||i===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,e,n,i,a),this._setDictionary()},d.prototype.params=function(){throw new Error("deflateParams Not supported")},d.prototype.reset=function(){this._reset(),this._setDictionary()},d.prototype._init=function(e,r,n,i,o){switch(this.level=e,this.windowBits=r,this.memLevel=n,this.strategy=i,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=c.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=o,this.write_in_progress=!1,this.init_done=!0},d.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=s.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},d.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=s.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=c.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=d},77611:(e,t,r)=>{"use strict";var n=r(19142),i=r(29033).Buffer,o=r(57245).Transform,a=r(19626),s=r(45058),c=r(3894).ok,u=r(29033).kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";a.Z_MIN_WINDOWBITS=8,a.Z_MAX_WINDOWBITS=15,a.Z_DEFAULT_WINDOWBITS=15,a.Z_MIN_CHUNK=64,a.Z_MAX_CHUNK=1/0,a.Z_DEFAULT_CHUNK=16384,a.Z_MIN_MEMLEVEL=1,a.Z_MAX_MEMLEVEL=9,a.Z_DEFAULT_MEMLEVEL=8,a.Z_MIN_LEVEL=-1,a.Z_MAX_LEVEL=9,a.Z_DEFAULT_LEVEL=a.Z_DEFAULT_COMPRESSION;for(var d=Object.keys(a),f=0;f=u?a=new RangeError(l):t=i.concat(n,o),n=[],e.close(),r(a,t)}e.on("error",(function(t){e.removeListener("end",s),e.removeListener("readable",a),r(t)})),e.on("end",s),e.end(t),a()}function b(e,t){if("string"==typeof t&&(t=i.from(t)),!i.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function w(e){if(!(this instanceof w))return new w(e);I.call(this,e,a.DEFLATE)}function A(e){if(!(this instanceof A))return new A(e);I.call(this,e,a.INFLATE)}function _(e){if(!(this instanceof _))return new _(e);I.call(this,e,a.GZIP)}function E(e){if(!(this instanceof E))return new E(e);I.call(this,e,a.GUNZIP)}function S(e){if(!(this instanceof S))return new S(e);I.call(this,e,a.DEFLATERAW)}function k(e){if(!(this instanceof k))return new k(e);I.call(this,e,a.INFLATERAW)}function x(e){if(!(this instanceof x))return new x(e);I.call(this,e,a.UNZIP)}function C(e){return e===a.Z_NO_FLUSH||e===a.Z_PARTIAL_FLUSH||e===a.Z_SYNC_FLUSH||e===a.Z_FULL_FLUSH||e===a.Z_FINISH||e===a.Z_BLOCK}function I(e,r){var n=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,o.call(this,e),e.flush&&!C(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!C(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:a.Z_FINISH,e.chunkSize&&(e.chunkSizet.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitst.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levelt.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevelt.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!i.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(r);var s=this;this._hadError=!1,this._handle.onerror=function(e,r){T(s),s._hadError=!0;var n=new Error(e);n.errno=r,n.code=t.codes[r],s.emit("error",n)};var c=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(c=e.level);var u=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(u=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,c,e.memLevel||t.Z_DEFAULT_MEMLEVEL,u,e.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=c,this._strategy=u,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!n._handle},configurable:!0,enumerable:!0})}function T(e,t){t&&n.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function O(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),t.Deflate=w,t.Inflate=A,t.Gzip=_,t.Gunzip=E,t.DeflateRaw=S,t.InflateRaw=k,t.Unzip=x,t.createDeflate=function(e){return new w(e)},t.createInflate=function(e){return new A(e)},t.createDeflateRaw=function(e){return new S(e)},t.createInflateRaw=function(e){return new k(e)},t.createGzip=function(e){return new _(e)},t.createGunzip=function(e){return new E(e)},t.createUnzip=function(e){return new x(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new w(t),e,r)},t.deflateSync=function(e,t){return b(new w(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new _(t),e,r)},t.gzipSync=function(e,t){return b(new _(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new S(t),e,r)},t.deflateRawSync=function(e,t){return b(new S(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new x(t),e,r)},t.unzipSync=function(e,t){return b(new x(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new A(t),e,r)},t.inflateSync=function(e,t){return b(new A(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new E(t),e,r)},t.gunzipSync=function(e,t){return b(new E(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new k(t),e,r)},t.inflateRawSync=function(e,t){return b(new k(t),e)},s.inherits(I,o),I.prototype.params=function(e,r,i){if(et.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==e||this._strategy!==r){var o=this;this.flush(a.Z_SYNC_FLUSH,(function(){c(o._handle,"zlib binding closed"),o._handle.params(e,r),o._hadError||(o._level=e,o._strategy=r,i&&i())}))}else n.nextTick(i)},I.prototype.reset=function(){return c(this._handle,"zlib binding closed"),this._handle.reset()},I.prototype._flush=function(e){this._transform(i.alloc(0),"",e)},I.prototype.flush=function(e,t){var r=this,o=this._writableState;("function"==typeof e||void 0===e&&!t)&&(t=e,e=a.Z_FULL_FLUSH),o.ended?t&&n.nextTick(t):o.ending?t&&this.once("end",t):o.needDrain?t&&this.once("drain",(function(){return r.flush(e,t)})):(this._flushFlag=e,this.write(i.alloc(0),"",t))},I.prototype.close=function(e){T(this,e),n.nextTick(O,this)},I.prototype._transform=function(e,t,r){var n,o=this._writableState,s=(o.ending||o.ended)&&(!e||o.length===e.length);return null===e||i.isBuffer(e)?this._handle?(s?n=this._finishFlushFlag:(n=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),void this._processChunk(e,n,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},I.prototype._processChunk=function(e,t,r){var n=e&&e.length,o=this._chunkSize-this._offset,a=0,s=this,d="function"==typeof r;if(!d){var f,h=[],p=0;this.on("error",(function(e){f=e})),c(this._handle,"zlib binding closed");do{var g=this._handle.writeSync(t,e,a,n,this._buffer,this._offset,o)}while(!this._hadError&&v(g[0],g[1]));if(this._hadError)throw f;if(p>=u)throw T(this),new RangeError(l);var m=i.concat(h,p);return T(this),m}c(this._handle,"zlib binding closed");var y=this._handle.write(t,e,a,n,this._buffer,this._offset,o);function v(u,l){if(this&&(this.buffer=null,this.callback=null),!s._hadError){var f=o-l;if(c(f>=0,"have should not go down"),f>0){var g=s._buffer.slice(s._offset,s._offset+f);s._offset+=f,d?s.push(g):(h.push(g),p+=g.length)}if((0===l||s._offset>=s._chunkSize)&&(o=s._chunkSize,s._offset=0,s._buffer=i.allocUnsafe(s._chunkSize)),0===l){if(a+=n-u,n=u,!d)return!0;var m=s._handle.write(t,e,a,n,s._buffer,s._offset,s._chunkSize);return m.callback=v,void(m.buffer=e)}if(!d)return!1;r()}}y.buffer=e,y.callback=v},s.inherits(w,I),s.inherits(A,I),s.inherits(_,I),s.inherits(E,I),s.inherits(S,I),s.inherits(k,I),s.inherits(x,I)},96316:(e,t,r)=>{"use strict";var n=r(29033).Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new n(r),o=0;o{"use strict";var n=r(34919),i=r(83226),o=r(39484);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var o,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;os&&(r=s-c),o=r;o>=0;o--){for(var d=!0,f=0;fi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=r)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=d}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);for(var r="",n=0;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},c.prototype.compare=function(e,t,r,n,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(n,i),l=e.slice(t,r),d=0;di)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return A(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function I(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;ii)&&(r=i);for(var o="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function B(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,o){return o||B(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return o||B(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}},83675:e=>{"use strict";e.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"}},80593:(e,t,r)=>{"use strict";var n=r(57701),i=r(24373),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},24373:(e,t,r)=>{"use strict";var n=r(3767),i=r(57701),o=r(77990),a=i("%TypeError%"),s=i("%Function.prototype.apply%"),c=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||n.call(c,s),l=i("%Object.defineProperty%",!0),d=i("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=u(n,c,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var f=function(){return u(n,s,arguments)};l?l(e.exports,"apply",{value:f}):e.exports.apply=f},47759:(e,t,r)=>{"use strict";for(var n=r(28847)(r(74519)),i=r(83630),o={},a=0,s=Object.entries(i);a{"use strict";var n=r(29033).Buffer,i=r(26657),o=r(55262),a=r(71842),s=r(40779);(t=e.exports).addPrefix=function(e,t){var r;if(n.isBuffer(e))r=s.varintBufferEncode(e);else{if(!a[e])throw new Error("multicodec not recognized");r=a[e]}return n.concat([r,t])},t.rmPrefix=function(e){return i.decode(e),e.slice(i.decode.bytes)},t.getCodec=function(e){var t=i.decode(e),r=o.get(t);if(void 0===r)throw new Error("Code ".concat(t," not found"));return r},t.getName=function(e){return o.get(e)},t.getNumber=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return s.varintBufferDecode(t)[0]},t.getCode=function(e){return i.decode(e)},t.getCodeVarint=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=function(e){return i.encode(e)};var c=r(47759);Object.assign(t,c),t.print=r(29268)},55262:(e,t,r)=>{"use strict";var n=r(83630),i=new Map;for(var o in n){var a=n[o];i.set(a,o)}e.exports=Object.freeze(i)},29268:(e,t,r)=>{"use strict";for(var n=r(28847)(r(74519)),i=r(83630),o={},a=0,s=Object.entries(i);a{"use strict";var n=r(26657),i=r(29033).Buffer;function o(e){return parseInt(e.toString("hex"),16)}function a(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),i.from(t,"hex")}e.exports={numberToBuffer:a,bufferToNumber:o,varintBufferEncode:function(e){return i.from(n.encode(o(e)))},varintBufferDecode:function(e){return a(n.decode(e))},varintEncode:function(e){return i.from(n.encode(e))}}},71842:(e,t,r)=>{"use strict";var n=r(83630),i=r(40779).varintEncode,o={};for(var a in n){var s=n[a];o[a]=i(s)}e.exports=Object.freeze(o)},59976:(e,t,r)=>{"use strict";var n=r(77748),i=r(29033).Buffer,o={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(0===e.version){if("dag-pb"!==e.codec)return"codec must be 'dag-pb' for CIDv0";if("base58btc"!==e.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!i.isBuffer(e.multihash))return"multihash must be a Buffer";try{n.validate(e.multihash)}catch(e){var t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=o},72753:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=r(29033).Buffer,s=r(77748),c=r(6086),u=r(97223),l=r(83630),d=r(59976),f=r(83162)(function(e){function t(e,r,n,o){if((0,i.default)(this,t),f.isCID(e)){var l=e;return this.version=l.version,this.codec=l.codec,this.multihash=a.from(l.multihash),void(this.multibaseName=l.multibaseName||(0===l.version?"base58btc":"base32"))}if("string"==typeof e){var d=c.isEncoded(e);if(d){var h=c.decode(e);this.version=parseInt(h.slice(0,1).toString("hex"),16),this.codec=u.getCodec(h.slice(1)),this.multihash=u.rmPrefix(h.slice(1)),this.multibaseName=d}else this.version=0,this.codec="dag-pb",this.multihash=s.fromB58String(e),this.multibaseName="base58btc";return t.validateCID(this),void Object.defineProperty(this,"string",{value:e})}if(a.isBuffer(e)){var p=e.slice(0,1),g=parseInt(p.toString("hex"),16);if(1===g){var m=e;this.version=g,this.codec=u.getCodec(m.slice(1)),this.multihash=u.rmPrefix(m.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=e,this.multibaseName="base58btc";t.validateCID(this)}else this.version=e,this.codec=r,this.multihash=n,this.multibaseName=o||(0===e?"base58btc":"base32"),t.validateCID(this)}return(0,o.default)(t,[{key:"buffer",get:function(){var e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=a.concat([a.from("01","hex"),u.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}},{key:"prefix",get:function(){return a.concat([a.from("0".concat(this.version),"hex"),u.getCodeVarint(this.codec),s.prefix(this.multihash)])}},{key:"toV0",value:function(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");var e=s.decode(this.multihash),t=e.name,r=e.length;if("sha2-256"!==t)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==r)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new f(0,this.codec,this.multihash)}},{key:"toV1",value:function(){return new f(1,this.codec,this.multihash)}},{key:"toBaseEncodedString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.multibaseName;if(this.string&&e===this.multibaseName)return this.string;var t=null;if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");t=s.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");t=c.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}},{key:e,value:function(){return"CID("+this.toString()+")"}},{key:"toString",value:function(e){return this.toBaseEncodedString(e)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}}],[{key:"validateCID",value:function(e){var t=d.checkCIDComponents(e);if(t)throw new Error(t)}}]),t}(Symbol.for("nodejs.util.inspect.custom")),{className:"CID",symbolName:"@ipld/js-cid/CID"});f.codecs=l,e.exports=f},93013:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(57245).Transform,o=r(23462).s;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(41736)(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);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(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},83162:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(14727)),o=n(r(90775)),a=n(r(69721)),s=n(r(58985)),c=n(r(58975)),u=n(r(15163)),l=n(r(34650)),d=n(r(21949));e.exports=function(e,t){var r=t.className,n=t.symbolName,i=Symbol.for(n),f=(0,o.default)({},r,function(e,t){(0,u.default)(h,e);var n,o,f=(n=h,o=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(e){return!1}}(),function(){var e,t=(0,d.default)(n);if(o){var r=(0,d.default)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,l.default)(this,e)});function h(){var e;(0,a.default)(this,h);for(var t=arguments.length,r=new Array(t),n=0;n{"use strict";var n=r(72753);t.cidV0ToV1Base32=function(e){var t=new n(e);return 0===t.version&&(t=t.toV1()),t.toString("base32")}},94308:(e,t,r)=>{"use strict";var n=r(69206),i=r(39512),o=i.hexStringToBuffer,a=i.profiles,s=r(36834).cidV0ToV1Base32;e.exports={helpers:{cidV0ToV1Base32:s},decode:function(e){var t=o(e),r=n.getCodec(t),i=n.rmPrefix(t),s=a[r];return s||(s=a.default),s.decode(i)},fromIpfs:function(e){return this.encode("ipfs-ns",e)},fromSwarm:function(e){return this.encode("swarm-ns",e)},encode:function(e,t){var r=a[e];r||(r=a.default);var i=r.encode(t);return n.addPrefix(e,i).toString("hex")},getCodec:function(e){var t=o(e);return n.getCodec(t)}}},39512:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(72753),o=r(77748),a=function(e){var t,r=e.slice(0,2),n=e.slice(2);return t="0x"===r?n:e,o.fromHexString(t)},s={swarm:function(e){var t=o.encode(a(e),"keccak-256");return new i(1,"swarm-manifest",t).buffer},ipfs:function(e){var t=o.fromB58String(e);return new i(1,"dag-pb",t).buffer},utf8:function(e){return n.from(e,"utf8")}},c={hexMultiHash:function(e){var t=new i(e);return o.decode(t.multihash).digest.toString("hex")},b58MultiHash:function(e){var t=new i(e);return o.toB58String(t.multihash)},utf8:function(e){return e.toString("utf8")}},u={"swarm-ns":{encode:s.swarm,decode:c.hexMultiHash},"ipfs-ns":{encode:s.ipfs,decode:c.b58MultiHash},"ipns-ns":{encode:s.ipfs,decode:c.b58MultiHash},default:{encode:s.utf8,decode:c.utf8}};t.hexStringToBuffer=a,t.profiles=u},64628:(e,t,r)=>{"use strict";var n,i,o=r(28847)(r(3355));i=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=new Array(256),r=0;256!=r;++r)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=r)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=function(e){var t=0,r=0,n=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=e[n];for(n=0;256!=n;++n)for(r=e[n],t=256+n;t<4096;t+=256)r=i[t]=r>>>8^e[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]="undefined"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(t),n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],c=r[5],u=r[6],l=r[7],d=r[8],f=r[9],h=r[10],p=r[11],g=r[12],m=r[13],y=r[14];e.table=t,e.bstr=function(e,r){for(var n=~r,i=0,o=e.length;i>>8^t[255&(n^e.charCodeAt(i++))];return~n},e.buf=function(e,r){for(var v=~r,b=e.length-15,w=0;w>8&255]^g[e[w++]^v>>16&255]^p[e[w++]^v>>>24]^h[e[w++]]^f[e[w++]]^d[e[w++]]^l[e[w++]]^u[e[w++]]^c[e[w++]]^s[e[w++]]^a[e[w++]]^o[e[w++]]^i[e[w++]]^n[e[w++]]^t[e[w++]];for(b+=15;w>>8^t[255&(v^e[w++])];return~v},e.str=function(e,r){for(var n=~r,i=0,o=e.length,a=0,s=0;i>>8^t[255&(n^a)]:a<2048?n=(n=n>>>8^t[255&(n^(192|a>>6&31))])>>>8^t[255&(n^(128|63&a))]:a>=55296&&a<57344?(a=64+(1023&a),s=1023&e.charCodeAt(i++),n=(n=(n=(n=n>>>8^t[255&(n^(240|a>>8&7))])>>>8^t[255&(n^(128|a>>2&63))])>>>8^t[255&(n^(128|s>>6&15|(3&a)<<4))])>>>8^t[255&(n^(128|63&s))]):n=(n=(n=n>>>8^t[255&(n^(224|a>>12&15))])>>>8^t[255&(n^(128|a>>6&63))])>>>8^t[255&(n^(128|63&a))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?"object"===(0,o.default)(t)?i(t):(n=function(){var e={};return i(e),e}.call(t,r,t,e),void 0===n||(e.exports=n)):i({})},75102:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(36597),o=r(31734);e.exports=function(e){return new s(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function c(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new n(e);if(r&&i.length{"use strict";var n=r(41736),i=r(50807),o=r(26707),a=r(51708),s=r(93013);function c(e){s.call(this,"digest"),this._hash=e}n(c,s),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new c(a(e))}},55349:(e,t,r)=>{"use strict";var n=r(50807);e.exports=function(e){return(new n).update(e).digest()}},34424:(e,t,r)=>{"use strict";var n=r(41736),i=r(19956),o=r(93013),a=r(48850).Buffer,s=r(55349),c=r(26707),u=r(51708),l=a.alloc(128);function d(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new c:u(e)).update(t).digest():t.length{"use strict";var n=r(41736),i=r(48850).Buffer,o=r(93013),a=i.alloc(128),s=64;function c(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length{"use strict";var n=r(28847)(r(3355)),i="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,o=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,i="URLSearchParams"in r,o="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in r,c="ArrayBuffer"in r;if(c)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&u.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function f(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function g(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=m(t);return t.readAsArrayBuffer(e),r}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():c&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=g(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?g(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(y)}),this.text=function(){var e,t,r,n=g(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=m(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function E(e,t){if(!(this instanceof E))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})},b.call(A.prototype),b.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,i){return new Promise((function(o,s){var u=new A(e,i);if(u.signal&&u.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function d(){l.abort()}l.onload=function(){var e,t,r={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in l?l.responseURL:r.headers.get("X-Request-URL");var n="response"in l?l.response:l.responseText;setTimeout((function(){o(new E(n,r))}),0)},l.onerror=function(){setTimeout((function(){s(new TypeError("Network request failed"))}),0)},l.ontimeout=function(){setTimeout((function(){s(new TypeError("Network request failed"))}),0)},l.onabort=function(){setTimeout((function(){s(new t.DOMException("Aborted","AbortError"))}),0)},l.open(u.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?l.withCredentials=!0:"omit"===u.credentials&&(l.withCredentials=!1),"responseType"in l&&(a?l.responseType="blob":c&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(l.responseType="arraybuffer")),!i||"object"!==(0,n.default)(i.headers)||i.headers instanceof p?u.headers.forEach((function(e,t){l.setRequestHeader(t,e)})):Object.getOwnPropertyNames(i.headers).forEach((function(e){l.setRequestHeader(e,f(i.headers[e]))})),u.signal&&(u.signal.addEventListener("abort",d),l.onreadystatechange=function(){4===l.readyState&&u.signal.removeEventListener("abort",d)}),l.send(void 0===u._bodyInit?null:u._bodyInit)}))}k.polyfill=!0,r.fetch||(r.fetch=k,r.Headers=p,r.Request=A,r.Response=E),t.Headers=p,t.Request=A,t.Response=E,t.fetch=k}({})}(o),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var a=i.fetch?i:o;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t},24293:(e,t,r)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(75010),t.createHash=t.Hash=r(35866),t.createHmac=t.Hmac=r(34424);var n=r(26561),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=r(54192);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(56805);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var c=r(28333);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var u=r(79527);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=r(75102);var l=r(86991);t.publicEncrypt=l.publicEncrypt,t.privateEncrypt=l.privateEncrypt,t.publicDecrypt=l.publicDecrypt,t.privateDecrypt=l.privateDecrypt;var d=r(36509);t.randomFill=d.randomFill,t.randomFillSync=d.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},80034:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i="%[a-f0-9]{2}",o=new RegExp("("+i+")|([^%]+?)","gi"),a=new RegExp("("+i+")+","gi");function s(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],s(r),s(n))}function c(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(o)||[],r=1;r{"use strict";var n=r(28847)(r(3355)),i=r(1020)(),o=r(57701),a=i&&o("%Object.defineProperty%",!0);if(a)try{a({},"a",{value:1})}catch(e){a=!1}var s=o("%SyntaxError%"),c=o("%TypeError%"),u=r(53820);e.exports=function(e,t,r){if(!e||"object"!==(0,n.default)(e)&&"function"!=typeof e)throw new c("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!==(0,n.default)(t))throw new c("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new c("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new c("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new c("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new c("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,d=arguments.length>6&&arguments[6],f=!!u&&u(e,t);if(a)a(e,t,{configurable:null===l&&f?f.configurable:!l,enumerable:null===i&&f?f.enumerable:!i,value:r,writable:null===o&&f?f.writable:!o});else{if(!d&&(i||o||l))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},75626:(e,t,r)=>{"use strict";t.utils=r(43349),t.Cipher=r(19591),t.DES=r(63049),t.CBC=r(4375),t.EDE=r(9413)},4375:(e,t,r)=>{"use strict";var n=r(94504),i=r(41736),o={};function a(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t{"use strict";var n=r(94504);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t{"use strict";var n=r(94504),i=r(41736),o=r(43349),a=r(19591);function s(){this.tmp=new Array(2),this.keys=null}function c(e){a.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}i(c,a),e.exports=c,c.create=function(e){return new c(e)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];c.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var a=0;a>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},c.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},c.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=f}o.rip(s,a,n,i)},c.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,c=e.keys.length-2;c>=0;c-=2){var u=e.keys[c],l=e.keys[c+1];o.expand(a,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var d=o.substitute(u,l),f=a;a=(s^o.permute(d))>>>0,s=f}o.rip(a,s,n,i)}},9413:(e,t,r)=>{"use strict";var n=r(94504),i=r(41736),o=r(19591),a=r(63049);function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function c(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(c,o),e.exports=c,c.create=function(e){return new c(e)},c.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},c.prototype._pad=a.prototype._pad,c.prototype._unpad=a.prototype._unpad},43349:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,c=0;c>>r[c]&1;for(c=s;c>>r[c]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(e>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)];return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>i[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length{"use strict";var n=r(29033).Buffer,i=r(78557),o=r(29799),a=r(51592),s={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new n(o[e].prime,"hex"),r=new n(o[e].gen,"hex");return new a(t,r)},t.createDiffieHellman=t.DiffieHellman=function e(t,r,o,c){return n.isBuffer(r)||void 0===s[r]?e(t,"binary",r,o):(r=r||"binary",c=c||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,c)),"number"==typeof t?new a(i(t,o),o,!0):(n.isBuffer(t)||(t=new n(t,r)),new a(t,o,!0)))}},51592:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(31734),o=new(r(31962)),a=new i(24),s=new i(11),c=new i(10),u=new i(3),l=new i(7),d=r(78557),f=r(75010);function h(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new i(e),this}function p(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new i(e),this}e.exports=m;var g={};function m(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=h,this.setPrivateKey=p):this._primeCode=8}function y(e,t){var r=new n(e.toArray());return t?r.toString(t):r}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in g)return g[n];var i,f=0;if(e.isEven()||!d.simpleSieve||!d.fermatTest(e)||!o.test(e))return f+=1,f+="02"===r||"05"===r?8:4,g[n]=f,f;switch(o.test(e.shrn(1))||(f+=2),r){case"02":e.mod(a).cmp(s)&&(f+=8);break;case"05":(i=e.mod(c)).cmp(u)&&i.cmp(l)&&(f+=8);break;default:f+=4}return g[n]=f,f}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new i(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var t=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(t.toArray()),o=this.getPrime();if(r.length{"use strict";var n=r(75010);e.exports=y,y.simpleSieve=g,y.fermatTest=m;var i=r(31734),o=new i(24),a=new(r(31962)),s=new i(1),c=new i(2),u=new i(5),l=(new i(16),new i(8),new i(10)),d=new i(3),f=(new i(7),new i(11)),h=new i(4),p=(new i(12),null);function g(e){for(var t=function(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;ie;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(c),t.cmp(c)){if(!t.cmp(u))for(;r.mod(l).cmp(d);)r.iadd(h)}else for(;r.mod(o).cmp(f);)r.iadd(h);if(g(p=r.shrn(1))&&g(r)&&m(p)&&m(r)&&a.test(p)&&a.test(r))return r}}},36597:(e,t,r)=>{"use strict";var n=t;n.version=r(18597).i8,n.utils=r(7528),n.rand=r(82202),n.curve=r(76063),n.curves=r(40506),n.ec=r(28320),n.eddsa=r(68027)},11249:(e,t,r)=>{"use strict";var n=r(31734),i=r(7528),o=i.getNAF,a=i.getJSF,s=i.assert;function c(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=a;l--)c=(c<<1)+n[l];u.push(c)}for(var d=this.jpoint(null,null,null),f=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;u--){for(var l=0;u>=0&&0===a[u];u--)l++;if(u>=0&&l++,c=c.dblp(l),u<0)break;var d=a[u];s(0!==d),c="affine"===e.type?d>0?c.mixedAdd(i[d-1>>1]):c.mixedAdd(i[-d-1>>1].neg()):d>0?c.add(i[d-1>>1]):c.add(i[-d-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,r,n,i){var s,c,u,l=this._wnafT1,d=this._wnafT2,f=this._wnafT3,h=0;for(s=0;s=1;s-=2){var g=s-1,m=s;if(1===l[g]&&1===l[m]){var y=[t[g],null,null,t[m]];0===t[g].y.cmp(t[m].y)?(y[1]=t[g].add(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg())):0===t[g].y.cmp(t[m].y.redNeg())?(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].add(t[m].neg())):(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=a(r[g],r[m]);for(h=Math.max(b[0].length,h),f[g]=new Array(h),f[m]=new Array(h),c=0;c=0;s--){for(var S=0;s>=0;){var k=!0;for(c=0;c=0&&S++,_=_.dblp(S),s<0)break;for(c=0;c0?u=d[c][x-1>>1]:x<0&&(u=d[c][-x-1>>1].neg()),_="affine"===u.type?_.mixedAdd(u):_.add(u))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i{"use strict";var n=r(7528),i=r(31734),o=r(41736),a=r(11249),s=n.assert;function c(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(c,a),e.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(t&&!c||!t&&c)&&(s=s.redNeg()),this.point(e,s)},c.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(u,a.BasePoint),c.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},c.prototype.point=function(e,t,r,n){return new u(this,e,t,r,n)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),c=i.redMul(a),u=o.redMul(s),l=i.redMul(s),d=a.redMul(o);return this.curve.point(c,u,d,l)},u.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(c);this.zOne?(e=a.redSub(s).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(c)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=a.redSub(s).redISub(c).redMul(o),t=u.redMul(n.redSub(c)),r=u.redMul(o))}else n=s.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(c)),r=n.redMul(o);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),c=r.redAdd(t),u=o.redMul(a),l=s.redMul(c),d=o.redMul(c),f=a.redMul(s);return this.curve.point(u,l,f,d)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),c=i.redSub(s),u=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(c).redMul(l);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=c.redMul(u)):(t=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(c).redMul(u)),this.curve.point(d,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},76063:(e,t,r)=>{"use strict";var n=t;n.base=r(11249),n.short=r(53148),n.mont=r(51105),n.edwards=r(81123)},51105:(e,t,r)=>{"use strict";var n=r(31734),i=r(41736),o=r(11249),a=r(7528);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(c,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new c(this,e,t)},s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),c=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},53148:(e,t,r)=>{"use strict";var n=r(7528),i=r(31734),o=r(41736),a=r(11249),s=n.assert;function c(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,a),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,c,u,l,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,h=this.n.clone(),p=new i(1),g=new i(0),m=new i(0),y=new i(1),v=0;0!==f.cmpn(0);){var b=h.div(f);u=h.sub(b.mul(f)),l=m.sub(b.mul(p));var w=y.sub(b.mul(g));if(!n&&u.cmp(d)<0)t=c.neg(),r=p,n=u.neg(),o=l;else if(n&&2==++v)break;c=u,h=f,f=u,m=p,p=l,y=g,g=w}a=u.neg(),s=l;var A=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(A)>=0&&(a=t,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}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:c.add(u).neg()}},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,a.BasePoint),c.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),d=n.redMul(u),f=c.redSqr().redIAdd(l).redISub(d).redISub(d),h=c.redMul(d.redISub(f)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=r.redMul(c),d=s.redSqr().redIAdd(u).redISub(l).redISub(l),f=s.redMul(l.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},l.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},40506:(e,t,r)=>{"use strict";var n,i=t,o=r(37198),a=r(76063),s=r(7528).assert;function c(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,u("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"]}),u("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"]}),u("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"]}),u("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"]}),u("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"]}),u("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"]}),u("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(46401)}catch(e){n=void 0}u("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]})},28320:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(29410),a=r(7528),s=r(40506),c=r(82202),u=a.assert,l=r(37791),d=r(30488);function f(e){if(!(this instanceof f))return new f(e);"string"==typeof e&&(u(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=f,f.prototype.keyPair=function(e){return new l(this,e)},f.prototype.keyFromPrivate=function(e,t){return l.fromPrivate(this,e,t)},f.prototype.keyFromPublic=function(e,t){return l.fromPublic(this,e,t)},f.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||c(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var a=new i(t.generate(r));if(!(a.cmp(n)>0))return a.iaddn(1),this.keyFromPrivate(a)}},f.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},f.prototype.sign=function(e,t,r,a){"object"===(0,n.default)(r)&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),c=t.getPrivate().toArray("be",s),u=e.toArray("be",s),l=new o({hash:this.hash,entropy:c,nonce:u,pers:a.pers,persEnc:a.persEnc||"utf8"}),f=this.n.sub(new i(1)),h=0;;h++){var p=a.k?a.k(h):new i(l.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(f)>=0)){var g=this.g.mul(p);if(!g.isInfinity()){var m=g.getX(),y=m.umod(this.n);if(0!==y.cmpn(0)){var v=p.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(g.getY().isOdd()?1:0)|(0!==m.cmp(y)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new d({r:y,s:v,recoveryParam:b})}}}}}},f.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n);var o=(t=new d(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),u=c.mul(e).umod(this.n),l=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(e,t,r,n){u((3&r)===r,"The recovery param is more than two bits"),t=new d(t,n);var o=this.n,a=new i(e),s=t.r,c=t.s,l=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),g=c.mul(h).umod(o);return this.g.mulAdd(p,s,g)},f.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new d(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},37791:(e,t,r)=>{"use strict";var n=r(31734),i=r(7528).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},30488:(e,t,r)=>{"use strict";var n=r(31734),i=r(7528),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function c(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=c(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=c(e,r);if(!1===a)return!1;var u=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var l=c(e,r);if(!1===l)return!1;if(e.length!==l+r.place)return!1;var d=e.slice(r.place,l+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(u),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];l(n,t.length),(n=n.concat(t)).push(2),l(n,r.length);var o=n.concat(r),a=[48];return l(a,o.length),a=a.concat(o),i.encode(a,e)}},68027:(e,t,r)=>{"use strict";var n=r(37198),i=r(40506),o=r(7528),a=o.assert,s=o.parseBytes,c=r(27303),u=r(36646);function l(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=l,l.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),c=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},l.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var n=r(7528),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},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 e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(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(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},36646:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(7528),a=o.assert,s=o.cachedProperty,c=o.parseBytes;function u(e,t){this.eddsa=e,"object"!==(0,n.default)(t)&&(t=c(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},46401:e=>{"use strict";e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},7528:(e,t,r)=>{"use strict";var n=t,i=r(31734),o=r(94504),a=r(96580);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,c=e.andln(3)+i&3,u=t.andln(3)+o&3;3===c&&(c=-1),3===u&&(u=-1),a=0==(1&c)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==u?c:-c,r[0].push(a),s=0==(1&u)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==c?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},26464:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=function(){if("object"===("undefined"==typeof self?"undefined":(0,n.default)(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":(0,n.default)(window))&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return i()}try{return __global__||i()}finally{delete Object.prototype.__global__}}()},54258:(e,t,r)=>{"use strict";var n,i,o,a=r(19142),s=r(28847)(r(3355));o=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,i=void 0,o=void 0,c=function(e,t){g[n]=e,g[n+1]=t,2===(n+=2)&&(o?o(m):A())},u="undefined"!=typeof window?window:void 0,l=u||{},d=l.MutationObserver||l.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==a&&"[object process]"==={}.toString.call(a),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(m,1)}}var g=new Array(1e3);function m(){for(var e=0;e{"use strict";var n=r(29033).Buffer,i=r(24858).keccak_256,o=r(3956);function a(e){return e?o.toUnicode(e,{useStd3ASCII:!0,transitional:!1}):e}t.hash=function(e){for(var t="",r=0;r<32;r++)t+="00";if(name=a(e),name){var o=name.split(".");for(r=o.length-1;r>=0;r--){var s=i(o[r]);t=i(new n(t+s,"hex"))}}return"0x"+t},t.normalize=a},53058:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847)(r(74519)),o=r(58320),a=r(88645),s=r(36597),c=(r(46740),new s.ec("secp256k1")),u=r(22922),l=u.keccak256,d=u.keccak256s,f=function(e){for(var t=d(e.slice(2)),r="0x",n=0;n<40;n++)r+=parseInt(t[n+2],16)>7?e[n+2].toUpperCase():e[n+2];return r},h=function(e){var t=new n(e.slice(2),"hex"),r="0x"+c.keyFromPrivate(t).getPublic(!1,"hex").slice(2),i=l(r);return{address:f("0x"+i.slice(-40)),privateKey:e}},p=function(e){var t=(0,i.default)(e,3),r=t[0],n=t[1],a=t[2];return o.flatten([n,a,r])},g=function(e){return[o.slice(64,o.length(e),e),o.slice(0,32,e),o.slice(32,64,e)]},m=function(e){return function(t,r){var i=c.keyFromPrivate(new n(r.slice(2),"hex")).sign(new n(t.slice(2),"hex"),{canonical:!0});return p([a.fromString(o.fromNumber(e+i.recoveryParam)),o.pad(32,o.fromNat("0x"+i.r.toString(16))),o.pad(32,o.fromNat("0x"+i.s.toString(16)))])}},y=m(27);e.exports={create:function(e){var t=l(o.concat(o.random(32),e||o.random(32))),r=o.concat(o.concat(o.random(32),t),o.random(32)),n=l(r);return h(n)},toChecksum:f,fromPrivate:h,sign:y,makeSigner:m,recover:function(e,t){var r=g(t),i={v:o.toNumber(r[0]),r:r[1].slice(2),s:r[2].slice(2)},a="0x"+c.recoverPubKey(new n(e.slice(2),"hex"),i,i.v<2?i.v:1-i.v%2).encode("hex",!1).slice(2),s=l(a);return f("0x"+s.slice(-40))},encodeSignature:p,decodeSignature:g}},51376:e=>{"use strict";var t=function(e,t){for(var r=[],n=0;n{"use strict";r(51376);var n=function(e,t){return parseInt(e.slice(2*t+2,2*t+4),16)},i=function(e){return(e.length-2)/2},o=function(e){for(var t=[],r=2,n=e.length;r>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},22922:e=>{"use strict";var t="0123456789abcdef".split(""),r=[1,256,65536,16777216],n=[0,8,16,24],i=[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],o=function(e){var t,r,n,o,a,s,c,u,l,d,f,h,p,g,m,y,v,b,w,A,_,E,S,k,x,C,I,T,O,P,M,R,N,L,B,D,U,j,F,z,q,H,V,$,K,W,G,Q,Y,Z,J,X,ee,te,re,ne,ie,oe,ae,se,ce,ue,le;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],c=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|c>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(c<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(u<<1|l>>>31),r=a^(l<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(d<<1|f>>>31),r=c^(f<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=l^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(o<<1|a>>>31),r=f^(a<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,g=e[0],m=e[1],W=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,V=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,P=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,D=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,$=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=g^~y&b,e[1]=m^~v&w,e[10]=k^~C&T,e[11]=x^~I&O,e[20]=L^~D&j,e[21]=B^~U&F,e[30]=$^~W&Q,e[31]=K^~G&Y,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~b&A,e[3]=v^~w&_,e[12]=C^~T&P,e[13]=I^~O&M,e[22]=D^~j&z,e[23]=U^~F&q,e[32]=W^~Q&Z,e[33]=G^~Y&J,e[42]=ne^~oe&se,e[43]=ie^~ae&ce,e[4]=b^~A&E,e[5]=w^~_&S,e[14]=T^~P&R,e[15]=O^~M&N,e[24]=j^~z&H,e[25]=F^~q&V,e[34]=Q^~Z&X,e[35]=Y^~J&ee,e[44]=oe^~se&ue,e[45]=ae^~ce&le,e[6]=A^~E&g,e[7]=_^~S&m,e[16]=P^~R&k,e[17]=M^~N&x,e[26]=z^~H&L,e[27]=q^~V&B,e[36]=Z^~X&$,e[37]=J^~ee&K,e[46]=se^~ue&te,e[47]=ce^~le&re,e[8]=E^~g&y,e[9]=S^~m&v,e[18]=R^~k&C,e[19]=N^~x&I,e[28]=H^~L&D,e[29]=V^~B&U,e[38]=X^~$&W,e[39]=ee^~K&G,e[48]=ue^~te&ne,e[49]=le^~re&ie,e[0]^=i[n],e[1]^=i[n+1]},a=function(e){return function(i){var a;if("0x"===i.slice(0,2)){a=[];for(var s=2,c=i.length;s>2]|=i[h]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(c[m>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=u){for(e.start=m-u,e.block=c[l],m=0;m>2]|=r[3&m],e.lastByteIndex===u)for(c[0]=c[l],m=1;m>4&15]+t[15&p]+t[p>>12&15]+t[p>>8&15]+t[p>>20&15]+t[p>>16&15]+t[p>>28&15]+t[p>>24&15];y%l==0&&(o(f),m=0)}return"0x"+g}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),a)}};e.exports={keccak256:a(256),keccak512:a(512),keccak256s:a(256),keccak512s:a(512)}},88645:(e,t,r)=>{"use strict";var n=r(31734),i=r(58320),o=function(e){return new n(e.slice(2),16)},a=function(e){var t="0x"+("0x"===e.slice(0,2)?new n(e.slice(2),16):new n(e,10)).toString("hex");return"0x0"===t?"0x":t},s=function(e){return"string"==typeof e?/^0x/.test(e)?e:"0x"+e:"0x"+new n(e).toString("hex")},c=function(e){return o(e).toNumber()},u=function(e){return function(t,r){return"0x"+o(t)[e](o(r)).toString("hex")}},l=u("add"),d=u("mul"),f=u("div"),h=u("sub");e.exports={toString:function(e){return o(e).toString(10)},fromString:a,toNumber:c,fromNumber:s,toEther:function(e){return c(f(e,a("10000000000")))/1e8},fromEther:function(e){return d(s(Math.floor(1e8*e)),a("10000000000"))},toUint256:function(e){return i.pad(32,e)},add:l,mul:d,div:f,sub:h}},46740:e=>{"use strict";e.exports={encode:function(e){var t=function(e){return(t=e.toString(16)).length%2==0?t:"0"+t;var t},r=function(e,r){return e<56?t(r+e):t(r+t(e).length/2+55)+t(e)};return"0x"+function e(t){if("string"==typeof t){var n=t.slice(2);return(2!=n.length||n>="80"?r(n.length/2,128):"")+n}var i=t.map(e).join("");return r(i.length/2,192)+i}(e)},decode:function(e){var t=2,r=function(){if(t>=e.length)throw"";var r=e.slice(t,t+2);return r<"80"?(t+=2,"0x"+r):r<"c0"?i():o()},n=function(){var r=parseInt(e.slice(t,t+=2),16)%64;return r<56?r:parseInt(e.slice(t,t+=2*(r-55)),16)},i=function(){var r=n();return"0x"+e.slice(t,t+=2*r)},o=function(){for(var e=2*n()+t,i=[];t{"use strict";var n=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0});var i=r(78179);function o(e){return!("string"!=typeof e||!/^(0x)?[0-9a-f]{512}$/i.test(e)||!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e))}function a(e,t){"object"===(0,n.default)(t)&&t.constructor===Uint8Array&&(t=i.bytesToHex(t));for(var r=i.keccak256(t).replace("0x",""),o=0;o<12;o+=4){var a=(parseInt(r.substr(o,2),16)<<8)+parseInt(r.substr(o+2,2),16)&2047,c=1<=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error("invalid bloom")}function c(e){return!("string"!=typeof e||!/^(0x)?[0-9a-f]{64}$/i.test(e)||!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e))}function u(e){return!("string"!=typeof e||!e.match(/^(0x)?[0-9a-fA-F]{40}$/)&&!e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}t.isBloom=o,t.isInBloom=a,t.isUserEthereumAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error('Invalid ethereum address given: "'.concat(t,'"'));return a(e,i.padLeft(t,64))},t.isContractAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error('Invalid contract address given: "'.concat(t,'"'));return a(e,t)},t.isTopicInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!c(t))throw new Error("Invalid topic");return a(e,t)},t.isTopic=c,t.isAddress=u},78179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34477);function i(e){if(null==e)throw new Error("cannot convert null value to array");if("string"==typeof e){var t=e.match(/^(0x)?[0-9a-fA-F]*$/);if(!t)throw new Error("invalid hexidecimal string");if("0x"!==t[1])throw new Error("hex string must have 0x prefix");(e=e.substring(2)).length%2&&(e="0"+e);for(var r=[],n=0;n=256||parseInt(String(r))!=r)return!1}return!0}(e))return o(new Uint8Array(e));throw new Error("invalid arrayify value")}function o(e){var t=arguments;return void 0!==e.slice||(e.slice=function(){var r=Array.prototype.slice.call(t);return o(new Uint8Array(Array.prototype.slice.apply(e,r)))}),e}t.keccak256=function(e){return"0x"+n.keccak_256(i(e))},t.padLeft=function(e,t){var r=/^0x/i.test(e)||"number"==typeof e,n=t-(e=e.toString().replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(r?"0x":"")+new Array(n).join("0")+e},t.bytesToHex=function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x".concat(t.join("").replace(/^0+/,""))},t.toByteArray=i},34477:(e,t,r)=>{"use strict";e=r.nmd(e);var n,i=r(19142),o=r(28847)(r(3355));!function(){var a="input is invalid type",s="object"===("undefined"==typeof window?"undefined":(0,o.default)(window)),c=s?window:{};c.JS_SHA3_NO_WINDOW&&(s=!1);var u=!s&&"object"===("undefined"==typeof self?"undefined":(0,o.default)(self));!c.JS_SHA3_NO_NODE_JS&&"object"===(void 0===i?"undefined":(0,o.default)(i))&&i.versions&&i.versions.node?c=r.g:u&&(c=self);var l=!c.JS_SHA3_NO_COMMON_JS&&"object"===(0,o.default)(e)&&e.exports,d=r.amdO,f=!c.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),p=[4,1024,262144,67108864],g=[0,8,16,24],m=[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],y=[224,256,384,512],v=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!c.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!f||!c.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,o.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var A=function(e,t,r){return function(n){return new B(e,t,e).update(n)[r]()}},_=function(e,t,r){return function(n,i){return new B(e,t,i).update(n)[r]()}},E=function(e,t,r){return function(t,n,i,o){return I["cshake"+e].update(t,n,i,o)[r]()}},S=function(e,t,r){return function(t,n,i,o){return I["kmac"+e].update(t,n,i,o)[r]()}},k=function(e,t,r,n){for(var i=0;i>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 D(e,t,r){B.call(this,e,t,r)}B.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}for(var n,i,s=this.blocks,c=this.byteCount,u=e.length,l=this.blockCount,d=0,h=this.s;d>2]|=e[d]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=c){for(this.start=n-c,this.block=s[l],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},B.prototype.encodeString=function(e){var t,r=(0,o.default)(e);if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(a);t=!0}var n=0,i=e.length;if(t)n=i;else for(var s=0;s=57344?n+=3:(c=65536+((1023&c)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},B.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];a%t==0&&(U(r),o=0)}return i&&(e=r[o],s+=h[e>>4&15]+h[15&e],i>1&&(s+=h[e>>12&15]+h[e>>8&15]),i>2&&(s+=h[e>>20&15]+h[e>>16&15])),s},B.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);a>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%r==0&&U(n)}return o&&(e=s<<2,t=n[a],c[e]=255&t,o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c},D.prototype=new B,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),B.prototype.finalize.call(this)};var U=function(e){var t,r,n,i,o,a,s,c,u,l,d,f,h,p,g,y,v,b,w,A,_,E,S,k,x,C,I,T,O,P,M,R,N,L,B,D,U,j,F,z,q,H,V,$,K,W,G,Q,Y,Z,J,X,ee,te,re,ne,ie,oe,ae,se,ce,ue,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(f=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|u>>>31),r=o^(u<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|d>>>31),r=s^(d<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(f<<1|h>>>31),r=u^(h<<1|f>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],g=e[1],W=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,V=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,P=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,D=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,$=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=p^~y&b,e[1]=g^~v&w,e[10]=k^~C&T,e[11]=x^~I&O,e[20]=L^~D&j,e[21]=B^~U&F,e[30]=$^~W&Q,e[31]=K^~G&Y,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~b&A,e[3]=v^~w&_,e[12]=C^~T&P,e[13]=I^~O&M,e[22]=D^~j&z,e[23]=U^~F&q,e[32]=W^~Q&Z,e[33]=G^~Y&J,e[42]=ne^~oe&se,e[43]=ie^~ae&ce,e[4]=b^~A&E,e[5]=w^~_&S,e[14]=T^~P&R,e[15]=O^~M&N,e[24]=j^~z&H,e[25]=F^~q&V,e[34]=Q^~Z&X,e[35]=Y^~J&ee,e[44]=oe^~se&ue,e[45]=ae^~ce&le,e[6]=A^~E&p,e[7]=_^~S&g,e[16]=P^~R&k,e[17]=M^~N&x,e[26]=z^~H&L,e[27]=q^~V&B,e[36]=Z^~X&$,e[37]=J^~ee&K,e[46]=se^~ue&te,e[47]=ce^~le&re,e[8]=E^~p&y,e[9]=S^~g&v,e[18]=R^~k&C,e[19]=N^~x&I,e[28]=H^~L&D,e[29]=V^~B&U,e[38]=X^~$&W,e[39]=ee^~K&G,e[48]=ue^~te&ne,e[49]=le^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(l)e.exports=I;else{for(O=0;O{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;var n,i=r(64376),o=r(40890);t.keccak224=(0,o.wrapHash)(i.keccak_224),t.keccak256=((n=(0,o.wrapHash)(i.keccak_256)).create=i.keccak_256.create,n),t.keccak384=(0,o.wrapHash)(i.keccak_384),t.keccak512=(0,o.wrapHash)(i.keccak_512)},86992:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=void 0;var n=r(4158);Object.defineProperty(t,"secp256k1",{enumerable:!0,get:function(){return n.secp256k1}})},40890:(e,t,r)=>{"use strict";e=r.nmd(e);var n=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;var i,o=(i=r(96822))&&i.__esModule?i:{default:i},a=r(72434),s=o.default.bool;t.assertBool=s;var c=o.default.bytes;t.assertBytes=c;var u,l,d=r(72434);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return d.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return d.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return d.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return d.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return d.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got ".concat((0,n.default)(e)));return(new TextDecoder).decode(e)},t.hexToBytes=function(e){var t=e.startsWith("0x")?e.substring(2):e;return(0,a.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(var r=0;r{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var i,o=(i=r(3894))&&i.__esModule?i:{default:i},a=r(49100),s=r(31439),c=r(23271),u=r(60986),l=r(13464),d=r(39808),f=r(5725),h=r(35513),p=function(){function e(e,t,r,n){void 0===e&&(e=new a.BN(0)),void 0===t&&(t=new a.BN(0)),void 0===r&&(r=u.KECCAK256_RLP),void 0===n&&(n=u.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,i=t.stateRoot,o=t.codeHash;return new e(r?new a.BN((0,l.toBuffer)(r)):void 0,n?new a.BN((0,l.toBuffer)(n)):void 0,i?(0,l.toBuffer)(i):void 0,o?(0,l.toBuffer)(o):void 0)},e.fromRlpSerializedAccount=function(e){var t=a.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(t,4),n=r[0],i=r[1],o=r[2],s=r[3];return new e(new a.BN(n),new a.BN(i),o,s)},e.prototype._validate=function(){if(this.nonce.lt(new a.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new a.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,h.bnToUnpaddedBuffer)(this.nonce),(0,h.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return a.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(u.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(u.KECCAK256_NULL)},e}();t.Account=p,t.isValidAddress=function(e){try{(0,f.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,f.assertIsHexString)(e);var r=(0,c.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,h.toType)(t,h.TypeOutput.BN).toString()+"0x");for(var i=(0,d.keccakFromString)(n+r).toString("hex"),o="0x",a=0;a=8?o+=r[a].toUpperCase():o+=r[a];return o},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){(0,f.assertIsBuffer)(e),(0,f.assertIsBuffer)(t);var r=new a.BN(t);return r.isZero()?(0,d.rlphash)([e,null]).slice(-20):(0,d.rlphash)([e,n.from(r.toArray())]).slice(-20)},t.generateAddress2=function(e,t,r){return(0,f.assertIsBuffer)(e),(0,f.assertIsBuffer)(t),(0,f.assertIsBuffer)(r),(0,o.default)(20===e.length),(0,o.default)(32===t.length),(0,d.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,d.keccak256)(r)])).slice(-20)},t.isValidPrivate=function(e){return(0,s.privateKeyVerify)(e)},t.isValidPublic=function(e,t){return void 0===t&&(t=!1),(0,f.assertIsBuffer)(e),64===e.length?(0,s.publicKeyVerify)(n.concat([n.from([4]),e])):!!t&&(0,s.publicKeyVerify)(e)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),(0,f.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from((0,s.publicKeyConvert)(e,!1).slice(1))),(0,o.default)(64===e.length),(0,d.keccak)(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,f.assertIsBuffer)(e),n.from((0,s.publicKeyCreate)(e,!1)).slice(1)},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,f.assertIsBuffer)(e),64!==e.length&&(e=n.from((0,s.publicKeyConvert)(e,!1).slice(1))),e},t.zeroAddress=function(){var e=(0,l.zeros)(20);return(0,l.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,f.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}},41984:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var i,o=(i=r(3894))&&i.__esModule?i:{default:i},a=r(49100),s=r(13464),c=r(21968),u=function(){function e(e){(0,o.default)(20===e.length,"Invalid address length"),this.buf=e}return e.zero=function(){return new e((0,s.zeros)(20))},e.fromString=function(t){return(0,o.default)((0,c.isValidAddress)(t),"Invalid address"),new e((0,s.toBuffer)(t))},e.fromPublicKey=function(t){return(0,o.default)(n.isBuffer(t),"Public key should be Buffer"),new e((0,c.pubToAddress)(t))},e.fromPrivateKey=function(t){return(0,o.default)(n.isBuffer(t),"Private key should be Buffer"),new e((0,c.privateToAddress)(t))},e.generate=function(t,r){return(0,o.default)(a.BN.isBN(r)),new e((0,c.generateAddress)(t.buf,r.toArrayLike(n)))},e.generate2=function(t,r,i){return(0,o.default)(n.isBuffer(r)),(0,o.default)(n.isBuffer(i)),new e((0,c.generateAddress2)(t.buf,r,i))},e.prototype.equals=function(e){return this.buf.equals(e.buf)},e.prototype.isZero=function(){return this.equals(e.zero())},e.prototype.isPrecompileOrSystemAddress=function(){var e=new a.BN(this.buf),t=new a.BN(0),r=new a.BN("ffff","hex");return e.gte(t)&&e.lte(r)},e.prototype.toString=function(){return"0x"+this.buf.toString("hex")},e.prototype.toBuffer=function(){return n.from(this.buf)},e}();t.Address=u},13464:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var o=r(49100),a=r(23271),s=r(5725);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: ".concat(e));return"0x".concat(e.toString(16))},t.intToBuffer=function(e){var r=(0,t.intToHex)(e);return n.from((0,a.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};var c=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,s.assertIsBuffer)(e),u(e)},t.unpadArray=function(e){return(0,s.assertIsArray)(e),u(e)},t.unpadHexString=function(e){return(0,s.assertIsHexString)(e),e=(0,a.stripHexPrefix)(e),u(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,a.isHexString)(e))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(e));return n.from((0,a.padToEven)((0,a.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if(o.BN.isBN(e)){if(e.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(e));return e.toArrayLike(n)}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")},t.bufferToInt=function(e){return new o.BN((0,t.toBuffer)(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.fromSigned=function(e){return new o.BN(e).fromTwos(256)},t.toUnsigned=function(e){return n.from(e.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!=typeof e||(0,a.isHexPrefixed)(e)?e:"0x"+e},t.toUtf8=function(e){if((e=(0,a.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return"0x".concat(e.toString("hex"));if(e instanceof Array){for(var r=[],i=0;i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),o=n.next();!o.done;o=n.next()){var a=i(o.value,2),s=a[0],c=a[1];if(void 0!==c&&c.length>0&&0===c[0])throw new Error("".concat(s," cannot have leading zeroes, received: ").concat(c.toString("hex")))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((function(t){return e(t)})):Uint8Array.from(null!=t?t:[])}},60986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(29033),i=r(49100);t.MAX_UINT64=new i.BN("ffffffffffffffff",16),t.MAX_INTEGER=new i.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new i.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex")},49100:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var o,a=(o=r(31734))&&o.__esModule?o:{default:o};t.BN=a.default;var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t}(r(6905));t.rlp=s},39808:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160FromArray=t.ripemd160FromString=t.ripemd160=t.sha256FromArray=t.sha256FromString=t.sha256=t.keccakFromArray=t.keccakFromHexString=t.keccakFromString=t.keccak256=t.keccak=void 0;var i=r(8235),o=r(35866),a=r(49100),s=r(13464),c=r(5725);t.keccak=function(e,t){switch(void 0===t&&(t=256),(0,c.assertIsBuffer)(e),t){case 224:return(0,i.keccak224)(e);case 256:return(0,i.keccak256)(e);case 384:return(0,i.keccak384)(e);case 512:return(0,i.keccak512)(e);default:throw new Error("Invald algorithm: keccak".concat(t))}},t.keccak256=function(e){return(0,t.keccak)(e)},t.keccakFromString=function(e,r){void 0===r&&(r=256),(0,c.assertIsString)(e);var i=n.from(e,"utf8");return(0,t.keccak)(i,r)},t.keccakFromHexString=function(e,r){return void 0===r&&(r=256),(0,c.assertIsHexString)(e),(0,t.keccak)((0,s.toBuffer)(e),r)},t.keccakFromArray=function(e,r){return void 0===r&&(r=256),(0,c.assertIsArray)(e),(0,t.keccak)((0,s.toBuffer)(e),r)};var u=function(e){return e=(0,s.toBuffer)(e),o("sha256").update(e).digest()};t.sha256=function(e){return(0,c.assertIsBuffer)(e),u(e)},t.sha256FromString=function(e){return(0,c.assertIsString)(e),u(e)},t.sha256FromArray=function(e){return(0,c.assertIsArray)(e),u(e)};var l=function(e,t){e=(0,s.toBuffer)(e);var r=o("rmd160").update(e).digest();return!0===t?(0,s.setLengthLeft)(r,32):r};t.ripemd160=function(e,t){return(0,c.assertIsBuffer)(e),l(e,t)},t.ripemd160FromString=function(e,t){return(0,c.assertIsString)(e),l(e,t)},t.ripemd160FromArray=function(e,t){return(0,c.assertIsArray)(e),l(e,t)},t.rlphash=function(e){return(0,t.keccak)(a.rlp.encode(e))}},5725:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;var i=r(23271);t.assertIsHexString=function(e){if(!(0,i.isHexString)(e)){var t="This method only supports 0x-prefixed hex strings but input was: ".concat(e);throw new Error(t)}},t.assertIsBuffer=function(e){if(!n.isBuffer(e)){var t="This method only supports Buffer but input was: ".concat(e);throw new Error(t)}},t.assertIsArray=function(e){if(!Array.isArray(e)){var t="This method only supports number arrays but input was: ".concat(e);throw new Error(t)}},t.assertIsString=function(e){if("string"!=typeof e){var t="This method only supports strings but input was: ".concat(e);throw new Error(t)}}},33062:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,i(r(60986),t),i(r(21968),t),i(r(41984),t),i(r(39808),t),i(r(86081),t),i(r(13464),t),i(r(41677),t),i(r(49100),t),i(r(35513),t);var o=r(23271);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}})},23271:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847)(r(3355));function o(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type ".concat((0,i.default)(e)));return"0"===e[0]&&"x"===e[1]}function a(e){var t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received ".concat((0,i.default)(t)));return t.length%2&&(t="0".concat(t)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=o,t.stripHexPrefix=function(e){if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received ".concat((0,i.default)(e)));return o(e)?e.slice(2):e},t.padToEven=a,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved ".concat((0,i.default)(e)));return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '".concat((0,i.default)(e),"'"));if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '".concat((0,i.default)(t),"'"));return t[r?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r{"use strict";var n=r(29033).Buffer,i=r(28847)(r(3355));Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var o,a=(o=r(3894))&&o.__esModule?o:{default:o},s=r(23271),c=r(49100),u=r(13464);t.defineProperties=function(e,t,r){if(e.raw=[],e._fields=[],e.toJSON=function(t){if(void 0===t&&(t=!1),t){var r={};return e._fields.forEach((function(t){r[t]="0x".concat(e[t].toString("hex"))})),r}return(0,u.baToJSON)(e.raw)},e.serialize=function(){return c.rlp.encode(e.raw)},t.forEach((function(t,r){function i(){return e.raw[r]}function o(i){"00"!==(i=(0,u.toBuffer)(i)).toString("hex")||t.allowZero||(i=n.allocUnsafe(0)),t.allowLess&&t.length?(i=(0,u.unpadBuffer)(i),(0,a.default)(t.length>=i.length,"The field ".concat(t.name," must not have more ").concat(t.length," bytes"))):t.allowZero&&0===i.length||!t.length||(0,a.default)(t.length===i.length,"The field ".concat(t.name," must have byte length of ").concat(t.length)),e.raw[r]=i}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:i,set:o}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),r)if("string"==typeof r&&(r=n.from((0,s.stripHexPrefix)(r),"hex")),n.isBuffer(r)&&(r=c.rlp.decode(r)),Array.isArray(r)){if(r.length>e._fields.length)throw new Error("wrong number of fields in data");r.forEach((function(t,r){e[e._fields[r]]=(0,u.toBuffer)(t)}))}else{if("object"!==(0,i.default)(r))throw new Error("invalid data");var o=Object.keys(r);t.forEach((function(t){-1!==o.indexOf(t.name)&&(e[t.name]=r[t.name]),-1!==o.indexOf(t.alias)&&(e[t.alias]=r[t.alias])}))}}},86081:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var i=r(31439),o=r(49100),a=r(13464),s=r(39808),c=r(5725),u=r(35513);function l(e,t){var r=(0,u.toType)(e,u.TypeOutput.BN);if(r.eqn(0)||r.eqn(1))return(0,u.toType)(e,u.TypeOutput.BN);if(!t)return r.subn(27);var n=(0,u.toType)(t,u.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function d(e){var t=new o.BN(e);return t.eqn(0)||t.eqn(1)}t.ecsign=function(e,t,r){var o=(0,i.ecdsaSign)(e,t),a=o.signature,s=o.recid,c=n.from(a.slice(0,32)),l=n.from(a.slice(32,64));if(!r||"number"==typeof r){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:c,s:l,v:r?s+(2*r+35):s+27}}return{r:c,s:l,v:(0,u.toType)(r,u.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(n)}},t.ecrecover=function(e,t,r,o,s){var c=n.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(o,32)],64),u=l(t,s);if(!d(u))throw new Error("Invalid signature v value");var f=(0,i.ecdsaRecover)(c,u.toNumber(),e);return n.from((0,i.publicKeyConvert)(f,!1).slice(1))},t.toRpcSig=function(e,t,r,i){if(!d(l(e,i)))throw new Error("Invalid signature v value");return(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(r,32),(0,a.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,i){if(!d(l(e,i)))throw new Error("Invalid signature v value");var o=(0,u.toType)(e,u.TypeOutput.Number),s=r;return(o>28&&o%2==1||1===o||28===o)&&((s=n.from(r))[0]|=128),(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(s,32)]))},t.fromRpcSig=function(e){var t,r,n,i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}},t.isValidSignature=function(e,t,r,n,i){void 0===n&&(n=!0);var a=new o.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new o.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!d(l(e,i)))return!1;var c=new o.BN(t),u=new o.BN(r);return!(c.isZero()||c.gt(s)||u.isZero()||u.gt(s)||n&&1===u.cmp(a))},t.hashPersonalMessage=function(e){(0,c.assertIsBuffer)(e);var t=n.from("\x19Ethereum Signed Message:\n".concat(e.length),"utf-8");return(0,s.keccak)(n.concat([t,e]))}},35513:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var i,o=r(49100),a=r(23271),s=r(13464);function c(e){return(0,s.unpadBuffer)(e.toArrayLike(n))}t.bnToHex=function(e){return"0x".concat(e.toString(16))},t.bnToUnpaddedBuffer=c,t.bnToRlp=function(e){return c(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(i=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"==typeof e&&!(0,a.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(e));if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,s.toBuffer)(e);if(t===i.Buffer)return r;if(t===i.BN)return new o.BN(r);if(t===i.Number){var n=new o.BN(r),c=new o.BN(Number.MAX_SAFE_INTEGER.toString());if(n.gt(c))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return n.toNumber()}return"0x".concat(r.toString("hex"))}}},73303:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createHashFunction=function(e){return function(t){var r=e();return r.update(t),n.from(r.digest())}}},8235:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(73303),i=r(93135);t.keccak224=n.createHashFunction((function(){return i("keccak224")})),t.keccak256=n.createHashFunction((function(){return i("keccak256")})),t.keccak384=n.createHashFunction((function(){return i("keccak384")})),t.keccak512=n.createHashFunction((function(){return i("keccak512")}))},40739:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(75010);t.getRandomBytes=function(e){return new Promise((function(t,r){n(e,(function(e,n){e?r(e):t(n)}))}))},t.getRandomBytesSync=function(e){return n(e)}},31439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(57902),i=r(40739);t.createPrivateKey=function(){return e=this,r=function(){var e;return function(e,t){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=(i=a.trys).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]{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(77277),a=new i(0),s=new i(-1),c={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function u(e){var t=e?e.toLowerCase():"ether",r=c[t];if("string"!=typeof r)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(c,null,2));return new i(r,10)}function l(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"===(0,n.default)(e)&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+(0,n.default)(e)+".")}e.exports={unitMap:c,numberToString:l,getValueOfUnit:u,fromWei:function(e,t,r){var n=o(e),i=n.lt(a),l=u(t),d=c[t].length-1||1,f=r||{};i&&(n=n.mul(s));for(var h=n.mod(l).toString(10);h.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var f=d[0],h=d[1];if(f||(f="0"),h||(h="0"),h.length>o)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;h.length{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}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 e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i{"use strict";var n=r(28847)(r(3355)),i=Object.create||function(e){var t=function(){};return t.prototype=e,new t},o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},a=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var c,u=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),c=0===l.x}catch(e){c=!1}function d(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,r,o){var a,s,c;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),c=s[t]):(s=e._events=i(null),e._eventsCount=0),c){if("function"==typeof c?c=s[t]=o?[r,c]:[c,r]:o?c.unshift(r):c.push(r),!c.warned&&(a=d(e))&&a>0&&c.length>a){c.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+c.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=c.length,"object"===("undefined"==typeof console?"undefined":(0,n.default)(console))&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else c=s[t]=r,++e._eventsCount;return e}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var c=new Error('Unhandled "error" event. ('+t+")");throw c.context=t,c}if(!(r=a[e]))return!1;var u="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=y(e,n),o=0;o=0;a--)if(r[a]===t||r[a].listener===t){s=r[a].listener,o=a;break}if(o<0)return this;0===o?r.shift():function(e,t){for(var r=t,n=r+1,i=e.length;n=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return g(this,e,!0)},s.prototype.rawListeners=function(e){return g(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},27085:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(50807);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),c=n.alloc(o||0),u=n.alloc(0);a>0||o>0;){var l=new i;l.update(u),l.update(e),t&&l.update(t),u=l.digest();var d=0;if(a>0){var f=s.length-a;d=Math.min(a,u.length),u.copy(s,f,0,d),a-=d}if(d0){var h=c.length-o,p=Math.min(o,u.length-d);u.copy(c,h,d,d+p),o-=p}}return u.fill(0),{key:s,iv:c}}},48184:(e,t,r)=>{"use strict";var n=r(41493),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n{"use strict";var n=r(83161);e.exports=Function.prototype.bind||n},57701:(e,t,r)=>{"use strict";var n,i=r(28847)(r(3355)),o=SyntaxError,a=Function,s=TypeError,c=function(e){try{return a('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var l=function(){throw new s},d=u?function(){try{return l}catch(e){try{return u(arguments,"callee").get}catch(e){return l}}}():l,f=r(58489)(),h=r(61593)(),p=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),g={},m="undefined"!=typeof Uint8Array&&p?p(Uint8Array):n,y={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":g,"%AsyncGenerator%":g,"%AsyncGeneratorFunction%":g,"%AsyncIteratorPrototype%":g,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%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%":a,"%GeneratorFunction%":g,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):n,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":(0,i.default)(JSON))?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f&&p?p((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&&f&&p?p((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":d,"%TypedArray%":m,"%TypeError%":s,"%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};if(p)try{null.error}catch(e){var v=p(p(e));y["%Error.prototype%"]=v}var b=function e(t){var r;if("%AsyncFunction%"===t)r=c("async function () {}");else if("%GeneratorFunction%"===t)r=c("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=c("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&p&&(r=p(i.prototype))}return y[t]=r,r},w={"%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"]},A=r(3767),_=r(2383),E=A.call(Function.call,Array.prototype.concat),S=A.call(Function.apply,Array.prototype.splice),k=A.call(Function.call,String.prototype.replace),x=A.call(Function.call,String.prototype.slice),C=A.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,O=function(e,t){var r,n=e;if(_(w,n)&&(n="%"+(r=w[n])[0]+"%"),_(y,n)){var i=y[n];if(i===g&&(i=b(n)),void 0===i&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=x(e,0,1),r=x(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return k(e,I,(function(e,t,r,i){n[n.length]=r?k(i,T,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=O("%"+n+"%",t),a=i.name,c=i.value,l=!1,d=i.alias;d&&(n=d[0],S(r,E([0,1],d)));for(var f=1,h=!0;f=r.length){var v=u(c,p);c=(h=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[p]}else h=_(c,p),c=c[p];h&&!l&&(y[a]=c)}}return c}},92948:(e,t,r)=>{"use strict";var n;n="undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},e.exports=n},53820:(e,t,r)=>{"use strict";var n=r(57701)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},1020:(e,t,r)=>{"use strict";var n=r(57701)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},61593:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},58489:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i="undefined"!=typeof Symbol&&Symbol,o=r(47027);e.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"===(0,n.default)(i("foo"))&&"symbol"===(0,n.default)(Symbol("bar"))&&o()}},47027:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===(0,n.default)(Symbol.iterator))return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},11191:(e,t,r)=>{"use strict";var n=r(47027);e.exports=function(){return n()&&!!Symbol.toStringTag}},22353:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=r(86505).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(41736)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++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(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},37198:(e,t,r)=>{"use strict";var n=t;n.utils=r(84268),n.common=r(64696),n.sha=r(39310),n.ripemd=r(69294),n.hmac=r(53201),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},64696:(e,t,r)=>{"use strict";var n=r(84268),i=r(94504);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o{"use strict";var n=r(84268),i=r(94504);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(84268),i=r(64696),o=n.rotl32,a=n.sum32,s=n.sum32_3,c=n.sum32_4,u=i.BlockHash;function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function f(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,u),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],l=this.h[4],v=r,b=n,w=i,A=u,_=l,E=0;E<80;E++){var S=a(o(c(r,d(E,n,i,u),e[p[E]+t],f(E)),m[E]),l);r=l,l=u,u=o(i,10),i=n,n=S,S=a(o(c(v,d(79-E,b,w,A),e[g[E]+t],h(E)),y[E]),_),v=_,_=A,A=o(w,10),w=b,b=S}S=s(this.h[1],i,A),this.h[1]=s(this.h[2],u,_),this.h[2]=s(this.h[3],l,v),this.h[3]=s(this.h[4],r,b),this.h[4]=s(this.h[0],n,w),this.h[0]=S},l.prototype._digest=function(e){return"hex"===e?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],g=[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]},39310:(e,t,r)=>{"use strict";t.sha1=r(38142),t.sha224=r(14909),t.sha256=r(87682),t.sha384=r(74532),t.sha512=r(36515)},38142:(e,t,r)=>{"use strict";var n=r(84268),i=r(64696),o=r(90070),a=n.rotl32,s=n.sum32,c=n.sum32_5,u=o.ft_1,l=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(f,l),e.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(84268),i=r(87682);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},87682:(e,t,r)=>{"use strict";var n=r(84268),i=r(64696),o=r(90070),a=r(94504),s=n.sum32,c=n.sum32_4,u=n.sum32_5,l=o.ch32,d=o.maj32,f=o.s0_256,h=o.s1_256,p=o.g0_256,g=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 v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(v,m),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(84268),i=r(36515);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},36515:(e,t,r)=>{"use strict";var n=r(84268),i=r(64696),o=r(94504),a=n.rotr64_hi,s=n.rotr64_lo,c=n.shr64_hi,u=n.shr64_lo,l=n.sum64,d=n.sum64_hi,f=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,g=n.sum64_5_hi,m=n.sum64_5_lo,y=i.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function 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=v,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function S(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function k(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function C(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function T(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(b,y),e.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(84268).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},84268:(e,t,r)=>{"use strict";var n=r(94504),i=r(41736);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,c,u){var l=0,d=t;return l+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,c,u){return t+n+o+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},2383:(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(3767);e.exports=o.call(n,i)},29410:(e,t,r)=>{"use strict";var n=r(37198),i=r(96580),o=r(94504);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length{"use strict";var n=r(29519),i=r(51143),o=e.exports;for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a]);function s(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=s(e),n.request.call(this,e,t)},o.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},32996:(e,t,r)=>{"use strict";var n;r(28847)(r(3355)),void 0===(n=function(){return e=[new Uint32Array([2157250,2157314,2157378,2157442,2157506,2157570,2157634,0,2157698,2157762,2157826,2157890,2157954,0,2158018,0]),new Uint32Array([2179041,6291456,2179073,6291456,2179105,6291456,2179137,6291456,2179169,6291456,2179201,6291456,2179233,6291456,2179265,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,2113729,2197345,2197377,2113825,2197409,2197441,2113921,2197473,2114017,2197505,2197537,2197569,2197601,2197633,2197665]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672,23068672,0,0,0,0,23068672]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064]),new Uint32Array([2196001,2196033,2196065,2196097,2196129,2196161,2196193,2196225,2196257,2196289,2196321,2196353,2196385,2196417,2196449,2196481]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2177025,6291456,2177057,6291456,2177089,6291456,2177121,6291456,2177153,6291456,2177185,6291456,2177217,6291456,2177249,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456]),new Uint32Array([2134435,2134531,2134627,2134723,2134723,2134819,2134819,2134915,2134915,2135011,2105987,2135107,2135203,2135299,2131587,2135395]),new Uint32Array([0,0,0,0,0,0,0,6291456,2168673,2169249,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354,2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354]),new Uint32Array([2125219,2125315,2152834,2152898,2125411,2152962,2153026,2125506,2125507,2125603,2153090,2153154,2153218,2153282,2153346,2105348]),new Uint32Array([2203393,6291456,2203425,6291456,2203457,6291456,2203489,6291456,6291456,6291456,6291456,2203521,6291456,2181281,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,6291456,2145538,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,6291456]),new Uint32Array([2139426,2160834,2160898,2160962,2134242,2161026,2161090,2161154,2161218,2161282,2161346,2161410,2138658,2161474,2161538,2134722]),new Uint32Array([2119939,2124930,2125026,2106658,2125218,2128962,2129058,2129154,2129250,2129346,2129442,2108866,2108770,2150466,2150530,2150594]),new Uint32Array([2201601,6291456,2201633,6291456,2201665,6291456,2201697,6291456,2201729,6291456,2201761,6291456,2201793,6291456,2201825,6291456]),new Uint32Array([2193537,2193569,2193601,2193633,2193665,2193697,2193729,2193761,2193793,2193825,2193857,2193889,2193921,2193953,2193985,2194017]),new Uint32Array([6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2190561,6291456,2190593,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2190625,6291456,2190657,6291456,23068672]),new Uint32Array([2215905,2215937,2215969,2216001,2216033,2216065,2216097,2216129,2216161,2216193,2216225,2216257,2105441,2216289,2216321,2216353]),new Uint32Array([23068672,18884130,23068672,23068672,23068672,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2191233,2191265,2191297,2191329,2191361,2191393,2191425,2117377,2191457,2191489,2191521,2191553,2191585,2191617,2191649,2117953]),new Uint32Array([2132227,2132323,2132419,2132419,2132515,2132515,2132611,2132707,2132707,2132803,2132899,2132899,2132995,2132995,2133091,2133187]),new Uint32Array([0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10609889,10610785,10609921,10610817,2222241]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([2219969,2157121,2157441,2157505,2157889,2157953,2220001,2158465,2158529,10575617,2156994,2157058,2129923,2130019,2157122,2157186]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2185249,6291456,2185281,6291456,2185313,6291456,2185345,6291456,2185377,6291456,2185409,6291456,2185441,6291456,2185473,6291456]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,6291456,0]),new Uint32Array([2183361,6291456,2183393,6291456,2183425,6291456,2183457,6291456,2183489,6291456,2183521,6291456,2183553,6291456,2183585,6291456]),new Uint32Array([2192161,2192193,2192225,2192257,2192289,2192321,2192353,2192385,2192417,2192449,2192481,2192513,2192545,2192577,2192609,2192641]),new Uint32Array([2212001,2212033,2212065,2212097,2212129,2212161,2212193,2212225,2212257,2212289,2212321,2212353,2212385,2212417,2212449,2207265]),new Uint32Array([2249825,2249857,2249889,2249921,2249954,2250018,2250082,2250145,2250177,2250209,2250241,2250274,2250337,2250370,2250433,2250465]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147905,2147969,2148033,2148097,2148161,2148225,2148289,2148353]),new Uint32Array([10485857,6291456,2197217,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2180353,2180385,2144033,2180417,2180449,2180481,2180513,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10610209,10610465,10610241,10610753,10609857]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2223842,2223906,2223970,2224034,2224098,2224162,2224226,2224290,2224354,2224418,2224482,2224546,2224610,2224674,2224738,2224802]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,18923650,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,18923714,23068672,23068672]),new Uint32Array([2126179,2125538,2126275,2126371,2126467,2125634,2126563,2105603,2105604,2125346,2126659,2126755,2126851,2098179,2098181,2098182]),new Uint32Array([2227426,2227490,2227554,2227618,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2192353,2240642,2240642,2240705,2240737,2240737,2240769,2240802,2240866,2240929,2240961,2240993,2241025,2241057,2241089,2241121]),new Uint32Array([6291456,2170881,2170913,2170945,6291456,2170977,6291456,2171009,2171041,6291456,6291456,6291456,2171073,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2132226,2132514,2163586,2132610,2160386,2133090,2133186,2160450,2160514,2160578,2133570,2106178,2160642,2133858,2160706,2160770]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10532162,10532226,10532290,10532354,10532418,10532482,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2098209,2108353,2108193,2108481,2170241,2111713,2105473,2105569,2105601,2112289,2112481,2098305,2108321,0,0,0]),new Uint32Array([2209121,2209153,2209185,2209217,2209249,2209281,2209313,2209345,2209377,2209409,2209441,2209473,2207265,2209505,2209537,2209569]),new Uint32Array([2189025,6291456,2189057,6291456,2189089,6291456,2189121,6291456,2189153,6291456,2189185,6291456,2189217,6291456,2189249,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2165764,2140004]),new Uint32Array([2215105,6291456,2215137,6291456,6291456,2215169,2215201,6291456,6291456,6291456,2215233,2215265,2215297,2215329,2215361,2215393]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,23068672,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([10505091,10505187,10505283,10505379,10505475,10505571,10505667,10505763,10505859,10505955,10506051,10506147,10506243,10506339,10506435,10506531]),new Uint32Array([2229730,2229794,2229858,2229922,2229986,2230050,2230114,2230178,2230242,2230306,2230370,2230434,2230498,2230562,2230626,2230690]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,0,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([6291456,6291456,6291456,6291456,10502115,10502178,10502211,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2190305,6291456,2190337,6291456,2190369,6291456,2190401,6291456,2190433,6291456,2190465,6291456,2190497,6291456,2190529,6291456]),new Uint32Array([2173793,2173985,2174017,6291456,2173761,2173697,6291456,2174689,6291456,2174017,2174721,6291456,6291456,2174753,2174785,2174817]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609,2100033]),new Uint32Array([2132898,2163842,2163906,2133282,2132034,2131938,2137410,2132802,2132706,2164866,2133282,2160578,2165186,2165186,6291456,6291456]),new Uint32Array([10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059,10501155,10501251,10501347,10501443]),new Uint32Array([2163458,2130978,2131074,2131266,2131362,2163522,2160130,2132066,2131010,2131106,2106018,2131618,2131298,2132034,2131938,2137410]),new Uint32Array([2212961,2116993,2212993,2213025,2213057,2213089,2213121,2213153,2213185,2213217,2213249,2209633,2213281,2213313,2213345,2213377]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2113729,2113825,2113921,2114017,2114113,2114209,2114305,2114401,2114497,2114593,2114689,2114785,2114881,2114977,2115073,2115169]),new Uint32Array([2238177,2238209,2238241,2238273,2238305,2238337,2238337,2217537,2238369,2238401,2238433,2238465,2215649,2238497,2238529,2238561]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0]),new Uint32Array([6291456,0,6291456,2145026,0,6291456,2145090,0,6291456,6291456,0,0,23068672,0,23068672,23068672]),new Uint32Array([2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129,2100289]),new Uint32Array([6291456,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0]),new Uint32Array([2187681,2187713,2187745,2187777,2187809,2187841,2187873,2187905,2187937,2187969,2188001,2188033,2188065,2188097,2188129,2188161]),new Uint32Array([0,10554498,10554562,10554626,10554690,10554754,10554818,10554882,10554946,10555010,10555074,6291456,6291456,0,0,0]),new Uint32Array([2235170,2235234,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0]),new Uint32Array([2181153,6291456,2188897,6291456,6291456,2188929,6291456,6291456,6291456,6291456,6291456,6291456,2111905,2100865,2188961,2188993]),new Uint32Array([2100833,2100897,0,0,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,2112289]),new Uint32Array([6291456,2172833,6291456,2172865,2172897,2172929,2172961,6291456,2172993,6291456,2173025,6291456,2173057,6291456,2173089,6291456]),new Uint32Array([6291456,0,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,2190721]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456]),new Uint32Array([2184993,6291456,2185025,6291456,2185057,6291456,2185089,6291456,2185121,6291456,2185153,6291456,2185185,6291456,2185217,6291456]),new Uint32Array([2115265,2115361,2115457,2115553,2115649,2115745,2115841,2115937,2116033,2116129,2116225,2116321,2150658,2150722,2200225,6291456]),new Uint32Array([2168321,6291456,2168353,6291456,2168385,6291456,2168417,6291456,2168449,6291456,2168481,6291456,2168513,6291456,2168545,6291456]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,0,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2186625,0,0,6291456,6291456,2186657,2186689,2186721,2173505,0,10496067,10496163,10496259]),new Uint32Array([2178785,6291456,2178817,6291456,2178849,6291456,2178881,6291456,2178913,6291456,2178945,6291456,2178977,6291456,2179009,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2097152,0,0,0,2097152,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2197857,2197889,2197921,2197953,2197985,2198017,0,0,2198049,2198081,2198113,2198145,2198177,2198209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2098209,2167297,2111137,6291456]),new Uint32Array([2171393,6291456,2171425,6291456,2171457,6291456,2171489,6291456,2171521,6291456,2171553,6291456,2171585,6291456,2171617,6291456]),new Uint32Array([2206753,2206785,2195457,2206817,2206849,2206881,2206913,2197153,2197153,2206945,2117857,2206977,2207009,2207041,2207073,2207105]),new Uint32Array([0,0,0,0,0,0,0,23068672,0,0,0,0,2144834,2144898,0,2144962]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,0,2105505,2098241]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,2202049,6291456,2202081,6291456,2202113,6291456,2202145,6291456,2202177,6291456,2202209,6291456,2202241,6291456]),new Uint32Array([10501155,10501251,10501347,10501443,10501539,10501635,10501731,10501827,10501923,10502019,2141731,2105505,2098177,2155586,2166530,0]),new Uint32Array([2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441]),new Uint32Array([2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330,2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10502307,10502403,10502499,10502595,10502691,10502787,10502883,10502979,10503075,10503171,10503267,10503363,10503459,10503555,10503651,10503747]),new Uint32Array([2179937,2179969,2180001,2180033,2156545,2180065,2156577,2180097,2180129,2180161,2180193,2180225,2180257,2180289,2156737,2180321]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,0,0,6291456,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([2227682,2227746,2227810,2227874,2227938,2228002,2228066,2228130,2228194,2228258,2228322,2228386,2228450,2228514,2228578,2228642]),new Uint32Array([2105601,2169121,2108193,2170049,2181025,2181057,2112481,2108321,2108289,2181089,2170497,2100865,2181121,2173601,2173633,2173665]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180641,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,6291456,0,6291456,0,6291456,0,0,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2178273,6291456,2178305,6291456,2178337,6291456,2178369,6291456,2178401,6291456,2178433,6291456,2178465,6291456,2178497,6291456]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2237377,2237409,2236225,2237441,2237473,2217441,2215521,2215553,2217473,2237505,2237537,2209697,2237569,2215585,2237601,2237633]),new Uint32Array([2221985,2165601,2165601,2165665,2165665,2222017,2222017,2165729,2165729,2158913,2158913,2158913,2158913,2097281,2097281,2105921]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2149634,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2176897,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2176929,6291456,2176961,6291456,2176993,6291456]),new Uint32Array([2172641,6291456,2172673,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2172705,2172737,6291456,2172769,2172801,6291456]),new Uint32Array([2099173,2104196,2121667,2099395,2121763,2152258,2152322,2098946,2152386,2121859,2121955,2099333,2122051,2104324,2099493,2122147]),new Uint32Array([6291456,6291456,6291456,2145794,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2145858,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,0,0,6291456,0]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,0,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2239074,2239138,2239201,2239233,2239265,2239297,2239329,2239361,0,2239393,2239425,2239425,2239458,2239521,2239553,2209569]),new Uint32Array([14680064,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,6291456,23068672]),new Uint32Array([2108321,2108289,2113153,2098209,2180897,2180929,2180961,2111137,2098241,2108353,2170241,2170273,2180993,2105825,6291456,2105473]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146114,6291456,6291456,6291456,0,0,0]),new Uint32Array([2105921,2105921,2105921,2222049,2222049,2130977,2130977,2130977,2130977,2160065,2160065,2160065,2160065,2097729,2097729,2097729]),new Uint32Array([2218145,2214785,2207937,2218177,2218209,2192993,2210113,2212769,2218241,2218273,2216129,2218305,2216161,2218337,2218369,2218401]),new Uint32Array([0,0,0,2156546,2156610,2156674,2156738,2156802,0,0,0,0,0,2156866,23068672,2156930]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2213409,2213441,2213473,2213505,2213537,2213569,2213601,2213633,2213665,2195681,2213697,2213729,2213761,2213793,2213825,2213857]),new Uint32Array([2100033,2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2201857,6291456,2201889,6291456,2201921,6291456,2201953,6291456,2201985,6291456,2202017,6291456,2176193,2176257,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2188193,2188225,2188257,2188289,2188321,2188353,2188385,2188417,2188449,2188481,2188513,2188545,2188577,2188609,2188641,0]),new Uint32Array([10554529,2221089,0,10502113,10562017,10537921,10538049,2221121,2221153,0,0,0,0,0,0,0]),new Uint32Array([2213889,2213921,2213953,2213985,2214017,2214049,2214081,2194177,2214113,2214145,2214177,2214209,2214241,2214273,2214305,2214337]),new Uint32Array([2166978,2167042,2099169,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180545,6291456,6291456,6291456]),new Uint32Array([10518915,10519011,10519107,10519203,2162242,2162306,2159554,2162370,2159362,2159618,2105922,2162434,2159746,2162498,2159810,2159874]),new Uint32Array([2161730,2161794,2135586,2161858,2161922,2137186,2131810,2160290,2135170,2161986,2137954,2162050,2162114,2162178,10518723,10518819]),new Uint32Array([10506627,10506723,10506819,10506915,10507011,10507107,10507203,10507299,10507395,10507491,10507587,10507683,10507779,10507875,10507971,10508067]),new Uint32Array([6291456,23068672,23068672,23068672,0,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2175873,2175905,2175937,2175969,2176001,2176033,2176065,2176097,2176129,2176161,2176193,2176225,2176257,2176289,2176321,2176353]),new Uint32Array([2140006,2140198,2140390,2140582,2140774,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241]),new Uint32Array([0,23068672,0,0,0,0,0,0,0,2145154,2145218,2145282,6291456,0,2145346,0]),new Uint32Array([0,0,0,0,10531458,10495395,2148545,2143201,2173473,2148865,2173505,0,2173537,0,2173569,2149121]),new Uint32Array([10537282,10495683,2148738,2148802,2148866,0,6291456,2148930,2186593,2173473,2148737,2148865,2148802,10495779,10495875,10495971]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2215425,2215457,2215489,2215521,2215553,2215585,2215617,2215649,2215681,2215713,2215745,2215777,2192033,2215809,2215841,2215873]),new Uint32Array([2242049,2242081,2242113,2242145,2242177,2242209,2242241,2242273,2215937,2242305,2242338,2242401,2242433,2242465,2242497,2216001]),new Uint32Array([10554529,2221089,0,0,10562017,10502113,10538049,10537921,2221185,10489601,10489697,10609889,10609921,2141729,2141793,10610273]),new Uint32Array([2141923,2142019,2142115,2142211,2142307,2142403,2142499,2142595,2142691,0,0,0,0,0,0,0]),new Uint32Array([0,2221185,2221217,10609857,10609857,10489601,10489697,10609889,10609921,2141729,2141793,2221345,2221377,2221409,2221441,2187105]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18923970,23068672,23068672,23068672,0,6291456,6291456]),new Uint32Array([2183105,6291456,2183137,6291456,2183169,6291456,2183201,6291456,2183233,6291456,2183265,6291456,2183297,6291456,2183329,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2134434,2134818,2097666,2097186,2097474,2097698,2105986,2131586,2132450,2131874,2131778,2135970,2135778,2161602,2136162,2161666]),new Uint32Array([2236865,2236897,2236930,2236993,2237025,2235681,2237058,2237121,2237153,2237185,2237217,2217281,2237250,2191233,2237313,2237345]),new Uint32Array([2190049,6291456,2190081,6291456,2190113,6291456,2190145,6291456,2190177,6291456,2190209,6291456,2190241,6291456,2190273,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2101922,2102050,2102178,2102306,10498755,10498851,10498947,10499043,10499139,10499235,10499331,10499427,10499523,10489604,10489732,10489860]),new Uint32Array([2166914,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2181601,2170561,2181633,2181665,2170753,2181697,2172897,2170881,2181729,2170913,2172929,2113441,2181761,2181793,2171009,2173761]),new Uint32Array([0,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2248001,2248033,2248066,2248130,2248193,2248226,2248289,2248322,2248385,2248417,2216673,2248450,2248514,2248577,2248610,2248673]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([2169729,6291456,2169761,6291456,2169793,6291456,2169825,6291456,2169857,2169889,6291456,2169921,6291456,2143329,6291456,2098305]),new Uint32Array([2162178,2163202,2163266,2135170,2136226,2161986,2137954,2159426,2159490,2163330,2159554,2163394,2159682,2139522,2136450,2159746]),new Uint32Array([2173953,2173985,0,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2174209,2174241,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,4271169,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2174273]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,2190785,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2189793,6291456,2189825,6291456,2189857,6291456,2189889,6291456,2189921,6291456,2189953,6291456,2189985,6291456,2190017,6291456]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,0,2098305,2108321,2108289,2100865,2113153,2108481,2113345,0,2098209,2111137]),new Uint32Array([2172129,6291456,2172161,6291456,2172193,6291456,2172225,6291456,2172257,6291456,2172289,6291456,2172321,6291456,2172353,6291456]),new Uint32Array([2214753,6291456,2214785,6291456,6291456,2214817,2214849,2214881,2214913,2214945,2214977,2215009,2215041,2215073,2194401,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([10610305,10610337,10575617,2221761,10610401,10610433,10502177,0,10610465,10610497,10610529,10610561,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2187105,2187137,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2199393,2199425,2199457,2199489,2199521,2199553,2199585,2199617,2199649,2199681,2199713,2199745,2199777,2199809,2199841,0]),new Uint32Array([2217249,2217281,2217313,2217345,2217377,2217409,2217441,2217473,2215617,2217505,2217537,2217569,2214753,2217601,2217633,2217665]),new Uint32Array([2170273,2170305,6291456,2170337,2170369,6291456,2170401,2170433,2170465,6291456,6291456,6291456,2170497,2170529,6291456,2170561]),new Uint32Array([2188673,6291456,2188705,2188737,2188769,6291456,6291456,2188801,6291456,2188833,6291456,2188865,6291456,2180929,2181505,2180897]),new Uint32Array([10489988,10490116,10490244,10490372,10490500,10490628,10490756,10490884,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147393,2147457,2147521,2147585,2147649,2147713,2147777,2147841]),new Uint32Array([23068672,23068672,0,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2241153,2241185,2241217,2215809,2241250,2241313,2241345,2241377,2217921,2241377,2241409,2215873,2241441,2241473,2241505,2241537]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220417,2220417,2220449,2220449,2220481,2220481,2220513,2220513,2220545,2220545,2220577,2220577,2220609,2220609,2220641,2220641]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2144002,0,6291456,6291456,0,0,6291456,6291456,6291456]),new Uint32Array([2167105,2167137,2167169,2167201,2167233,2167265,2167297,2167329,2167361,2167393,2167425,2167457,2167489,2167521,2167553,2167585]),new Uint32Array([10575521,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2234146,2234210,2234274,2234338,2234402,2234466,2234530,2234594,2234658,2234722,2234786,2234850,2234914,2234978,2235042,2235106]),new Uint32Array([0,0,0,0,0,0,0,2180577,0,0,0,0,0,2180609,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456]),new Uint32Array([2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2242529,2242561,2242593,2242625,2242657,2242689,2242721,2242753,2207937,2218177,2242785,2242817,2242849,2242882,2242945,2242977]),new Uint32Array([2118049,2105345,2118241,2105441,2118433,2118529,2118625,2118721,2118817,2200257,2200289,2191809,2200321,2200353,2200385,2200417]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2185505,6291456,2185537,6291456,2185569,6291456,2185601,6291456,2185633,6291456,2185665,6291456,2185697,6291456,2185729,6291456]),new Uint32Array([2231970,2232034,2232098,2232162,2232226,2232290,2232354,2232418,2232482,2232546,2232610,2232674,2232738,2232802,2232866,2232930]),new Uint32Array([2218625,2246402,2246466,2246530,2246594,2246657,2246689,2246689,2218657,2219681,2246721,2246753,2246785,2246818,2246881,2208481]),new Uint32Array([2197025,2197057,2197089,2197121,2197153,2197185,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2219137,2216961,2219169,2219201,2219233,2219265,2219297,2217025,2215041,2219329,2217057,2219361,2217089,2219393,2197153,2219426]),new Uint32Array([23068672,23068672,23068672,0,0,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713]),new Uint32Array([2243522,2243585,2243617,2243649,2243681,2210113,2243713,2243746,2243810,2243874,2243937,2243970,2244033,2244065,2244097,2244129]),new Uint32Array([2178017,6291456,2178049,6291456,2178081,6291456,2178113,6291456,2178145,6291456,2178177,6291456,2178209,6291456,2178241,6291456]),new Uint32Array([10553858,2165314,10518722,6291456,10518818,0,10518914,2130690,10519010,2130786,10519106,2130882,10519202,2165378,10554050,2165506]),new Uint32Array([0,0,2135491,2135587,2135683,2135779,2135875,2135971,2135971,2136067,2136163,2136259,2136355,2136355,2136451,2136547]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2220033,2220033,2220065,2220065,2220065,2220065,2220097,2220097,2220097,2220097,2220129,2220129,2220129,2220129,2220161,2220161]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2100897,2100898,2100899,2150018,2100865,2100866,2100867,2100868,2150082,2108481,2109858,2109859,2105569,2105505,2098241,2105601]),new Uint32Array([2097217,2097505,2097505,2097505,2097505,2165570,2165570,2165634,2165634,2165698,2165698,2097858,2097858,0,0,2097152]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10503843,10503939,10504035,10504131,10504227,10504323,10504419,10504515,10504611,10504707,10504803,10504899,10504995,10491140,10491268,0]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,2235297,2220769,2235329,2235361]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2222401,2222433,2222465,10531394,2222497,2222529,2222561,0,2222593,2222625,2222657,2222689,2222721,2222753,2222785,0]),new Uint32Array([2184481,6291456,2184513,6291456,2184545,6291456,2184577,6291456,2184609,6291456,2184641,6291456,2184673,6291456,2184705,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2105570,2156034,2126947,2156098,2153666,2127043,2127139,2156162,0,2127235,2156226,2156290,2156354,2156418,2127331,2127427]),new Uint32Array([2215905,2207041,2153185,2241569,2241601,2241633,2241665,2241697,2241730,2241793,2241825,2241857,2241889,2241921,2241954,2242017]),new Uint32Array([2203777,6291456,2203809,6291456,2203841,6291456,2203873,6291456,2203905,6291456,2173121,2180993,2181249,2203937,2181313,0]),new Uint32Array([2168577,6291456,2168609,6291456,2168641,6291456,2168673,6291456,2168705,6291456,2168737,6291456,2168769,6291456,2168801,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,0,0]),new Uint32Array([2210113,2195521,2210145,2210177,2210209,2210241,2210273,2210305,2210337,2210369,2210401,2210433,2210465,2210497,2210529,2210561]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2228706,2228770,2228834,2228898,2228962,2229026,2229090,2229154,2229218,2229282,2229346,2229410,2229474,2229538,2229602,2229666]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,18874368,18874368,18874368,0,0]),new Uint32Array([2133089,2133281,2133281,2133281,2133281,2160577,2160577,2160577,2160577,2097441,2097441,2097441,2097441,2133857,2133857,2133857]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089]),new Uint32Array([2178529,6291456,2178561,6291456,2178593,6291456,2178625,6291456,2178657,6291456,2178689,6291456,2178721,6291456,2178753,6291456]),new Uint32Array([2221025,2221025,2221057,2221057,2159329,2159329,2159329,2159329,2097217,2097217,2158914,2158914,2158978,2158978,2159042,2159042]),new Uint32Array([2208161,2208193,2208225,2208257,2194433,2208289,2208321,2208353,2208385,2208417,2208449,2208481,2208513,2208545,2208577,2208609]),new Uint32Array([2169217,6291456,2169249,6291456,2169281,6291456,2169313,6291456,2169345,6291456,2169377,6291456,2169409,6291456,2169441,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2133187,2133283,2133283,2133379,2133475,2133571,2133667,2133667,2133763,2133859,2133955,2134051,2134147,2134147,2134243,2134339]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,0]),new Uint32Array([2193089,2193121,2193153,2193185,2117665,2117569,2193217,2193249,2193281,2193313,2193345,2193377,2193409,2193441,2193473,2193505]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184225,6291456,2184257,6291456,2184289,6291456,2184321,6291456,2184353,6291456,2184385,6291456,2184417,6291456,2184449,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2100833,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2200801,2200833,2200865,0]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2181153,2105505,2181185,2167617,2180993]),new Uint32Array([2160002,2160066,2160130,2160194,2160258,2132066,2131010,2131106,2106018,2131618,2160322,2131298,2132034,2131938,2137410,2132226]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2183617,6291456,2183649,6291456,2183681,6291456,2183713,6291456,2183745,6291456,2183777,6291456,2183809,6291456,2183841,6291456]),new Uint32Array([0,6291456,6291456,0,6291456,0,0,6291456,6291456,0,6291456,0,0,6291456,0,0]),new Uint32Array([2250977,2251009,2251041,2251073,2195009,2251106,2251169,2251201,2251233,2251265,2251297,2251330,2251394,2251457,2251489,2251521]),new Uint32Array([2205729,2205761,2205793,2205825,2205857,2205889,2205921,2205953,2205985,2206017,2206049,2206081,2206113,2206145,2206177,2206209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2143170,2168993,6291456,2169025,6291456,2169057,6291456,2169089,6291456,2143234,2169121,6291456,2169153,6291456,2169185,6291456]),new Uint32Array([23068672,23068672,2190689,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2248706,2248769,2248801,2248833,2248865,2248897,2248929,2248962,2249026,2249090,2249154,2240705,2249217,2249249,2249281,2249313]),new Uint32Array([10485857,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10495394,6291456,2098209,6291456,6291456,2097152,6291456,10531394]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([6291456,2186977,6291456,6291456,6291456,6291456,6291456,10537858,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2209601,2209633,2209665,2209697,2209729,2209761,2209793,2209825,2209857,2209889,2209921,2209953,2209985,2210017,2210049,2210081]),new Uint32Array([10501539,10501635,10501731,10501827,10501923,10502019,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2194561,2194593,2194625,2119777,2119873,2194657,2194689,2194721,2194753,2194785,2194817,2194849,2194881,2194913,2194945,2194977]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569]),new Uint32Array([2222818,2222882,2222946,2223010,2223074,2223138,2223202,2223266,2223330,2223394,2223458,2223522,2223586,2223650,2223714,2223778]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672]),new Uint32Array([0,2179553,2179585,2179617,2179649,2144001,2179681,2179713,2179745,2179777,2179809,2156705,2179841,2156833,2179873,2179905]),new Uint32Array([6291456,23068672,6291456,2145602,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,6291456,0,0]),new Uint32Array([2196513,2196545,2196577,2196609,2196641,2196673,2196705,2196737,2196769,2196801,2196833,2196865,2196897,2196929,2196961,2196993]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2177281,6291456,2177313,6291456,2177345,6291456,2177377,6291456,2177409,6291456,2177441,6291456,2177473,6291456,2177505,6291456]),new Uint32Array([2187137,2221473,2221505,2221537,2221569,6291456,6291456,10610209,10610241,10537986,10537986,10537986,10537986,10609857,10609857,10609857]),new Uint32Array([2243009,2243041,2216033,2243074,2243137,2243169,2243201,2219617,2243233,2243265,2243297,2243329,2243362,2243425,2243457,2243489]),new Uint32Array([10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,2097152,4194304,4194304,0,0]),new Uint32Array([2143042,6291456,2143106,2143106,2168833,6291456,2168865,6291456,6291456,2168897,6291456,2168929,6291456,2168961,6291456,2143170]),new Uint32Array([6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2204193,2204225,2204257,2204289,2204321,2204353,2204385,2204417,2204449,2204481,2204513,2204545,2204577,2204609,2204641,2204673]),new Uint32Array([2202753,6291456,2202785,6291456,2202817,6291456,2202849,6291456,2202881,6291456,2202913,6291456,2202945,6291456,2202977,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321]),new Uint32Array([2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842,2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842]),new Uint32Array([2253313,2253346,2253409,2253441,2253473,2253505,2253537,2253569,2253601,2253634,2219393,2253697,2253729,2253761,2253793,2253825]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([2162562,2162626,2131362,2162690,2159938,2160002,2162754,2162818,2160130,2162882,2160194,2160258,2160834,2160898,2161026,2161090]),new Uint32Array([2175361,2175393,2175425,2175457,2175489,2175521,2175553,2175585,2175617,2175649,2175681,2175713,2175745,2175777,2175809,2175841]),new Uint32Array([2253858,2253921,2253954,2254018,2254082,2196737,2254145,2196865,2254177,2254209,2254241,2254273,2197025,2254306,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2202113,2204129,2188705,2204161]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953]),new Uint32Array([2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,0,2108417,0,2111713,2100897,2111905]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2175425,2175489,2175809,2175905,2175937,2175937,2176193,2176417,2180865,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,2143298,2143298,2143298,2143362,2143362,2143362,2143426,2143426,2143426,2171105,6291456,2171137]),new Uint32Array([2120162,2120258,2151618,2151682,2151746,2151810,2151874,2151938,2152002,2120035,2120131,2120227,2152066,2120323,2152130,2120419]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2195361,2142433,2236065,2236097,2236129,2236161,2118241,2117473,2236193,2236225,2236257,2236289,0,0,0,0]),new Uint32Array([2189281,6291456,2189313,6291456,2189345,6291456,2189377,6291456,2189409,6291456,2189441,6291456,2189473,6291456,2189505,6291456]),new Uint32Array([6291456,6291456,2145922,6291456,6291456,6291456,6291456,2145986,6291456,6291456,6291456,6291456,2146050,6291456,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10502113,10562017,10610401,10502177,10610433,10538049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,2186401,0,2186433,0,2186465,0,2186497]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,23068672,23068672]),new Uint32Array([0,0,2198241,2198273,2198305,2198337,2198369,2198401,0,0,2198433,2198465,2198497,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,0,23068672,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,2133281,2097505,2105889,0,2097697,2135777,2097633,2097441]),new Uint32Array([2197889,2197921,2197953,2197985,2198017,2198049,2198081,2198113,2198145,2198177,2198209,2198241,2198273,2198305,2198337,2198369]),new Uint32Array([2132514,2132610,2160386,2133090,2133186,2160450,2160514,2133282,2160578,2133570,2106178,2160642,2133858,2160706,2160770,2134146]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,6291456,23068672,23068672,6291456,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2184737,6291456,2184769,6291456,2184801,6291456,2184833,6291456,2184865,6291456,2184897,6291456,2184929,6291456,2184961,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,2186753,6291456,6291456,6291456,6291456,2186785,2186817,2186849,2173569,2186881,10496355,10495395,10575521]),new Uint32Array([0,0,2097729,0,0,0,0,2106017,0,2097505,0,2097185,0,2135777,2097633,2097441]),new Uint32Array([2189537,6291456,2189569,6291456,2189601,6291456,2189633,6291456,2189665,6291456,2189697,6291456,2189729,6291456,2189761,6291456]),new Uint32Array([2202497,6291456,2202529,6291456,2202561,6291456,2202593,6291456,2202625,6291456,2202657,6291456,2202689,6291456,2202721,6291456]),new Uint32Array([2245217,2218369,2245249,2245282,2245345,2245377,2245410,2245474,2245537,2245569,2245601,2245633,2245665,2245665,2245697,2245729]),new Uint32Array([6291456,0,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,23068672,6291456,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,2097377,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2176641,6291456,2176673,6291456,2176705,6291456,2176737,6291456,2176769,6291456,2176801,6291456,2176833,6291456,2176865,6291456]),new Uint32Array([2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2174369,2174369,0,0,2100833,2100737]),new Uint32Array([2116513,2190817,2190849,2190881,2190913,2190945,2116609,2190977,2191009,2191041,2191073,2117185,2191105,2191137,2191169,2191201]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2167617,2167649,2167681,2167713,2167745,2167777,2167809,6291456,2167841,2167873,2167905,2167937,2167969,2168001,2168033,4240130]),new Uint32Array([2165122,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122,2134562,2132162,2132834,2136866]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2186209,2186241,2186273,2186305,2186337,2186369,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,0,23068672,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([0,10537921,10610689,10610273,10610497,10610529,10610305,10610721,10489601,10489697,10610337,10575617,10554529,2221761,2197217,10496577]),new Uint32Array([2105473,2105569,2105601,2112289,0,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2125346,2153410,2153474,2127394,2153538,2153602,2153666,2153730,2105507,2105476,2153794,2153858,2153922,2153986,2154050,2105794]),new Uint32Array([2200449,2119681,2200481,2153313,2199873,2199905,2199937,2200513,2200545,2200577,2200609,2119105,2119201,2119297,2119393,2119489]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2175777,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2222273,2197217,2221473,2221505,2221089,2222305,2200865,2099681,2104481,2222337,2099905,2120737,2222369,2103713,2100225,2098785]),new Uint32Array([2201377,6291456,2201409,6291456,2201441,6291456,2201473,6291456,2201505,6291456,2201537,6291456,2201569,6291456,6291456,23068672]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([2200897,6291456,2200929,6291456,2200961,6291456,2200993,6291456,2201025,6291456,2180865,6291456,2201057,6291456,2201089,6291456]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2161154,2161410,2138658,2161474,2161538,2097666,2097186,2097474,2162946,2132450,2163010,2163074,2136162,2163138,2161666,2161730]),new Uint32Array([2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953]),new Uint32Array([0,0,0,0,0,0,23068672,23068672,0,0,0,0,2145410,2145474,0,6291456]),new Uint32Array([2244161,2216065,2212769,2244193,2244225,2244257,2244290,2244353,2244385,2244417,2244449,2218273,2244481,2244514,2244577,2244609]),new Uint32Array([2125730,2125699,2125795,2125891,2125987,2154114,2154178,2154242,2154306,2154370,2154434,2154498,2126082,2126178,2126274,2126083]),new Uint32Array([2237665,2237697,2237697,2237697,2237730,2237793,2237825,2237857,2237890,2237953,2237985,2238017,2238049,2238081,2238113,2238145]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150146,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2214369,2238593,2238625,2238657,2238689,2238721,2238753,2238785,2238817,2238850,2238913,2238945,2238977,2235457,2239009,2239041]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2252066,2252130,2252193,2252225,2252257,2252290,2252353,2252385,2252417,2252449,2252481,2252513,2252545,2252578,2252641,2252673]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,2197857]),new Uint32Array([2224866,2224930,2224994,2225058,2225122,2225186,2225250,2225314,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2219490,2219554,2219617,2219649,2219681,2219714,2219778,2219842,2219905,2219937,0,0,0,0,0,0]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665]),new Uint32Array([2220161,2220161,2220193,2220193,2220193,2220193,2220225,2220225,2220225,2220225,2220257,2220257,2220257,2220257,2220289,2220289]),new Uint32Array([2192673,2192705,2192737,2192769,2192801,2192833,2192865,2118049,2192897,2117473,2117761,2192929,2192961,2192993,2193025,2193057]),new Uint32Array([2179297,6291456,2179329,6291456,2179361,6291456,2179393,6291456,2179425,6291456,2179457,6291456,2179489,6291456,2179521,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2235745,2235777,2193633,2235809,2235841,2235873,2235905,2235937,2235969,2116513,2116705,2236001,2200513,2199905,2200545,2236033]),new Uint32Array([2113153,2108481,2113345,2113441,2232993,2233025,0,0,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761]),new Uint32Array([2170593,6291456,2170625,6291456,2170657,6291456,2170689,2170721,6291456,2170753,6291456,6291456,2170785,6291456,2170817,2170849]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2166786,2166850,0,0,0,0]),new Uint32Array([23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,0]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2134562,2132162,2132834,2136866,2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058]),new Uint32Array([6291456,6291456,2098337,2101441,10531458,2153473,6291456,6291456,10531522,2100737,2108193,6291456,2106499,2106595,2106691,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2233122,2233186,2233250,2233314,2233378,2233442,2233506,2233570,2233634,2233698,2233762,2233826,2233890,2233954,2234018,2234082]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2205217,2205249,2205281,2205313,2205345,2205377,2205409,2205441,2205473,2205505,2205537,2205569,2205601,2205633,2205665,2205697]),new Uint32Array([6291456,0,6291456,0,0,0,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([2173601,2173761,2174081,2173569,2174241,2174113,2173953,6291456,2174305,6291456,2174337,6291456,2174369,6291456,2174401,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2152450,2152514,2099653,2104452,2099813,2122243,2099973,2152578,2122339,2122435,2122531,2122627,2122723,2104580,2122819,2152642]),new Uint32Array([2236385,2236417,2236449,2236482,2236545,2215425,2236577,2236609,2236641,2236673,2215457,2236705,2236737,2236770,2215489,2236833]),new Uint32Array([2163394,2159746,2163458,2131362,2163522,2160130,2163778,2132226,2163842,2132898,2163906,2161410,2138658,2097666,2136162,2163650]),new Uint32Array([2218721,2246913,2246946,2216385,2247010,2247074,2215009,2247137,2247169,2216481,2247201,2247233,2247266,2247330,2247330,0]),new Uint32Array([2129730,2129762,2129858,2129731,2129827,2156482,2156482,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0,0,0,0,6291456,0,0]),new Uint32Array([2203969,2204001,2181377,2204033,2204065,6291456,2204097,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2169473,6291456,2169505,6291456,2169537,6291456,2169569,6291456,2169601,6291456,2169633,6291456,2169665,6291456,2169697,6291456]),new Uint32Array([2141542,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220801,2220801,2220801,2220801,2220833,2220833,2220865,2220865,2220865,2220865,2220897,2220897,2220897,2220897,2139873,2139873]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,0,0,0,0,0,0,6291456,0]),new Uint32Array([2214849,2218433,2218465,2218497,2218529,2218561,2214881,2218593,2218625,2218657,2218689,2218721,2218753,2216545,2218785,2218817]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058,2165122,2132802,2132706,2164866]),new Uint32Array([2207649,2207681,2207713,2207745,2207777,2207809,2207841,2207873,2207905,2207937,2207969,2208001,2208033,2208065,2208097,2208129]),new Uint32Array([2123683,2105092,2152706,2123779,2105220,2152770,2100453,2098755,2123906,2124002,2124098,2124194,2124290,2124386,2124482,2124578]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,0,0,0,0,0,0,0,10485857]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([10508163,10508259,10508355,10508451,2200129,2200161,2192737,2200193,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203553,6291456,2203585,6291456,6291456,6291456,2203617,6291456,2203649,6291456,2203681,6291456,2203713,6291456,2203745,6291456]),new Uint32Array([18884449,18884065,23068672,18884417,18884034,18921185,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18874368]),new Uint32Array([2247393,2247426,2247489,2247521,2247553,2247586,2247649,2247681,2247713,2247745,2247777,2247810,2247873,2247905,2247937,2247969]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,2160577,2133857,2235297,0,2235329,0]),new Uint32Array([2182593,6291456,2182625,6291456,2182657,6291456,2182689,6291456,2182721,6291456,2182753,6291456,2182785,6291456,2182817,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102402,2102403,6291456,2110050]),new Uint32Array([2149890,2108323,2149954,6291456,2113441,6291456,2149057,6291456,2113441,6291456,2105473,2167265,2111137,2105505,6291456,2108353]),new Uint32Array([2219105,2219137,2195233,2251554,2251617,2251649,2251681,2251713,2251746,2251810,2251873,2251905,2251937,2251970,2252033,2219169]),new Uint32Array([2203009,6291456,2203041,6291456,2203073,6291456,2203105,6291456,2203137,6291456,2203169,6291456,2203201,6291456,2203233,6291456]),new Uint32Array([2128195,2128291,2128387,2128483,2128579,2128675,2128771,2128867,2128963,2129059,2129155,2129251,2129347,2129443,2129539,2129635]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2140964,2141156,2140966,2141158,2141350]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2225378,2225442,2225506,2225570,2225634,2225698,2225762,2225826,2225890,2225954,2226018,2226082,2226146,2226210,2226274,2226338]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417]),new Uint32Array([2108353,2108417,0,2105601,2108193,2157121,2157313,2157377,2157441,2100897,6291456,2108419,2173953,2173633,2173633,2173953]),new Uint32Array([2111713,2173121,2111905,2098177,2173153,2173185,2173217,2113153,2113345,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2190753]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,2197249,6291456,2117377,2197281,2197313,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,23068672]),new Uint32Array([2173281,6291456,2173313,6291456,2173345,6291456,2173377,6291456,0,0,10532546,6291456,6291456,6291456,10562017,2173441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2159426,2159490,2159554,2159362,2159618,2159682,2139522,2136450,2159746,2159810,2159874,2130978,2131074,2131266,2131362,2159938]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203233,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2203265,6291456,2203297,6291456,2203329,2203361,6291456]),new Uint32Array([6291456,6291456,2148418,2148482,2148546,0,6291456,2148610,2186529,2186561,2148417,2148545,2148482,10495778,2143969,10495778]),new Uint32Array([2134146,2139426,2160962,2134242,2161218,2161282,2161346,2161410,2138658,2134722,2134434,2134818,2097666,2097346,2097698,2105986]),new Uint32Array([2198881,2198913,2198945,2198977,2199009,2199041,2199073,2199105,2199137,2199169,2199201,2199233,2199265,2199297,2199329,2199361]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([10610561,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2183873,6291456,2183905,6291456,2183937,6291456,2183969,6291456,2184001,6291456,2184033,6291456,2184065,6291456,2184097,6291456]),new Uint32Array([2244642,2244706,2244769,2244801,2218305,2244833,2244865,2244897,2244929,2244961,2244993,2245026,2245089,2245122,2245185,0]),new Uint32Array([6291456,6291456,2116513,2116609,2116705,2116801,2199873,2199905,2199937,2199969,2190913,2200001,2200033,2200065,2200097,2191009]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2180673,2180705,2180737,2180769,2180801,2180833,0,0]),new Uint32Array([2098081,2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150402]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,2145666,2145730,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665]),new Uint32Array([2187073,6291456,6291456,6291456,6291456,2098241,2098241,2108353,2100897,2111905,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102404,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2100612,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10485857]),new Uint32Array([2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([2217697,2217729,2217761,2217793,2217825,2217857,2217889,2217921,2217953,2215873,2217985,2215905,2218017,2218049,2218081,2218113]),new Uint32Array([2211233,2218849,2216673,2218881,2218913,2218945,2218977,2219009,2216833,2219041,2215137,2219073,2216865,2209505,2219105,2216897]),new Uint32Array([2240097,2240129,2240161,2240193,2240225,2240257,2240289,2240321,2240353,2240386,2240449,2240481,2240513,2240545,2207905,2240578]),new Uint32Array([6291456,6291456,2202273,6291456,2202305,6291456,2202337,6291456,2202369,6291456,2202401,6291456,2202433,6291456,2202465,6291456]),new Uint32Array([0,23068672,23068672,18923394,23068672,18923458,18923522,18884099,18923586,18884195,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2201121,6291456,2201153,6291456,2201185,6291456,2201217,6291456,2201249,6291456,2201281,6291456,2201313,6291456,2201345,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2211041,2211073,2211105,2211137,2211169,2211201,2211233,2211265,2211297,2211329,2211361,2211393,2211425,2211457,2211489,2211521]),new Uint32Array([2181825,6291456,2181857,6291456,2181889,6291456,2181921,6291456,2181953,6291456,2181985,6291456,2182017,6291456,2182049,6291456]),new Uint32Array([2162337,2097633,2097633,2097633,2097633,2132705,2132705,2132705,2132705,2097153,2097153,2097153,2097153,2133089,2133089,2133089]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,2148545,6291456,2173473,6291456,2148865,6291456,2173505,6291456,2173537,6291456,2173569,6291456,2149121,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2207137,2207169,2207201,2207233,2207265,2207297,2207329,2207361,2207393,2207425,2207457,2207489,2207521,2207553,2207585,2207617]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,23068672,23068672,0,0,0,0,0,0]),new Uint32Array([2198401,2198433,2198465,2198497,0,2198529,2198561,2198593,2198625,2198657,2198689,2198721,2198753,2198785,2198817,2198849]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2216385,2118721,2216417,2216449,2216481,2216513,2216545,2211233,2216577,2216609,2216641,2216673,2216705,2216737,2216737,2216769]),new Uint32Array([2216801,2216833,2216865,2216897,2216929,2216961,2216993,2215169,2217025,2217057,2217089,2217121,2217154,2217217,0,0]),new Uint32Array([2210593,2191809,2210625,2210657,2210689,2210721,2210753,2210785,2210817,2210849,2191297,2210881,2210913,2210945,2210977,2211009]),new Uint32Array([0,0,2105825,0,0,2111905,2105473,0,0,2112289,2108193,2112481,2112577,0,2098305,2108321]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,2097153,2134241,0,2132705,0,0,2131297,0,2133089,0,2133857,0,2220769,0,2235361]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,6291456,6291456,14680064]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2171873,6291456,2171905,6291456,2171937,6291456,2171969,6291456,2172001,6291456,2172033,6291456,2172065,6291456,2172097,6291456]),new Uint32Array([2220929,2220929,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2133857,2134145,2134145,2134145,2134145,2134241,2134241,2134241,2134241,2105889,2105889,2105889,2105889,2097185,2097185,2097185]),new Uint32Array([2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,10499619,10499715,10499811,10499907]),new Uint32Array([0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2144322,2144386,2144450,2144514,2144578,2144642,2144706,2144770]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0,0,2111905,2105473,2105569]),new Uint32Array([2236321,2236353,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2152194,2121283,2103684,2103812,2097986,2098533,2097990,2098693,2098595,2098853,2099013,2103940,2121379,2121475,2121571,2104068]),new Uint32Array([2206241,2206273,2206305,2206337,2206369,2206401,2206433,2206465,2206497,2206529,2206561,2206593,2206625,2206657,2206689,2206721]),new Uint32Array([6291456,6291456,6291456,6291456,16777216,16777216,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,10538818,10538882,6291456,6291456,2150338]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2214369,2214401,2214433,2214465,2214497,2214529,2214561,2214593,2194977,2214625,2195073,2214657,2214689,2214721,6291456,6291456]),new Uint32Array([2097152,2097152,2097152,2097152,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2182081,6291456,2182113,6291456,2182145,6291456,2182177,6291456,2182209,6291456,2182241,6291456,2182273,6291456,2182305,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146881,2146945,2147009,2147073,2147137,2147201,2147265,2147329]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672]),new Uint32Array([0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2122915,2123011,2123107,2104708,2123203,2123299,2123395,2100133,2104836,2100290,2100293,2104962,2104964,2098052,2123491,2123587]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,2171169,6291456,2171201,6291456,2171233,6291456,2171265,6291456,2171297,6291456,2171329,6291456,6291456,2171361,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2148994,2149058,2149122,0,6291456,2149186,2186945,2173537,2148993,2149121,2149058,10531458,10496066,0]),new Uint32Array([2195009,2195041,2195073,2195105,2195137,2195169,2195201,2195233,2195265,2195297,2195329,2195361,2195393,2195425,2195457,2195489]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,0,0,6291456,6291456]),new Uint32Array([2182849,6291456,2182881,6291456,2182913,6291456,2182945,6291456,2182977,6291456,2183009,6291456,2183041,6291456,2183073,6291456]),new Uint32Array([2211553,2210081,2211585,2211617,2211649,2211681,2211713,2211745,2211777,2211809,2209569,2211841,2211873,2211905,2211937,2211969]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2166594,2127298,2166658,2142978,2141827,2166722]),new Uint32Array([2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2185761,2185793,2185825,2185857,2185889,2185921,0,0]),new Uint32Array([6291456,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456]),new Uint32Array([0,0,0,2220961,2220961,2220961,2220961,2144193,2144193,2159201,2159201,2159265,2159265,2144194,2220993,2220993]),new Uint32Array([2192641,2235393,2235425,2152257,2116609,2235457,2235489,2200065,2235521,2235553,2235585,2212449,2235617,2235649,2235681,2235713]),new Uint32Array([2194049,2194081,2194113,2194145,2194177,2194209,2194241,2194273,2194305,2194337,2194369,2194401,2194433,2194465,2194497,2194529]),new Uint32Array([2196673,2208641,2208673,2208705,2208737,2208769,2208801,2208833,2208865,2208897,2208929,2208961,2208993,2209025,2209057,2209089]),new Uint32Array([2191681,2191713,2191745,2191777,2153281,2191809,2191841,2191873,2191905,2191937,2191969,2192001,2192033,2192065,2192097,2192129]),new Uint32Array([2230946,2231010,2231074,2231138,2231202,2231266,2231330,2231394,2231458,2231522,2231586,2231650,2231714,2231778,2231842,2231906]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2185953,2185985,2186017,2186049,2186081,2186113,2186145,2186177]),new Uint32Array([2139811,2139907,2097284,2105860,2105988,2106116,2106244,2097444,2097604,2097155,10485778,10486344,2106372,6291456,0,0]),new Uint32Array([2110051,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2172385,6291456,2172417,6291456,2172449,6291456,2172481,6291456,2172513,6291456,2172545,6291456,2172577,6291456,2172609,6291456]),new Uint32Array([0,0,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2249345,2249377,2249409,2249441,2249473,2249505,2249537,2249570,2210209,2249633,2249665,2249697,2249729,2249761,2249793,2216769]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2187169,2187201,2187233,2187265,2187297,2187329,2187361,2187393,2187425,2187457,2187489,2187521,2187553,2187585,2187617,2187649]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,6291456,6291456,0,0,0,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2182337,6291456,2182369,6291456,2182401,6291456,2182433,6291456,2182465,6291456,2182497,6291456,2182529,6291456,2182561,6291456]),new Uint32Array([2138179,2138275,2138371,2138467,2134243,2134435,2138563,2138659,2138755,2138851,2138947,2139043,2138947,2138755,2139139,2139235]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2250498,2250562,2250625,2250657,2208321,2250689,2250721,2250753,2250785,2250817,2250849,2218945,2250881,2250913,2250945,0]),new Uint32Array([2170369,2105569,2098305,2108481,2173249,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,0,2108193,0,0,0,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2100897,2100897,2105569,2105569,6291456,2112289,2149826,6291456,6291456,2112481,2112577,2098177,2098177,2098177,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,2169953,2169985,6291456,2170017,6291456,2170049,2170081,6291456,2170113,2170145,2170177,6291456,6291456,2170209,2170241]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220641,2220641,2220673,2220673,2220673,2220673,2220705,2220705,2220705,2220705,2220737,2220737,2220737,2220737,2220769,2220769]),new Uint32Array([2127650,2127746,2127842,2127938,2128034,2128130,2128226,2128322,2128418,2127523,2127619,2127715,2127811,2127907,2128003,2128099]),new Uint32Array([2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177]),new Uint32Array([0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2204705,2204737,2204769,2204801,2204833,2204865,2204897,2204929,2204961,2204993,2205025,2205057,2205089,2205121,2205153,2205185]),new Uint32Array([2176385,6291456,2176417,6291456,2176449,6291456,2176481,6291456,2176513,6291456,2176545,6291456,2176577,6291456,2176609,6291456]),new Uint32Array([2195521,2195553,2195585,2195617,2195649,2195681,2117857,2195713,2195745,2195777,2195809,2195841,2195873,2195905,2195937,2195969]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113]),new Uint32Array([2131586,2132450,2135970,2135778,2161602,2136162,2163650,2161794,2135586,2163714,2137186,2131810,2160290,2135170,2097506,2159554]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,0,0,0,0]),new Uint32Array([2116513,2116609,2116705,2116801,2116897,2116993,2117089,2117185,2117281,2117377,2117473,2117569,2117665,2117761,2117857,2117953]),new Uint32Array([2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100802,2101154,2101282,2101410,2101538,2101666,2101794]),new Uint32Array([2100289,2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2098977,2150241,2150305]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,2109955,6291456,6291456,0,0,0,0]),new Uint32Array([18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,0,0]),new Uint32Array([2130979,2131075,2131075,2131171,2131267,2131363,2131459,2131555,2131651,2131651,2131747,2131843,2131939,2132035,2132131,2132227]),new Uint32Array([0,2177793,6291456,2177825,6291456,2177857,6291456,2177889,6291456,2177921,6291456,2177953,6291456,2177985,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2113345,0,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2136643,2136739,2136835,2136931,2137027,2137123,2137219,2137315,2137411,2137507,2137603,2137699,2137795,2137891,2137987,2138083]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2174433,6291456,2174465,6291456,2174497,6291456,2174529,6291456,2174561,6291456,2174593,6291456,2174625,6291456,2174657,6291456]),new Uint32Array([0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([10496547,10496643,2105505,2149698,6291456,10496739,10496835,2170273,6291456,2149762,2105825,2111713,2111713,2111713,2111713,2168673]),new Uint32Array([6291456,2143490,2143490,2143490,2171649,6291456,2171681,2171713,2171745,6291456,2171777,6291456,2171809,6291456,2171841,6291456]),new Uint32Array([2159106,2159106,2159170,2159170,2159234,2159234,2159298,2159298,2159298,2159362,2159362,2159362,2106401,2106401,2106401,2106401]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137]),new Uint32Array([2108417,2181217,2181249,2181281,2170433,2170401,2181313,2181345,2181377,2181409,2181441,2181473,2181505,2181537,2170529,2181569]),new Uint32Array([2218433,2245761,2245793,2245825,2245857,2245890,2245953,2245986,2209665,2246050,2246113,2246146,2246210,2246274,2246337,2246369]),new Uint32Array([2230754,2230818,2230882,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184129,6291456,2184161,6291456,2184193,6291456,6291456,6291456,6291456,6291456,2146818,2183361,6291456,6291456,2142978,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2135170,2097506,2130691,2130787,2130883,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122]),new Uint32Array([2108515,2108611,2100740,2108707,2108803,2108899,2108995,2109091,2109187,2109283,2109379,2109475,2109571,2109667,2109763,2100738]),new Uint32Array([2102788,2102916,2103044,2120515,2103172,2120611,2120707,2098373,2103300,2120803,2120899,2120995,2103428,2103556,2121091,2121187]),new Uint32Array([2158082,2158146,0,2158210,2158274,0,2158338,2158402,2158466,2129922,2158530,2158594,2158658,2158722,2158786,2158850]),new Uint32Array([10499619,10499715,10499811,10499907,10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059]),new Uint32Array([2239585,2239618,2239681,2239713,0,2191969,2239745,2239777,2192033,2239809,2239841,2239874,2239937,2239970,2240033,2240065]),new Uint32Array([2252705,2252738,2252801,2252833,2252865,2252897,2252930,2252994,2253057,2253089,2253121,2253154,2253217,2253250,2219361,2219361]),new Uint32Array([2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,10538050,10538114,10538178,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2226402,2226466,2226530,2226594,2226658,2226722,2226786,2226850,2226914,2226978,2227042,2227106,2227170,2227234,2227298,2227362]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,2144066,2144130,2144194,2144258,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2124674,2124770,2123875,2123971,2124067,2124163,2124259,2124355,2124451,2124547,2124643,2124739,2124835,2124931,2125027,2125123]),new Uint32Array([2168065,6291456,2168097,6291456,2168129,6291456,2168161,6291456,2168193,6291456,2168225,6291456,2168257,6291456,2168289,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2100610,2100611,6291456,2107842,2107843,6291456,6291456,6291456,6291456,10537922,6291456,10537986,6291456]),new Uint32Array([2174849,2174881,2174913,2174945,2174977,2175009,2175041,2175073,2175105,2175137,2175169,2175201,2175233,2175265,2175297,2175329]),new Uint32Array([2154562,2154626,2154690,2154754,2141858,2154818,2154882,2127298,2154946,2127298,2155010,2155074,2155138,2155202,2155266,2155202]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0]),new Uint32Array([2200641,2150786,2150850,2150914,2150978,2151042,2106562,2151106,2150562,2151170,2151234,2151298,2151362,2151426,2151490,2151554]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456]),new Uint32Array([2220289,2220289,2220321,2220321,2220321,2220321,2220353,2220353,2220353,2220353,2220385,2220385,2220385,2220385,2220417,2220417]),new Uint32Array([2155330,2155394,0,2155458,2155522,2155586,2105732,0,2155650,2155714,2155778,2125314,2155842,2155906,2126274,2155970]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0]),new Uint32Array([2097729,2106017,2106017,2106017,2106017,2131297,2131297,2131297,2131297,2106081,2106081,2162049,2162049,2105953,2105953,2162337]),new Uint32Array([2097185,2097697,2097697,2097697,2097697,2135777,2135777,2135777,2135777,2097377,2097377,2097377,2097377,2097601,2097601,2097217]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([2139331,2139427,2139523,2139043,2133571,2132611,2139619,2139715,0,0,0,0,0,0,0,0]),new Uint32Array([2174113,2174145,2100897,2098177,2108289,2100865,2173601,2173633,2173985,2174113,2174145,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,23068672,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,18923778,23068672,23068672,23068672,23068672,18923842,23068672,23068672,23068672,23068672,18923906,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,0,2133857,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2177537,6291456,2177569,6291456,2177601,6291456,2177633,6291456,2177665,6291456,2177697,6291456,2177729,6291456,2177761,6291456]),new Uint32Array([2212481,2212513,2212545,2212577,2197121,2212609,2212641,2212673,2212705,2212737,2212769,2212801,2212833,2212865,2212897,2212929]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2098241,2108353,2170209,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,6291456,2108193,2172417,2112481,2098177]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456])],t=new Uint16Array([616,616,565,147,161,411,330,2,131,131,328,454,241,408,86,86,696,113,285,350,325,301,473,214,639,232,447,64,369,598,124,672,567,223,621,154,107,86,86,86,86,86,86,505,86,68,634,86,218,218,218,218,486,218,218,513,188,608,216,86,217,463,668,85,700,360,184,86,86,86,647,402,153,10,346,718,662,260,145,298,117,1,443,342,138,54,563,86,240,572,218,70,387,86,118,460,641,602,86,86,306,218,86,692,86,86,86,86,86,162,707,86,458,26,86,218,638,86,86,86,86,86,65,449,86,86,306,183,86,58,391,667,86,157,131,131,131,131,86,433,131,406,31,218,247,86,86,693,218,581,351,86,438,295,69,462,45,126,173,650,14,295,69,97,168,187,641,78,523,390,69,108,287,664,173,219,83,295,69,108,431,426,173,694,412,115,628,52,257,398,641,118,501,121,69,579,151,423,173,620,464,121,69,382,151,476,173,27,53,121,86,594,578,226,173,86,632,130,86,96,228,268,641,622,563,86,86,21,148,650,131,131,321,43,144,343,381,531,131,131,178,20,86,399,156,375,164,541,30,60,715,198,92,118,131,131,86,86,306,407,86,280,457,196,488,358,131,131,244,86,86,143,86,86,86,86,86,667,563,86,86,86,86,86,86,86,86,86,86,86,86,86,336,363,86,86,336,86,86,380,678,67,86,86,86,678,86,86,86,512,86,307,86,708,86,86,86,86,86,528,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,563,307,86,86,86,86,86,104,450,337,86,720,86,32,450,397,86,86,86,587,218,558,708,708,293,708,86,86,86,86,86,694,205,86,8,86,86,86,86,549,86,667,697,697,679,86,458,460,86,86,650,86,708,543,86,86,86,245,86,86,86,140,218,127,708,708,458,197,131,131,131,131,500,86,86,483,251,86,306,510,515,86,722,86,86,86,65,201,86,86,483,580,470,86,86,86,368,131,131,131,694,114,110,555,86,86,123,721,163,142,713,418,86,317,675,209,218,218,218,371,545,592,629,490,603,199,46,320,525,680,310,279,388,111,42,252,593,607,235,617,410,377,50,548,135,356,17,520,189,116,392,600,349,332,482,699,690,535,119,106,451,71,152,667,131,218,218,265,671,637,492,504,533,683,269,269,658,86,86,86,86,86,86,86,86,86,491,619,86,86,6,86,86,86,86,86,86,86,86,86,86,86,229,86,86,86,86,86,86,86,86,86,86,86,86,667,86,86,171,131,118,131,656,206,234,571,89,334,670,246,311,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,534,86,86,86,86,86,86,82,86,86,86,86,86,430,86,86,86,86,86,86,86,86,86,599,86,324,86,470,69,640,264,131,626,101,174,86,86,667,233,105,73,374,394,221,204,84,28,326,86,86,471,86,86,86,109,573,86,171,200,200,200,200,218,218,86,86,86,86,460,131,131,131,86,506,86,86,86,86,86,220,404,34,614,47,442,305,25,612,338,601,648,7,344,255,131,131,51,86,312,507,563,86,86,86,86,588,86,86,86,86,86,530,511,86,458,3,435,384,556,522,230,527,86,118,86,86,717,86,137,273,79,181,484,23,93,112,655,249,417,703,370,87,98,313,684,585,155,465,596,481,695,18,416,428,61,701,706,282,643,495,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,86,86,86,171,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,650,131,422,542,420,263,24,172,86,86,86,86,86,566,86,86,132,540,395,353,494,519,19,485,284,472,131,131,131,16,714,86,211,708,86,86,86,694,698,86,86,483,704,708,218,272,86,86,120,86,159,478,86,307,247,86,86,663,597,459,627,667,86,86,277,455,39,302,86,250,86,86,86,271,99,452,306,281,329,400,200,86,86,362,549,352,646,461,323,586,86,86,4,708,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,717,86,518,86,86,650,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,125,554,480,300,613,72,333,288,561,544,604,48,719,91,169,176,590,224,76,191,29,559,560,231,537,166,477,538,256,437,131,131,469,167,40,0,685,266,441,705,239,642,475,568,640,610,299,673,517,318,385,22,202,180,179,359,424,215,90,66,521,653,467,682,453,409,479,88,131,661,35,303,15,262,666,630,712,131,131,618,659,175,218,195,347,193,227,261,150,165,709,546,294,569,710,270,413,376,524,55,242,38,419,529,170,657,3,304,122,379,278,131,651,86,67,576,458,458,131,131,86,86,86,86,86,86,86,118,309,86,86,547,86,86,86,86,667,650,664,131,131,86,86,56,131,131,131,131,131,131,131,131,86,307,86,86,86,664,238,650,86,86,717,86,118,86,86,315,86,59,86,86,574,549,131,131,340,57,436,86,86,86,86,86,86,458,708,499,691,62,86,650,86,86,694,86,86,86,319,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,86,549,694,131,131,131,131,131,131,131,131,131,77,86,86,139,86,502,86,86,86,667,595,131,131,131,86,12,86,13,86,609,131,131,131,131,86,86,86,625,86,669,86,86,182,129,86,5,694,104,86,86,86,86,131,131,86,86,386,171,86,86,86,345,86,324,86,589,86,213,36,131,131,131,131,131,86,86,86,86,104,131,131,131,141,290,80,677,86,86,86,267,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,515,86,86,33,136,669,86,711,515,86,86,550,640,86,104,708,515,86,159,372,717,86,86,444,515,86,86,663,37,86,563,460,86,390,624,702,131,131,131,131,389,59,708,86,86,341,208,708,635,295,69,108,431,508,100,190,131,131,131,131,131,131,131,131,86,86,86,649,516,660,131,131,86,86,86,218,631,708,131,131,131,131,131,131,131,131,131,131,86,86,341,575,238,514,131,131,86,86,86,218,291,708,307,131,86,86,306,367,708,131,131,131,86,378,697,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,615,253,86,86,86,292,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,104,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,69,86,341,553,549,86,307,86,86,645,275,455,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,708,131,131,131,131,131,131,86,86,86,86,86,86,667,460,86,86,86,86,86,86,86,86,86,86,86,86,717,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,104,86,667,459,131,131,131,131,131,131,86,458,225,86,86,86,516,549,11,390,405,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,460,44,218,197,711,515,131,131,131,131,664,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,118,307,104,286,591,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,681,86,86,75,185,314,582,86,358,496,474,86,104,131,86,86,86,86,146,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,171,86,640,131,131,131,131,131,131,131,131,246,503,689,339,674,81,258,415,439,128,562,366,414,246,503,689,583,222,557,316,636,665,186,355,95,670,246,503,689,339,674,557,258,415,439,186,355,95,670,246,503,689,446,644,536,652,331,532,335,440,274,421,297,570,74,425,364,425,606,552,403,509,134,365,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,218,218,218,498,218,218,577,627,551,497,572,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,553,354,236,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,296,455,131,131,456,243,103,86,41,459,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,9,276,158,716,393,564,383,489,401,654,210,654,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,650,86,86,86,86,86,86,717,667,563,563,563,86,549,102,686,133,246,605,86,448,86,86,207,307,131,131,131,641,86,177,611,445,373,194,584,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,307,171,86,86,86,86,86,86,86,717,86,86,86,86,86,460,131,131,650,86,86,86,694,708,86,86,694,86,458,131,131,131,131,131,131,667,694,289,650,667,131,131,86,640,131,131,664,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,460,86,86,86,86,86,86,86,86,86,86,86,86,86,458,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,466,203,149,429,94,432,160,687,539,63,237,283,192,248,348,259,427,526,396,676,254,468,487,212,327,623,49,633,322,493,434,688,357,361,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131]),{mapStr:"\u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064a\u0647 \u0648\u0633\u0644\u0645\u062c\u0644 \u062c\u0644\u0627\u0644\u0647\u30ad\u30ed\u30e1\u30fc\u30c8\u30ebrad\u2215s2\u30a8\u30b9\u30af\u30fc\u30c9\u30ad\u30ed\u30b0\u30e9\u30e0\u30ad\u30ed\u30ef\u30c3\u30c8\u30b0\u30e9\u30e0\u30c8\u30f3\u30af\u30eb\u30bc\u30a4\u30ed\u30b5\u30f3\u30c1\u30fc\u30e0\u30d1\u30fc\u30bb\u30f3\u30c8\u30d4\u30a2\u30b9\u30c8\u30eb\u30d5\u30a1\u30e9\u30c3\u30c9\u30d6\u30c3\u30b7\u30a7\u30eb\u30d8\u30af\u30bf\u30fc\u30eb\u30de\u30f3\u30b7\u30e7\u30f3\u30df\u30ea\u30d0\u30fc\u30eb\u30ec\u30f3\u30c8\u30b2\u30f3\u2032\u2032\u2032\u20321\u204410viii(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)\u222b\u222b\u222b\u222b(\uc624\uc804)(\uc624\ud6c4)\u30a2\u30d1\u30fc\u30c8\u30a2\u30eb\u30d5\u30a1\u30a2\u30f3\u30da\u30a2\u30a4\u30cb\u30f3\u30b0\u30a8\u30fc\u30ab\u30fc\u30ab\u30e9\u30c3\u30c8\u30ab\u30ed\u30ea\u30fc\u30ad\u30e5\u30ea\u30fc\u30ae\u30eb\u30c0\u30fc\u30af\u30ed\u30fc\u30cd\u30b5\u30a4\u30af\u30eb\u30b7\u30ea\u30f3\u30b0\u30d0\u30fc\u30ec\u30eb\u30d5\u30a3\u30fc\u30c8\u30dd\u30a4\u30f3\u30c8\u30de\u30a4\u30af\u30ed\u30df\u30af\u30ed\u30f3\u30e1\u30ac\u30c8\u30f3\u30ea\u30c3\u30c8\u30eb\u30eb\u30fc\u30d6\u30eb\u682a\u5f0f\u4f1a\u793ekcalm\u2215s2c\u2215kg\u0627\u0643\u0628\u0631\u0645\u062d\u0645\u062f\u0635\u0644\u0639\u0645\u0631\u0633\u0648\u0644\u0631\u06cc\u0627\u06441\u204441\u204423\u20444 \u0308\u0301\u0fb2\u0f71\u0f80\u0fb3\u0f71\u0f80 \u0308\u0342 \u0313\u0300 \u0313\u0301 \u0313\u0342 \u0314\u0300 \u0314\u0301 \u0314\u0342 \u0308\u0300\u2035\u2035\u2035a/ca/sc/oc/utelfax1\u204471\u204491\u204432\u204431\u204452\u204453\u204454\u204451\u204465\u204461\u204483\u204485\u204487\u20448xii0\u20443\u222e\u222e\u222e(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)::====(\u1100)(\u1102)(\u1103)(\u1105)(\u1106)(\u1107)(\u1109)(\u110b)(\u110c)(\u110e)(\u110f)(\u1110)(\u1111)(\u1112)(\uac00)(\ub098)(\ub2e4)(\ub77c)(\ub9c8)(\ubc14)(\uc0ac)(\uc544)(\uc790)(\ucc28)(\uce74)(\ud0c0)(\ud30c)(\ud558)(\uc8fc)(\u4e00)(\u4e8c)(\u4e09)(\u56db)(\u4e94)(\u516d)(\u4e03)(\u516b)(\u4e5d)(\u5341)(\u6708)(\u706b)(\u6c34)(\u6728)(\u91d1)(\u571f)(\u65e5)(\u682a)(\u6709)(\u793e)(\u540d)(\u7279)(\u8ca1)(\u795d)(\u52b4)(\u4ee3)(\u547c)(\u5b66)(\u76e3)(\u4f01)(\u8cc7)(\u5354)(\u796d)(\u4f11)(\u81ea)(\u81f3)pte10\u670811\u670812\u6708ergltd\u30a2\u30fc\u30eb\u30a4\u30f3\u30c1\u30a6\u30a9\u30f3\u30aa\u30f3\u30b9\u30aa\u30fc\u30e0\u30ab\u30a4\u30ea\u30ac\u30ed\u30f3\u30ac\u30f3\u30de\u30ae\u30cb\u30fc\u30b1\u30fc\u30b9\u30b3\u30eb\u30ca\u30b3\u30fc\u30dd\u30bb\u30f3\u30c1\u30c0\u30fc\u30b9\u30ce\u30c3\u30c8\u30cf\u30a4\u30c4\u30d1\u30fc\u30c4\u30d4\u30af\u30eb\u30d5\u30e9\u30f3\u30da\u30cb\u30d2\u30d8\u30eb\u30c4\u30da\u30f3\u30b9\u30da\u30fc\u30b8\u30d9\u30fc\u30bf\u30dc\u30eb\u30c8\u30dd\u30f3\u30c9\u30db\u30fc\u30eb\u30db\u30fc\u30f3\u30de\u30a4\u30eb\u30de\u30c3\u30cf\u30de\u30eb\u30af\u30e4\u30fc\u30c9\u30e4\u30fc\u30eb\u30e6\u30a2\u30f3\u30eb\u30d4\u30fc10\u70b911\u70b912\u70b913\u70b914\u70b915\u70b916\u70b917\u70b918\u70b919\u70b920\u70b921\u70b922\u70b923\u70b924\u70b9hpabardm2dm3khzmhzghzthzmm2cm2km2mm3cm3km3kpampagpalogmilmolppmv\u2215ma\u2215m10\u65e511\u65e512\u65e513\u65e514\u65e515\u65e516\u65e517\u65e518\u65e519\u65e520\u65e521\u65e522\u65e523\u65e524\u65e525\u65e526\u65e527\u65e528\u65e529\u65e530\u65e531\u65e5galffiffl\u05e9\u05bc\u05c1\u05e9\u05bc\u05c2 \u064c\u0651 \u064d\u0651 \u064e\u0651 \u064f\u0651 \u0650\u0651 \u0651\u0670\u0640\u064e\u0651\u0640\u064f\u0651\u0640\u0650\u0651\u062a\u062c\u0645\u062a\u062d\u062c\u062a\u062d\u0645\u062a\u062e\u0645\u062a\u0645\u062c\u062a\u0645\u062d\u062a\u0645\u062e\u062c\u0645\u062d\u062d\u0645\u064a\u062d\u0645\u0649\u0633\u062d\u062c\u0633\u062c\u062d\u0633\u062c\u0649\u0633\u0645\u062d\u0633\u0645\u062c\u0633\u0645\u0645\u0635\u062d\u062d\u0635\u0645\u0645\u0634\u062d\u0645\u0634\u062c\u064a\u0634\u0645\u062e\u0634\u0645\u0645\u0636\u062d\u0649\u0636\u062e\u0645\u0637\u0645\u062d\u0637\u0645\u0645\u0637\u0645\u064a\u0639\u062c\u0645\u0639\u0645\u0645\u0639\u0645\u0649\u063a\u0645\u0645\u063a\u0645\u064a\u063a\u0645\u0649\u0641\u062e\u0645\u0642\u0645\u062d\u0642\u0645\u0645\u0644\u062d\u0645\u0644\u062d\u064a\u0644\u062d\u0649\u0644\u062c\u062c\u0644\u062e\u0645\u0644\u0645\u062d\u0645\u062d\u062c\u0645\u062d\u064a\u0645\u062c\u062d\u0645\u062c\u0645\u0645\u062e\u0645\u0645\u062c\u062e\u0647\u0645\u062c\u0647\u0645\u0645\u0646\u062d\u0645\u0646\u062d\u0649\u0646\u062c\u0645\u0646\u062c\u0649\u0646\u0645\u064a\u0646\u0645\u0649\u064a\u0645\u0645\u0628\u062e\u064a\u062a\u062c\u064a\u062a\u062c\u0649\u062a\u062e\u064a\u062a\u062e\u0649\u062a\u0645\u064a\u062a\u0645\u0649\u062c\u0645\u064a\u062c\u062d\u0649\u062c\u0645\u0649\u0633\u062e\u0649\u0635\u062d\u064a\u0634\u062d\u064a\u0636\u062d\u064a\u0644\u062c\u064a\u0644\u0645\u064a\u064a\u062d\u064a\u064a\u062c\u064a\u064a\u0645\u064a\u0645\u0645\u064a\u0642\u0645\u064a\u0646\u062d\u064a\u0639\u0645\u064a\u0643\u0645\u064a\u0646\u062c\u062d\u0645\u062e\u064a\u0644\u062c\u0645\u0643\u0645\u0645\u062c\u062d\u064a\u062d\u062c\u064a\u0645\u062c\u064a\u0641\u0645\u064a\u0628\u062d\u064a\u0633\u062e\u064a\u0646\u062c\u064a\u0635\u0644\u06d2\u0642\u0644\u06d2\ud834\udd58\ud834\udd65\ud834\udd6e\ud834\udd58\ud834\udd65\ud834\udd6f\ud834\udd58\ud834\udd65\ud834\udd70\ud834\udd58\ud834\udd65\ud834\udd71\ud834\udd58\ud834\udd65\ud834\udd72\ud834\uddb9\ud834\udd65\ud834\udd6e\ud834\uddba\ud834\udd65\ud834\udd6e\ud834\uddb9\ud834\udd65\ud834\udd6f\ud834\uddba\ud834\udd65\ud834\udd6f\u3014s\u3015ppv\u3014\u672c\u3015\u3014\u4e09\u3015\u3014\u4e8c\u3015\u3014\u5b89\u3015\u3014\u70b9\u3015\u3014\u6253\u3015\u3014\u76d7\u3015\u3014\u52dd\u3015\u3014\u6557\u3015 \u0304 \u0301 \u0327ssi\u0307ijl\xb7\u02bcnd\u017eljnjdz \u0306 \u0307 \u030a \u0328 \u0303 \u030b \u03b9\u0565\u0582\u0627\u0674\u0648\u0674\u06c7\u0674\u064a\u0674\u0915\u093c\u0916\u093c\u0917\u093c\u091c\u093c\u0921\u093c\u0922\u093c\u092b\u093c\u092f\u093c\u09a1\u09bc\u09a2\u09bc\u09af\u09bc\u0a32\u0a3c\u0a38\u0a3c\u0a16\u0a3c\u0a17\u0a3c\u0a1c\u0a3c\u0a2b\u0a3c\u0b21\u0b3c\u0b22\u0b3c\u0e4d\u0e32\u0ecd\u0eb2\u0eab\u0e99\u0eab\u0ea1\u0f42\u0fb7\u0f4c\u0fb7\u0f51\u0fb7\u0f56\u0fb7\u0f5b\u0fb7\u0f40\u0fb5\u0f71\u0f72\u0f71\u0f74\u0fb2\u0f80\u0fb3\u0f80\u0f92\u0fb7\u0f9c\u0fb7\u0fa1\u0fb7\u0fa6\u0fb7\u0fab\u0fb7\u0f90\u0fb5a\u02be\u1f00\u03b9\u1f01\u03b9\u1f02\u03b9\u1f03\u03b9\u1f04\u03b9\u1f05\u03b9\u1f06\u03b9\u1f07\u03b9\u1f20\u03b9\u1f21\u03b9\u1f22\u03b9\u1f23\u03b9\u1f24\u03b9\u1f25\u03b9\u1f26\u03b9\u1f27\u03b9\u1f60\u03b9\u1f61\u03b9\u1f62\u03b9\u1f63\u03b9\u1f64\u03b9\u1f65\u03b9\u1f66\u03b9\u1f67\u03b9\u1f70\u03b9\u03b1\u03b9\u03ac\u03b9\u1fb6\u03b9 \u0342\u1f74\u03b9\u03b7\u03b9\u03ae\u03b9\u1fc6\u03b9\u1f7c\u03b9\u03c9\u03b9\u03ce\u03b9\u1ff6\u03b9 \u0333!! \u0305???!!?rs\xb0c\xb0fnosmtmivix\u2add\u0338 \u3099 \u309a\u3088\u308a\u30b3\u30c8333435\ucc38\uace0\uc8fc\uc758363738394042444546474849503\u67084\u67085\u67086\u67087\u67088\u67089\u6708hgev\u30ae\u30ac\u30c7\u30b7\u30c9\u30eb\u30ca\u30ce\u30d4\u30b3\u30d3\u30eb\u30da\u30bd\u30db\u30f3\u30ea\u30e9\u30ec\u30e0daauovpciu\u5e73\u6210\u662d\u548c\u5927\u6b63\u660e\u6cbbna\u03bcakakbmbgbpfnf\u03bcf\u03bcgmg\u03bclmldlklfmnm\u03bcmpsns\u03bcsmsnv\u03bcvkvpwnw\u03bcwmwkwk\u03c9m\u03c9bqcccddbgyhainkkktlnlxphprsrsvwbst\u0574\u0576\u0574\u0565\u0574\u056b\u057e\u0576\u0574\u056d\u05d9\u05b4\u05f2\u05b7\u05e9\u05c1\u05e9\u05c2\u05d0\u05b7\u05d0\u05b8\u05d0\u05bc\u05d1\u05bc\u05d2\u05bc\u05d3\u05bc\u05d4\u05bc\u05d5\u05bc\u05d6\u05bc\u05d8\u05bc\u05d9\u05bc\u05da\u05bc\u05db\u05bc\u05dc\u05bc\u05de\u05bc\u05e0\u05bc\u05e1\u05bc\u05e3\u05bc\u05e4\u05bc\u05e6\u05bc\u05e7\u05bc\u05e8\u05bc\u05ea\u05bc\u05d5\u05b9\u05d1\u05bf\u05db\u05bf\u05e4\u05bf\u05d0\u05dc\u0626\u0627\u0626\u06d5\u0626\u0648\u0626\u06c7\u0626\u06c6\u0626\u06c8\u0626\u06d0\u0626\u0649\u0626\u062c\u0626\u062d\u0626\u0645\u0626\u064a\u0628\u062c\u0628\u0645\u0628\u0649\u0628\u064a\u062a\u0649\u062a\u064a\u062b\u062c\u062b\u0645\u062b\u0649\u062b\u064a\u062e\u062d\u0636\u062c\u0636\u0645\u0637\u062d\u0638\u0645\u063a\u062c\u0641\u062c\u0641\u062d\u0641\u0649\u0641\u064a\u0642\u062d\u0642\u0649\u0642\u064a\u0643\u0627\u0643\u062c\u0643\u062d\u0643\u062e\u0643\u0644\u0643\u0649\u0643\u064a\u0646\u062e\u0646\u0649\u0646\u064a\u0647\u062c\u0647\u0649\u0647\u064a\u064a\u0649\u0630\u0670\u0631\u0670\u0649\u0670\u0626\u0631\u0626\u0632\u0626\u0646\u0628\u0632\u0628\u0646\u062a\u0631\u062a\u0632\u062a\u0646\u062b\u0631\u062b\u0632\u062b\u0646\u0645\u0627\u0646\u0631\u0646\u0632\u0646\u0646\u064a\u0631\u064a\u0632\u0626\u062e\u0626\u0647\u0628\u0647\u062a\u0647\u0635\u062e\u0646\u0647\u0647\u0670\u062b\u0647\u0633\u0647\u0634\u0647\u0637\u0649\u0637\u064a\u0639\u0649\u0639\u064a\u063a\u0649\u063a\u064a\u0633\u0649\u0633\u064a\u0634\u0649\u0634\u064a\u0635\u0649\u0635\u064a\u0636\u0649\u0636\u064a\u0634\u062e\u0634\u0631\u0633\u0631\u0635\u0631\u0636\u0631\u0627\u064b \u064b\u0640\u064b\u0640\u0651 \u0652\u0640\u0652\u0644\u0622\u0644\u0623\u0644\u0625\ud834\udd57\ud834\udd650,1,2,3,4,5,6,7,8,9,wzhvsdwcmcmddj\u307b\u304b\u30b3\u30b3\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0135\u0137\u013a\u013c\u013e\u0142\u0144\u0146\u0148\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\xff\u017a\u017c\u0253\u0183\u0185\u0254\u0188\u0256\u0257\u018c\u01dd\u0259\u025b\u0192\u0260\u0263\u0269\u0268\u0199\u026f\u0272\u0275\u01a1\u01a3\u01a5\u0280\u01a8\u0283\u01ad\u0288\u01b0\u028a\u028b\u01b4\u01b6\u0292\u01b9\u01bd\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef\u01f5\u0195\u01bf\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u019e\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233\u2c65\u023c\u019a\u2c66\u0242\u0180\u0289\u028c\u0247\u0249\u024b\u024d\u024f\u0266\u0279\u027b\u0281\u0295\u0371\u0373\u02b9\u0377;\u03f3\u03ad\u03af\u03cc\u03cd\u03b2\u03b3\u03b4\u03b5\u03b6\u03b8\u03ba\u03bb\u03bd\u03be\u03bf\u03c0\u03c1\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03ca\u03cb\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef\u03f8\u03fb\u037b\u037c\u037d\u0450\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045a\u045b\u045c\u045d\u045e\u045f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0529\u052b\u052d\u052f\u0561\u0562\u0563\u0564\u0566\u0567\u0568\u0569\u056a\u056c\u056e\u056f\u0570\u0571\u0572\u0573\u0575\u0577\u0578\u0579\u057a\u057b\u057c\u057d\u057f\u0580\u0581\u0583\u0584\u0585\u0586\u0f0b\u2d27\u2d2d\u10dc\u13f0\u13f1\u13f2\u13f3\u13f4\u13f5\ua64b\u0250\u0251\u1d02\u025c\u1d16\u1d17\u1d1d\u1d25\u0252\u0255\u025f\u0261\u0265\u026a\u1d7b\u029d\u026d\u1d85\u029f\u0271\u0270\u0273\u0274\u0278\u0282\u01ab\u1d1c\u0290\u0291\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff\u1f10\u1f11\u1f12\u1f13\u1f14\u1f15\u1f30\u1f31\u1f32\u1f33\u1f34\u1f35\u1f36\u1f37\u1f40\u1f41\u1f42\u1f43\u1f44\u1f45\u1f51\u1f53\u1f55\u1f57\u1fb0\u1fb1\u1f72\u0390\u1fd0\u1fd1\u1f76\u03b0\u1fe0\u1fe1\u1f7a\u1fe5`\u1f78\u2010+\u2212\u2211\u3008\u3009\u2c30\u2c31\u2c32\u2c33\u2c34\u2c35\u2c36\u2c37\u2c38\u2c39\u2c3a\u2c3b\u2c3c\u2c3d\u2c3e\u2c3f\u2c40\u2c41\u2c42\u2c43\u2c44\u2c45\u2c46\u2c47\u2c48\u2c49\u2c4a\u2c4b\u2c4c\u2c4d\u2c4e\u2c4f\u2c50\u2c51\u2c52\u2c53\u2c54\u2c55\u2c56\u2c57\u2c58\u2c59\u2c5a\u2c5b\u2c5c\u2c5d\u2c5e\u2c61\u026b\u1d7d\u027d\u2c68\u2c6a\u2c6c\u2c73\u2c76\u023f\u0240\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3\u2cec\u2cee\u2cf3\u2d61\u6bcd\u9f9f\u4e28\u4e36\u4e3f\u4e59\u4e85\u4ea0\u4eba\u513f\u5165\u5182\u5196\u51ab\u51e0\u51f5\u5200\u529b\u52f9\u5315\u531a\u5338\u535c\u5369\u5382\u53b6\u53c8\u53e3\u56d7\u58eb\u5902\u590a\u5915\u5973\u5b50\u5b80\u5bf8\u5c0f\u5c22\u5c38\u5c6e\u5c71\u5ddb\u5de5\u5df1\u5dfe\u5e72\u5e7a\u5e7f\u5ef4\u5efe\u5f0b\u5f13\u5f50\u5f61\u5f73\u5fc3\u6208\u6236\u624b\u652f\u6534\u6587\u6597\u65a4\u65b9\u65e0\u66f0\u6b20\u6b62\u6b79\u6bb3\u6bcb\u6bd4\u6bdb\u6c0f\u6c14\u722a\u7236\u723b\u723f\u7247\u7259\u725b\u72ac\u7384\u7389\u74dc\u74e6\u7518\u751f\u7528\u7530\u758b\u7592\u7676\u767d\u76ae\u76bf\u76ee\u77db\u77e2\u77f3\u793a\u79b8\u79be\u7a74\u7acb\u7af9\u7c73\u7cf8\u7f36\u7f51\u7f8a\u7fbd\u8001\u800c\u8012\u8033\u807f\u8089\u81e3\u81fc\u820c\u821b\u821f\u826e\u8272\u8278\u864d\u866b\u8840\u884c\u8863\u897e\u898b\u89d2\u8a00\u8c37\u8c46\u8c55\u8c78\u8c9d\u8d64\u8d70\u8db3\u8eab\u8eca\u8f9b\u8fb0\u8fb5\u9091\u9149\u91c6\u91cc\u9577\u9580\u961c\u96b6\u96b9\u96e8\u9751\u975e\u9762\u9769\u97cb\u97ed\u97f3\u9801\u98a8\u98db\u98df\u9996\u9999\u99ac\u9aa8\u9ad8\u9adf\u9b25\u9b2f\u9b32\u9b3c\u9b5a\u9ce5\u9e75\u9e7f\u9ea5\u9ebb\u9ec3\u9ecd\u9ed1\u9ef9\u9efd\u9f0e\u9f13\u9f20\u9f3b\u9f4a\u9f52\u9f8d\u9f9c\u9fa0.\u3012\u5344\u5345\u1101\u11aa\u11ac\u11ad\u1104\u11b0\u11b1\u11b2\u11b3\u11b4\u11b5\u111a\u1108\u1121\u110a\u110d\u1161\u1162\u1163\u1164\u1165\u1166\u1167\u1168\u1169\u116a\u116b\u116c\u116d\u116e\u116f\u1170\u1171\u1172\u1173\u1174\u1175\u1114\u1115\u11c7\u11c8\u11cc\u11ce\u11d3\u11d7\u11d9\u111c\u11dd\u11df\u111d\u111e\u1120\u1122\u1123\u1127\u1129\u112b\u112c\u112d\u112e\u112f\u1132\u1136\u1140\u1147\u114c\u11f1\u11f2\u1157\u1158\u1159\u1184\u1185\u1188\u1191\u1192\u1194\u119e\u11a1\u4e0a\u4e2d\u4e0b\u7532\u4e19\u4e01\u5929\u5730\u554f\u5e7c\u7b8f\uc6b0\u79d8\u7537\u9069\u512a\u5370\u6ce8\u9805\u5199\u5de6\u53f3\u533b\u5b97\u591c\u30c6\u30cc\u30e2\u30e8\u30f0\u30f1\u30f2\ua641\ua643\ua645\ua647\ua649\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua699\ua69b\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua77a\ua77c\u1d79\ua77f\ua781\ua783\ua785\ua787\ua78c\ua791\ua793\ua797\ua799\ua79b\ua79d\ua79f\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\u026c\u029e\u0287\uab53\ua7b5\ua7b7\uab37\uab52\u13a0\u13a1\u13a2\u13a3\u13a4\u13a5\u13a6\u13a7\u13a8\u13a9\u13aa\u13ab\u13ac\u13ad\u13ae\u13af\u13b0\u13b1\u13b2\u13b3\u13b4\u13b5\u13b6\u13b7\u13b8\u13b9\u13ba\u13bb\u13bc\u13bd\u13be\u13bf\u13c0\u13c1\u13c2\u13c3\u13c4\u13c5\u13c6\u13c7\u13c8\u13c9\u13ca\u13cb\u13cc\u13cd\u13ce\u13cf\u13d0\u13d1\u13d2\u13d3\u13d4\u13d5\u13d6\u13d7\u13d8\u13d9\u13da\u13db\u13dc\u13dd\u13de\u13df\u13e0\u13e1\u13e2\u13e3\u13e4\u13e5\u13e6\u13e7\u13e8\u13e9\u13ea\u13eb\u13ec\u13ed\u13ee\u13ef\u8c48\u66f4\u8cc8\u6ed1\u4e32\u53e5\u5951\u5587\u5948\u61f6\u7669\u7f85\u863f\u87ba\u88f8\u908f\u6a02\u6d1b\u70d9\u73de\u843d\u916a\u99f1\u4e82\u5375\u6b04\u721b\u862d\u9e1e\u5d50\u6feb\u85cd\u8964\u62c9\u81d8\u881f\u5eca\u6717\u6d6a\u72fc\u90ce\u4f86\u51b7\u52de\u64c4\u6ad3\u7210\u76e7\u8606\u865c\u8def\u9732\u9b6f\u9dfa\u788c\u797f\u7da0\u83c9\u9304\u8ad6\u58df\u5f04\u7c60\u807e\u7262\u78ca\u8cc2\u96f7\u58d8\u5c62\u6a13\u6dda\u6f0f\u7d2f\u7e37\u964b\u52d2\u808b\u51dc\u51cc\u7a1c\u7dbe\u83f1\u9675\u8b80\u62cf\u8afe\u4e39\u5be7\u6012\u7387\u7570\u5317\u78fb\u4fbf\u5fa9\u4e0d\u6ccc\u6578\u7d22\u53c3\u585e\u7701\u8449\u8aaa\u6bba\u6c88\u62fe\u82e5\u63a0\u7565\u4eae\u5169\u51c9\u6881\u7ce7\u826f\u8ad2\u91cf\u52f5\u5442\u5eec\u65c5\u6ffe\u792a\u95ad\u9a6a\u9e97\u9ece\u66c6\u6b77\u8f62\u5e74\u6190\u6200\u649a\u6f23\u7149\u7489\u79ca\u7df4\u806f\u8f26\u84ee\u9023\u934a\u5217\u52a3\u54bd\u70c8\u88c2\u5ec9\u5ff5\u637b\u6bae\u7c3e\u7375\u4ee4\u56f9\u5dba\u601c\u73b2\u7469\u7f9a\u8046\u9234\u96f6\u9748\u9818\u4f8b\u79ae\u91b4\u96b8\u60e1\u4e86\u50da\u5bee\u5c3f\u6599\u71ce\u7642\u84fc\u907c\u6688\u962e\u5289\u677b\u67f3\u6d41\u6e9c\u7409\u7559\u786b\u7d10\u985e\u622e\u9678\u502b\u5d19\u6dea\u8f2a\u5f8b\u6144\u6817\u9686\u5229\u540f\u5c65\u6613\u674e\u68a8\u6ce5\u7406\u75e2\u7f79\u88cf\u88e1\u96e2\u533f\u6eba\u541d\u71d0\u7498\u85fa\u96a3\u9c57\u9e9f\u6797\u6dcb\u81e8\u7b20\u7c92\u72c0\u7099\u8b58\u4ec0\u8336\u523a\u5207\u5ea6\u62d3\u7cd6\u5b85\u6d1e\u66b4\u8f3b\u964d\u5ed3\u5140\u55c0\u585a\u6674\u51de\u732a\u76ca\u793c\u795e\u7965\u798f\u9756\u7cbe\u8612\u8af8\u9038\u90fd\u98ef\u98fc\u9928\u9db4\u90de\u96b7\u4fae\u50e7\u514d\u52c9\u52e4\u5351\u559d\u5606\u5668\u5840\u58a8\u5c64\u6094\u6168\u618e\u61f2\u654f\u65e2\u6691\u6885\u6d77\u6e1a\u6f22\u716e\u722b\u7422\u7891\u7949\u7948\u7950\u7956\u798d\u798e\u7a40\u7a81\u7bc0\u7e09\u7e41\u7f72\u8005\u81ed\u8279\u8457\u8910\u8996\u8b01\u8b39\u8cd3\u8d08\u8fb6\u96e3\u97ff\u983b\u6075\ud850\udeee\u8218\u4e26\u51b5\u5168\u4f80\u5145\u5180\u52c7\u52fa\u5555\u5599\u55e2\u58b3\u5944\u5954\u5a62\u5b28\u5ed2\u5ed9\u5f69\u5fad\u60d8\u614e\u6108\u6160\u6234\u63c4\u641c\u6452\u6556\u671b\u6756\u6edb\u6ecb\u701e\u77a7\u7235\u72af\u7471\u7506\u753b\u761d\u761f\u76db\u76f4\u774a\u7740\u78cc\u7ab1\u7c7b\u7d5b\u7f3e\u8352\u83ef\u8779\u8941\u8986\u8abf\u8acb\u8aed\u8b8a\u8f38\u9072\u9199\u9276\u967c\u97db\u980b\u9b12\ud84a\udc4a\ud84a\udc44\ud84c\udfd5\u3b9d\u4018\u4039\ud854\ude49\ud857\udcd0\ud85f\uded3\u9f43\u9f8e\u05e2\u05dd\u0671\u067b\u067e\u0680\u067a\u067f\u0679\u06a4\u06a6\u0684\u0683\u0686\u0687\u068d\u068c\u068e\u0688\u0698\u0691\u06a9\u06af\u06b3\u06b1\u06ba\u06bb\u06c0\u06c1\u06be\u06d3\u06ad\u06cb\u06c5\u06c9\u3001\u3016\u3017\u2014\u2013_{}\u3010\u3011\u300a\u300b\u300c\u300d\u300e\u300f[]#&*-<>\\$%@\u0621\u0624\u0629\"'^|~\u2985\u2986\u30fb\u30a5\u30e3\xa2\xa3\xac\xa6\xa5\u20a9\u2502\u2190\u2191\u2192\u2193\u25a0\u25cb\ud801\udc28\ud801\udc29\ud801\udc2a\ud801\udc2b\ud801\udc2c\ud801\udc2d\ud801\udc2e\ud801\udc2f\ud801\udc30\ud801\udc31\ud801\udc32\ud801\udc33\ud801\udc34\ud801\udc35\ud801\udc36\ud801\udc37\ud801\udc38\ud801\udc39\ud801\udc3a\ud801\udc3b\ud801\udc3c\ud801\udc3d\ud801\udc3e\ud801\udc3f\ud801\udc40\ud801\udc41\ud801\udc42\ud801\udc43\ud801\udc44\ud801\udc45\ud801\udc46\ud801\udc47\ud801\udc48\ud801\udc49\ud801\udc4a\ud801\udc4b\ud801\udc4c\ud801\udc4d\ud801\udc4e\ud801\udc4f\ud801\udcd8\ud801\udcd9\ud801\udcda\ud801\udcdb\ud801\udcdc\ud801\udcdd\ud801\udcde\ud801\udcdf\ud801\udce0\ud801\udce1\ud801\udce2\ud801\udce3\ud801\udce4\ud801\udce5\ud801\udce6\ud801\udce7\ud801\udce8\ud801\udce9\ud801\udcea\ud801\udceb\ud801\udcec\ud801\udced\ud801\udcee\ud801\udcef\ud801\udcf0\ud801\udcf1\ud801\udcf2\ud801\udcf3\ud801\udcf4\ud801\udcf5\ud801\udcf6\ud801\udcf7\ud801\udcf8\ud801\udcf9\ud801\udcfa\ud801\udcfb\ud803\udcc0\ud803\udcc1\ud803\udcc2\ud803\udcc3\ud803\udcc4\ud803\udcc5\ud803\udcc6\ud803\udcc7\ud803\udcc8\ud803\udcc9\ud803\udcca\ud803\udccb\ud803\udccc\ud803\udccd\ud803\udcce\ud803\udccf\ud803\udcd0\ud803\udcd1\ud803\udcd2\ud803\udcd3\ud803\udcd4\ud803\udcd5\ud803\udcd6\ud803\udcd7\ud803\udcd8\ud803\udcd9\ud803\udcda\ud803\udcdb\ud803\udcdc\ud803\udcdd\ud803\udcde\ud803\udcdf\ud803\udce0\ud803\udce1\ud803\udce2\ud803\udce3\ud803\udce4\ud803\udce5\ud803\udce6\ud803\udce7\ud803\udce8\ud803\udce9\ud803\udcea\ud803\udceb\ud803\udcec\ud803\udced\ud803\udcee\ud803\udcef\ud803\udcf0\ud803\udcf1\ud803\udcf2\ud806\udcc0\ud806\udcc1\ud806\udcc2\ud806\udcc3\ud806\udcc4\ud806\udcc5\ud806\udcc6\ud806\udcc7\ud806\udcc8\ud806\udcc9\ud806\udcca\ud806\udccb\ud806\udccc\ud806\udccd\ud806\udcce\ud806\udccf\ud806\udcd0\ud806\udcd1\ud806\udcd2\ud806\udcd3\ud806\udcd4\ud806\udcd5\ud806\udcd6\ud806\udcd7\ud806\udcd8\ud806\udcd9\ud806\udcda\ud806\udcdb\ud806\udcdc\ud806\udcdd\ud806\udcde\ud806\udcdf\u0131\u0237\u2207\u2202\ud83a\udd22\ud83a\udd23\ud83a\udd24\ud83a\udd25\ud83a\udd26\ud83a\udd27\ud83a\udd28\ud83a\udd29\ud83a\udd2a\ud83a\udd2b\ud83a\udd2c\ud83a\udd2d\ud83a\udd2e\ud83a\udd2f\ud83a\udd30\ud83a\udd31\ud83a\udd32\ud83a\udd33\ud83a\udd34\ud83a\udd35\ud83a\udd36\ud83a\udd37\ud83a\udd38\ud83a\udd39\ud83a\udd3a\ud83a\udd3b\ud83a\udd3c\ud83a\udd3d\ud83a\udd3e\ud83a\udd3f\ud83a\udd40\ud83a\udd41\ud83a\udd42\ud83a\udd43\u066e\u06a1\u066f\u5b57\u53cc\u591a\u89e3\u4ea4\u6620\u7121\u524d\u5f8c\u518d\u65b0\u521d\u7d42\u8ca9\u58f0\u5439\u6f14\u6295\u6355\u904a\u6307\u7981\u7a7a\u5408\u6e80\u7533\u5272\u55b6\u914d\u5f97\u53ef\u4e3d\u4e38\u4e41\ud840\udd22\u4f60\u4fbb\u5002\u507a\u5099\u50cf\u349e\ud841\ude3a\u5154\u5164\u5177\ud841\udd1c\u34b9\u5167\ud841\udd4b\u5197\u51a4\u4ecc\u51ac\ud864\udddf\u5203\u34df\u523b\u5246\u5277\u3515\u5305\u5306\u5349\u535a\u5373\u537d\u537f\ud842\ude2c\u7070\u53ca\u53df\ud842\udf63\u53eb\u53f1\u5406\u549e\u5438\u5448\u5468\u54a2\u54f6\u5510\u5553\u5563\u5584\u55ab\u55b3\u55c2\u5716\u5717\u5651\u5674\u58ee\u57ce\u57f4\u580d\u578b\u5832\u5831\u58ac\ud845\udce4\u58f2\u58f7\u5906\u5922\u5962\ud845\udea8\ud845\udeea\u59ec\u5a1b\u5a27\u59d8\u5a66\u36ee\u5b08\u5b3e\ud846\uddc8\u5bc3\u5bd8\u5bf3\ud846\udf18\u5bff\u5c06\u3781\u5c60\u5cc0\u5c8d\ud847\udde4\u5d43\ud847\udde6\u5d6e\u5d6b\u5d7c\u5de1\u5de2\u382f\u5dfd\u5e28\u5e3d\u5e69\u3862\ud848\udd83\u387c\u5eb0\u5eb3\u5eb6\ud868\udf92\ud848\udf31\u8201\u5f22\u38c7\ud84c\udeb8\ud858\uddda\u5f62\u5f6b\u38e3\u5f9a\u5fcd\u5fd7\u5ff9\u6081\u393a\u391c\ud849\uded4\u60c7\u6148\u614c\u617a\u61b2\u61a4\u61af\u61de\u621b\u625d\u62b1\u62d4\u6350\ud84a\udf0c\u633d\u62fc\u6368\u6383\u63e4\ud84a\udff1\u6422\u63c5\u63a9\u3a2e\u6469\u647e\u649d\u6477\u3a6c\u656c\ud84c\udc0a\u65e3\u66f8\u6649\u3b19\u3b08\u3ae4\u5192\u5195\u6700\u669c\u80ad\u43d9\u6721\u675e\u6753\ud84c\udfc3\u3b49\u67fa\u6785\u6852\ud84d\udc6d\u688e\u681f\u6914\u6942\u69a3\u69ea\u6aa8\ud84d\udea3\u6adb\u3c18\u6b21\ud84e\udca7\u6b54\u3c4e\u6b72\u6b9f\u6bbb\ud84e\ude8d\ud847\udd0b\ud84e\udefa\u6c4e\ud84f\udcbc\u6cbf\u6ccd\u6c67\u6d16\u6d3e\u6d69\u6d78\u6d85\ud84f\udd1e\u6d34\u6e2f\u6e6e\u3d33\u6ec7\ud84f\uded1\u6df9\u6f6e\ud84f\udf5e\ud84f\udf8e\u6fc6\u7039\u701b\u3d96\u704a\u707d\u7077\u70ad\ud841\udd25\u7145\ud850\ude63\u719c\u7228\u7250\ud851\ude08\u7280\u7295\ud851\udf35\ud852\udc14\u737a\u738b\u3eac\u73a5\u3eb8\u7447\u745c\u7485\u74ca\u3f1b\u7524\ud853\udc36\u753e\ud853\udc92\ud848\udd9f\u7610\ud853\udfa1\ud853\udfb8\ud854\udc44\u3ffc\u4008\ud854\udcf3\ud854\udcf2\ud854\udd19\ud854\udd33\u771e\u771f\u778b\u4046\u4096\ud855\udc1d\u784e\u40e3\ud855\ude26\ud855\ude9a\ud855\udec5\u79eb\u412f\u7a4a\u7a4f\ud856\udd7c\ud856\udea7\u4202\ud856\udfab\u7bc6\u7bc9\u4227\ud857\udc80\u7cd2\u42a0\u7ce8\u7ce3\u7d00\ud857\udf86\u7d63\u4301\u7dc7\u7e02\u7e45\u4334\ud858\ude28\ud858\ude47\u4359\ud858\uded9\u7f7a\ud858\udf3e\u7f95\u7ffa\ud859\udcda\ud859\udd23\u8060\ud859\udda8\u8070\ud84c\udf5f\u43d5\u80b2\u8103\u440b\u813e\u5ab5\ud859\udfa7\ud859\udfb5\ud84c\udf93\ud84c\udf9c\u8204\u8f9e\u446b\u8291\u828b\u829d\u52b3\u82b1\u82b3\u82bd\u82e6\ud85a\udf3c\u831d\u8363\u83ad\u8323\u83bd\u83e7\u8353\u83ca\u83cc\u83dc\ud85b\udc36\ud85b\udd6b\ud85b\udcd5\u452b\u84f1\u84f3\u8516\ud85c\udfca\u8564\ud85b\udf2c\u455d\u4561\ud85b\udfb1\ud85c\udcd2\u456b\u8650\u8667\u8669\u86a9\u8688\u870e\u86e2\u8728\u876b\u8786\u87e1\u8801\u45f9\u8860\ud85d\ude67\u88d7\u88de\u4635\u88fa\u34bb\ud85e\udcae\ud85e\udd66\u46be\u46c7\u8aa0\ud85f\udca8\u8cab\u8cc1\u8d1b\u8d77\ud85f\udf2f\ud842\udc04\u8dcb\u8dbc\u8df0\ud842\udcde\u8ed4\ud861\uddd2\ud861\udded\u9094\u90f1\u9111\ud861\udf2e\u911b\u9238\u92d7\u92d8\u927c\u93f9\u9415\ud862\udffa\u958b\u4995\u95b7\ud863\udd77\u49e6\u96c3\u5db2\u9723\ud864\udd45\ud864\ude1a\u4a6e\u4a76\u97e0\ud865\udc0a\u4ab2\ud865\udc96\u9829\ud865\uddb6\u98e2\u4b33\u9929\u99a7\u99c2\u99fe\u4bce\ud866\udf30\u9c40\u9cfd\u4cce\u4ced\u9d67\ud868\udcce\u4cf8\ud868\udd05\ud868\ude0e\ud868\ude91\u4d56\u9efe\u9f05\u9f0f\u9f16\ud869\ude00",mapChar:function(r){return r>=196608?r>=917760&&r<=917999?18874368:0:e[t[r>>4]][15&r]}};var e,t}.apply(t,[]))||(e.exports=n)},94489:(e,t,r)=>{"use strict";var n=r(28847)(r(93106));function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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 a,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,h=String.fromCharCode;function p(e){throw new RangeError(d[e])}function g(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]);var i=function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(l,".")).split("."),t).join(".");return n+i}function m(e){for(var t=[],r=0,n=e.length;r=55296&&i<=56319&&r>1,e+=f(e/t);e>455;n+=s)e=f(e/35);return f(n+36*e/(e+38))},b=function(e){var t,r=[],n=e.length,i=0,o=128,c=72,u=e.lastIndexOf("-");u<0&&(u=0);for(var l=0;l=128&&p("not-basic"),r.push(e.charCodeAt(l));for(var d=u>0?u+1:0;d=n&&p("invalid-input");var y=(t=e.charCodeAt(d++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:s;(y>=s||y>f((a-i)/g))&&p("overflow"),i+=y*g;var b=m<=c?1:m>=c+26?26:m-c;if(yf(a/w)&&p("overflow"),g*=w}var A=r.length+1;c=v(i-h,A,0==h),f(i/A)>a-o&&p("overflow"),o+=f(i/A),i%=A,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},w=function(e){var t,r=[],n=(e=m(e)).length,o=128,c=0,u=72,l=i(e);try{for(l.s();!(t=l.n()).done;){var d=t.value;d<128&&r.push(h(d))}}catch(e){l.e(e)}finally{l.f()}var g=r.length,b=g;for(g&&r.push("-");b=o&&Ef((a-c)/S)&&p("overflow"),c+=(A-o)*S,o=A;var k,x=i(e);try{for(x.s();!(k=x.n()).done;){var C=k.value;if(Ca&&p("overflow"),C==o){for(var I=c,T=s;;T+=s){var O=T<=u?1:T>=u+26?26:T-u;if(I{"use strict";var n,i;r(28847)(r(3355)),n=[r(94489),r(32996)],void 0===(i=function(e,t){return function(e,t){function r(r,n,i){for(var o=[],a=e.ucs2.decode(r),s=0;s>23,f=l>>21&3,h=l>>5&65535,p=31&l,g=t.mapStr.substr(h,p);if(0===f||n&&1&d)throw new Error("Illegal char "+u);1===f?o.push(g):2===f?o.push(i?g:u):3===f&&o.push(u)}return o.join("").normalize("NFC")}function n(t,n,o){void 0===o&&(o=!1);var a=r(t,o,n).split(".");return(a=a.map((function(t){return t.startsWith("xn--")?i(t=e.decode(t.substring(4)),o,!1):i(t,o,n),t}))).join(".")}function i(e,n,i){if("-"===e[2]&&"-"===e[3])throw new Error("Failed to validate "+e);if(e.startsWith("-")||e.endsWith("-"))throw new Error("Failed to validate "+e);if(e.includes("."))throw new Error("Failed to validate "+e);if(r(e,n,i)!==e)throw new Error("Failed to validate "+e);var o=e.codePointAt(0);if(t.mapChar(o)&2<<23)throw new Error("Label contains illegal character: "+o)}return{toUnicode:function(e,t){return void 0===t&&(t={}),n(e,!1,"useStd3ASCII"in t&&t.useStd3ASCII)},toAscii:function(t,r){void 0===r&&(r={});var i,o=!("transitional"in r)||r.transitional,a="useStd3ASCII"in r&&r.useStd3ASCII,s="verifyDnsLength"in r&&r.verifyDnsLength,c=n(t,o,a).split(".").map(e.toASCII),u=c.join(".");if(s){if(u.length<1||u.length>253)throw new Error("DNS name has wrong length: "+u);for(i=0;i63)throw new Error("DNS label has wrong length: "+l)}}return u}}}(e,t)}.apply(t,n))||(e.exports=i)},83226:(e,t)=>{"use strict";t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<>1,l=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+d],d+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=u}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,u-=8);e[r+h-p]|=128*g}},41736:e=>{"use strict";"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},69446:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(11191)(),o=r(80593)("Object.prototype.toString"),a=function(e){return!(i&&e&&"object"===(0,n.default)(e)&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},s=function(e){return!!a(e)||null!==e&&"object"===(0,n.default)(e)&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},c=function(){return a(arguments)}();a.isLegacyArguments=s,e.exports=c?a:s},41493:(e,t,r)=>{"use strict";var n,i,o=r(28847)(r(3355)),a=Function.prototype.toString,s="object"===("undefined"==typeof Reflect?"undefined":(0,o.default)(Reflect))&&null!==Reflect&&Reflect.apply;if("function"==typeof s&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw i}}),i={},s((function(){throw 42}),null,n)}catch(e){e!==i&&(s=null)}else s=null;var c=/^\s*class\b/,u=function(e){try{var t=a.call(e);return c.test(t)}catch(e){return!1}},l=function(e){try{return!u(e)&&(a.call(e),!0)}catch(e){return!1}},d=Object.prototype.toString,f="function"==typeof Symbol&&!!Symbol.toStringTag,h=!(0 in[,]),p=function(){return!1};if("object"===("undefined"==typeof document?"undefined":(0,o.default)(document))){var g=document.all;d.call(g)===d.call(document.all)&&(p=function(e){if((h||!e)&&(void 0===e||"object"===(0,o.default)(e)))try{var t=d.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=s?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!==(0,o.default)(e))return!1;try{s(e,null,n)}catch(e){if(e!==i)return!1}return!u(e)&&l(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!==(0,o.default)(e))return!1;if(f)return l(e);if(u(e))return!1;var t=d.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&l(e)}},27277:e=>{"use strict";e.exports=function(e){if(!e)return!1;var r=t.call(e);return"[object Function]"===r||"function"==typeof e&&"[object RegExp]"!==r||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},14477:(e,t,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(11191)(),c=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(o.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(e);if(!c)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&c(t)}return c(e)===n}},8619:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+(0,n.default)(e)+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},28915:(e,t,r)=>{"use strict";var n=r(72337);e.exports=function(e){return!!n(e)}},39484:e=>{"use strict";var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},24858:(e,t,r)=>{"use strict";e=r.nmd(e);var n=r(19142),i=r(28847)(r(3355));!function(){var t="object"===("undefined"==typeof window?"undefined":(0,i.default)(window))?window:{};!t.JS_SHA3_NO_NODE_JS&&"object"===(void 0===n?"undefined":(0,i.default)(n))&&n.versions&&n.versions.node&&(t=r.g);for(var o=!t.JS_SHA3_NO_COMMON_JS&&"object"===(0,i.default)(e)&&e.exports,a="0123456789abcdef".split(""),s=[0,8,16,24],c=[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],u=[224,256,384,512],l=["hex","buffer","arrayBuffer","array"],d=function(e,t,r){return function(n){return new _(e,t,e).update(n)[r]()}},f=function(e,t,r){return function(n,i){return new _(e,t,i).update(n)[r]()}},h=function(e,t){var r=d(e,t,"hex");r.create=function(){return new _(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}_.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,o=this.blocks,a=this.byteCount,c=this.blockCount,u=0,l=this.s;u>2]|=e[u]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(o[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=a){for(this.start=r-a,this.block=o[c],r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];s%t==0&&(E(r),o=0)}return i&&(e=r[o],i>0&&(c+=a[e>>4&15]+a[15&e]),i>1&&(c+=a[e>>12&15]+a[e>>8&15]),i>2&&(c+=a[e>>20&15]+a[e>>16&15])),c},_.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);a>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%r==0&&E(n)}return o&&(e=s<<2,t=n[a],o>0&&(c[e]=255&t),o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c};var E=function(e){var t,r,n,i,o,a,s,u,l,d,f,h,p,g,m,y,v,b,w,A,_,E,S,k,x,C,I,T,O,P,M,R,N,L,B,D,U,j,F,z,q,H,V,$,K,W,G,Q,Y,Z,J,X,ee,te,re,ne,ie,oe,ae,se,ce,ue,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|l>>>31),r=o^(l<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(d<<1|f>>>31),r=s^(f<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=l^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,g=e[0],m=e[1],W=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,V=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,P=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,D=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,$=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=g^~y&b,e[1]=m^~v&w,e[10]=k^~C&T,e[11]=x^~I&O,e[20]=L^~D&j,e[21]=B^~U&F,e[30]=$^~W&Q,e[31]=K^~G&Y,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~b&A,e[3]=v^~w&_,e[12]=C^~T&P,e[13]=I^~O&M,e[22]=D^~j&z,e[23]=U^~F&q,e[32]=W^~Q&Z,e[33]=G^~Y&J,e[42]=ne^~oe&se,e[43]=ie^~ae&ce,e[4]=b^~A&E,e[5]=w^~_&S,e[14]=T^~P&R,e[15]=O^~M&N,e[24]=j^~z&H,e[25]=F^~q&V,e[34]=Q^~Z&X,e[35]=Y^~J&ee,e[44]=oe^~se&ue,e[45]=ae^~ce&le,e[6]=A^~E&g,e[7]=_^~S&m,e[16]=P^~R&k,e[17]=M^~N&x,e[26]=z^~H&L,e[27]=q^~V&B,e[36]=Z^~X&$,e[37]=J^~ee&K,e[46]=se^~ue&te,e[47]=ce^~le&re,e[8]=E^~g&y,e[9]=S^~m&v,e[18]=R^~k&C,e[19]=N^~x&I,e[28]=H^~L&D,e[29]=V^~B&U,e[38]=X^~$&W,e[39]=ee^~K&G,e[48]=ue^~te&ne,e[49]=le^~re&ie,e[0]^=c[n],e[1]^=c[n+1]};if(o)e.exports=g;else for(y=0;y{"use strict";e.exports=r(22109)(r(80801))},22109:(e,t,r)=>{"use strict";var n=r(46543),i=r(40274);e.exports=function(e){var t=n(e),r=i(e);return function(e,n){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(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: "+e)}}}},46543:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(69721)),a=i(r(58985)),s=i(r(15163)),c=i(r(34650)),u=i(r(21949)),l=r(86505).Transform;e.exports=function(e){return function(t){(0,s.default)(d,t);var r,i,l=(r=d,i=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(e){return!1}}(),function(){var e,t=(0,u.default)(r);if(i){var n=(0,u.default)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,c.default)(this,e)});function d(t,r,n,i,a){var s;return(0,o.default)(this,d),(s=l.call(this,a))._rate=t,s._capacity=r,s._delimitedSuffix=n,s._hashBitLength=i,s._options=a,s._state=new e,s._state.initialize(t,r),s._finalized=!1,s}return(0,a.default)(d,[{key:"_transform",value:function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)}},{key:"_flush",value:function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}},{key:"update",value:function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}},{key:"digest",value:function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var e=new d(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}]),d}(l)}},40274:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(69721)),a=i(r(58985)),s=i(r(15163)),c=i(r(34650)),u=i(r(21949)),l=r(86505).Transform;e.exports=function(e){return function(t){(0,s.default)(d,t);var r,i,l=(r=d,i=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(e){return!1}}(),function(){var e,t=(0,u.default)(r);if(i){var n=(0,u.default)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,c.default)(this,e)});function d(t,r,n,i){var a;return(0,o.default)(this,d),(a=l.call(this,i))._rate=t,a._capacity=r,a._delimitedSuffix=n,a._options=i,a._state=new e,a._state.initialize(t,r),a._finalized=!1,a}return(0,a.default)(d,[{key:"_transform",value:function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)}},{key:"_flush",value:function(){}},{key:"_read",value:function(e){this.push(this.squeeze(e))}},{key:"update",value:function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}},{key:"squeeze",value:function(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var e=new d(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}]),d}(l)}},25612:(e,t)=>{"use strict";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];t.p1600=function(e){for(var t=0;t<24;++t){var n=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],f=e[9]^e[19]^e[29]^e[39]^e[49],h=d^(o<<1|a>>>31),p=f^(a<<1|o>>>31),g=e[0]^h,m=e[1]^p,y=e[10]^h,v=e[11]^p,b=e[20]^h,w=e[21]^p,A=e[30]^h,_=e[31]^p,E=e[40]^h,S=e[41]^p;h=n^(s<<1|c>>>31),p=i^(c<<1|s>>>31);var k=e[2]^h,x=e[3]^p,C=e[12]^h,I=e[13]^p,T=e[22]^h,O=e[23]^p,P=e[32]^h,M=e[33]^p,R=e[42]^h,N=e[43]^p;h=o^(u<<1|l>>>31),p=a^(l<<1|u>>>31);var L=e[4]^h,B=e[5]^p,D=e[14]^h,U=e[15]^p,j=e[24]^h,F=e[25]^p,z=e[34]^h,q=e[35]^p,H=e[44]^h,V=e[45]^p;h=s^(d<<1|f>>>31),p=c^(f<<1|d>>>31);var $=e[6]^h,K=e[7]^p,W=e[16]^h,G=e[17]^p,Q=e[26]^h,Y=e[27]^p,Z=e[36]^h,J=e[37]^p,X=e[46]^h,ee=e[47]^p;h=u^(n<<1|i>>>31),p=l^(i<<1|n>>>31);var te=e[8]^h,re=e[9]^p,ne=e[18]^h,ie=e[19]^p,oe=e[28]^h,ae=e[29]^p,se=e[38]^h,ce=e[39]^p,ue=e[48]^h,le=e[49]^p,de=g,fe=m,he=v<<4|y>>>28,pe=y<<4|v>>>28,ge=b<<3|w>>>29,me=w<<3|b>>>29,ye=_<<9|A>>>23,ve=A<<9|_>>>23,be=E<<18|S>>>14,we=S<<18|E>>>14,Ae=k<<1|x>>>31,_e=x<<1|k>>>31,Ee=I<<12|C>>>20,Se=C<<12|I>>>20,ke=T<<10|O>>>22,xe=O<<10|T>>>22,Ce=M<<13|P>>>19,Ie=P<<13|M>>>19,Te=R<<2|N>>>30,Oe=N<<2|R>>>30,Pe=B<<30|L>>>2,Me=L<<30|B>>>2,Re=D<<6|U>>>26,Ne=U<<6|D>>>26,Le=F<<11|j>>>21,Be=j<<11|F>>>21,De=z<<15|q>>>17,Ue=q<<15|z>>>17,je=V<<29|H>>>3,Fe=H<<29|V>>>3,ze=$<<28|K>>>4,qe=K<<28|$>>>4,He=G<<23|W>>>9,Ve=W<<23|G>>>9,$e=Q<<25|Y>>>7,Ke=Y<<25|Q>>>7,We=Z<<21|J>>>11,Ge=J<<21|Z>>>11,Qe=ee<<24|X>>>8,Ye=X<<24|ee>>>8,Ze=te<<27|re>>>5,Je=re<<27|te>>>5,Xe=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,nt=se<<8|ce>>>24,it=ce<<8|se>>>24,ot=ue<<14|le>>>18,at=le<<14|ue>>>18;e[0]=de^~Ee&Le,e[1]=fe^~Se&Be,e[10]=ze^~Xe&ge,e[11]=qe^~et&me,e[20]=Ae^~Re&$e,e[21]=_e^~Ne&Ke,e[30]=Ze^~he&ke,e[31]=Je^~pe&xe,e[40]=Pe^~He&tt,e[41]=Me^~Ve&rt,e[2]=Ee^~Le&We,e[3]=Se^~Be&Ge,e[12]=Xe^~ge&Ce,e[13]=et^~me&Ie,e[22]=Re^~$e&nt,e[23]=Ne^~Ke&it,e[32]=he^~ke&De,e[33]=pe^~xe&Ue,e[42]=He^~tt&ye,e[43]=Ve^~rt&ve,e[4]=Le^~We&ot,e[5]=Be^~Ge&at,e[14]=ge^~Ce&je,e[15]=me^~Ie&Fe,e[24]=$e^~nt&be,e[25]=Ke^~it&we,e[34]=ke^~De&Qe,e[35]=xe^~Ue&Ye,e[44]=tt^~ye&Te,e[45]=rt^~ve&Oe,e[6]=We^~ot&de,e[7]=Ge^~at&fe,e[16]=Ce^~je&ze,e[17]=Ie^~Fe&qe,e[26]=nt^~be&Ae,e[27]=it^~we&_e,e[36]=De^~Qe&Ze,e[37]=Ue^~Ye&Je,e[46]=ye^~Te&Pe,e[47]=ve^~Oe&Me,e[8]=ot^~de&Ee,e[9]=at^~fe&Se,e[18]=je^~ze&Xe,e[19]=Fe^~qe&et,e[28]=be^~Ae&Re,e[29]=we^~_e&Ne,e[38]=Qe^~Ze&he,e[39]=Ye^~Je&pe,e[48]=Te^~Pe&He,e[49]=Oe^~Me&Ve,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},80801:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(25612);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(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(e){for(var t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return t},o.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=o},50807:(e,t,r)=>{"use strict";var n=r(41736),i=r(22353),o=r(48850).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function c(e,t){return e<>>32-t}function u(e,t,r,n,i,o,a){return c(e+(t&r|~t&n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return c(e+(t&n|r&~n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return c(e+(t^r^n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return c(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),r=l(r,n=u(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=l(o,r,n,i,e[6],3225465664,9),i=l(i,o,r,n,e[11],643717713,14),n=l(n,i,o,r,e[0],3921069994,20),r=l(r,n,i,o,e[5],3593408605,5),o=l(o,r,n,i,e[10],38016083,9),i=l(i,o,r,n,e[15],3634488961,14),n=l(n,i,o,r,e[4],3889429448,20),r=l(r,n,i,o,e[9],568446438,5),o=l(o,r,n,i,e[14],3275163606,9),i=l(i,o,r,n,e[3],4107603335,14),n=l(n,i,o,r,e[8],1163531501,20),r=l(r,n,i,o,e[13],2850285829,5),o=l(o,r,n,i,e[2],4243563512,9),i=l(i,o,r,n,e[7],1735328473,14),r=d(r,n=l(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=d(o,r,n,i,e[8],2272392833,11),i=d(i,o,r,n,e[11],1839030562,16),n=d(n,i,o,r,e[14],4259657740,23),r=d(r,n,i,o,e[1],2763975236,4),o=d(o,r,n,i,e[4],1272893353,11),i=d(i,o,r,n,e[7],4139469664,16),n=d(n,i,o,r,e[10],3200236656,23),r=d(r,n,i,o,e[13],681279174,4),o=d(o,r,n,i,e[0],3936430074,11),i=d(i,o,r,n,e[3],3572445317,16),n=d(n,i,o,r,e[6],76029189,23),r=d(r,n,i,o,e[9],3654602809,4),o=d(o,r,n,i,e[12],3873151461,11),i=d(i,o,r,n,e[15],530742520,16),r=f(r,n=d(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=f(o,r,n,i,e[7],1126891415,10),i=f(i,o,r,n,e[14],2878612391,15),n=f(n,i,o,r,e[5],4237533241,21),r=f(r,n,i,o,e[12],1700485571,6),o=f(o,r,n,i,e[3],2399980690,10),i=f(i,o,r,n,e[10],4293915773,15),n=f(n,i,o,r,e[1],2240044497,21),r=f(r,n,i,o,e[8],1873313359,6),o=f(o,r,n,i,e[15],4264355552,10),i=f(i,o,r,n,e[6],2734768916,15),n=f(n,i,o,r,e[13],1309151649,21),r=f(r,n,i,o,e[4],4149444226,6),o=f(o,r,n,i,e[11],3174756917,10),i=f(i,o,r,n,e[2],718787259,15),n=f(n,i,o,r,e[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 e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},37441:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(19142),o=r(28847),a=o(r(82247)),s=o(r(3355)),c=o(r(94571)),u=o(r(90775)),l=o(r(58985)),d=o(r(69721)),f=o(r(15163)),h=o(r(34650)),p=o(r(21949)),g=o(r(22940));function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t{"use strict";var n=r(31734),i=r(82202);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var u=e.shrn(c),l=s.toRed(o);t>0;t--){var d=this._randrange(new n(2),s);r&&r(d);var f=d.toRed(o).redPow(u);if(0!==f.cmp(a)&&0!==f.cmp(l)){for(var h=1;h0;t--){var l=this._randrange(new n(2),a),d=e.gcd(l);if(0!==d.cmpn(1))return d;var f=l.toRed(i).redPow(c);if(0!==f.cmp(o)&&0!==f.cmp(u)){for(var h=1;h{"use strict";function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},96580:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},36565:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.code=r,this.alphabet=o,n&&o&&(this.engine=n(o))}return(0,o.default)(e,[{key:"encode",value:function(e){return this.engine.encode(e)}},{key:"decode",value:function(e){return this.engine.decode(e)}},{key:"isImplemented",value:function(){return this.engine}}]),e}();e.exports=a},52642:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base16 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"hex")}}}},96494:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[a>>>o-5&31],o-=5;if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(r){var n,i=function(e){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(e.indexOf(o)<0)throw new Error("invalid base32 character")}}catch(e){i.e(e)}finally{i.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8);return a.buffer}(r,e)}}}},76627:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?i.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var o=n.indexOf("=");return o>0&&!t&&(n=n.substring(0,o)),n},decode:function(t){var r,o=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base64 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"base64")}}}},7905:(e,t,r)=>{"use strict";var n=r(36565),i=r(27548),o=r(52642),a=r(96494),s=r(76627),c=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",a,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",a,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",a,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",a,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",a,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],u=c.reduce((function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e}),{}),l=c.reduce((function(e,t){return e[t[1]]=u[t[0]],e}),{});e.exports={names:u,codes:l}},6086:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(7905);(t=e.exports=a).encode=function(e,t){var r=s(e);return a(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());var t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));var r=s(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;var t=e.substring(0,1);try{return s(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes));var o=new Error("Unsupported encoding");function a(e,t){if(!t)throw new Error("requires an encoded buffer");var r=s(e),i=n.from(r.code);return function(e,t){s(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function s(e){var t;if(i.names[e])t=i.names[e];else{if(!i.codes[e])throw o;t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}},54093:(e,t,r)=>{"use strict";for(var n=r(28847)(r(74519)),i=r(24070),o={},a=0,s=Object.entries(i);a{"use strict";var n=r(29033).Buffer,i=r(26657),o=r(7054),a=r(86002),s=r(55576);(t=e.exports).addPrefix=function(e,t){var r;if(n.isBuffer(e))r=s.varintBufferEncode(e);else{if(!a[e])throw new Error("multicodec not recognized");r=a[e]}return n.concat([r,t])},t.rmPrefix=function(e){return i.decode(e),e.slice(i.decode.bytes)},t.getCodec=function(e){var t=i.decode(e),r=o.get(t);if(void 0===r)throw new Error("Code ".concat(t," not found"));return r},t.getName=function(e){return o.get(e)},t.getNumber=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return s.varintBufferDecode(t)[0]},t.getCode=function(e){return i.decode(e)},t.getCodeVarint=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=function(e){return i.encode(e)};var c=r(54093);Object.assign(t,c),t.print=r(11032)},7054:(e,t,r)=>{"use strict";var n=r(24070),i=new Map;for(var o in n){var a=n[o];i.set(a,o)}e.exports=Object.freeze(i)},11032:(e,t,r)=>{"use strict";for(var n=r(28847)(r(74519)),i=r(24070),o={},a=0,s=Object.entries(i);a{"use strict";var n=r(29033).Buffer,i=r(26657);function o(e){return parseInt(e.toString("hex"),16)}function a(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),n.from(t,"hex")}e.exports={numberToBuffer:a,bufferToNumber:o,varintBufferEncode:function(e){return n.from(i.encode(o(e)))},varintBufferDecode:function(e){return a(i.decode(e))},varintEncode:function(e){return n.from(i.encode(e))}}},86002:(e,t,r)=>{"use strict";var n=r(24070),i=r(55576).varintEncode,o={};for(var a in n){var s=n[a];o[a]=i(s)}e.exports=Object.freeze(o)},71786:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.code=r,this.alphabet=o,n&&o&&(this.engine=n(o))}return(0,o.default)(e,[{key:"encode",value:function(e){return this.engine.encode(e)}},{key:"decode",value:function(e){return this.engine.decode(e)}},{key:"isImplemented",value:function(){return this.engine}}]),e}();e.exports=a},37739:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base16 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"hex")}}}},70976:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[a>>>o-5&31],o-=5;if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(r){var n,i=function(e){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(e.indexOf(o)<0)throw new Error("invalid base32 character")}}catch(e){i.e(e)}finally{i.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8);return a.buffer}(r,e)}}}},88504:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?i.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var o=n.indexOf("=");return o>0&&!t&&(n=n.substring(0,o)),n},decode:function(t){var r,o=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base64 character")}}catch(e){o.e(e)}finally{o.f()}return i.from(t,"base64")}}}},12263:(e,t,r)=>{"use strict";var n=r(71786),i=r(27548),o=r(37739),a=r(70976),s=r(88504),c=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",a,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",a,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",a,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",a,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",a,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],u=c.reduce((function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e}),{}),l=c.reduce((function(e,t){return e[t[1]]=u[t[0]],e}),{});e.exports={names:u,codes:l}},2592:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(12263);function o(e,t){if(!t)throw new Error("requires an encoded buffer");var r=a(e),i=n.from(r.code);return function(e,t){a(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function a(e){var t;if(i.names[e])t=i.names[e];else{if(!i.codes[e])throw new Error("Unsupported encoding");t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}(t=e.exports=o).encode=function(e,t){var r=a(e);return o(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());var t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));var r=a(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;var t=e.substring(0,1);try{return a(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes))},81269:(e,t)=>{"use strict";t.names=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,md4:212,md5:213,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),t.codes=Object.freeze({0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",212:"md4",213:"md5",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46e3:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),t.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46e3:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},77748:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(2592),o=r(26657),a=r(81269);function s(e){t.decode(e)}t.names=a.names,t.codes=a.codes,t.defaultLengths=a.defaultLengths,t.toHexString=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return e.toString("hex")},t.fromHexString=function(e){return n.from(e,"hex")},t.toB58String=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return i.encode("base58btc",e).toString().slice(1)},t.fromB58String=function(e){var t=e;return n.isBuffer(e)&&(t=e.toString()),i.decode("z"+t)},t.decode=function(e){if(!n.isBuffer(e))throw new Error("multihash must be a Buffer");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");var r=o.decode(e);if(!t.isValidCode(r))throw new Error("multihash unknown function code: 0x".concat(r.toString(16)));e=e.slice(o.decode.bytes);var i=o.decode(e);if(i<0)throw new Error("multihash invalid length: ".concat(i));if((e=e.slice(o.decode.bytes)).length!==i)throw new Error("multihash length inconsistent: 0x".concat(e.toString("hex")));return{code:r,name:a.codes[r],length:i,digest:e}},t.encode=function(e,r,i){if(!e||void 0===r)throw new Error("multihash encode requires at least two args: digest, code");var a=t.coerceCode(r);if(!n.isBuffer(e))throw new Error("digest should be a Buffer");if(null==i&&(i=e.length),i&&e.length!==i)throw new Error("digest length should be equal to specified length.");return n.concat([n.from(o.encode(a)),n.from(o.encode(i)),e])},t.coerceCode=function(e){var r=e;if("string"==typeof e){if(void 0===a.names[e])throw new Error("Unrecognized hash function named: ".concat(e));r=a.names[e]}if("number"!=typeof r)throw new Error("Hash function code should be a number. Got: ".concat(r));if(void 0===a.codes[r]&&!t.isAppCode(r))throw new Error("Unrecognized function code: ".concat(r));return r},t.isAppCode=function(e){return e>0&&e<16},t.isValidCode=function(e){return!!t.isAppCode(e)||!!a.codes[e]},t.validate=s,t.prefix=function(e){return s(e),e.slice(0,2)}},77277:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(36931);e.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new i(1),r=String(e).toLowerCase().trim(),a="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),s=o(r);if("-"===s.substr(0,1)&&(s=o(s.slice(1)),t=new i(-1,10)),!(s=""===s?"0":s).match(/^-?[0-9]+$/)&&s.match(/^[0-9A-Fa-f]+$/)||s.match(/^[a-fA-F]+$/)||!0===a&&s.match(/^[0-9A-Fa-f]+$/))return new i(s,16).mul(t);if((s.match(/^-?[0-9]+$/)||""===s)&&!1===a)return new i(s,10).mul(t)}else if("object"===(0,n.default)(e)&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new i(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},33103:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c{"use strict";var n,i,o;e=r.nmd(e);var a,s=r(28847)(r(3355));"undefined"!=typeof self&&self,a=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}([function(e,t,r){r.d(t,"j",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"h",(function(){return s})),r.d(t,"b",(function(){return c})),r.d(t,"k",(function(){return u})),r.d(t,"e",(function(){return l})),r.d(t,"g",(function(){return d})),r.d(t,"i",(function(){return f})),r.d(t,"a",(function(){return h})),r.d(t,"f",(function(){return p}));var n=r(1),i=u((function(e,t){var r=t.length;return u((function(n){for(var i=0;i0&&(i=r),r=e[u++]);)switch(q++,"\n"===r?(V++,H=0):H++,D){case h:if("{"===r)D=g;else if("["===r)D=y;else if(!K(r))return $("Non-whitespace before {[.");continue;case w:case g:if(K(r))continue;if(D===w)U.push(A);else{if("}"===r){s({}),c(),D=U.pop()||p;continue}U.push(m)}if('"'!==r)return $('Malformed object key should start with " ');D=b;continue;case A:case m:if(K(r))continue;if(":"===r)D===m?(U.push(m),void 0!==o&&(s({}),a(o),o=void 0),z++):void 0!==o&&(a(o),o=void 0),D=p;else if("}"===r)void 0!==o&&(s(o),c(),o=void 0),c(),z--,D=U.pop()||p;else{if(","!==r)return $("Bad object");D===m&&U.push(m),void 0!==o&&(s(o),c(),o=void 0),D=w}continue;case y:case p:if(K(r))continue;if(D===y){if(s([]),z++,D=p,"]"===r){c(),z--,D=U.pop()||p;continue}U.push(v)}if('"'===r)D=b;else if("{"===r)D=g;else if("["===r)D=y;else if("t"===r)D=_;else if("f"===r)D=k;else if("n"===r)D=T;else if("-"===r)N+=r;else if("0"===r)N+=r,D=20;else{if(-1==="123456789".indexOf(r))return $("Bad value");N+=r,D=20}continue;case v:if(","===r)U.push(v),void 0!==o&&(s(o),c(),o=void 0),D=p;else{if("]"!==r){if(K(r))continue;return $("Bad array")}void 0!==o&&(s(o),c(),o=void 0),c(),z--,D=U.pop()||p}continue;case b:void 0===o&&(o="");var f=u-1;e:for(;;){for(;F>0;)if(j+=r,r=e.charAt(u++),4===F?(o+=String.fromCharCode(parseInt(j,16)),F=0,f=u-1):F++,!r)break e;if('"'===r&&!L){D=U.pop()||p,o+=e.substring(f,u-1);break}if(!("\\"!==r||L||(L=!0,o+=e.substring(f,u-1),r=e.charAt(u++))))break;if(L){if(L=!1,"n"===r?o+="\n":"r"===r?o+="\r":"t"===r?o+="\t":"f"===r?o+="\f":"b"===r?o+="\b":"u"===r?(F=1,j=""):o+=r,r=e.charAt(u++),f=u-1,r)continue;break}d.lastIndex=u;var W=d.exec(e);if(!W){u=e.length+1,o+=e.substring(f,u-1);break}if(u=W.index+1,!(r=e.charAt(W.index))){o+=e.substring(f,u-1);break}}continue;case _:if(!r)continue;if("r"!==r)return $("Invalid true started with t"+r);D=E;continue;case E:if(!r)continue;if("u"!==r)return $("Invalid true started with tr"+r);D=S;continue;case S:if(!r)continue;if("e"!==r)return $("Invalid true started with tru"+r);s(!0),c(),D=U.pop()||p;continue;case k:if(!r)continue;if("a"!==r)return $("Invalid false started with f"+r);D=x;continue;case x:if(!r)continue;if("l"!==r)return $("Invalid false started with fa"+r);D=C;continue;case C:if(!r)continue;if("s"!==r)return $("Invalid false started with fal"+r);D=I;continue;case I:if(!r)continue;if("e"!==r)return $("Invalid false started with fals"+r);s(!1),c(),D=U.pop()||p;continue;case T:if(!r)continue;if("u"!==r)return $("Invalid null started with n"+r);D=O;continue;case O:if(!r)continue;if("l"!==r)return $("Invalid null started with nu"+r);D=P;continue;case P:if(!r)continue;if("l"!==r)return $("Invalid null started with nul"+r);s(null),c(),D=U.pop()||p;continue;case M:if("."!==r)return $("Leading zero not followed by .");N+=r,D=20;continue;case 20:if(-1!=="0123456789".indexOf(r))N+=r;else if("."===r){if(-1!==N.indexOf("."))return $("Invalid number has two dots");N+=r}else if("e"===r||"E"===r){if(-1!==N.indexOf("e")||-1!==N.indexOf("E"))return $("Invalid number has two exponential");N+=r}else if("+"===r||"-"===r){if("e"!==i&&"E"!==i)return $("Invalid symbol in number");N+=r}else N&&(s(parseFloat(N)),c(),N=""),u--,D=U.pop()||p;continue;default:return $("Unknown state: "+D)}q>=R&&(n=0,void 0!==o&&o.length>l&&($("Max buffer length exceeded: textNode"),n=Math.max(n,o.length)),N.length>l&&($("Max buffer length exceeded: numberNode"),n=Math.max(n,N.length)),R=l-n+q)}})),e(n.n).on((function(){if(D===h)return s({}),c(),void(B=!0);D===p&&0===z||$("Unexpected end"),void 0!==o&&(s(o),c(),o=void 0),B=!0}))}},function(e,t,r){r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return u}));var n=r(19),i=r(3),o=r(2),a=r(20),s=r(0);function c(){return new XMLHttpRequest}function u(e,t,r,c,u,l,d){var f=e(i.m).emit,h=e(i.b).emit,p=0,g=!0;function m(){if("2"===String(t.status)[0]){var e=t.responseText,r=(" "+e.substr(p)).substr(1);r&&f(r),p=Object(o.e)(e)}}function y(t){try{g&&e(i.c).emit(t.status,Object(a.a)(t.getAllResponseHeaders())),g=!1}catch(e){}}e(i.a).on((function(){t.onreadystatechange=null,t.abort()})),"onprogress"in t&&(t.onprogress=m),t.onreadystatechange=function(){switch(t.readyState){case 2:case 3:return y(t);case 4:y(t),"2"===String(t.status)[0]?(m(),e(i.n).emit()):h(Object(i.o)(t.status,t.responseText))}};try{for(var v in t.open(r,c,!0),l)t.setRequestHeader(v,l[v]);Object(n.a)(window.location,Object(n.b)(c))||t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.withCredentials=d,t.send(u)}catch(e){window.setTimeout(Object(s.j)(h,Object(i.o)(void 0,void 0,e)),0)}}},function(e,t,r){function n(e,t){function r(t){return String(t.port||{"http:":80,"https:":443}[t.protocol||e.protocol])}return!!(t.protocol&&t.protocol!==e.protocol||t.host&&t.host!==e.host||t.host&&r(t)!==r(e))}function i(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e)||[];return{protocol:t[1]||"",host:t[2]||"",port:t[3]||""}}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}))},function(e,t,r){function n(e){var t={};return e&&e.split("\r\n").forEach((function(e){var r=e.indexOf(": ");t[e.substring(0,r)]=e.substring(r+2)})),t}r.d(t,"a",(function(){return n}))}]).default},"object"===(0,s.default)(t)&&"object"===(0,s.default)(e)?e.exports=a():(i=[],void 0===(o="function"==typeof(n=a)?n.apply(t,i):n)||(e.exports=o))},21307:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!==(0,n.default)(r))throw new TypeError(r+"must be non-object");for(var i in r)o(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o{"use strict";e.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16}},29806:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},28548:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var o=t,a=i+n;e^=-1;for(var s=i;s>>8^o[255&(e^r[s])];return~e}},54151:(e,t,r)=>{"use strict";var n,i=r(21307),o=r(25280),a=r(57506),s=r(28548),c=r(78021),u=0,l=0,d=-2,f=2,h=8,p=286,g=30,m=19,y=2*p+1,v=15,b=3,w=258,A=w+b+1,_=42,E=103,S=113,k=666;function x(e,t){return e.msg=c[t],t}function C(e){return(e<<1)-(e>4?9:0)}function I(e){for(var t=e.length;--t>=0;)e[t]=0}function T(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function O(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,T(e.strm)}function P(e,t){e.pending_buf[e.pending++]=t}function M(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function R(e,t){var r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-A?e.strstart-(e.w_size-A):0,u=e.window,l=e.w_mask,d=e.prev,f=e.strstart+w,h=u[o+a-1],p=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(r=t)+a]===p&&u[r+a-1]===h&&u[r]===u[o]&&u[++r]===u[o+1]){o+=2,r++;do{}while(u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&oa){if(e.match_start=t,a=n,n>=s)break;h=u[o+a-1],p=u[o+a]}}}while((t=d[t&l])>c&&0!=--i);return a<=e.lookahead?a:e.lookahead}function N(e){var t,r,n,o,c,u,l,d,f,h,p=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-A)){i.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=p?n-p:0}while(--r);t=r=p;do{n=e.prev[--t],e.prev[t]=n>=p?n-p:0}while(--r);o+=p}if(0===e.strm.avail_in)break;if(u=e.strm,l=e.window,d=e.strstart+e.lookahead,f=o,h=void 0,(h=u.avail_in)>f&&(h=f),r=0===h?0:(u.avail_in-=h,i.arraySet(l,u.input,u.next_in,h,d),1===u.state.wrap?u.adler=a(u.adler,l,h,d):2===u.state.wrap&&(u.adler=s(u.adler,l,h,d)),u.next_in+=h,u.total_in+=h,h),e.lookahead+=r,e.lookahead+e.insert>=b)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=b&&(e.ins_h=(e.ins_h<=b)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-b),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=b){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=b&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=b-1)),e.prev_length>=b&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-b,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-b),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(s=2,n-=16),o<1||o>9||r!==h||n<8||n>15||t<0||t>9||a<0||a>4)return x(e,d);8===n&&(n=9);var c=new U;return e.state=c,c.strm=e,c.wrap=s,c.gzhead=null,c.w_bits=n,c.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(N(e),0===e.lookahead&&t===u)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,O(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-A&&(O(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(O(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(O(e,!1),e.strm.avail_out),1)})),new D(4,4,8,4,L),new D(4,5,16,8,L),new D(4,6,32,32,L),new D(4,4,16,16,B),new D(8,16,32,32,B),new D(8,16,128,128,B),new D(8,32,128,256,B),new D(32,128,258,1024,B),new D(32,258,258,4096,B)],t.deflateInit=function(e,t){return z(e,t,h,15,8,0)},t.deflateInit2=z,t.deflateReset=F,t.deflateResetKeep=j,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?d:(e.state.gzhead=t,l):d},t.deflate=function(e,t){var r,i,a,c;if(!e||!e.state||t>5||t<0)return e?x(e,d):d;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===k&&4!==t)return x(e,0===e.avail_out?-5:d);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===_)if(2===i.wrap)e.adler=0,P(i,31),P(i,139),P(i,8),i.gzhead?(P(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),P(i,255&i.gzhead.time),P(i,i.gzhead.time>>8&255),P(i,i.gzhead.time>>16&255),P(i,i.gzhead.time>>24&255),P(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),P(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(P(i,255&i.gzhead.extra.length),P(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(P(i,0),P(i,0),P(i,0),P(i,0),P(i,0),P(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),P(i,3),i.status=S);else{var f=h+(i.w_bits-8<<4)<<8;f|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=S,M(i,f),0!==i.strstart&&(M(i,e.adler>>>16),M(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),T(e),a=i.pending,i.pending!==i.pending_buf_size));)P(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),T(e),a=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexa&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===c&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),T(e),a=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexa&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===c&&(i.status=E)}else i.status=E;if(i.status===E&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&T(e),i.pending+2<=i.pending_buf_size&&(P(i,255&e.adler),P(i,e.adler>>8&255),e.adler=0,i.status=S)):i.status=S),0!==i.pending){if(T(e),0===e.avail_out)return i.last_flush=-1,l}else if(0===e.avail_in&&C(t)<=C(r)&&4!==t)return x(e,-5);if(i.status===k&&0!==e.avail_in)return x(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==u&&i.status!==k){var p=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(N(e),0===e.lookahead)){if(t===u)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(O(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(O(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,s=e.window;;){if(e.lookahead<=w){if(N(e),e.lookahead<=w&&t===u)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=b&&e.strstart>0&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=e.strstart+w;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=b?(r=o._tr_tally(e,1,e.match_length-b),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(O(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(O(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==p&&4!==p||(i.status=k),1===p||3===p)return 0===e.avail_out&&(i.last_flush=-1),l;if(2===p&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(I(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),T(e),0===e.avail_out))return i.last_flush=-1,l}return 4!==t?l:i.wrap<=0?1:(2===i.wrap?(P(i,255&e.adler),P(i,e.adler>>8&255),P(i,e.adler>>16&255),P(i,e.adler>>24&255),P(i,255&e.total_in),P(i,e.total_in>>8&255),P(i,e.total_in>>16&255),P(i,e.total_in>>24&255)):(M(i,e.adler>>>16),M(i,65535&e.adler)),T(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?l:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==_&&69!==t&&73!==t&&91!==t&&t!==E&&t!==S&&t!==k?x(e,d):(e.state=null,t===S?x(e,-3):l):d},t.deflateSetDictionary=function(e,t){var r,n,o,s,c,u,f,h,p=t.length;if(!e||!e.state)return d;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==_||r.lookahead)return d;for(1===s&&(e.adler=a(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===s&&(I(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,t,p-r.w_size,r.w_size,0),t=h,p=r.w_size),c=e.avail_in,u=e.next_in,f=e.input,e.avail_in=p,e.next_in=0,e.input=t,N(r);r.lookahead>=b;){n=r.strstart,o=r.lookahead-(b-1);do{r.ins_h=(r.ins_h<{"use strict";e.exports=function(e,t){var r,n,i,o,a,s,c,u,l,d,f,h,p,g,m,y,v,b,w,A,_,E,S,k,x;r=e.state,n=e.next_in,k=e.input,i=n+(e.avail_in-5),o=e.next_out,x=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),c=r.dmax,u=r.wsize,l=r.whave,d=r.wnext,f=r.window,h=r.hold,p=r.bits,g=r.lencode,m=r.distcode,y=(1<>>=w=b>>>24,p-=w,0==(w=b>>>16&255))x[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=g[(65535&b)+(h&(1<>>=w,p-=w),p<15&&(h+=k[n++]<>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=m[(65535&b)+(h&(1<c){e.msg="invalid distance too far back",r.mode=30;break e}if(h>>>=w,p-=w,_>(w=o-a)){if((w=_-w)>l&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(E=0,S=f,0===d){if(E+=u-w,w2;)x[o++]=S[E++],x[o++]=S[E++],x[o++]=S[E++],A-=3;A&&(x[o++]=S[E++],A>1&&(x[o++]=S[E++]))}else{E=o-_;do{x[o++]=x[E++],x[o++]=x[E++],x[o++]=x[E++],A-=3}while(A>2);A&&(x[o++]=x[E++],A>1&&(x[o++]=x[E++]))}break}}break}}while(n>3,h&=(1<<(p-=A<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n{"use strict";var n=r(21307),i=r(57506),o=r(28548),a=r(52399),s=r(51721),c=0,u=-2,l=1,d=12,f=30,h=852,p=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function m(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=l,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(h),t.distcode=t.distdyn=new n.Buf32(p),t.sane=1,t.back=-1,c):u}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,y(e)):u}function b(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,v(e))):u}function w(e,t){var r,n;return e?(n=new m,e.state=n,n.window=null,(r=b(e,t))!==c&&(e.state=null),r):u}var A,_,E=!0;function S(e){if(E){var t;for(A=new n.Buf32(512),_=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,A,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,_,0,e.work,{bits:5}),E=!1}e.lencode=A,e.lenbits=9,e.distcode=_,e.distbits=5}function k(e,t,r,i){var o,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,t,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,F,2,0),w=0,A=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&w)<<8)+(w>>8))%31){e.msg="incorrect header check",r.mode=f;break}if(8!=(15&w)){e.msg="unknown compression method",r.mode=f;break}if(A-=4,L=8+(15&(w>>>=4)),0===r.wbits)r.wbits=L;else if(L>r.wbits){e.msg="invalid window size",r.mode=f;break}r.dmax=1<>8&1),512&r.flags&&(F[0]=255&w,F[1]=w>>>8&255,r.check=o(r.check,F,2,0)),w=0,A=0,r.mode=3;case 3:for(;A<32;){if(0===v)break e;v--,w+=h[m++]<>>8&255,F[2]=w>>>16&255,F[3]=w>>>24&255,r.check=o(r.check,F,4,0)),w=0,A=0,r.mode=4;case 4:for(;A<16;){if(0===v)break e;v--,w+=h[m++]<>8),512&r.flags&&(F[0]=255&w,F[1]=w>>>8&255,r.check=o(r.check,F,2,0)),w=0,A=0,r.mode=5;case 5:if(1024&r.flags){for(;A<16;){if(0===v)break e;v--,w+=h[m++]<>>8&255,r.check=o(r.check,F,2,0)),w=0,A=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((x=r.length)>v&&(x=v),x&&(r.head&&(L=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,m,x,L)),512&r.flags&&(r.check=o(r.check,h,x,m)),v-=x,m+=x,r.length-=x),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===v)break e;x=0;do{L=h[m+x++],r.head&&L&&r.length<65536&&(r.head.name+=String.fromCharCode(L))}while(L&&x>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=d;break;case 10:for(;A<32;){if(0===v)break e;v--,w+=h[m++]<>>=7&A,A-=7&A,r.mode=27;break}for(;A<3;){if(0===v)break e;v--,w+=h[m++]<>>=1)){case 0:r.mode=14;break;case 1:if(S(r),r.mode=20,6===t){w>>>=2,A-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=f}w>>>=2,A-=2;break;case 14:for(w>>>=7&A,A-=7&A;A<32;){if(0===v)break e;v--,w+=h[m++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=f;break}if(r.length=65535&w,w=0,A=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(x=r.length){if(x>v&&(x=v),x>b&&(x=b),0===x)break e;n.arraySet(p,h,m,x,y),v-=x,m+=x,b-=x,y+=x,r.length-=x;break}r.mode=d;break;case 17:for(;A<14;){if(0===v)break e;v--,w+=h[m++]<>>=5,A-=5,r.ndist=1+(31&w),w>>>=5,A-=5,r.ncode=4+(15&w),w>>>=4,A-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=f;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,A-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,D={bits:r.lenbits},B=s(0,r.lens,0,19,r.lencode,0,r.work,D),r.lenbits=D.bits,B){e.msg="invalid code lengths set",r.mode=f;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,P=65535&j,!((T=j>>>24)<=A);){if(0===v)break e;v--,w+=h[m++]<>>=T,A-=T,r.lens[r.have++]=P;else{if(16===P){for(U=T+2;A>>=T,A-=T,0===r.have){e.msg="invalid bit length repeat",r.mode=f;break}L=r.lens[r.have-1],x=3+(3&w),w>>>=2,A-=2}else if(17===P){for(U=T+3;A>>=T)),w>>>=3,A-=3}else{for(U=T+7;A>>=T)),w>>>=7,A-=7}if(r.have+x>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=f;break}for(;x--;)r.lens[r.have++]=L}}if(r.mode===f)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=f;break}if(r.lenbits=9,D={bits:r.lenbits},B=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,D),r.lenbits=D.bits,B){e.msg="invalid literal/lengths set",r.mode=f;break}if(r.distbits=6,r.distcode=r.distdyn,D={bits:r.distbits},B=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,D),r.distbits=D.bits,B){e.msg="invalid distances set",r.mode=f;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(v>=6&&b>=258){e.next_out=y,e.avail_out=b,e.next_in=m,e.avail_in=v,r.hold=w,r.bits=A,a(e,E),y=e.next_out,p=e.output,b=e.avail_out,m=e.next_in,h=e.input,v=e.avail_in,w=r.hold,A=r.bits,r.mode===d&&(r.back=-1);break}for(r.back=0;O=(j=r.lencode[w&(1<>>16&255,P=65535&j,!((T=j>>>24)<=A);){if(0===v)break e;v--,w+=h[m++]<>M)])>>>16&255,P=65535&j,!(M+(T=j>>>24)<=A);){if(0===v)break e;v--,w+=h[m++]<>>=M,A-=M,r.back+=M}if(w>>>=T,A-=T,r.back+=T,r.length=P,0===O){r.mode=26;break}if(32&O){r.back=-1,r.mode=d;break}if(64&O){e.msg="invalid literal/length code",r.mode=f;break}r.extra=15&O,r.mode=22;case 22:if(r.extra){for(U=r.extra;A>>=r.extra,A-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;O=(j=r.distcode[w&(1<>>16&255,P=65535&j,!((T=j>>>24)<=A);){if(0===v)break e;v--,w+=h[m++]<>M)])>>>16&255,P=65535&j,!(M+(T=j>>>24)<=A);){if(0===v)break e;v--,w+=h[m++]<>>=M,A-=M,r.back+=M}if(w>>>=T,A-=T,r.back+=T,64&O){e.msg="invalid distance code",r.mode=f;break}r.offset=P,r.extra=15&O,r.mode=24;case 24:if(r.extra){for(U=r.extra;A>>=r.extra,A-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=f;break}r.mode=25;case 25:if(0===b)break e;if(x=E-b,r.offset>x){if((x=r.offset-x)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=f;break}x>r.wnext?(x-=r.wnext,C=r.wsize-x):C=r.wnext-x,x>r.length&&(x=r.length),I=r.window}else I=p,C=y-r.offset,x=r.length;x>b&&(x=b),b-=x,r.length-=x;do{p[y++]=I[C++]}while(--x);0===r.length&&(r.mode=21);break;case 26:if(0===b)break e;p[y++]=r.length,b--,r.mode=21;break;case 27:if(r.wrap){for(;A<32;){if(0===v)break e;v--,w|=h[m++]<{"use strict";var n=r(21307),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,c,u,l,d,f){var h,p,g,m,y,v,b,w,A,_=f.bits,E=0,S=0,k=0,x=0,C=0,I=0,T=0,O=0,P=0,M=0,R=null,N=0,L=new n.Buf16(16),B=new n.Buf16(16),D=null,U=0;for(E=0;E<=15;E++)L[E]=0;for(S=0;S=1&&0===L[x];x--);if(C>x&&(C=x),0===x)return u[l++]=20971520,u[l++]=20971520,f.bits=1,0;for(k=1;k0&&(0===e||1!==x))return-1;for(B[1]=0,E=1;E<15;E++)B[E+1]=B[E]+L[E];for(S=0;S852||2===e&&P>592)return 1;for(;;){b=E-T,d[S]v?(w=D[U+d[S]],A=R[N+d[S]]):(w=96,A=0),h=1<>T)+(p-=h)]=b<<24|w<<16|A}while(0!==p);for(h=1<>=1;if(0!==h?(M&=h-1,M+=h):M=0,S++,0==--L[E]){if(E===x)break;E=t[r+d[S]]}if(E>C&&(M&m)!==g){for(0===T&&(T=C),y+=k,O=1<<(I=E-T);I+T852||2===e&&P>592)return 1;u[g=M&m]=C<<24|I<<16|y-l}}return 0!==M&&(u[y+M]=E-T<<24|64<<16),f.bits=C,0}},78021:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},25280:(e,t,r)=>{"use strict";var n=r(21307);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,a=286,s=30,c=15,u=16,l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],d=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);i(p);var g=new Array(60);i(g);var m=new Array(512);i(m);var y=new Array(256);i(y);var v=new Array(29);i(v);var b,w,A,_=new Array(s);function E(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function S(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function k(e){return e<256?m[e]:m[256+(e>>>7)]}function x(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function C(e,t,r){e.bi_valid>u-r?(e.bi_buf|=t<>u-e.bi_valid,e.bi_valid+=r-u):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function O(e,t,r){var n,i,o=new Array(c+1),a=0;for(n=1;n<=c;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=T(o[s]++,s))}}function P(e){var t;for(t=0;t8?x(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function R(e,t,r,n){var i=2*t,o=2*r;return e[i]>1;r>=1;r--)N(e,o,r);i=u;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,N(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,a,s,u=t.dyn_tree,l=t.max_code,d=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,g=t.stat_desc.max_length,m=0;for(o=0;o<=c;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(o=u[2*u[2*(n=e.heap[r])+1]+1]+1)>g&&(o=g,m++),u[2*n+1]=o,n>l||(e.bl_count[o]++,a=0,n>=p&&(a=h[n-p]),s=u[2*n],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(d[2*n+1]+a)));if(0!==m){do{for(o=g-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[g]--,m-=2}while(m>0);for(o=g;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>l||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(e,t),O(o,l,e.bl_count)}function D(e,t,r){var n,i,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++s>=7;n0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t=3&&0===e.bl_tree[2*h[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?F(e,t,r,n):4===e.strategy||a===i?(C(e,2+(n?1:0),3),L(e,p,g)):(C(e,4+(n?1:0),3),function(e,t,r,n){var i;for(C(e,t-257,5),C(e,r-1,5),C(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(y[r]+o+1)]++,e.dyn_dtree[2*k(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){C(e,2,3),I(e,256,p),function(e){16===e.bi_valid?(x(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},47563:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},81823:(e,t,r)=>{"use strict";var n=r(68357);t.certificate=r(41320);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),c=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=c;var u=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=u;var l=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=l,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var d=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=d;var f=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},41320:(e,t,r)=>{"use strict";var n=r(68357),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),c=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),u=n.define("RDNSequence",(function(){this.seqof(c)})),l=n.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),d=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),f=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(l),this.key("validity").use(d),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(f).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=p},64988:(e,t,r)=>{"use strict";var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=r(27085),s=r(98073),c=r(48850).Buffer;e.exports=function(e,t){var r,u=e.toString(),l=u.match(n);if(l){var d="aes"+l[1],f=c.from(l[2],"hex"),h=c.from(l[3].replace(/[\r\n]/g,""),"base64"),p=a(t,f.slice(0,8),parseInt(l[1],10)).key,g=[],m=s.createDecipheriv(d,p,f);g.push(m.update(h)),g.push(m.final()),r=c.concat(g)}else{var y=u.match(o);r=c.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(i)[1],data:r}}},27552:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(81823),o=r(22562),a=r(64988),s=r(98073),c=r(54192),u=r(48850).Buffer;function l(e){var t;"object"!==(0,n.default)(e)||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var r,l,d=a(e,t),f=d.tag,h=d.data;switch(f){case"CERTIFICATE":l=i.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(l||(l=i.PublicKey.decode(h,"der")),r=l.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(l.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return l.subjectPrivateKey=l.subjectPublicKey,{type:"ec",data:l};case"1.2.840.10040.4.1":return l.algorithm.params.pub_key=i.DSAparam.decode(l.subjectPublicKey.data,"der"),{type:"dsa",data:l.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":h=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=o[e.algorithm.decrypt.cipher.algo.join(".")],a=e.algorithm.decrypt.cipher.iv,l=e.subjectPrivateKey,d=parseInt(i.split("-")[1],10)/8,f=c.pbkdf2Sync(t,r,n,d,"sha1"),h=s.createDecipheriv(i,f,a),p=[];return p.push(h.update(l)),p.push(h.final()),u.concat(p)}(h=i.EncryptedPrivateKey.decode(h,"der"),t);case"PRIVATE KEY":switch(r=(l=i.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(l.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:l.algorithm.curve,privateKey:i.ECPrivateKey.decode(l.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return l.algorithm.params.priv_key=i.DSAparam.decode(l.subjectPrivateKey,"der"),{type:"dsa",params:l.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=i.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+f)}}e.exports=l,l.signature=i.signature},48209:e=>{"use strict";var t=function(e){return e.replace(/^\s+|\s+$/g,"")};e.exports=function(e){if(!e)return{};for(var r,n={},i=t(e).split("\n"),o=0;o{"use strict";t.pbkdf2=r(1882),t.pbkdf2Sync=r(1658)},1882:(e,t,r)=>{"use strict";var n,i,o=r(48850).Buffer,a=r(63127),s=r(77401),c=r(1658),u=r(98398),l=r.g.crypto&&r.g.crypto.subtle,d={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},f=[];function h(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(e,t,r,n,i){return l.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return l.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,t,i,g,m,y){"function"==typeof m&&(y=m,m=void 0);var v=d[(m=m||"sha1").toLowerCase()];if(v&&"function"==typeof r.g.Promise){if(a(i,g),e=u(e,s,"Password"),t=u(t,s,"Salt"),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){h()((function(){t(null,e)}))}),(function(e){h()((function(){t(e)}))}))}(function(e){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(void 0!==f[e])return f[e];var t=p(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return f[e]=t,t}(v).then((function(r){return r?p(e,t,i,g,v):c(e,t,i,g,m)})),y)}else h()((function(){var r;try{r=c(e,t,i,g,m)}catch(e){return y(e)}y(null,r)}))}},77401:(e,t,r)=>{"use strict";var n,i=r(19142);n=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=n},63127:e=>{"use strict";var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!=r)throw new TypeError("Bad key length")}},1658:(e,t,r)=>{"use strict";var n=r(55349),i=r(26707),o=r(51708),a=r(48850).Buffer,s=r(63127),c=r(77401),u=r(98398),l=a.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(e,t,r){var s=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),c="sha512"===e||"sha384"===e?128:64;t.length>c?t=s(t):t.length{"use strict";var n=r(48850).Buffer;e.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},19142:e=>{"use strict";var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,c=[],u=!1,l=-1;function d(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&f())}function f(){if(!u){var e=a(d);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l1)for(var r=1;r{"use strict";t.publicEncrypt=r(82466),t.privateDecrypt=r(53144),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},26873:(e,t,r)=>{"use strict";var n=r(35866),i=r(48850).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,a=i.alloc(0),s=0;a.length{"use strict";var n=r(27552),i=r(26873),o=r(27223),a=r(31734),s=r(99782),c=r(35866),u=r(2561),l=r(48850).Buffer;e.exports=function(e,t,r){var d;d=e.padding?e.padding:r?1:4;var f,h=n(e),p=h.modulus.byteLength();if(t.length>p||new a(t).cmp(h.modulus)>=0)throw new Error("decryption error");f=r?u(new a(t),h):s(t,h);var g=l.alloc(p-f.length);if(f=l.concat([g,f],p),4===d)return function(e,t){var r=e.modulus.byteLength(),n=c("sha1").update(l.alloc(0)).digest(),a=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),u=t.slice(a+1),d=o(s,i(u,a)),f=o(u,i(d,r-a-1));if(function(e,t){e=l.from(e),t=l.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++i=t.length){o++;break}var a=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,f,r);if(3===d)return f;throw new Error("unknown padding")}},82466:(e,t,r)=>{"use strict";var n=r(27552),i=r(75010),o=r(35866),a=r(26873),s=r(27223),c=r(31734),u=r(2561),l=r(99782),d=r(48850).Buffer;e.exports=function(e,t,r){var f;f=e.padding?e.padding:r?1:4;var h,p=n(e);if(4===f)h=function(e,t){var r=e.modulus.byteLength(),n=t.length,u=o("sha1").update(d.alloc(0)).digest(),l=u.length,f=2*l;if(n>r-f-2)throw new Error("message too long");var h=d.alloc(r-n-f-2),p=r-l-1,g=i(l),m=s(d.concat([u,h,d.alloc(1,1),t],p),a(g,p)),y=s(g,a(m,l));return new c(d.concat([d.alloc(1),y,m],r))}(p,t);else if(1===f)h=function(e,t,r){var n,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");return n=r?d.alloc(a-o-3,255):function(e){for(var t,r=d.allocUnsafe(e),n=0,o=i(2*e),a=0;n=0)throw new Error("data too long for modulus")}return r?l(h,p):u(h,p)}},2561:(e,t,r)=>{"use strict";var n=r(31734),i=r(48850).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},27223:e=>{"use strict";e.exports=function(e,t){for(var r=e.length,n=-1;++n{"use strict";var n=r(28847)(r(3355)),i=r(22028),o=r(33103),a=r(80034);function s(e,t){return t.encode?t.strict?i(e):encodeURIComponent(e):e}function c(e){return Array.isArray(e)?e.sort():"object"===(0,n.default)(e)?c(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}function u(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function l(e,t){var r=function(e){var t;switch(e.arrayFormat){case"index":return function(e,r,n){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return function(e,r,n){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};default:return function(e,t,r){void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t=o({arrayFormat:"none"},t)),i=Object.create(null);return"string"!=typeof e?i:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),n=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:a(o),r(a(n),o,i)})),Object.keys(i).sort().reduce((function(e,t){var r=i[t];return Boolean(r)&&"object"===(0,n.default)(r)&&!Array.isArray(r)?e[t]=c(r):e[t]=r,e}),Object.create(null))):i}t.extract=u,t.parse=l,t.stringify=function(e,t){!1===(t=o({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var r=function(e){switch(e.arrayFormat){case"index":return function(t,r,n){return null===r?[s(t,e),"[",n,"]"].join(""):[s(t,e),"[",s(n,e),"]=",s(r,e)].join("")};case"bracket":return function(t,r){return null===r?s(t,e):[s(t,e),"[]=",s(r,e)].join("")};default:return function(t,r){return null===r?s(t,e):[s(t,e),"=",s(r,e)].join("")}}}(t);return e?Object.keys(e).sort(t.sort).map((function(n){var i=e[n];if(void 0===i)return"";if(null===i)return s(n,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(r(n,e,o.length))})),o.join("&")}return s(n,t)+"="+s(i,t)})).filter((function(e){return e.length>0})).join("&"):""},t.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:l(u(e),t)}}},75010:(e,t,r)=>{"use strict";var n=r(19142),i=65536,o=r(48850).Buffer,a=r.g.crypto||r.g.msCrypto;a&&a.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>i)for(var s=0;s{"use strict";var n=r(19142);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(48850),a=r(75010),s=o.Buffer,c=o.kMaxLength,u=r.g.crypto||r.g.msCrypto,l=Math.pow(2,32)-1;function d(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>l||e<0)throw new TypeError("offset must be a uint32");if(e>c||e>t)throw new RangeError("offset out of range")}function f(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>l||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>c)throw new RangeError("buffer too small")}function h(e,t,r,i){if(n.browser){var o=e.buffer,s=new Uint8Array(o,t,r);return u.getRandomValues(s),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return a(r).copy(e,t),e;a(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}u&&u.getRandomValues||!n.browser?(t.randomFill=function(e,t,n,i){if(!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return d(t,e.length),f(n,t,e.length),h(e,t,n,i)},t.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return d(t,e.length),void 0===n&&(n=e.length-t),f(n,t,e.length),h(e,t,n)}):(t.randomFill=i,t.randomFillSync=i)},79024:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i={};function o(e,t,r){r||(r=Error);var n=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);n.prototype.name=r.name,n.prototype.code=e,i[e]=n}function a(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,c,u;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var l=("number"!=typeof u&&(u=0),u+1>(c=e).length||-1===c.indexOf(".",u)?"argument":"property");s='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(a(t,"type"))}return s+". Received type ".concat((0,n.default)(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=i},76884:(e,t,r)=>{"use strict";var n=r(19142),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(6297),a=r(71471);r(41736)(l,o);for(var s=i(a.prototype),c=0;c{"use strict";e.exports=i;var n=r(99154);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(41736)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},6297:(e,t,r)=>{"use strict";var n,i=r(19142);e.exports=k,k.ReadableState=S,r(38291).EventEmitter;var o,a=function(e,t){return e.listeners(t).length},s=r(37144),c=r(29033).Buffer,u=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=r(94616);o=l&&l.debuglog?l.debuglog("stream"):function(){};var d,f,h,p=r(25392),g=r(57572),m=r(6756).getHighWaterMark,y=r(79024).q,v=y.ERR_INVALID_ARG_TYPE,b=y.ERR_STREAM_PUSH_AFTER_EOF,w=y.ERR_METHOD_NOT_IMPLEMENTED,A=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(41736)(k,s);var _=g.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(76884),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",i),this.buffer=new p,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!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(23462).s),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function k(e){if(n=n||r(76884),!(this instanceof k))return new k(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function x(e,t,r,n,i){o("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}}(e,s);else if(i||(a=function(e,t){var r,n;return n=t,c.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],t)),r}(s,t)),a)_(e,a);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n)s.endEmitted?_(e,new A):C(e,s,t,!0);else if(s.ended)_(e,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?C(e,s,t,!1):M(e,s)):C(e,s,t,!1)}else n||(s.reading=!1,M(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(P,e))}function P(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){o("readable nexttick read 0"),e.read(0)}function B(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function U(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function j(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(F,t,e))}function F(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function z(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?j(this):O(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&j(this),null;var n,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e0?U(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&j(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){_(this,new w("_read()"))},k.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===i.stdout||e===i.stderr?g:c;function c(){o("onend"),e.end()}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",(function t(i,a){o("onunpipe"),i===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",c),r.removeListener("end",g),r.removeListener("data",d),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}));var u=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,D(e))}}(r);e.on("drain",u);var l=!1;function d(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==z(n.pipes,e))&&!l&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function f(t){o("onerror",t),g(),e.removeListener("error",f),0===a(e,"error")&&_(e,t)}function h(){e.removeListener("finish",p),g()}function p(){o("onfinish"),e.removeListener("close",h),g()}function g(){o("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",h),e.once("finish",p),e.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?O(this):n.reading||i.nextTick(L,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(N,this),r},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(N,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(B,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a{"use strict";e.exports=l;var n=r(79024).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,c=r(76884);function u(e,t){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!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";var n,i=r(19142);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=k,k.WritableState=S;var a,s={deprecate:r(96219)},c=r(37144),u=r(29033).Buffer,l=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},d=r(57572),f=r(6756).getHighWaterMark,h=r(79024).q,p=h.ERR_INVALID_ARG_TYPE,g=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_MULTIPLE_CALLBACK,y=h.ERR_STREAM_CANNOT_PIPE,v=h.ERR_STREAM_DESTROYED,b=h.ERR_STREAM_NULL_VALUES,w=h.ERR_STREAM_WRITE_AFTER_END,A=h.ERR_UNKNOWN_ENCODING,_=d.errorOrDestroy;function E(){}function S(e,t,a){n=n||r(76884),e=e||{},"boolean"!=typeof a&&(a=t instanceof n),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(P,e,t),e._writableState.errorEmitted=!0,_(e,n)):(o(n),e._writableState.errorEmitted=!0,_(e,n),P(e,t))}(e,r,n,t,o);else{var a=T(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||I(e,r),n?i.nextTick(C,e,r,a,o):C(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function k(e){var t=this instanceof(n=n||r(76884));if(!t&&!a.call(k,this))return new k(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function x(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),P(e,t)}function I(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,c=!0;r;)i[s]=r,r.isBuf||(c=!1),r=r.next,s+=1;i.allBuffers=c,x(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,d=r.callback;if(x(e,t,!1,t.objectMode?1:u.length,u,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function T(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(r){t.pendingcb--,r&&_(e,r),t.prefinished=!0,e.emit("prefinish"),P(e,t)}))}function P(e,t){var r=T(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(41736)(k,c),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===k&&e&&e._writableState instanceof S}})):a=function(e){return e instanceof this},k.prototype.pipe=function(){_(this,new y)},k.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,u.isBuffer(n)||n instanceof l);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=E),o.ending?function(e,t){var r=new w;_(e,r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o;return null===r?o=new b:"string"==typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(_(e,o),i.nextTick(n,o),!1)}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r)),t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length-1))throw new A(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new g("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=d.destroy,k.prototype._undestroy=d.undestroy,k.prototype._destroy=function(e,t){t(e)}},32317:(e,t,r)=>{"use strict";var n,i=r(19142),o=r(28847)(r(3355));function a(e,t,r){return(t=function(e){var t=function(e){if("object"!==(0,o.default)(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==(0,o.default)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===(0,o.default)(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(5831),c=Symbol("lastResolve"),u=Symbol("lastReject"),l=Symbol("error"),d=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),p=Symbol("stream");function g(e,t){return{value:e,done:t}}function m(e){var t=e[c];if(null!==t){var r=e[p].read();null!==r&&(e[f]=null,e[c]=null,e[u]=null,t(g(r,!1)))}}function y(e){i.nextTick(m,e)}var v=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((a(n={get stream(){return this[p]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[d])return Promise.resolve(g(void 0,!0));if(this[p].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[l]?r(e[l]):t(g(void 0,!0))}))}));var r,n=this[f];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[d]?r(g(void 0,!0)):t[h](r,n)}),n)}}(n,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(g(o,!1));r=new Promise(this[h])}return this[f]=r,r}},Symbol.asyncIterator,(function(){return this})),a(n,"return",(function(){var e=this;return new Promise((function(t,r){e[p].destroy(null,(function(e){e?r(e):t(g(void 0,!0))}))}))})),n),v);e.exports=function(e){var t,r=Object.create(b,(a(t={},p,{value:e,writable:!0}),a(t,c,{value:null,writable:!0}),a(t,u,{value:null,writable:!0}),a(t,l,{value:null,writable:!0}),a(t,d,{value:e._readableState.endEmitted,writable:!0}),a(t,h,{value:function(e,t){var n=r[p].read();n?(r[f]=null,r[c]=null,r[u]=null,e(g(n,!1))):(r[c]=e,r[u]=t)},writable:!0}),t));return r[f]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[f]=null,r[c]=null,r[u]=null,t(e)),void(r[l]=e)}var n=r[c];null!==n&&(r[f]=null,r[c]=null,r[u]=null,n(g(void 0,!0))),r[d]=!0})),e.on("readable",y.bind(null,r)),r}},25392:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t,r,n,i=c.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,c.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=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,t}},{key:l,value:function(e,t){return u(this,o(o({},t),{},{depth:0,customInspect:!1}))}}])&&function(e,t){for(var r=0;r{"use strict";var n=r(19142);function i(e,t){a(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return s||c?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(o,r),t(e)):n.nextTick(o,r)})),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(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},5831:(e,t,r)=>{"use strict";var n=r(79024).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i{"use strict";e.exports=function(){throw new Error("Readable.from is not available in the browser")}},60384:(e,t,r)=>{"use strict";var n,i=r(79024).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function c(e){e()}function u(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i0,(function(e){l||(l=e),e&&f.forEach(c),o||(f.forEach(c),d(l))}))}));return t.reduce(u)}},6756:(e,t,r)=>{"use strict";var n=r(79024).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,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 e.objectMode?16:16384}}},37144:(e,t,r)=>{"use strict";e.exports=r(38291).EventEmitter},86505:(e,t,r)=>{"use strict";(t=e.exports=r(6297)).Stream=t,t.Readable=t,t.Writable=r(71471),t.Duplex=r(76884),t.Transform=r(99154),t.PassThrough=r(53582),t.finished=r(5831),t.pipeline=r(60384)},26707:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(41736),o=r(22353),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],c=[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],u=[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],l=[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],d=[0,1518500249,1859775393,2400959708,2840853838],f=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function g(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,A=0|this._b,_=0|this._c,E=0|this._d,S=0|this._e,k=0;k<80;k+=1){var x,C;k<16?(x=g(r,n,i,o,h,e[s[k]],d[0],u[k]),C=b(w,A,_,E,S,e[c[k]],f[0],l[k])):k<32?(x=m(r,n,i,o,h,e[s[k]],d[1],u[k]),C=v(w,A,_,E,S,e[c[k]],f[1],l[k])):k<48?(x=y(r,n,i,o,h,e[s[k]],d[2],u[k]),C=y(w,A,_,E,S,e[c[k]],f[2],l[k])):k<64?(x=v(r,n,i,o,h,e[s[k]],d[3],u[k]),C=m(w,A,_,E,S,e[c[k]],f[3],l[k])):(x=b(r,n,i,o,h,e[s[k]],d[4],u[k]),C=g(w,A,_,E,S,e[c[k]],f[4],l[k])),r=h,h=o,o=p(i,10),i=n,n=x,w=S,S=E,E=p(_,10),_=A,A=C}var I=this._b+i+E|0;this._b=this._c+o+S|0,this._c=this._d+h+w|0,this._d=this._e+r+A|0,this._e=this._a+n+_|0,this._a=I},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},6905:(e,t,r)=>{"use strict";var n=r(29033).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.getLength=t.decode=t.encode=void 0;var i,o=(i=r(31734))&&i.__esModule?i:{default:i};function a(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function s(e,t){if(e<56)return n.from([e+t]);var r=l(e),i=l(t+55+r.length/2);return n.from(i+r,"hex")}function c(e){var t,r,i,o,s,u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,i=128===l?n.from([]):e.slice(1,t),2===t&&i[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:i,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1e.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(o=e.slice(r,d)).length)throw new Error("invalid rlp, List has a invalid length");for(;o.length;)s=c(o),u.push(s.data),o=s.remainder;return{data:u,remainder:e.slice(d)}}function u(e){return"0x"===e.slice(0,2)}function l(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function d(e){if(!n.isBuffer(e)){if("string"==typeof e)return u(e)?n.from((r="string"!=typeof(i=e)?i:u(i)?i.slice(2):i).length%2?"0"+r:r,"hex"):n.from(e);if("number"==typeof e||"bigint"==typeof e)return e?(t=l(e),n.from(t,"hex")):n.from([]);if(null==e)return n.from([]);if(e instanceof Uint8Array)return n.from(e);if(o.default.isBN(e))return n.from(e.toArray());throw new Error("invalid type")}var t,r,i;return e}t.encode=function e(t){if(Array.isArray(t)){for(var r=[],i=0;i{"use strict";var n=r(29033),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},11755:(e,t,r)=>{"use strict";var n,i=r(19142),o=r(28847)(r(3355)),a=r(29033),s=a.Buffer,c={};for(n in a)a.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(c[n]=a[n]);var u=c.Buffer={};for(n in s)s.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(u[n]=s[n]);if(c.Buffer.prototype=s.prototype,u.from&&u.from!==Uint8Array.from||(u.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+(0,o.default)(e));if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,o.default)(e));return s(e,t,r)}),u.alloc||(u.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+(0,o.default)(e));if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=s(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!c.kStringMaxLength)try{c.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}c.constants||(c.constants={MAX_LENGTH:c.kMaxLength},c.kStringMaxLength&&(c.constants.MAX_STRING_LENGTH=c.kStringMaxLength)),e.exports=c},67799:e=>{"use strict";!function(){var t=2147483647;function r(e){var t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,c=528734635,u=1541459225,l=new Uint32Array(64);function d(e){for(var d=0,f=e.length;f>=64;){var h=r,p=n,g=i,m=o,y=a,v=s,b=c,w=u,A=void 0,_=void 0,E=void 0,S=void 0,k=void 0;for(_=0;_<16;_++)E=d+4*_,l[_]=(255&e[E])<<24|(255&e[E+1])<<16|(255&e[E+2])<<8|255&e[E+3];for(_=16;_<64;_++)S=((A=l[_-2])>>>17|A<<15)^(A>>>19|A<<13)^A>>>10,k=((A=l[_-15])>>>7|A<<25)^(A>>>18|A<<14)^A>>>3,l[_]=(S+l[_-7]|0)+(k+l[_-16]|0)|0;for(_=0;_<64;_++)S=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&v^~y&b)|0)+(w+(t[_]+l[_]|0)|0)|0,k=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&p^h&g^p&g)|0,w=b,b=v,v=y,y=m+S|0,m=g,g=p,p=h,h=S+k|0;r=r+h|0,n=n+p|0,i=i+g|0,o=o+m|0,a=a+y|0,s=s+v|0,c=c+b|0,u=u+w|0,d+=64,f-=64}}d(e);var f,h=e.length%64,p=e.length/536870912|0,g=e.length<<3,m=h<56?56:120,y=e.slice(e.length-h,e.length);for(y.push(128),f=h+1;f>>24&255),y.push(p>>>16&255),y.push(p>>>8&255),y.push(p>>>0&255),y.push(g>>>24&255),y.push(g>>>16&255),y.push(g>>>8&255),y.push(g>>>0&255),d(y),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255]}function n(e,t,n){e=e.length<=64?e:r(e);var i,o=64+t.length+4,a=new Array(o),s=new Array(64),c=[];for(i=0;i<64;i++)a[i]=54;for(i=0;i=o-4;e--){if(a[e]++,a[e]<=255)return;a[e]=0}}for(;n>=32;)u(),c=c.concat(r(s.concat(r(a)))),n-=32;return n>0&&(u(),c=c.concat(r(s.concat(r(a))).slice(0,n))),c}function i(e,t,r,n,i){var o;for(c(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)s(e,16*o,i,16),a(i,n),c(i,0,e,t+16*o,16);for(o=0;o>>32-t}function a(e,t){c(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=o(t[0]+t[12],7),t[8]^=o(t[4]+t[0],9),t[12]^=o(t[8]+t[4],13),t[0]^=o(t[12]+t[8],18),t[9]^=o(t[5]+t[1],7),t[13]^=o(t[9]+t[5],9),t[1]^=o(t[13]+t[9],13),t[5]^=o(t[1]+t[13],18),t[14]^=o(t[10]+t[6],7),t[2]^=o(t[14]+t[10],9),t[6]^=o(t[2]+t[14],13),t[10]^=o(t[6]+t[2],18),t[3]^=o(t[15]+t[11],7),t[7]^=o(t[3]+t[15],9),t[11]^=o(t[7]+t[3],13),t[15]^=o(t[11]+t[7],18),t[1]^=o(t[0]+t[3],7),t[2]^=o(t[1]+t[0],9),t[3]^=o(t[2]+t[1],13),t[0]^=o(t[3]+t[2],18),t[6]^=o(t[5]+t[4],7),t[7]^=o(t[6]+t[5],9),t[4]^=o(t[7]+t[6],13),t[5]^=o(t[4]+t[7],18),t[11]^=o(t[10]+t[9],7),t[8]^=o(t[11]+t[10],9),t[9]^=o(t[8]+t[11],13),t[10]^=o(t[9]+t[8],18),t[12]^=o(t[15]+t[14],7),t[13]^=o(t[12]+t[15],9),t[14]^=o(t[13]+t[12],13),t[15]^=o(t[14]+t[13],18);for(var n=0;n<16;++n)e[n]+=t[n]}function s(e,t,r,n){for(var i=0;i=256)return!1}return!0}function l(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function d(e,r,o,a,d,f,h){if(o=l(o,"N"),a=l(a,"r"),d=l(d,"p"),f=l(f,"dkLen"),0===o||0!=(o&o-1))throw new Error("N must be power of 2");if(o>t/128/a)throw new Error("N too large");if(a>t/128/d)throw new Error("r too large");if(!u(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!u(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var p=n(e,r,128*d*a),g=new Uint32Array(32*d*a),m=0;mP&&(r=P);for(var u=0;uP&&(r=P);for(var m=0;m>8&255),p.push(g[N]>>16&255),p.push(g[N]>>24&255);var L=n(e,p,f);return h&&h(null,1,L),L}h&&M(t)};if(!h)for(;;){var N=R();if(null!=N)return N}R()}var f={scrypt:function(e,t,r,n,i,o,a){return new Promise((function(s,c){var u=0;a&&a(0),d(e,t,r,n,i,o,(function(e,t,r){if(e)c(e);else if(r)a&&1!==u&&a(1),s(new Uint8Array(r));else if(a&&t!==u)return u=t,a(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(d(e,t,r,n,i,o))}};e.exports=f}()},57902:(e,t,r)=>{"use strict";e.exports=r(36922)(r(38123))},38123:(e,t,r)=>{"use strict";var n=new(0,r(36597).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(i.p)>=0)return null;var a=(r=r.toRed(i.red)).redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===e!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var a=new o(t),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===e||7===e)&&s.isOdd()!==(7===e))return null;var c=a.redSqr().redIMul(a);return s.redSqr().redISub(c.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var r=t.encode(null,33===e.length),n=0;n=0)return 1;if(r.iadd(new o(e)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul:function(e,t){var r=new o(t);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(e)),r.cmp(i.n)>=0&&(r=r.umod(i.n));var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:function(e){return null===a(e)?1:0},publicKeyCreate:function(e,t){var r=new o(t);return r.cmp(i.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var r=a(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate:function(e,t){var r=a(t);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine:function(e,t){for(var r=new Array(t.length),n=0;n=0)return 2;var c=n.getPublic().add(i.g.mul(r));return c.isInfinity()?2:(s(e,c),0)},publicKeyTweakMul:function(e,t,r){var n=a(t);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize:function(e){var t=new o(e.subarray(0,32)),r=new o(e.subarray(32,64));return t.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&e.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var r=t.subarray(0,32),n=t.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=e.output,s=a.subarray(4,37);s[0]=0,s.set(r,1);for(var c=33,u=0;c>1&&0===s[u]&&!(128&s[u+1]);--c,++u);if(128&(s=s.subarray(u))[0])return 1;if(c>1&&0===s[0]&&!(128&s[1]))return 1;var l=a.subarray(39,72);l[0]=0,l.set(n,1);for(var d=33,f=0;d>1&&0===l[f]&&!(128&l[f+1]);--d,++f);return 128&(l=l.subarray(f))[0]||d>1&&0===l[0]&&!(128&l[1])?1:(e.outputlen=6+c+d,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+c]=2,a[5+c]=l.length,a.set(l,6+c),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;var n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;var a=t.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;var s=t.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 c=new o(a);c.cmp(i.n)>=0&&(c=new o(0));var u=new o(t.subarray(6+r));return u.cmp(i.n)>=0&&(u=new o(0)),e.set(c.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,r,a,s){if(s){var c=s;s=function(e){var n=c(t,r,null,a,e);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new o(n)}}var u,l=new o(r);if(l.cmp(i.n)>=0||l.isZero())return 1;try{u=n.sign(t,r,{canonical:!0,k:s,pers:a})}catch(e){return 1}return e.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),e.recid=u.recoveryParam,0},ecdsaVerify:function(e,t,r){var s={r:e.subarray(0,32),s:e.subarray(32,64)},c=new o(s.r),u=new o(s.s);if(c.cmp(i.n)>=0||u.cmp(i.n)>=0)return 1;if(1===u.cmp(n.nh)||c.isZero()||u.isZero())return 3;var l=a(r);if(null===l)return 2;var d=l.getPublic();return n.verify(t,s,d)?0:3},ecdsaRecover:function(e,t,r,a){var c,u={r:t.slice(0,32),s:t.slice(32,64)},l=new o(u.r),d=new o(u.s);if(l.cmp(i.n)>=0||d.cmp(i.n)>=0)return 1;if(l.isZero()||d.isZero())return 2;try{c=n.recoverPubKey(a,u,r)}catch(e){return 2}return s(e,c),0},ecdh:function(e,t,r,s,c,u,l){var d=a(t);if(null===d)return 1;var f=new o(r);if(f.cmp(i.n)>=0||f.isZero())return 2;var h=d.getPublic().mul(f);if(void 0===c)for(var p=h.encode(null,!0),g=n.hash().update(p).digest(),m=0;m<32;++m)e[m]=g[m];else{u||(u=new Uint8Array(32));for(var y=h.getX().toArray("be",32),v=0;v<32;++v)u[v]=y[v];l||(l=new Uint8Array(32));for(var b=h.getY().toArray("be",32),w=0;w<32;++w)l[w]=b[w];var A=c(u,l,s);if(!(A instanceof Uint8Array&&A.length===e.length))return 2;e.set(A)}return 0}}},36922:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"==typeof e&&(e=e(t)),u("output",e,t),e}function f(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){if(c(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&u("seed",t,32),1===e.contextRandomize(t))throw new Error("Unknow error on context randomization")},privateKeyVerify:function(t){return u("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(u("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(r)}},privateKeyTweakAdd:function(t,r){switch(u("private key",t,32),u("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(n)}},privateKeyTweakMul:function(t,r){switch(u("private key",t,32),u("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(i)}},publicKeyVerify:function(t){return u("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(u("private key",t,32),l(r),n=d(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(a)}},publicKeyConvert:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(u("public key",t,[33,65]),l(r),n=d(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(o);case 2:throw new Error(a)}},publicKeyNegate:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;switch(u("public key",t,[33,65]),l(n),i=d(i,n?33:65),e.publicKeyNegate(i,t)){case 0:return i;case 1:throw new Error(o);case 2:throw new Error(r);case 3:throw new Error(a)}},publicKeyCombine:function(r){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;c(Array.isArray(r),"Expected public keys to be an Array"),c(r.length>0,"Expected public keys array will have more than zero items");var s,f=function(e){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(r);try{for(f.s();!(s=f.n()).done;)u("public key",s.value,[33,65])}catch(e){f.e(e)}finally{f.f()}switch(l(n),i=d(i,n?33:65),e.publicKeyCombine(i,r)){case 0:return i;case 1:throw new Error(o);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(a)}},publicKeyTweakAdd:function(t,r){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0;switch(u("public key",t,[33,65]),u("tweak",r,32),l(i),a=d(a,i?33:65),e.publicKeyTweakAdd(a,t,r)){case 0:return a;case 1:throw new Error(o);case 2:throw new Error(n)}},publicKeyTweakMul:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0;switch(u("public key",t,[33,65]),u("tweak",r,32),l(n),a=d(a,n?33:65),e.publicKeyTweakMul(a,t,r)){case 0:return a;case 1:throw new Error(o);case 2:throw new Error(i)}},signatureNormalize:function(t){switch(u("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(s)}},signatureExport:function(t,n){u("signature",t,64);var i={output:n=d(n,72),outputlen:72};switch(e.signatureExport(i,t)){case 0:return n.slice(0,i.outputlen);case 1:throw new Error(s);case 2:throw new Error(r)}},signatureImport:function(t,n){switch(u("signature",t),n=d(n,64),e.signatureImport(n,t)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(r)}},ecdsaSign:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;u("message",t,32),u("private key",n,32),c("Object"===f(i),"Expected options to be an Object"),void 0!==i.data&&u("options.data",i.data),void 0!==i.noncefn&&c("Function"===f(i.noncefn),"Expected options.noncefn to be a Function");var a={signature:o=d(o,64),recid:null};switch(e.ecdsaSign(a,t,n,i.data,i.noncefn)){case 0:return a;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(r)}},ecdsaVerify:function(t,r,n){switch(u("signature",t,64),u("message",r,32),u("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(s);case 2:throw new Error(o)}},ecdsaRecover:function(t,n,i){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;switch(u("signature",t,64),c("Number"===f(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),u("message",i,32),l(o),a=d(a,o?33:65),e.ecdsaRecover(a,t,n,i)){case 0:return a;case 1:throw new Error(s);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(r)}},ecdh:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(u("public key",t,[33,65]),u("private key",r,32),c("Object"===f(n),"Expected options to be an Object"),void 0!==n.data&&u("options.data",n.data),void 0!==n.hashfn?(c("Function"===f(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&u("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&u("options.ybuf",n.ybuf,32),u("output",i)):i=d(i,32),e.ecdh(i,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(o);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}}}},77990:(e,t,r)=>{"use strict";var n=r(57701),i=r(94919),o=r(1020)(),a=r(53820),s=n("%TypeError%"),c=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(u=!1)}return(n||u||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},76003:(e,t,r)=>{"use strict";var n=r(48850).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=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 e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},51708:(e,t,r)=>{"use strict";var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(8210),n.sha1=r(10544),n.sha224=r(66288),n.sha256=r(34571),n.sha384=r(46959),n.sha512=r(14515)},8210:(e,t,r)=>{"use strict";var n=r(41736),i=r(76003),o=r(48850).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=r[d-3]^r[d-8]^r[d-14]^r[d-16];for(var f=0;f<80;++f){var h=~~(f/20),p=0|((t=n)<<5|t>>>27)+l(h,i,o,s)+c+r[f]+a[h];c=s,s=o,o=u(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=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},10544:(e,t,r)=>{"use strict";var n=r(41736),i=r(76003),o=r(48850).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function d(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=(t=r[f-3]^r[f-8]^r[f-14]^r[f-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),g=u(n)+d(p,i,o,s)+c+r[h]+a[p]|0;c=s,s=o,o=l(i),i=n,n=g}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=c+this._e|0},c.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},66288:(e,t,r)=>{"use strict";var n=r(41736),i=r(34571),o=r(76003),a=r(48850).Buffer,s=new Array(64);function c(){this.init(),this._w=s,o.call(this,64,56)}n(c,i),c.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},c.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c},34571:(e,t,r)=>{"use strict";var n=r(41736),i=r(76003),o=r(48850).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 c(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function f(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(c,i),c.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},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,p=0|this._f,g=0|this._g,m=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+h(r[y-15])+r[y-16];for(var v=0;v<64;++v){var b=m+f(c)+u(c,p,g)+a[v]+r[v]|0,w=d(n)+l(n,i,o)|0;m=g,g=p,p=c,c=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=c+this._e|0,this._f=p+this._f|0,this._g=g+this._g|0,this._h=m+this._h|0},c.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},46959:(e,t,r)=>{"use strict";var n=r(41736),i=r(14515),o=r(76003),a=r(48850).Buffer,s=new Array(160);function c(){this.init(),this._w=s,o.call(this,128,112)}n(c,i),c.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},c.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},14515:(e,t,r)=>{"use strict";var n=r(41736),i=r(76003),o=r(48850).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 c(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function f(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0>>0?1:0}n(c,i),c.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},c.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,c=0|this._fh,v=0|this._gh,b=0|this._hh,w=0|this._al,A=0|this._bl,_=0|this._cl,E=0|this._dl,S=0|this._el,k=0|this._fl,x=0|this._gl,C=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var T=t[I-30],O=t[I-30+1],P=h(T,O),M=p(O,T),R=g(T=t[I-4],O=t[I-4+1]),N=m(O,T),L=t[I-14],B=t[I-14+1],D=t[I-32],U=t[I-32+1],j=M+B|0,F=P+L+y(j,M)|0;F=(F=F+R+y(j=j+N|0,N)|0)+D+y(j=j+U|0,U)|0,t[I]=F,t[I+1]=j}for(var z=0;z<160;z+=2){F=t[z],j=t[z+1];var q=l(r,n,i),H=l(w,A,_),V=d(r,w),$=d(w,r),K=f(s,S),W=f(S,s),G=a[z],Q=a[z+1],Y=u(s,c,v),Z=u(S,k,x),J=C+W|0,X=b+K+y(J,C)|0;X=(X=(X=X+Y+y(J=J+Z|0,Z)|0)+G+y(J=J+Q|0,Q)|0)+F+y(J=J+j|0,j)|0;var ee=$+H|0,te=V+q+y(ee,$)|0;b=v,C=x,v=c,x=k,c=s,k=S,s=o+X+y(S=E+J|0,E)|0,o=i,E=_,i=n,_=A,n=r,A=w,r=X+te+y(w=J+ee|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+A|0,this._cl=this._cl+_|0,this._dl=this._dl+E|0,this._el=this._el+S|0,this._fl=this._fl+k|0,this._gl=this._gl+x|0,this._hl=this._hl+C|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+n+y(this._bl,A)|0,this._ch=this._ch+i+y(this._cl,_)|0,this._dh=this._dh+o+y(this._dl,E)|0,this._eh=this._eh+s+y(this._el,S)|0,this._fh=this._fh+c+y(this._fl,k)|0,this._gh=this._gh+v+y(this._gl,x)|0,this._hh=this._hh+b+y(this._hl,C)|0},c.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},57245:(e,t,r)=>{"use strict";e.exports=i;var n=r(38291).EventEmitter;function i(){n.call(this)}r(41736)(i,n),i.Readable=r(6297),i.Writable=r(71471),i.Duplex=r(76884),i.Transform=r(99154),i.PassThrough=r(53582),i.finished=r(5831),i.pipeline=r(60384),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",c));var a=!1;function s(){a||(a=!0,e.end())}function c(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",c),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",u),e.on("error",u),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},29519:(e,t,r)=>{"use strict";var n=r(38844),i=r(53319),o=r(87705),a=r(83675),s=r(51143),c=t;c.request=function(e,t){e="string"==typeof e?s.parse(e):o(e);var i=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,c=e.hostname||e.host,u=e.port,l=e.path||"/";c&&-1!==c.indexOf(":")&&(c="["+c+"]"),e.url=(c?a+"//"+c:"")+(u?":"+u:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new n(e);return t&&d.on("response",t),d},c.get=function(e,t){var r=c.request(e,t);return r.end(),r},c.ClientRequest=n,c.IncomingMessage=i.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=a,c.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"]},23928:(e,t,r)=>{"use strict";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(e){n=null}}else n=null;return n}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),t.writableStream=a(r.g.WritableStream),t.abortController=a(r.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!i()&&a(i().overrideMimeType),n=null},38844:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(19142),o=r(23928),a=r(41736),s=r(53319),c=r(86505),u=s.IncomingMessage,l=s.readyStates,d=e.exports=function(e){var t,r=this;c.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+n.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,i),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};a(d,c.Writable),d.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===f.indexOf(r)&&(this._headers[r]={name:e,value:t})},d.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},d.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},d.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var n=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach((function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach((function(e){s.push([t,e])})):s.push([t,r])})),"fetch"===e._mode){var c=null;if(o.abortController){var u=new AbortController;c=u.signal,e._fetchAbortController=u,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}r.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:c}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var d=e._xhr=new r.g.XMLHttpRequest;try{d.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in d&&(d.responseType=e._mode),"withCredentials"in d&&(d.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(d.timeout=t.requestTimeout,d.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){d.setRequestHeader(e[0],e[1])})),e._response=null,d.onreadystatechange=function(){switch(d.readyState){case l.LOADING:case l.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(d.onprogress=function(){e._onXHRProgress()}),d.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{d.send(a)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},d.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},d.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},d.prototype._write=function(e,t,r){this._body.push(e),r()},d.prototype._resetTimers=function(e){var t=this;r.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(r.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=r.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},d.prototype.abort=d.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},d.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),c.Writable.prototype.end.call(this,e,t,r)},d.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},d.prototype.flushHeaders=function(){},d.prototype.setNoDelay=function(){},d.prototype.setSocketKeepAlive=function(){};var f=["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"]},53319:(e,t,r)=>{"use strict";var n=r(19142),i=r(29033).Buffer,o=r(23928),a=r(41736),s=r(86505),c=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=t.IncomingMessage=function(e,t,r,a){var c=this;if(s.Readable.call(c),c._mode=r,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){n.nextTick((function(){c.emit("close")}))})),"fetch"===r){if(c._fetchResponse=t,c.url=t.url,c.statusCode=t.status,c.statusMessage=t.statusText,t.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),o.writableStream){var u=new WritableStream({write:function(e){return a(!1),new Promise((function(t,r){c._destroyed?r():c.push(i.from(e))?t():c._resumeFetch=t}))},close:function(){a(!0),c._destroyed||c.push(null)},abort:function(e){a(!0),c._destroyed||c.emit("error",e)}});try{return void t.body.pipeTo(u).catch((function(e){a(!0),c._destroyed||c.emit("error",e)}))}catch(e){}}var l=t.body.getReader();!function e(){l.read().then((function(t){c._destroyed||(a(t.done),t.done?c.push(null):(c.push(i.from(t.value)),e()))})).catch((function(e){a(!0),c._destroyed||c.emit("error",e)}))}()}else if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(t[2])):void 0!==c.headers[r]?c.headers[r]+=", "+t[2]:c.headers[r]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!o.overrideMimeType){var d=c.rawHeaders["mime-type"];if(d){var f=d.match(/;\s*charset=([^;])(;|$)/);f&&(c._charset=f[1].toLowerCase())}c._charset||(c._charset="utf-8")}};a(u,s.Readable),u.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},u.prototype._onXHRProgress=function(e){var t=this,n=t._xhr,o=null;switch(t._mode){case"text":if((o=n.responseText).length>t._pos){var a=o.substr(t._pos);if("x-user-defined"===t._charset){for(var s=i.alloc(a.length),u=0;ut._pos&&(t.push(i.from(new Uint8Array(l.result.slice(t._pos)))),t._pos=l.result.byteLength)},l.onload=function(){e(!0),t.push(null)},l.readAsArrayBuffer(o)}t._xhr.readyState===c.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},22028:e=>{"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}},23462:(e,t,r)=>{"use strict";var n=r(48850).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},36931:(e,t,r)=>{"use strict";var n=r(8619);e.exports=function(e){return"string"!=typeof e?e:n(e)?e.slice(2):e}},26427:(e,t,r)=>{"use strict";var n=function(){throw"This swarm.js function isn't available on the browser."},i={readFile:n},o={download:n,safeDownloadArchived:n,directoryTree:n},a={platform:n,arch:n},s={join:n,slice:n},c={spawn:n},u={lookup:n},l=r(31357),d=r(40631),f=r(42733),h=r(52510),p=r(13094);e.exports=p({fs:i,files:o,os:a,path:s,child_process:c,defaultArchives:{},mimetype:u,request:l,downloadUrl:null,bytes:d,hash:f,pick:h})},52510:e=>{"use strict";var t=function(e){return function(){return new Promise((function(t,r){var n,i=function(r){var n={},i=r.target.files.length,o=0;[].map.call(r.target.files,(function(r){var a=new FileReader;a.onload=function(a){var s=new Uint8Array(a.target.result);if("directory"===e){var c=r.webkitRelativePath;n[c.slice(c.indexOf("/")+1)]={type:"text/plain",data:s},++o===i&&t(n)}else if("file"===e){var u=r.webkitRelativePath;t({type:mimetype.lookup(u),data:s})}else t(s)},a.readAsArrayBuffer(r)}))};"directory"===e?((n=document.createElement("input")).addEventListener("change",i),n.type="file",n.webkitdirectory=!0,n.mozdirectory=!0,n.msdirectory=!0,n.odirectory=!0,n.directory=!0):((n=document.createElement("input")).addEventListener("change",i),n.type="file");var o=document.createEvent("MouseEvents");o.initEvent("click",!0,!1),n.dispatchEvent(o)}))}};e.exports={data:t("data"),file:t("file"),directory:t("directory")}},42733:(e,t,r)=>{"use strict";var n=r(49574).keccak256,i=r(40631),o=function(e,t){var r=i.reverse(i.pad(6,i.fromNumber(e))),o=i.flatten([r,"0x0000",t]);return n(o).slice(2)};e.exports=function e(t){"string"==typeof t&&"0x"!==t.slice(0,2)?t=i.fromString(t):"string"!=typeof t&&void 0!==t.length&&(t=i.fromUint8Array(t));var r=i.length(t);if(r<=4096)return o(r,t);for(var n=4096;128*n{"use strict";e.exports=function(e){var t=e.fs,r=e.files,n=e.os,i=e.path,o=e.child_process,a=e.mimetype,s=e.defaultArchives,c=e.request,u=e.downloadUrl,l=e.bytes,d=e.hash,f=e.pick,h=function(e){return function(t){for(var r={},n=0,i=e.length;n=400?n(new Error("Error ".concat(i.statusCode,"."))):r(new Uint8Array(t))}))}))}},m=function(e){return function(t){return function t(r){return function(n){return function(i){var o=function(e){return void 0===e.path?Promise.resolve():"application/bzz-manifest+json"===e.contentType?t(e.hash)(n+e.path)(i):Promise.resolve((r=n+e.path,function(e){return function(t){return t[r]=e,t}})(function(e){return{type:e.contentType,hash:e.hash}}(e))(i));var r};return g(e)(r).then((function(e){return JSON.parse(B(e)).entries})).then((function(e){return Promise.all(e.map(o))})).then((function(){return i}))}}}(t)("")({})}},y=function(e){return function(t){return m(e)(t).then((function(e){return h(Object.keys(e))(Object.keys(e).map((function(t){return e[t].hash})))}))}},v=function(e){return function(t){return m(e)(t).then((function(t){var r=Object.keys(t),n=r.map((function(e){return t[e].hash})),i=r.map((function(e){return t[e].type})),o=n.map(g(e));return Promise.all(o).then((function(e){return h(r)(function(e){return e.map((function(e,t){return{type:i[t],data:e}}))}(e))}))}))}},b=function(e){return function(t){return function(n){return r.download(p(e)(t))(n)}}},w=function(e){return function(t){return function(r){return y(e)(t).then((function(t){var n=[];for(var o in t)if(o.length>0){var a=i.join(r,o);n.push(b(e)(t[o])(a))}return Promise.all(n).then((function(){return r}))}))}}},A=function(e){return function(t){return new Promise((function(r,n){var i={body:"string"==typeof t?D(t):t,method:"POST"};c("".concat(e,"/bzz-raw:/"),i,(function(e,t){return e?n(e):r(t)}))}))}},_=function(e){return function(t){return function(r){return function(n){return function i(o){var a="/"===r[0]?r:"/"+r,s="".concat(e,"/bzz:/").concat(t).concat(a),u={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return new Promise((function(e,t){c(s,u,(function(r,n){return r?t(r):-1!==n.indexOf("error")?t(n):e(n)}))})).catch((function(e){return o>0&&i(o-1)}))}(3)}}}},E=function(e){return function(t){return k(e)({"":t})}},S=function(e){return function(r){return t.readFile(r).then((function(t){return E(e)({type:a.lookup(r),data:t})}))}},k=function(e){return function(t){return A(e)("{}").then((function(r){return Object.keys(t).reduce((function(r,n){return r.then(function(r){return function(n){return _(e)(n)(r)(t[r])}}(n))}),Promise.resolve(r))}))}},x=function(e){return function(r){return t.readFile(r).then(A(e))}},C=function(e){return function(n){return function(i){return r.directoryTree(i).then((function(e){return Promise.all(e.map((function(e){return t.readFile(e)}))).then((function(t){var r=e.map((function(e){return e.slice(i.length)})),n=e.map((function(e){return a.lookup(e)||"text/plain"}));return h(r)(t.map((function(e,t){return{type:n[t],data:e}})))}))})).then((function(e){return(t=n?{"":e[n]}:{},function(e){var r={};for(var n in t)r[n]=t[n];for(var i in e)r[i]=e[i];return r})(e);var t})).then(k(e))}}},I=function(e){return function(t){if("data"===t.pick)return f.data().then(A(e));if("file"===t.pick)return f.file().then(E(e));if("directory"===t.pick)return f.directory().then(k(e));if(t.path)switch(t.kind){case"data":return x(e)(t.path);case"file":return S(e)(t.path);case"directory":return C(e)(t.defaultFile)(t.path)}else{if(t.length||"string"==typeof t)return A(e)(t);if(t instanceof Object)return k(e)(t)}return Promise.reject(new Error("Bad arguments"))}},T=function(e){return function(t){return function(r){return N(e)(t).then((function(n){return n?r?w(e)(t)(r):v(e)(t):r?b(e)(t)(r):g(e)(t)}))}}},O=function(e,t){var i=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),o=(t||s)[i],a=u+o.archive+".tar.gz",c=o.archiveMD5,l=o.binaryMD5;return r.safeDownloadArchived(a)(c)(l)(e)},P=function(e){return new Promise((function(t,r){var n=o.spawn,i=function(e){return function(t){return-1!==(""+t).indexOf(e)}},a=e.account,s=e.password,c=e.dataDir,u=e.ensApi,l=e.privateKey,d=0,f=n(e.binPath,["--bzzaccount",a||l,"--datadir",c,"--ens-api",u]),h=function(e){0===d&&i("Passphrase")(e)?setTimeout((function(){d=1,f.stdin.write(s+"\n")}),500):i("Swarm http proxy started")(e)&&(d=2,clearTimeout(p),t(f))};f.stdout.on("data",h),f.stderr.on("data",h);var p=setTimeout((function(){return r(new Error("Couldn't start swarm process."))}),2e4)}))},M=function(e){return new Promise((function(t,r){e.stderr.removeAllListeners("data"),e.stdout.removeAllListeners("data"),e.stdin.removeAllListeners("error"),e.removeAllListeners("error"),e.removeAllListeners("exit"),e.kill("SIGINT");var n=setTimeout((function(){return e.kill("SIGKILL")}),8e3);e.once("close",(function(){clearTimeout(n),t()}))}))},R=function(e){return A(e)("test").then((function(e){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===e})).catch((function(){return!1}))},N=function(e){return function(t){return g(e)(t).then((function(e){try{return!!JSON.parse(B(e)).entries}catch(e){return!1}}))}},L=function(e){return function(t,r,n,i,o){var a;return void 0!==t&&(a=e(t)),void 0!==r&&(a=e(r)),void 0!==n&&(a=e(n)),void 0!==i&&(a=e(i)),void 0!==o&&(a=e(o)),a}},B=function(e){return l.toString(l.fromUint8Array(e))},D=function(e){return l.toUint8Array(l.fromString(e))},U=function(e){return{download:function(t,r){return T(e)(t)(r)},downloadData:L(g(e)),downloadDataToDisk:L(b(e)),downloadDirectory:L(v(e)),downloadDirectoryToDisk:L(w(e)),downloadEntries:L(m(e)),downloadRoutes:L(y(e)),isAvailable:function(){return R(e)},upload:function(t){return I(e)(t)},uploadData:L(A(e)),uploadFile:L(E(e)),uploadFileFromDisk:L(E(e)),uploadDataFromDisk:L(x(e)),uploadDirectory:L(k(e)),uploadDirectoryFromDisk:L(C(e)),uploadToManifest:L(_(e)),pick:f,hash:d,fromString:D,toString:B}};return{at:U,local:function(e){return function(t){return R("http://localhost:8500").then((function(r){return r?t(U("http://localhost:8500")).then((function(){})):O(e.binPath,e.archives).onData((function(t){return(e.onProgress||function(){})(t.length)})).then((function(){return P(e)})).then((function(e){return t(U("http://localhost:8500")).then((function(){return e}))})).then(M)}))}},download:T,downloadBinary:O,downloadData:g,downloadDataToDisk:b,downloadDirectory:v,downloadDirectoryToDisk:w,downloadEntries:m,downloadRoutes:y,isAvailable:R,startProcess:P,stopProcess:M,upload:I,uploadData:A,uploadDataFromDisk:x,uploadFile:E,uploadFileFromDisk:S,uploadDirectory:k,uploadDirectoryFromDisk:C,uploadToManifest:_,pick:f,hash:d,fromString:D,toString:B}}},16873:e=>{"use strict";var t=function(e,t){for(var r=[],n=0;n{"use strict";r(16873);var n=function(e,t){return parseInt(e.slice(2*t+2,2*t+4),16)},i=function(e){return(e.length-2)/2},o=function(e){for(var t=[],r=2,n=e.length;r>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},49574:e=>{"use strict";var t="0123456789abcdef".split(""),r=[1,256,65536,16777216],n=[0,8,16,24],i=[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],o=function(e){var t,r,n,o,a,s,c,u,l,d,f,h,p,g,m,y,v,b,w,A,_,E,S,k,x,C,I,T,O,P,M,R,N,L,B,D,U,j,F,z,q,H,V,$,K,W,G,Q,Y,Z,J,X,ee,te,re,ne,ie,oe,ae,se,ce,ue,le;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],c=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|c>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(c<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(u<<1|l>>>31),r=a^(l<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(d<<1|f>>>31),r=c^(f<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=l^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(o<<1|a>>>31),r=f^(a<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,g=e[0],m=e[1],W=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,V=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,P=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,D=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,$=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=g^~y&b,e[1]=m^~v&w,e[10]=k^~C&T,e[11]=x^~I&O,e[20]=L^~D&j,e[21]=B^~U&F,e[30]=$^~W&Q,e[31]=K^~G&Y,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~b&A,e[3]=v^~w&_,e[12]=C^~T&P,e[13]=I^~O&M,e[22]=D^~j&z,e[23]=U^~F&q,e[32]=W^~Q&Z,e[33]=G^~Y&J,e[42]=ne^~oe&se,e[43]=ie^~ae&ce,e[4]=b^~A&E,e[5]=w^~_&S,e[14]=T^~P&R,e[15]=O^~M&N,e[24]=j^~z&H,e[25]=F^~q&V,e[34]=Q^~Z&X,e[35]=Y^~J&ee,e[44]=oe^~se&ue,e[45]=ae^~ce&le,e[6]=A^~E&g,e[7]=_^~S&m,e[16]=P^~R&k,e[17]=M^~N&x,e[26]=z^~H&L,e[27]=q^~V&B,e[36]=Z^~X&$,e[37]=J^~ee&K,e[46]=se^~ue&te,e[47]=ce^~le&re,e[8]=E^~g&y,e[9]=S^~m&v,e[18]=R^~k&C,e[19]=N^~x&I,e[28]=H^~L&D,e[29]=V^~B&U,e[38]=X^~$&W,e[39]=ee^~K&G,e[48]=ue^~te&ne,e[49]=le^~re&ie,e[0]^=i[n],e[1]^=i[n+1]},a=function(e){return function(i){var a;if("0x"===i.slice(0,2)){a=[];for(var s=2,c=i.length;s>2]|=i[h]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(c[m>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=u){for(e.start=m-u,e.block=c[l],m=0;m>2]|=r[3&m],e.lastByteIndex===u)for(c[0]=c[l],m=1;m>4&15]+t[15&p]+t[p>>12&15]+t[p>>8&15]+t[p>>20&15]+t[p>>16&15]+t[p>>28&15]+t[p>>24&15];y%l==0&&(o(f),m=0)}return"0x"+g}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),a)}};e.exports={keccak256:a(256),keccak512:a(512),keccak256s:a(256),keccak512s:a(512)}},68419:e=>{"use strict";e.exports=function(e,t){if(t){t=(t=t.trim().replace(/^(\?|#|&)/,""))?"?"+t:t;var r=e.split(/[\?\#]/)[0];t&&/\:\/\/[^\/]*$/.test(r)&&(r+="/");var n=e.match(/(\#.*)$/);e=r+t,n&&(e+=n[0])}return e}},78677:(e,t,r)=>{"use strict";var n;e=r.nmd(e);var i=r(28847)(r(3355));!function(o){var a="object"==(0,i.default)(t)&&t&&!t.nodeType&&t,s="object"==(0,i.default)(e)&&e&&!e.nodeType&&e,c="object"==(void 0===r.g?"undefined":(0,i.default)(r.g))&&r.g;c.global!==c&&c.window!==c&&c.self!==c||(o=c);var u,l,d=2147483647,f=36,h=26,p=38,g=700,m=/^xn--/,y=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=f-1,A=Math.floor,_=String.fromCharCode;function E(e){throw RangeError(b[e])}function S(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function k(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+S((e=e.replace(v,".")).split("."),t).join(".")}function x(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=_((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+_(e)})).join("")}function I(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,r){var n=0;for(e=r?A(e/g):e>>1,e+=A(e/t);e>w*h>>1;n+=f)e=A(e/w);return A(n+(w+1)*e/(e+p))}function O(e){var t,r,n,i,o,a,s,c,u,l,p,g=[],m=e.length,y=0,v=128,b=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&E("not-basic"),g.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=m&&E("invalid-input"),((c=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:f)>=f||c>A((d-y)/a))&&E("overflow"),y+=c*a,!(c<(u=s<=b?1:s>=b+h?h:s-b));s+=f)a>A(d/(l=f-u))&&E("overflow"),a*=l;b=T(y-o,t=g.length+1,0==o),A(y/t)>d-v&&E("overflow"),v+=A(y/t),y%=t,g.splice(y++,0,v)}return C(g)}function P(e){var t,r,n,i,o,a,s,c,u,l,p,g,m,y,v,b=[];for(g=(e=x(e)).length,t=128,r=0,o=72,a=0;a=t&&pA((d-r)/(m=n+1))&&E("overflow"),r+=(s-t)*m,t=s,a=0;ad&&E("overflow"),p==t){for(c=r,u=f;!(c<(l=u<=o?1:u>=o+h?h:u-o));u+=f)v=c-l,y=f-l,b.push(_(I(l+v%y,0))),c=A(v/y);b.push(_(I(c,0))),o=T(r,m,n==i),r=0,++n}++r,++t}return b.join("")}if(u={version:"1.3.2",ucs2:{decode:x,encode:C},decode:O,encode:P,toASCII:function(e){return k(e,(function(e){return y.test(e)?"xn--"+P(e):e}))},toUnicode:function(e){return k(e,(function(e){return m.test(e)?O(e.slice(4).toLowerCase()):e}))}},"object"==(0,i.default)(r.amdO)&&r.amdO)void 0===(n=function(){return u}.call(t,r,t,e))||(e.exports=n);else if(a&&s)if(e.exports==a)s.exports=u;else for(l in u)u.hasOwnProperty(l)&&(a[l]=u[l]);else o.punycode=u}(void 0)},98983:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(r);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var c=e.length;s>0&&c>s&&(c=s);for(var u=0;u=0?(l=p.substr(0,g),d=p.substr(g+1)):(l=p,d=""),f=decodeURIComponent(l),h=decodeURIComponent(d),t(o,f)?Array.isArray(o[f])?o[f].push(h):o[f]=[o[f],h]:o[f]=h}return o}},84031:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=function(e){switch((0,n.default)(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,o){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===(0,n.default)(e)?Object.keys(e).map((function(n){var o=encodeURIComponent(i(n))+r;return Array.isArray(e[n])?e[n].map((function(e){return o+encodeURIComponent(i(e))})).join(t):o+encodeURIComponent(i(e[n]))})).join(t):o?encodeURIComponent(i(o))+r+encodeURIComponent(i(e)):""}},845:(e,t,r)=>{"use strict";t.decode=t.parse=r(98983),t.encode=t.stringify=r(84031)},51143:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(78677),o=r(95751);function a(){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}t.parse=w,t.resolve=function(e,t){return w(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?w(e,!1,!0).resolveObject(t):t},t.format=function(e){return o.isString(e)&&(e=w(e)),e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var s=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(l),f=["%","/","?",";","#"].concat(d),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(845);function w(e,t,r){if(e&&o.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}a.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+(0,n.default)(e));var a=e.indexOf("?"),c=-1!==a&&a127?N+="x":N+=R[L];if(!N.match(p)){var D=P.slice(0,I),U=P.slice(I+1),j=R.match(g);j&&(D.push(j[1]),U.unshift(j[2])),U.length&&(w="/"+U.join(".")+w),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=i.toASCII(this.hostname));var F=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+F,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!m[E])for(I=0,M=d.length;I0)&&r.host.split("@"))&&(r.auth=T.shift(),r.host=r.hostname=T.shift())),r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=E.slice(-1)[0],x=(r.host||e.host||E.length>1)&&("."===k||".."===k)||""===k,C=0,I=E.length;I>=0;I--)"."===(k=E[I])?E.splice(I,1):".."===k?(E.splice(I,1),C++):C&&(E.splice(I,1),C--);if(!A&&!_)for(;C--;C)E.unshift("..");!A||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),x&&"/"!==E.join("/").substr(-1)&&E.push("");var T,O=""===E[0]||E[0]&&"/"===E[0].charAt(0);return S&&(r.hostname=r.host=O?"":E.length?E.shift():"",(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.host=r.hostname=T.shift())),(A=A||r.host&&E.length)&&!O&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},95751:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===(0,n.default)(e)&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},88632:(e,t)=>{"use strict";!function(e){var t,r,n,i=String.fromCharCode;function o(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return i(e>>t&63|128)}function c(e){if(0==(4294967168&e))return i(e);var t="";return 0==(4294965248&e)?t=i(e>>6&31|192):0==(4294901760&e)?(a(e),t=i(e>>12&15|224),t+=s(e,6)):0==(4292870144&e)&&(t=i(e>>18&7|240),t+=s(e,12),t+=s(e,6)),t+i(63&e|128)}function u(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function l(){var e,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|u())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|u()<<6|u())>=2048)return a(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|u()<<12|u()<<6|u())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),r=t.length,n=-1,i="";++n65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(s)}}(t)},96219:(e,t,r)=>{"use strict";function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},16248:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports=function(e){return e&&"object"===(0,n.default)(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},17092:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(69446),o=r(14477),a=r(72337),s=r(28915);function c(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,l="undefined"!=typeof Symbol,d=c(Object.prototype.toString),f=c(Number.prototype.valueOf),h=c(String.prototype.valueOf),p=c(Boolean.prototype.valueOf);if(u)var g=c(BigInt.prototype.valueOf);if(l)var m=c(Symbol.prototype.valueOf);function y(e,t){if("object"!==(0,n.default)(e))return!1;try{return t(e),!0}catch(e){return!1}}function v(e){return"[object Map]"===d(e)}function b(e){return"[object Set]"===d(e)}function w(e){return"[object WeakMap]"===d(e)}function A(e){return"[object WeakSet]"===d(e)}function _(e){return"[object ArrayBuffer]"===d(e)}function E(e){return"undefined"!=typeof ArrayBuffer&&(_.working?_(e):e instanceof ArrayBuffer)}function S(e){return"[object DataView]"===d(e)}function k(e){return"undefined"!=typeof DataView&&(S.working?S(e):e instanceof DataView)}t.isArgumentsObject=i,t.isGeneratorFunction=o,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"===(0,n.default)(e)&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||k(e)},t.isUint8Array=function(e){return"Uint8Array"===a(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===a(e)},t.isUint16Array=function(e){return"Uint16Array"===a(e)},t.isUint32Array=function(e){return"Uint32Array"===a(e)},t.isInt8Array=function(e){return"Int8Array"===a(e)},t.isInt16Array=function(e){return"Int16Array"===a(e)},t.isInt32Array=function(e){return"Int32Array"===a(e)},t.isFloat32Array=function(e){return"Float32Array"===a(e)},t.isFloat64Array=function(e){return"Float64Array"===a(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===a(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===a(e)},v.working="undefined"!=typeof Map&&v(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(v.working?v(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},w.working="undefined"!=typeof WeakMap&&w(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(w.working?w(e):e instanceof WeakMap)},A.working="undefined"!=typeof WeakSet&&A(new WeakSet),t.isWeakSet=function(e){return A(e)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),t.isArrayBuffer=E,S.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=k;var x="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function C(e){return"[object SharedArrayBuffer]"===d(e)}function I(e){return void 0!==x&&(void 0===C.working&&(C.working=C(new x)),C.working?C(e):e instanceof x)}function T(e){return y(e,f)}function O(e){return y(e,h)}function P(e){return y(e,p)}function M(e){return u&&y(e,g)}function R(e){return l&&y(e,m)}t.isSharedArrayBuffer=I,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===d(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===d(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===d(e)},t.isGeneratorObject=function(e){return"[object Generator]"===d(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===d(e)},t.isNumberObject=T,t.isStringObject=O,t.isBooleanObject=P,t.isBigIntObject=M,t.isSymbolObject=R,t.isBoxedPrimitive=function(e){return T(e)||O(e)||P(e)||M(e)||R(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(E(e)||I(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},45058:(e,t,r)=>{"use strict";var n=r(19142),i=r(28847)(r(3355)),o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&t._extend(n,r),A(n.showHidden)&&(n.showHidden=!1),A(n.depth)&&(n.depth=2),A(n.colors)&&(n.colors=!1),A(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=d),h(n,e,n.depth)}function d(e,t){var r=l.styles[t];return r?"\x1b["+l.colors[r][0]+"m"+e+"\x1b["+l.colors[r][1]+"m":e}function f(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&x(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return w(i)||(i=h(e,i,n)),i}var o=function(e,t){if(A(t))return e.stylize("undefined","undefined");if(w(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),k(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(r);if(0===a.length){if(x(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(k(r))return p(r)}var u,l="",d=!1,f=["{","}"];return m(r)&&(d=!0,f=["[","]"]),x(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(l=" "+RegExp.prototype.toString.call(r)),S(r)&&(l=" "+Date.prototype.toUTCString.call(r)),k(r)&&(l=" "+p(r)),0!==a.length||d&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=d?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(u,l,f)):f[0]+l+f[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function g(e,t,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),O(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=v(r)?h(e,c.value,null):h(e,c.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),A(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function m(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function v(e){return null===e}function b(e){return"number"==typeof e}function w(e){return"string"==typeof e}function A(e){return void 0===e}function _(e){return E(e)&&"[object RegExp]"===C(e)}function E(e){return"object"===(0,i.default)(e)&&null!==e}function S(e){return E(e)&&"[object Date]"===C(e)}function k(e){return E(e)&&("[object Error]"===C(e)||e instanceof Error)}function x(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(c.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(17092),t.isArray=m,t.isBoolean=y,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=w,t.isSymbol=function(e){return"symbol"===(0,i.default)(e)},t.isUndefined=A,t.isRegExp=_,t.types.isRegExp=_,t.isObject=E,t.isDate=S,t.types.isDate=S,t.isError=k,t.types.isNativeError=k,t.isFunction=x,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(0,i.default)(e)||void 0===e},t.isBuffer=r(16248);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[I((e=new Date).getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":"),[e.getDate(),T[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(41736),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return c.default}});var n=f(r(55999)),i=f(r(28231)),o=f(r(78647)),a=f(r(65025)),s=f(r(55996)),c=f(r(8928)),u=f(r(76163)),l=f(r(22982)),d=f(r(91729));function f(e){return e&&e.__esModule?e:{default:e}}},86792:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t,r,i,o,a){return n((s=n(n(t,e),n(i,a)))<<(c=o)|s>>>32-c,r);var s,c}function o(e,t,r,n,o,a,s){return i(t&r|~t&n,e,t,o,a,s)}function a(e,t,r,n,o,a,s){return i(t&n|r&~n,e,t,o,a,s)}function s(e,t,r,n,o,a,s){return i(t^r^n,e,t,o,a,s)}function c(e,t,r,n,o,a,s){return i(r^(t|~n),e,t,o,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var i=0;i>5]>>>i%32&255,a=parseInt(n.charAt(o>>>4&15)+n.charAt(15&o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[i/8])<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},55996:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default="00000000-0000-0000-0000-000000000000"},91729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(76163))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}},77300:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},14402:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};var n=new Uint8Array(16)},42702:(e,t)=>{"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){var t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var o=unescape(encodeURIComponent(e));e=[];for(var a=0;a>>0;A=w,w=b,b=n(v,30)>>>0,v=y,y=S}i[0]=i[0]+y>>>0,i[1]=i[1]+v>>>0,i[2]=i[2]+b>>>0,i[3]=i[3]+w>>>0,i[4]=i[4]+A>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},22982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=s;for(var n,i=(n=r(76163))&&n.__esModule?n:{default:n},o=[],a=0;a<256;++a)o.push((a+256).toString(16).slice(1));function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]}t.default=function(e){var t=s(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0);if(!(0,i.default)(t))throw TypeError("Stringified UUID is invalid");return t}},55999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i,o,a=(n=r(14402))&&n.__esModule?n:{default:n},s=r(22982),c=0,u=0;t.default=function(e,t,r){var n=t&&r||0,l=t||new Array(16),d=(e=e||{}).node||i,f=void 0!==e.clockseq?e.clockseq:o;if(null==d||null==f){var h=e.random||(e.rng||a.default)();null==d&&(d=i=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==f&&(f=o=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:Date.now(),g=void 0!==e.nsecs?e.nsecs:u+1,m=p-c+(g-u)/1e4;if(m<0&&void 0===e.clockseq&&(f=f+1&16383),(m<0||p>c)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=p,u=g,o=f;var y=(1e4*(268435455&(p+=122192928e5))+g)%4294967296;l[n++]=y>>>24&255,l[n++]=y>>>16&255,l[n++]=y>>>8&255,l[n++]=255&y;var v=p/4294967296*1e4&268435455;l[n++]=v>>>8&255,l[n++]=255&v,l[n++]=v>>>24&15|16,l[n++]=v>>>16&255,l[n++]=f>>>8|128,l[n++]=255&f;for(var b=0;b<6;++b)l[n+b]=d[b];return t||(0,s.unsafeStringify)(l)}},28231:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(36125)),i=o(r(86792));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v3",48,i.default);t.default=a},36125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,a,s){var c;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(11788)),i=a(r(14402)),o=r(22982);function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();var a=(e=e||{}).random||(e.rng||i.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=a[s];return t}return(0,o.unsafeStringify)(a)}},65025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(36125)),i=o(r(42702));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v5",80,i.default);t.default=a},76163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(77300))&&n.__esModule?n:{default:n};t.default=function(e){return"string"==typeof e&&i.default.test(e)}},8928:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(76163))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},38325:e=>{"use strict";e.exports=function e(n,i){var o,a=0,s=0,c=i=i||0,u=n.length;do{if(c>=u)throw e.bytes=0,new RangeError("Could not decode varint");o=n[c++],a+=s<28?(o&r)<=t);return e.bytes=c-i,a};var t=128,r=127},92699:e=>{"use strict";e.exports=function e(i,o,a){o=o||[];for(var s=a=a||0;i>=n;)o[a++]=255&i|t,i/=128;for(;i&r;)o[a++]=255&i|t,i>>>=7;return o[a]=0|i,e.bytes=a-s+1,o};var t=128,r=-128,n=Math.pow(2,31)},26657:(e,t,r)=>{"use strict";e.exports={encode:r(92699),decode:r(38325),encodingLength:r(57490)}},57490:e=>{"use strict";var t=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),a=Math.pow(2,42),s=Math.pow(2,49),c=Math.pow(2,56),u=Math.pow(2,63);e.exports=function(e){return e{"use strict";var n,i=r(28847)(r(3355));if("object"===("undefined"==typeof globalThis?"undefined":(0,i.default)(globalThis)))n=globalThis;else try{n=r(26464)}catch(e){}finally{if(n||"undefined"==typeof window||(n=window),!n)throw new Error("Could not determine global this")}var o=n.WebSocket||n.MozWebSocket,a=r(75735);function s(e,t){return t?new o(e,t):new o(e)}o&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(s,e,{get:function(){return o[e]}})})),e.exports={w3cwebsocket:o?s:null,version:a}},75735:(e,t,r)=>{"use strict";e.exports=r(19794).version},72337:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(48184),o=r(43604),a=r(24373),s=r(80593),c=r(53820),u=s("Object.prototype.toString"),l=r(11191)(),d="undefined"==typeof globalThis?r.g:globalThis,f=o(),h=s("String.prototype.slice"),p=Object.getPrototypeOf,g=s("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1?t:"Object"===t&&function(e){var t=!1;return i(m,(function(r,n){if(!t)try{r(e),t=h(n,1)}catch(e){}})),t}(e)}return c?function(e){var t=!1;return i(m,(function(r,n){if(!t)try{"$"+r(e)===n&&(t=h(n,1))}catch(e){}})),t}(e):null}},31357:(e,t,r)=>{"use strict";var n=r(31296),i=r(68419),o=r(33103),a=r(39122),s=r(17321),c="application/json",u=function(){};e.exports=function(e,t,r){if(!e||"string"!=typeof e)throw new TypeError("must specify a URL");if("function"==typeof t&&(r=t,t={}),r&&"function"!=typeof r)throw new TypeError("expected cb to be undefined or a function");r=r||u;var l=(t=t||{}).json?"json":"text",d=(t=o({responseType:l},t)).headers||{},f=(t.method||"GET").toUpperCase(),h=t.query;return h&&("string"!=typeof h&&(h=n.stringify(h)),e=i(e,h)),"json"===t.responseType&&a(d,"Accept",c),t.json&&"GET"!==f&&"HEAD"!==f&&(a(d,"Content-Type",c),t.body=JSON.stringify(t.body)),t.method=f,t.url=e,t.headers=d,delete t.query,delete t.json,s(t,r)}},39122:e=>{"use strict";e.exports=function(e,t,r){var n=t.toLowerCase();e[t]||e[n]||(e[t]=r)}},49800:e=>{"use strict";e.exports=function(e,t){return t?{statusCode:t.statusCode,headers:t.headers,method:e.method,url:e.url,rawRequest:t.rawRequest?t.rawRequest:t}:null}},17321:(e,t,r)=>{"use strict";var n=r(30346),i=r(49800),o=function(){};e.exports=function(e,t){delete e.uri;var r=!1;"json"===e.responseType&&(e.responseType="text",r=!0);var a=n(e,(function(n,a,s){if(r&&!n)try{var c=a.rawRequest.responseText;s=JSON.parse(c)}catch(e){n=e}a=i(e,a),t(n,n?null:s,a),t=o})),s=a.onabort;return a.onabort=function(){var e=s.apply(a,Array.prototype.slice.call(arguments));return t(new Error("XHR Aborted")),t=o,e},a}},30346:(e,t,r)=>{"use strict";var n=r(92948),i=r(27277),o=r(48209),a=r(87705);function s(e,t,r){var n=e;return i(t)?(r=t,"string"==typeof e&&(n={uri:e})):n=a(t,{uri:e}),n.callback=r,n}function c(e,t,r){return u(t=s(e,t,r))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,r=function(r,n,i){t||(t=!0,e.callback(r,n,i))};function n(){var e=void 0;if(e=l.response?l.response:l.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(l),y)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(d),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,r(e,v)}function a(){if(!u){var t;clearTimeout(d),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var i=v,a=null;return 0!==t?(i={body:n(),statusCode:t,method:h,headers:{},url:f,rawRequest:l},l.getAllResponseHeaders&&(i.headers=o(l.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),r(a,i,i.body)}}var s,u,l=e.xhr||null;l||(l=e.cors||e.useXDR?new c.XDomainRequest:new c.XMLHttpRequest);var d,f=l.url=e.uri||e.url,h=l.method=e.method||"GET",p=e.body||e.data,g=l.headers=e.headers||{},m=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:h,url:f,rawRequest:l};if("json"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(a,0)},l.onload=a,l.onerror=i,l.onprogress=function(){},l.onabort=function(){u=!0},l.ontimeout=i,l.open(h,f,!m,e.username,e.password),m||(l.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(d=setTimeout((function(){if(!u){u=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),l.setRequestHeader)for(s in g)g.hasOwnProperty(s)&&l.setRequestHeader(s,g[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(l.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(l),l.send(p||null),l}e.exports=c,e.exports.default=c,c.XMLHttpRequest=n.XMLHttpRequest||function(){},c.XDomainRequest="withCredentials"in new c.XMLHttpRequest?c.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var r=0;r{"use strict";e.exports=function(){for(var e={},r=0;r{"use strict";var n=r(28847)(r(3355)),i=r(26427),o=function e(t){this.givenProvider=e.givenProvider,t&&t._requestManager&&(t=t.currentProvider),"undefined"!=typeof document&&(this.pick=i.pick),this.setProvider(t)};o.givenProvider=null,"undefined"!=typeof ethereum&ðereum.bzz&&(o.givenProvider=ethereum.bzz),o.prototype.setProvider=function(e){if(e&&"object"===(0,n.default)(e)&&"string"==typeof e.bzz&&(e=e.bzz),"string"!=typeof e){this.currentProvider=null;var t=new Error("No provider set, please set one using bzz.setProvider().");return this.download=this.upload=this.isAvailable=function(){throw t},!1}return this.currentProvider=e,this.download=i.at(e).download,this.upload=i.at(e).upload,this.isAvailable=i.at(e).isAvailable,!0},e.exports=o},94246:(e,t,r)=>{"use strict";var n=r(28847)(r(3355));e.exports={ErrorResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:JSON.stringify(e),r=e.error&&e.error.data?e.error.data:null,n=new Error("Returned error: "+t);return n.data=r,n},InvalidNumberOfParams:function(e,t,r){return new Error('Invalid number of parameters for "'+r+'". Got '+e+" expected "+t+"!")},InvalidConnection:function(e,t){return this.ConnectionError("CONNECTION ERROR: Couldn't connect to node "+e+".",t)},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:"Invalid JSON RPC response: "+JSON.stringify(e);return new Error(t)},ConnectionTimeout:function(e){return new Error("CONNECTION TIMEOUT: timeout of "+e+" ms achived")},ConnectionNotOpenError:function(e){return this.ConnectionError("connection not open on send()",e)},ConnectionCloseError:function(e){return"object"===(0,n.default)(e)&&e.code&&e.reason?this.ConnectionError("CONNECTION ERROR: The connection got closed with the close code `"+e.code+"` and the following reason string `"+e.reason+"`",e):new Error("CONNECTION ERROR: The connection closed unexpectedly")},MaxAttemptsReachedOnReconnectingError:function(){return new Error("Maximum number of reconnect attempts reached!")},PendingRequestsOnReconnectingError:function(){return new Error("CONNECTION ERROR: Provider started to reconnect before the response got received!")},ConnectionError:function(e,t){var r=new Error(e);return t&&(r.code=t.code,r.reason=t.reason,t.description&&(r.description=t.description)),r},RevertInstructionError:function(e,t){var r=new Error("Your request got reverted with the following reason string: "+e);return r.reason=e,r.signature=t,r},TransactionRevertInstructionError:function(e,t,r){var n=new Error("Transaction has been reverted by the EVM:\n"+JSON.stringify(r,null,2));return n.reason=e,n.signature=t,n.receipt=r,n},TransactionError:function(e,t){var r=new Error(e);return r.receipt=t,r},NoContractAddressFoundError:function(e){return this.TransactionError("The transaction receipt didn't contain a contract address.",e)},ContractCodeNotStoredError:function(e){return this.TransactionError("The contract code couldn't be stored, please check your gas limit.",e)},TransactionRevertedWithoutReasonError:function(e){return this.TransactionError("Transaction has been reverted by the EVM:\n"+JSON.stringify(e,null,2),e)},TransactionOutOfGasError:function(e){return this.TransactionError("Transaction ran out of gas. Please provide more gas:\n"+JSON.stringify(e,null,2),e)},ResolverMethodMissingError:function(e,t){return new Error("The resolver at "+e+'does not implement requested method: "'+t+'".')},ContractMissingABIError:function(){return new Error("You must provide the json interface of the contract when instantiating a contract object.")},ContractOnceRequiresCallbackError:function(){return new Error("Once requires a callback as the second parameter.")},ContractEventDoesNotExistError:function(e){return new Error('Event "'+e+"\" doesn't exist in this contract.")},ContractReservedEventError:function(e){return new Error('The event "'+e+"\" is a reserved event name, you can't use it.")},ContractMissingDeployDataError:function(){return new Error('No "data" specified in neither the given options, nor the default options.')},ContractNoAddressDefinedError:function(){return new Error("This contract object doesn't have address set yet, please set an address first.")},ContractNoFromAddressDefinedError:function(){return new Error('No "from" address specified in neither the given options, nor the default options.')}}},32084:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(90775)),o=n(r(3355));function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t{"use strict";var n=r(94246),i=r(32084);e.exports={errors:n,formatters:i}},53349:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(74519)),a=n(r(90775)),s=n(r(94571)),c=n(r(3355));function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},y.prototype.getCall=function(e){return"function"==typeof this.call?this.call(e):this.call},y.prototype.extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},y.prototype.validateArgs=function(e){if(e.length!==this.params)throw d.InvalidNumberOfParams(e.length,this.params,this.name)},y.prototype.formatInput=function(e){var t=this;return this.inputFormatter?this.inputFormatter.map((function(r,n){return r?r.call(t,e[n]):e[n]})):e},y.prototype.formatOutput=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.outputFormatter&&e?t.outputFormatter(e,null==this?void 0:this.hexFormat):e})):this.outputFormatter&&e?this.outputFormatter(e,null==this?void 0:this.hexFormat):e},y.prototype.toPayload=function(e){var t=this.getCall(e),r=this.extractCallback(e),n=this.formatInput(e);this.validateArgs(n);var i={method:t,params:n,callback:r};return this.transformPayload&&(i=this.transformPayload(i)),i},y.prototype._confirmTransaction=function(e,t,r){var n=this,o=!1,a=!0,u=0,l=0,v=null,b=null,w=null,A=r.params[0]&&"object"===(0,c.default)(r.params[0])&&r.params[0].gas?r.params[0].gas:null,_=!!r.params[0]&&"object"===(0,c.default)(r.params[0])&&r.params[0].data&&r.params[0].from&&!r.params[0].to,E=_&&r.params[0].data.length>2,S=[new y({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[f.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:f.outputBlockFormatter}),new y({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:f.outputTransactionReceiptFormatter}),new y({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[f.inputAddressFormatter,f.inputDefaultBlockNumberFormatter]}),new y({name:"getTransactionByHash",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:f.outputTransactionFormatter}),new g({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:f.outputBlockFormatter}}})],k={};S.forEach((function(e){e.attachToObject(k),e.requestManager=n.requestManager}));var x=function(c,g,y,S,x){if(!y)return x||(x={unsubscribe:function(){clearInterval(v),clearTimeout(b)}}),(c?p.resolve(c):k.getTransactionReceipt(t)).catch((function(t){x.unsubscribe(),o=!0,h._fireError({message:"Failed to check for transaction receipt:",data:t},e.eventEmitter,e.reject)})).then(function(){var t=(0,s.default)(i.default.mark((function t(r){var o,s,u;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r&&r.blockHash){t.next=2;break}throw new Error("Receipt missing or blockHash null");case 2:if(n.extraFormatters&&n.extraFormatters.receiptFormatter&&(r=n.extraFormatters.receiptFormatter(r)),!(e.eventEmitter.listeners("confirmation").length>0)){t.next=28;break}if(void 0!==c&&0===l){t.next=25;break}return t.next=7,k.getBlockByNumber("latest");case 7:if(s=t.sent,u=s?s.hash:null,!g){t.next=24;break}if(!w){t.next=17;break}return t.next=13,k.getBlockByNumber(w.number+1);case 13:(o=t.sent)&&(w=o,e.eventEmitter.emit("confirmation",l,r,u)),t.next=22;break;case 17:return t.next=19,k.getBlockByNumber(r.blockNumber);case 19:o=t.sent,w=o,e.eventEmitter.emit("confirmation",l,r,u);case 22:t.next=25;break;case 24:e.eventEmitter.emit("confirmation",l,r,u);case 25:(g&&o||!g)&&l++,a=!1,l===n.transactionConfirmationBlocks+1&&(x.unsubscribe(),e.eventEmitter.removeAllListeners());case 28:return t.abrupt("return",r);case 29:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(i.default.mark((function t(r){var s;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!_||o){t.next=19;break}if(r.contractAddress){t.next=5;break}return a&&(x.unsubscribe(),o=!0),h._fireError(d.NoContractAddressFoundError(r),e.eventEmitter,e.reject,null,r),t.abrupt("return");case 5:return t.prev=5,t.next=8,k.getCode(r.contractAddress);case 8:s=t.sent,t.next=13;break;case 11:t.prev=11,t.t0=t.catch(5);case 13:if(s){t.next=15;break}return t.abrupt("return");case 15:!0===r.status&&E||s.length>2?(e.eventEmitter.emit("receipt",r),n.extraFormatters&&n.extraFormatters.contractDeployFormatter?e.resolve(n.extraFormatters.contractDeployFormatter(r)):e.resolve(r),a&&e.eventEmitter.removeAllListeners()):h._fireError(d.ContractCodeNotStoredError(r),e.eventEmitter,e.reject,null,r),a&&x.unsubscribe(),o=!0;case 19:return t.abrupt("return",r);case 20:case"end":return t.stop()}}),t,null,[[5,11]])})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(i.default.mark((function t(s){var c,u,l,p;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_||o){t.next=35;break}if(s.outOfGas||A&&A===s.gasUsed||!0!==s.status&&"0x1"!==s.status&&void 0!==s.status){t.next=7;break}e.eventEmitter.emit("receipt",s),e.resolve(s),a&&e.eventEmitter.removeAllListeners(),t.next=33;break;case 7:if(JSON.stringify(s,null,2),!1!==s.status&&"0x0"!==s.status){t.next=32;break}if(t.prev=9,c=null,!n.handleRevert||"eth_sendTransaction"!==n.call&&"eth_sendRawTransaction"!==n.call){t.next=24;break}return u=r.params[0],"eth_sendRawTransaction"===n.call&&(l=r.params[0],p=m.parse(l),u=f.inputTransactionFormatter({data:p.data,to:p.to,from:p.from,gas:p.gasLimit.toHexString(),gasPrice:p.gasPrice?p.gasPrice.toHexString():void 0,value:p.value.toHexString()})),t.next=16,n.getRevertReason(u,s.blockNumber);case 16:if(!(c=t.sent)){t.next=21;break}h._fireError(d.TransactionRevertInstructionError(c.reason,c.signature,s),e.eventEmitter,e.reject,null,s),t.next=22;break;case 21:throw!1;case 22:t.next=25;break;case 24:throw!1;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(9),h._fireError(d.TransactionRevertedWithoutReasonError(s),e.eventEmitter,e.reject,null,s);case 30:t.next=33;break;case 32:h._fireError(d.TransactionOutOfGasError(s),e.eventEmitter,e.reject,null,s);case 33:a&&x.unsubscribe(),o=!0;case 35:case"end":return t.stop()}}),t,null,[[9,27]])})));return function(e){return t.apply(this,arguments)}}()).catch((function(){u++,g?u-1>=n.transactionPollingTimeout&&(x.unsubscribe(),o=!0,h._fireError(d.TransactionError("Transaction was not mined within "+n.transactionPollingTimeout+" seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject)):u-1>=n.transactionBlockTimeout&&(x.unsubscribe(),o=!0,h._fireError(d.TransactionError("Transaction was not mined within "+n.transactionBlockTimeout+" blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject))}));x.unsubscribe(),o=!0,h._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:y},e.eventEmitter,e.reject)},C=function(e){var t=!1,r=function(){v=setInterval(x.bind(null,e,!0),n.transactionPollingInterval)};if(!this.requestManager.provider.on)return r();k.subscribe("newBlockHeaders",(function(n,i,o){if(t=!0,n||!i)return r();x(e,!1,n,0,o)})),b=setTimeout((function(){t||r()}),1e3*this.blockHeaderTimeout)}.bind(this);k.getTransactionReceipt(t).then((function(t){t&&t.blockHash?(e.eventEmitter.listeners("confirmation").length>0&&C(t),x(t,!1)):o||C()})).catch((function(){o||C()}))};var v=function(e,t){return"number"==typeof e?t.wallet[e]:e&&"object"===(0,c.default)(e)&&e.address&&e.privateKey?e:t.wallet[e.toLowerCase()]};y.prototype.buildCall=function(){var e=this,t="eth_sendTransaction"===e.call||"eth_sendRawTransaction"===e.call,r="eth_call"===e.call,n=function(){var n=Array.prototype.slice.call(arguments),i=p(!t),a=e.toPayload(n);e.hexFormat=!1,"eth_getTransactionReceipt"!==e.call&&"eth_getTransactionByHash"!==e.call&&"getBlock"!==e.name||(e.hexFormat=a.params.length{"use strict";var n=r(98008),i=function(e){var t,r,i=new Promise((function(){t=arguments[0],r=arguments[1]}));if(e)return{resolve:t,reject:r,eventEmitter:i};var o=new n;return i._events=o._events,i.emit=o.emit,i.on=o.on,i.once=o.once,i.off=o.off,i.listeners=o.listeners,i.addListener=o.addListener,i.removeListener=o.removeListener,i.removeAllListeners=o.removeAllListeners,{resolve:t,reject:r,eventEmitter:i}};i.resolve=function(e){var t=i(!0);return t.resolve(e),t.eventEmitter},e.exports=i},35229:(e,t,r)=>{"use strict";var n=r(48155),i=r(11314).errors,o=function(e){this.requestManager=e,this.requests=[]};o.prototype.add=function(e){this.requests.push(e)},o.prototype.execute=function(){var e=this.requests,t=this._sortResponses.bind(this);this.requestManager.sendBatch(e,(function(r,o){o=t(o),e.map((function(e,t){return o[t]||{}})).forEach((function(t,r){if(e[r].callback){if(t&&t.error)return e[r].callback(i.ErrorResponse(t));if(!n.isValidResponse(t))return e[r].callback(i.InvalidResponse(t));try{e[r].callback(null,e[r].format?e[r].format(t.result):t.result)}catch(t){e[r].callback(t)}}}))}))},o.prototype._sortResponses=function(e){return(e||[]).sort((function(e,t){return e.id-t.id}))},e.exports=o},99764:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=null,o="object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))?globalThis:void 0;if(!o)try{o=Function("return this")()}catch(e){o=self}void 0!==o.ethereum?i=o.ethereum:void 0!==o.web3&&o.web3.currentProvider&&(o.web3.currentProvider.sendAsync&&(o.web3.currentProvider.send=o.web3.currentProvider.sendAsync,delete o.web3.currentProvider.sendAsync),!o.web3.currentProvider.on&&o.web3.currentProvider.connection&&"ipcProviderWrapper"===o.web3.currentProvider.connection.constructor.name&&(o.web3.currentProvider.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");"data"===e?this.connection.on("data",(function(e){var r="";e=e.toString();try{r=JSON.parse(e)}catch(r){return t(new Error("Couldn't parse response data"+e))}r.id||-1===r.method.indexOf("_subscription")||t(null,r)})):this.connection.on(e,t)}),i=o.web3.currentProvider),e.exports=i},92033:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(45058).callbackify,o=r(11314).errors,a=r(48155),s=r(35229),c=r(99764),u=function e(t,r){this.provider=null,this.providers=e.providers,this.setProvider(t,r),this.subscriptions=new Map};u.givenProvider=c,u.providers={WebsocketProvider:r(77651),HttpProvider:r(14565),IpcProvider:r(52683)},u.prototype.setProvider=function(e,t){var r=this;if(e&&"string"==typeof e&&this.providers)if(/^http(s)?:\/\//i.test(e))e=new this.providers.HttpProvider(e);else if(/^ws(s)?:\/\//i.test(e))e=new this.providers.WebsocketProvider(e);else if(e&&"object"===(0,n.default)(t)&&"function"==typeof t.connect)e=new this.providers.IpcProvider(e,t);else if(e)throw new Error("Can't autodetect provider for \""+e+'"');this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=e||null,this.provider&&this.provider.on&&("function"==typeof e.request?this.provider.on("message",(function(e){if(e&&"eth_subscription"===e.type&&e.data){var t=e.data;t.subscription&&r.subscriptions.has(t.subscription)&&r.subscriptions.get(t.subscription).callback(null,t.result)}})):this.provider.on("data",(function(e,t){(e=e||t).method&&e.params&&e.params.subscription&&r.subscriptions.has(e.params.subscription)&&r.subscriptions.get(e.params.subscription).callback(null,e.params.result)})),this.provider.on("connect",(function(){r.subscriptions.forEach((function(e){e.subscription.resubscribe()}))})),this.provider.on("error",(function(e){r.subscriptions.forEach((function(t){t.callback(e)}))})),this.provider.on("disconnect",(function(e){r._isCleanCloseEvent(e)&&!r._isIpcCloseError(e)||(r.subscriptions.forEach((function(t){t.callback(o.ConnectionCloseError(e)),r.subscriptions.delete(t.subscription.id)})),r.provider&&r.provider.emit&&r.provider.emit("error",o.ConnectionCloseError(e))),r.provider&&r.provider.emit&&r.provider.emit("end",e)})))},u.prototype.send=function(e,t){if(t=t||function(){},!this.provider)return t(o.InvalidProvider());var r=e.method,n=e.params,s=a.toPayload(r,n),c=this._jsonrpcResultCallback(t,s);if(this.provider.request)i(this.provider.request.bind(this.provider))({method:r,params:n},t);else if(this.provider.sendAsync)this.provider.sendAsync(s,c);else{if(!this.provider.send)throw new Error("Provider does not have a request or send method to use.");this.provider.send(s,c)}},u.prototype.sendBatch=function(e,t){if(!this.provider)return t(o.InvalidProvider());var r=a.toBatchPayload(e);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,(function(e,r){return e?t(e):Array.isArray(r)?void t(null,r):t(o.InvalidResponse(r))}))},u.prototype.addSubscription=function(e,t){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions.set(e.id,{callback:t,subscription:e})},u.prototype.removeSubscription=function(e,t){if(this.subscriptions.has(e)){var r=this.subscriptions.get(e).subscription.options.type;return this.subscriptions.delete(e),void this.send({method:r+"_unsubscribe",params:[e]},t)}"function"==typeof t&&t(null)},u.prototype.clearSubscriptions=function(e){try{var t=this;return this.subscriptions.size>0&&this.subscriptions.forEach((function(r,n){e&&"syncing"===r.name||t.removeSubscription(n)})),this.provider.reset&&this.provider.reset(),!0}catch(e){throw new Error("Error while clearing subscriptions: ".concat(e))}},u.prototype._isCleanCloseEvent=function(e){return"object"===(0,n.default)(e)&&([1e3].includes(e.code)||!0===e.wasClean)},u.prototype._isIpcCloseError=function(e){return"boolean"==typeof e&&e},u.prototype._jsonrpcResultCallback=function(e,t){return function(r,n){return n&&n.id&&t.id!==n.id?e(new Error("Wrong response id ".concat(n.id," (expected: ").concat(t.id,") in ").concat(JSON.stringify(t)))):r?e(r):n&&n.error?e(o.ErrorResponse(n)):a.isValidResponse(n)?void e(null,n.result):e(o.InvalidResponse(n))}},e.exports={Manager:u,BatchManager:s}},48155:e=>{"use strict";var t={messageId:Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),toPayload:function(e,r){if(!e)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(r)+'"!');return t.messageId===Number.MAX_SAFE_INTEGER?t.messageId=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER):t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:e,params:r||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!(!e||e.error||"2.0"!==e.jsonrpc||"number"!=typeof e.id&&"string"!=typeof e.id||void 0===e.result)}},toBatchPayload:function(e){return e.map((function(e){return t.toPayload(e.method,e.params)}))}};e.exports=t},34178:(e,t,r)=>{"use strict";var n=r(42929),i=function(e){this.name=e.name,this.type=e.type,this.subscriptions=e.subscriptions||{},this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.attachToObject=function(e){var t=this.buildCall(),r=this.name.split(".");r.length>1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},i.prototype.buildCall=function(){var e=this;return function(){e.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var t=new n({subscription:e.subscriptions[arguments[0]]||{},requestManager:e.requestManager,type:e.type});return t.subscribe.apply(t,arguments)}},e.exports={subscriptions:i,subscription:n}},42929:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(11314).errors,o=r(98008),a=r(11314).formatters;function s(e){return e}function c(e){o.call(this),this.id=null,this.callback=s,this.arguments=null,this.lastBlock=null,this.options={subscription:e.subscription,type:e.type,requestManager:e.requestManager}}c.prototype=Object.create(o.prototype),c.prototype.constructor=c,c.prototype._extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},c.prototype._validateArgs=function(e){var t=this.options.subscription;if(t||(t={}),t.params||(t.params=0),e.length!==t.params)throw i.InvalidNumberOfParams(e.length,t.params,t.subscriptionName)},c.prototype._formatInput=function(e){var t=this.options.subscription;return t&&t.inputFormatter?t.inputFormatter.map((function(t,r){return t?t(e[r]):e[r]})):e},c.prototype._formatOutput=function(e){var t=this.options.subscription;return t&&t.outputFormatter&&e?t.outputFormatter(e):e},c.prototype._toPayload=function(e){var t=[];if(this.callback=this._extractCallback(e)||s,this.subscriptionMethod||(this.subscriptionMethod=e.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(e),this._validateArgs(this.arguments),e=[]),t.push(this.subscriptionMethod),t=t.concat(this.arguments),e.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:t}},c.prototype.unsubscribe=function(e){this.options.requestManager.removeSubscription(this.id,e),this.id=null,this.lastBlock=null,this.removeAllListeners()},c.prototype.subscribe=function(){var e=this,t=Array.prototype.slice.call(arguments),r=this._toPayload(t);if(!r)return this;if(!this.options.requestManager.provider)return setTimeout((function(){var t=new Error("No provider set.");e.callback(t,null,e),e.emit("error",t)}),0),this;if(!this.options.requestManager.provider.on)return setTimeout((function(){var t=new Error("The current provider doesn't support subscriptions: "+e.options.requestManager.provider.constructor.name);e.callback(t,null,e),e.emit("error",t)}),0),this;if(this.lastBlock&&this.options.params&&"object"===(0,n.default)(this.options.params)&&(r.params[1]=this.options.params,r.params[1].fromBlock=a.inputBlockNumberFormatter(this.lastBlock+1)),this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&r.params[1]&&"object"===(0,n.default)(r.params[1])&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)){var i=Object.assign({},r.params[1]);this.options.requestManager.send({method:"eth_getLogs",params:[i]},(function(t,r){t?setTimeout((function(){e.callback(t,null,e),e.emit("error",t)}),0):r.forEach((function(t){var r=e._formatOutput(t);e.callback(null,r,e),e.emit("data",r)}))}))}return"object"===(0,n.default)(r.params[1])&&delete r.params[1].fromBlock,this.options.requestManager.send(r,(function(t,i){!t&&i?(e.id=i,e.method=r.params[0],e.options.requestManager.addSubscription(e,(function(t,r){t?(e.callback(t,!1,e),e.emit("error",t)):(Array.isArray(r)||(r=[r]),r.forEach((function(t){var r=e._formatOutput(t);if(e.lastBlock=r&&"object"===(0,n.default)(r)?r.blockNumber:null,"function"==typeof e.options.subscription.subscriptionHandler)return e.options.subscription.subscriptionHandler.call(e,r);e.emit("data",r),e.callback(null,r,e)})))})),e.emit("connected",i)):setTimeout((function(){e.callback(t,!1,e),e.emit("error",t)}),0)})),this},c.prototype.resubscribe=function(){this.options.requestManager.removeSubscription(this.id),this.id=null,this.subscribe(this.callback)},e.exports=c},1949:(e,t,r)=>{"use strict";var n=r(11314).formatters,i=r(53349),o=r(48161);e.exports=function(e){var t=function(t){var r;return t.property?(e[t.property]||(e[t.property]={}),r=e[t.property]):r=e,t.methods&&t.methods.forEach((function(t){t instanceof i||(t=new i(t)),t.attachToObject(r),t.setRequestManager(e._requestManager)})),e};return t.formatters=n,t.utils=o,t.Method=i,t}},80606:(e,t,r)=>{"use strict";var n=r(92033),i=r(1949);e.exports={packageInit:function(e,t){if(t=Array.prototype.slice.call(t),!e)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(e,"currentProvider",{get:function(){return e._provider},set:function(t){return e.setProvider(t)},enumerable:!0,configurable:!0}),t[0]&&t[0]._requestManager?e._requestManager=t[0]._requestManager:e._requestManager=new n.Manager(t[0],t[1]),e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers,e._provider=e._requestManager.provider,e.setProvider||(e.setProvider=function(t,r){return e._requestManager.setProvider(t,r),e._provider=e._requestManager.provider,!0}),e.setRequestManager=function(t){e._requestManager=t,e._provider=t.provider},e.BatchRequest=n.BatchManager.bind(null,e._requestManager),e.extend=i(e)},addProviders:function(e){e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers}}},79901:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(29033).Buffer,o=r(48161),a=r(62914).RQ,s=r(62914)._R,c=new a((function(e,t){return!e.match(/^u?int/)||Array.isArray(t)||t&&"object"===(0,n.default)(t)&&"BN"===t.constructor.name?t:t.toString()}));function u(){}var l=function(){};l.prototype.encodeFunctionSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=o._jsonInterfaceMethodToString(e)),o.sha3(e).slice(0,10)},l.prototype.encodeEventSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=o._jsonInterfaceMethodToString(e)),o.sha3(e)},l.prototype.encodeParameter=function(e,t){return this.encodeParameters([e],[t])},l.prototype.encodeParameters=function(e,t){var r=this;return e=r.mapTypes(e),t=t.map((function(t,i){var o=e[i];return"object"===(0,n.default)(o)&&o.type&&(o=o.type),t=r.formatParam(o,t),"string"==typeof o&&o.includes("tuple")&&function e(t,n){if("array"===t.name){if(!t.type.match(/\[(\d+)\]/))return n.map((function(r){return e(c._getCoder(s.from(t.type.replace("[]",""))),r)}));var i=parseInt(t.type.match(/\[(\d+)\]/)[1]);if(n.length!==i)throw new Error("Array length does not matches with the given input");return n.map((function(r){return e(c._getCoder(s.from(t.type.replace(/\[\d+\]/,""))),r)}))}t.coders.forEach((function(t,i){"tuple"===t.name?e(t,n[i]):n[i]=r.formatParam(t.name,n[i])}))}(c._getCoder(s.from(o)),t),t})),c.encode(e,t)},l.prototype.mapTypes=function(e){var t=this,r=[];return e.forEach((function(e){if("object"===(0,n.default)(e)&&"function"===e.type&&(e=Object.assign({},e,{type:"bytes24"})),t.isSimplifiedStructFormat(e)){var i=Object.keys(e)[0];r.push(Object.assign(t.mapStructNameAndType(i),{components:t.mapStructToCoderFormat(e[i])}))}else r.push(e)})),r},l.prototype.isSimplifiedStructFormat=function(e){return"object"===(0,n.default)(e)&&void 0===e.components&&void 0===e.name},l.prototype.mapStructNameAndType=function(e){var t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}},l.prototype.mapStructToCoderFormat=function(e){var t=this,r=[];return Object.keys(e).forEach((function(i){"object"!==(0,n.default)(e[i])?r.push({name:i,type:e[i]}):r.push(Object.assign(t.mapStructNameAndType(i),{components:t.mapStructToCoderFormat(e[i])}))})),r},l.prototype.formatParam=function(e,t){var r=this,n=new RegExp(/^bytes([0-9]*)$/),a=new RegExp(/^bytes([0-9]*)\[\]$/),s=new RegExp(/^(u?int)([0-9]*)$/),c=new RegExp(/^(u?int)([0-9]*)\[\]$/);if(o.isBN(t)||o.isBigNumber(t))return t.toString(10);if(e.match(a)||e.match(c))return t.map((function(t){return r.formatParam(e.replace("[]",""),t)}));var u=e.match(s);if(u){var l=parseInt(u[2]||"256");l/80&&(!t||"0x"===t||"0X"===t))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var i=c.decode(this.mapTypes(e),"0x"+t.replace(/0x/i,""),r),o=new u;return o.__length__=0,e.forEach((function(e,t){var r=i[o.__length__],a="object"===(0,n.default)(e)&&e.type&&"string"===e.type;r="0x"!==r||a||"string"==typeof e&&"string"===e?r:null,o[t]=r,("function"==typeof e||e&&"object"===(0,n.default)(e))&&e.name&&(o[e.name]=r),o.__length__++})),o},l.prototype.decodeLog=function(e,t,r){var n=this;r=Array.isArray(r)?r:[r],t=t||"";var i=[],o=[],a=0;e.forEach((function(e,t){e.indexed?(o[t]=["bool","int","uint","address","fixed","ufixed"].find((function(t){return-1!==e.type.indexOf(t)}))?n.decodeParameter(e.type,r[a]):r[a],a++):i[t]=e}));var s=t,c=s?this.decodeParametersWith(i,s,!0):[],l=new u;return l.__length__=0,e.forEach((function(e,t){l[t]="string"===e.type?"":null,void 0!==c[t]&&(l[t]=c[t]),void 0!==o[t]&&(l[t]=o[t]),e.name&&(l[e.name]=l[t]),l.__length__++})),l};var d=new l;e.exports=d},99819:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(93106)),a=i(r(3355)),s=i(r(90775)),c=i(r(74519));function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var l,f="Signer Error: ",h=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}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 i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(u);try{for(h.s();!(l=h.n()).done;){var p=l.value;f+="".concat(f," ").concat(p,".")}}catch(e){h.e(e)}finally{h.f()}throw new Error(f)}var g="0x"+c.serialize().toString("hex"),m=v.keccak256(g),y={messageHash:"0x"+n.from(c.getMessageToSign(!0)).toString("hex"),v:"0x"+c.v.toString("hex"),r:"0x"+c.r.toString("hex"),s:"0x"+c.s.toString("hex"),rawTransaction:g,transactionHash:m};return r(null,y),y}catch(e){return r(e),Promise.reject(e)}}return e.type=function(e){var t,r=void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas;if(void 0!==e.type?t=v.toHex(e.type):void 0===e.type&&r&&(t="0x2"),void 0!==e.gasPrice&&("0x2"===t||r))throw Error("eip-1559 transactions don't support gasPrice");if(("0x1"===t||"0x0"===t)&&r)throw Error("pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas");return r||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===_.London||e.hardfork&&e.hardfork.toLowerCase()===_.London?t="0x2":(e.accessList||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===_.Berlin||e.hardfork&&e.hardfork.toLowerCase()===_.Berlin)&&(t="0x1"),t}(e),void 0!==e.nonce&&void 0!==e.chainId&&(void 0!==e.gasPrice||void 0!==e.maxFeePerGas&&void 0!==e.maxPriorityFeePerGas)&&s?Promise.resolve(u(e)):Promise.all([S(e.common)||S(e.common.customChain.chainId)?S(e.chainId)?i._ethereumCall.getChainId():e.chainId:void 0,S(e.nonce)?i._ethereumCall.getTransactionCount(i.privateKeyToAccount(t).address):e.nonce,S(s)?i._ethereumCall.getNetworkId():1,C(i,e)]).then((function(t){var r=(0,c.default)(t,4),n=r[0],i=r[1],o=r[2],a=r[3];if(S(n)&&S(e.common)&&S(e.common.customChain.chainId)||S(i)||S(o)||S(a))throw new Error('One of the values "chainId", "networkId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(t));return u(l(l(l({},e),S(e.common)||S(e.common.customChain.chainId)?{chainId:n}:{}),{},{nonce:i,networkId:o},a))}))},x.prototype.recoverTransaction=function(e){var t=n.from(e.slice(2),"hex"),r=w.fromSerializedData(t);return v.toChecksumAddress(r.getSenderAddress().toString("hex"))},x.prototype.hashMessage=function(e){var t=v.isHexStrict(e)?e:v.utf8ToHex(e),r=v.hexToBytes(t),i=n.from(r),o="\x19Ethereum Signed Message:\n"+r.length,a=n.from(o),s=n.concat([a,i]);return E.bufferToHex(v.keccak256(s))},x.prototype.sign=function(e,t){if(t.startsWith("0x")||(t="0x"+t),66!==t.length)throw new Error("Private key must be 32 bytes long");var r=this.hashMessage(e),n=p.sign(r,t),i=p.decodeSignature(n);return{message:e,messageHash:r,v:i[0],r:i[1],s:i[2],signature:n}},x.prototype.recover=function(e,t,r){var n=[].slice.apply(arguments);return e&&"object"===(0,a.default)(e)?this.recover(e.messageHash,p.encodeSignature([e.v,e.r,e.s]),!0):(r||(e=this.hashMessage(e)),n.length>=4?(r="boolean"==typeof(r=n.slice(-1)[0])&&!!r,this.recover(e,p.encodeSignature(n.slice(1,4)),r)):p.recover(e,t))},x.prototype.decrypt=function(e,t,r){if("string"!=typeof t)throw new Error("No password given.");var i,s,c=e&&"object"===(0,a.default)(e)?e:JSON.parse(r?e.toLowerCase():e);if(3!==c.version)throw new Error("Not a valid V3 wallet");if("scrypt"===c.crypto.kdf)s=c.crypto.kdfparams,i=m.syncScrypt(n.from(t),n.from(s.salt,"hex"),s.n,s.r,s.p,s.dklen);else{if("pbkdf2"!==c.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(s=c.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");i=g.pbkdf2Sync(n.from(t),n.from(s.salt,"hex"),s.c,s.dklen,"sha256")}var u=n.from(c.crypto.ciphertext,"hex");if(v.sha3(n.from([].concat((0,o.default)(i.slice(16,32)),(0,o.default)(u)))).replace("0x","")!==c.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var l=g.createDecipheriv(c.crypto.cipher,i.slice(0,16),n.from(c.crypto.cipherparams.iv,"hex")),d="0x"+n.from([].concat((0,o.default)(l.update(u)),(0,o.default)(l.final()))).toString("hex");return this.privateKeyToAccount(d,!0)},x.prototype.encrypt=function(e,t,r){var i,a=this.privateKeyToAccount(e,!0),s=(r=r||{}).salt||g.randomBytes(32),c=r.iv||g.randomBytes(16),u=r.kdf||"scrypt",l={dklen:r.dklen||32,salt:s.toString("hex")};if("pbkdf2"===u)l.c=r.c||262144,l.prf="hmac-sha256",i=g.pbkdf2Sync(n.from(t),n.from(l.salt,"hex"),l.c,l.dklen,"sha256");else{if("scrypt"!==u)throw new Error("Unsupported kdf");l.n=r.n||8192,l.r=r.r||8,l.p=r.p||1,i=m.syncScrypt(n.from(t),n.from(l.salt,"hex"),l.n,l.r,l.p,l.dklen)}var d=g.createCipheriv(r.cipher||"aes-128-ctr",i.slice(0,16),c);if(!d)throw new Error("Unsupported cipher");var f=n.from([].concat((0,o.default)(d.update(n.from(a.privateKey.replace("0x",""),"hex"))),(0,o.default)(d.final()))),h=v.sha3(n.from([].concat((0,o.default)(i.slice(16,32)),(0,o.default)(f)))).replace("0x","");return{version:3,id:y.v4({random:r.uuid||g.randomBytes(16)}),address:a.address.toLowerCase().replace("0x",""),crypto:{ciphertext:f.toString("hex"),cipherparams:{iv:c.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:u,kdfparams:l,mac:h.toString("hex")}}},I.prototype._findSafeIndex=function(e){return e=e||0,this.hasOwnProperty(e)?this._findSafeIndex(e+1):e},I.prototype._currentIndexes=function(){return Object.keys(this).map((function(e){return parseInt(e)})).filter((function(e){return e<9e20}))},I.prototype.create=function(e,t){for(var r=0;r{"use strict";var n=r(28847),i=n(r(93106)),o=n(r(90775)),a=n(r(3355));function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}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 i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(e.inputs);try{var u=function(){var e=a.value;if(!e.indexed)return"continue";var t=r[e.name];if(!t)return o.push(null),"continue";Array.isArray(t)?o.push(t.map((function(t){return y.encodeParameter(e.type,t)}))):o.push(y.encodeParameter(e.type,t))};for(c.s();!(a=c.n()).done;)u()}catch(e){c.e(e)}finally{c.f()}}return o.length&&(n.topics=o),this.options.address&&(n.address=this.options.address.toLowerCase()),n},v.prototype._decodeEventABI=function(e){var t=this;e.data=e.data||"",e.topics=e.topics||[];var r=p.outputLogFormatter(e);if("ALLEVENTS"===t.name&&(t=t.jsonInterface.find((function(t){return t.signature===e.topics[0]}))||{anonymous:!0}),t.inputs=t.inputs||[],!t.anonymous){var n=0;t.inputs.forEach((function(e){return e.indexed?n++:null})),n>0&&e.topics.length!==n+1&&(t={anonymous:!0,inputs:[]})}var i=t.anonymous?e.topics:e.topics.slice(1);return r.returnValues=y.decodeLog(t.inputs,e.data,i),delete r.returnValues.__length__,r.event=t.name,r.signature=t.anonymous||!e.topics[0]?null:e.topics[0],r.raw={data:r.data,topics:r.topics},delete r.data,delete r.topics,r},v.prototype._encodeMethodABI=function(){var e=this._method.signature,t=this.arguments||[],r=!1,n=this._parent.options.jsonInterface.filter((function(t){return"constructor"===e&&t.type===e||(t.signature===e||t.signature===e.replace("0x","")||t.name===e)&&"function"===t.type})).map((function(e){var n=Array.isArray(e.inputs)?e.inputs.length:0;if(n!==t.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+n+" arguments.");return"function"===e.type&&(r=e.signature),Array.isArray(e.inputs)?e.inputs:[]})).map((function(e){return y.encodeParameters(e,t).replace("0x","")}))[0]||"";if("constructor"===e){if(!this._deployData)throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");return this._deployData.startsWith("0x")||(this._deployData="0x"+this._deployData),this._deployData+n}var i=r?r+n:n;if(!i)throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".');return i},v.prototype._decodeMethodReturn=function(e,t){if(!t)return null;t=t.length>=2?t.slice(2):t;var r=y.decodeParameters(e,t);return 1===r.__length__?r[0]:(delete r.__length__,r)},v.prototype.deploy=function(e,t){if((e=e||{}).arguments=e.arguments||[],!(e=this._getOrSetDefaultOptions(e)).data){if("function"==typeof t)return t(g.ContractMissingDeployDataError());throw g.ContractMissingDeployDataError()}var r=this.options.jsonInterface.find((function(e){return"constructor"===e.type}))||{};return r.signature="constructor",this._createTxObject.apply({method:r,parent:this,deployData:e.data,_ethAccounts:this.constructor._ethAccounts},e.arguments)},v.prototype._generateEventOptions=function(){var e=Array.prototype.slice.call(arguments),t=this._getCallback(e),r="object"===(!!e[e.length-1]&&(0,a.default)(e[e.length-1]))?e.pop():{},n="string"==typeof e[0]?e[0]:"allevents",i="allevents"===n.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find((function(e){return"event"===e.type&&(e.name===n||e.signature==="0x"+n.replace("0x",""))}));if(!i)throw g.ContractEventDoesNotExistError(n);if(!f.isAddress(this.options.address))throw g.ContractNoAddressDefinedError();return{params:this._encodeEventABI(i,r),event:i,filter:r.filter||{},callback:t}},v.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},v.prototype.once=function(e,t,r){var n=Array.prototype.slice.call(arguments);if(!(r=this._getCallback(n)))throw g.ContractOnceRequiresCallbackError();t&&delete t.fromBlock,this._on(e,t,(function(e,t,n){n.unsubscribe(),"function"==typeof r&&r(e,t,n)}))},v.prototype._on=function(){var e=this._generateEventOptions.apply(this,arguments);e.params&&e.params.toBlock&&(delete e.params.toBlock,console.warn("Invalid option: toBlock. Use getPastEvents for specific range.")),this._checkListener("newListener",e.event.name),this._checkListener("removeListener",e.event.name);var t=new h({subscription:{params:1,inputFormatter:[p.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event),subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},type:"eth",requestManager:this._requestManager});return t.subscribe("logs",e.params,e.callback||function(){}),t};var b=function(e,t){if(e.event&&"ALLEVENTS"===e.event.name&&Array.isArray(t)){var r=e.filter||{},n=Object.keys(r);return n.length>0?t.filter((function(e){return"string"==typeof e||n.every((function(t){return Array.isArray(r[t])?r[t].some((function(r){return String(e.returnValues[t]).toUpperCase()===String(r).toUpperCase()})):String(e.returnValues[t]).toUpperCase()===String(r[t]).toUpperCase()}))})):t}return t};v.prototype.getPastEvents=function(){var e=this._generateEventOptions.apply(this,arguments),t=new d({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[p.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event)});t.setRequestManager(this._requestManager);var r=t.buildCall();return t=null,r(e.params,(function(t,r){"function"==typeof e.callback&&e.callback(t,b(e,r))})).then(b.bind(this,e))},v.prototype._createTxObject=function(){var e=Array.prototype.slice.call(arguments),t={};if("function"===this.method.type&&(t.call=this.parent._executeMethod.bind(t,"call"),t.call.request=this.parent._executeMethod.bind(t,"call",!0)),t.send=this.parent._executeMethod.bind(t,"send"),t.send.request=this.parent._executeMethod.bind(t,"send",!0),t.encodeABI=this.parent._encodeMethodABI.bind(t),t.estimateGas=this.parent._executeMethod.bind(t,"estimate"),t.createAccessList=this.parent._executeMethod.bind(t,"createAccessList"),e&&this.method.inputs&&e.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,e);throw g.InvalidNumberOfParams(e.length,this.method.inputs.length,this.method.name)}return t.arguments=e||[],t._method=this.method,t._parent=this.parent,t._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(t._deployData=this.deployData),t},v.prototype._processExecuteArguments=function(e,t){var r={};if(r.type=e.shift(),r.callback=this._parent._getCallback(e),"call"!==r.type||!0===e[e.length-1]||"string"!=typeof e[e.length-1]&&!isFinite(e[e.length-1])||(r.defaultBlock=e.pop()),r.options="object"===(!!e[e.length-1]&&(0,a.default)(e[e.length-1]))?e.pop():{},r.generateRequest=!0===e[e.length-1]&&e.pop(),r.options=this._parent._getOrSetDefaultOptions(r.options),r.options.data=this.encodeABI(),!this._deployData&&!f.isAddress(this._parent.options.address))throw g.ContractNoAddressDefinedError();return this._deployData||(r.options.to=this._parent.options.address),r.options.data?r:f._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),t.eventEmitter,t.reject,r.callback)},v.prototype._executeMethod=function(){var e=this,t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),r),r=m("send"!==t.type),n=e.constructor._ethAccounts||e._ethAccounts;if(t.generateRequest){var i={params:[p.inputCallFormatter.call(this._parent,t.options)],callback:t.callback};return"call"===t.type?(i.params.push(p.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)),i.method="eth_call",i.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):i.method="eth_sendTransaction",i}switch(t.type){case"createAccessList":return f.isAddress(t.options.from)?new d({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[p.inputTransactionFormatter,p.inputDefaultBlockNumberFormatter],requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback):f._fireError(g.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);case"estimate":return new d({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[p.inputCallFormatter],outputFormatter:f.hexToNumber,requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback);case"call":return new d({name:"call",call:"eth_call",params:2,inputFormatter:[p.inputCallFormatter,p.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,handleRevert:e._parent.handleRevert,abiCoder:y}).createFunction()(t.options,t.defaultBlock,t.callback);case"send":if(!f.isAddress(t.options.from))return f._fireError(g.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);if("boolean"==typeof this._method.payable&&!this._method.payable&&t.options.value&&t.options.value>0)return f._fireError(new Error("Can not send value to non-payable contract method or constructor"),r.eventEmitter,r.reject,t.callback);var o={receiptFormatter:function(t){if(Array.isArray(t.logs)){var r=t.logs.map((function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)}));t.events={};var n=0;r.forEach((function(e){e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[n]=e,n++)})),delete t.logs}return t},contractDeployFormatter:function(t){var r=e._parent.clone();return r.options.address=t.contractAddress,r}};return new d({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[p.inputTransactionFormatter],requestManager:e._parent._requestManager,accounts:e.constructor._ethAccounts||e._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,transactionBlockTimeout:e._parent.transactionBlockTimeout,transactionConfirmationBlocks:e._parent.transactionConfirmationBlocks,transactionPollingTimeout:e._parent.transactionPollingTimeout,transactionPollingInterval:e._parent.transactionPollingInterval,defaultCommon:e._parent.defaultCommon,defaultChain:e._parent.defaultChain,defaultHardfork:e._parent.defaultHardfork,handleRevert:e._parent.handleRevert,extraFormatters:o,abiCoder:y}).createFunction()(t.options,t.callback);default:throw new Error('Method "'+t.type+'" not implemented.')}},e.exports=v},46764:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(94571)),a=r(55160),s=r(11314).formatters,c=r(48161),u=r(11841),l=r(62867),d=r(22689);function f(e){this.eth=e;var t=null;this._detectedAddress=null,this._lastSyncCheck=null,Object.defineProperty(this,"registry",{get:function(){return new u(this)},enumerable:!0}),Object.defineProperty(this,"resolverMethodHandler",{get:function(){return new l(this.registry)},enumerable:!0}),Object.defineProperty(this,"registryAddress",{get:function(){return t},set:function(e){t=null!==e?s.inputAddressFormatter(e):e},enumerable:!0})}f.prototype.supportsInterface=function(e,t,r){return this.getResolver(e).then((function(e){return c.isHexStrict(t)||(t=c.sha3(t).slice(0,10)),e.methods.supportsInterface(t).call(r)})).catch((function(e){if("function"!=typeof r)throw e;r(e,null)}))},f.prototype.resolver=function(e,t){return this.registry.resolver(e,t)},f.prototype.getResolver=function(e,t){return this.registry.getResolver(e,t)},f.prototype.setResolver=function(e,t,r,n){return this.registry.setResolver(e,t,r,n)},f.prototype.setRecord=function(e,t,r,n,i,o){return this.registry.setRecord(e,t,r,n,i,o)},f.prototype.setSubnodeRecord=function(e,t,r,n,i,o,a){return this.registry.setSubnodeRecord(e,t,r,n,i,o,a)},f.prototype.setApprovalForAll=function(e,t,r,n){return this.registry.setApprovalForAll(e,t,r,n)},f.prototype.isApprovedForAll=function(e,t,r){return this.registry.isApprovedForAll(e,t,r)},f.prototype.recordExists=function(e,t){return this.registry.recordExists(e,t)},f.prototype.setSubnodeOwner=function(e,t,r,n,i){return this.registry.setSubnodeOwner(e,t,r,n,i)},f.prototype.getTTL=function(e,t){return this.registry.getTTL(e,t)},f.prototype.setTTL=function(e,t,r,n){return this.registry.setTTL(e,t,r,n)},f.prototype.getOwner=function(e,t){return this.registry.getOwner(e,t)},f.prototype.setOwner=function(e,t,r,n){return this.registry.setOwner(e,t,r,n)},f.prototype.getAddress=function(e,t){return this.resolverMethodHandler.method(e,"addr",[]).call(t)},f.prototype.setAddress=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setAddr",[t]).send(r,n)},f.prototype.getPubkey=function(e,t){return this.resolverMethodHandler.method(e,"pubkey",[],null,t).call(t)},f.prototype.setPubkey=function(e,t,r,n,i){return this.resolverMethodHandler.method(e,"setPubkey",[t,r]).send(n,i)},f.prototype.getContent=function(e,t){return this.resolverMethodHandler.method(e,"content",[]).call(t)},f.prototype.setContent=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setContent",[t]).send(r,n)},f.prototype.getContenthash=function(e,t){return this.resolverMethodHandler.method(e,"contenthash",[],d.decode).call(t)},f.prototype.setContenthash=function(e,t,r,n){var i;try{i=d.encode(t)}catch(e){var o=new Error("Could not encode "+t+". See docs for supported hash protocols.");if("function"==typeof n)return void n(o,null);throw o}return this.resolverMethodHandler.method(e,"setContenthash",[i]).send(r,n)},f.prototype.getMultihash=function(e,t){return this.resolverMethodHandler.method(e,"multihash",[]).call(t)},f.prototype.setMultihash=function(e,t,r,n){return this.resolverMethodHandler.method(e,"multihash",[t]).send(r,n)},f.prototype.checkNetwork=(0,o.default)(i.default.mark((function e(){var t,r,n,o,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=new Date/1e3,this._lastSyncCheck&&!(t-this._lastSyncCheck>3600)){e.next=9;break}return e.next=4,this.eth.getBlock("latest");case 4:if(r=e.sent,!((n=t-r.timestamp)>3600)){e.next=8;break}throw new Error("Network not synced; last block was "+n+" seconds ago");case 8:this._lastSyncCheck=t;case 9:if(!this.registryAddress){e.next=11;break}return e.abrupt("return",this.registryAddress);case 11:if(this._detectedAddress){e.next=20;break}return e.next=14,this.eth.net.getNetworkType();case 14:if(o=e.sent,void 0!==(s=a.addresses[o])){e.next=18;break}throw new Error("ENS is not supported on network "+o);case 18:return this._detectedAddress=s,e.abrupt("return",this._detectedAddress);case 20:return e.abrupt("return",this._detectedAddress);case 21:case"end":return e.stop()}}),e,this)}))),e.exports=f},55160:e=>{"use strict";e.exports={addresses:{main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",ropsten:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",rinkeby:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},interfaceIds:{addr:"0x3b3b57de",setAddr:"0x3b3b57de",pubkey:"0xc8690233",setPubkey:"0xc8690233",contenthash:"0xbc1c58d1",setContenthash:"0xbc1c58d1",content:"0xd8389dc5",setContent:"0xd8389dc5"}}},11841:(e,t,r)=>{"use strict";var n=r(58164),i=r(21006),o=r(90282),a=r(11314).formatters,s=r(48161),c=r(43205),u=r(48384);function l(e){var t=this;this.ens=e,this.contract=e.checkNetwork().then((function(e){var r=new n(c,e);return r.setProvider(t.ens.eth.currentProvider),r}))}l.prototype.owner=function(e,t){return console.warn('Deprecated: Please use the "getOwner" method instead of "owner".'),this.getOwner(e,t)},l.prototype.getOwner=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.owner(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},l.prototype.setOwner=function(e,t,r,n){var s=new o(!0);return this.contract.then((function(n){return n.methods.setOwner(i.hash(e),a.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},l.prototype.getTTL=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.ttl(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},l.prototype.setTTL=function(e,t,r,n){var a=new o(!0);return this.contract.then((function(n){return n.methods.setTTL(i.hash(e),t).send(r)})).then((function(e){"function"!=typeof n?a.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?a.reject(e):n(e,null)})),a.eventEmitter},l.prototype.setSubnodeOwner=function(e,t,r,n,c){var u=new o(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(o){return o.methods.setSubnodeOwner(i.hash(e),t,a.inputAddressFormatter(r)).send(n)})).then((function(e){"function"!=typeof c?u.resolve(e):c(e,e)})).catch((function(e){"function"!=typeof c?u.reject(e):c(e,null)})),u.eventEmitter},l.prototype.setRecord=function(e,t,r,n,s,c){var u=new o(!0);return this.contract.then((function(o){return o.methods.setRecord(i.hash(e),a.inputAddressFormatter(t),a.inputAddressFormatter(r),n).send(s)})).then((function(e){"function"!=typeof c?u.resolve(e):c(e,e)})).catch((function(e){"function"!=typeof c?u.reject(e):c(e,null)})),u.eventEmitter},l.prototype.setSubnodeRecord=function(e,t,r,n,c,u,l){var d=new o(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(o){return o.methods.setSubnodeRecord(i.hash(e),t,a.inputAddressFormatter(r),a.inputAddressFormatter(n),c).send(u)})).then((function(e){"function"!=typeof l?d.resolve(e):l(e,e)})).catch((function(e){"function"!=typeof l?d.reject(e):l(e,null)})),d.eventEmitter},l.prototype.setApprovalForAll=function(e,t,r,n){var i=new o(!0);return this.contract.then((function(n){return n.methods.setApprovalForAll(a.inputAddressFormatter(e),t).send(r)})).then((function(e){"function"!=typeof n?i.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?i.reject(e):n(e,null)})),i.eventEmitter},l.prototype.isApprovedForAll=function(e,t,r){var n=new o(!0);return this.contract.then((function(r){return r.methods.isApprovedForAll(a.inputAddressFormatter(e),a.inputAddressFormatter(t)).call()})).then((function(e){"function"!=typeof r?n.resolve(e):r(e,e)})).catch((function(e){"function"!=typeof r?n.reject(e):r(e,null)})),n.eventEmitter},l.prototype.recordExists=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.recordExists(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},l.prototype.resolver=function(e,t){return console.warn('Deprecated: Please use the "getResolver" method instead of "resolver".'),this.getResolver(e,t)},l.prototype.getResolver=function(e,t){var r=this;return this.contract.then((function(t){return t.methods.resolver(i.hash(e)).call()})).then((function(e){var i=new n(u,e);if(i.setProvider(r.ens.eth.currentProvider),"function"!=typeof t)return i;t(i,i)})).catch((function(e){if("function"!=typeof t)throw e;t(e,null)}))},l.prototype.setResolver=function(e,t,r,n){var s=new o(!0);return this.contract.then((function(n){return n.methods.setResolver(i.hash(e),a.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},e.exports=l},30715:(e,t,r)=>{"use strict";var n=r(46764);e.exports=n},62867:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(82247)),o=n(r(94571)),a=r(90282),s=r(21006),c=r(11314).errors,u=r(55160).interfaceIds;function l(e){this.registry=e}l.prototype.method=function(e,t,r,n,i){return{call:this.call.bind({ensName:e,methodName:t,methodArguments:r,callback:i,parent:this,outputFormatter:n}),send:this.send.bind({ensName:e,methodName:t,methodArguments:r,callback:i,parent:this})}},l.prototype.call=function(e){var t=this,r=new a,n=this.parent.prepareArguments(this.ensName,this.methodArguments),s=this.outputFormatter||null;return this.parent.registry.getResolver(this.ensName).then(function(){var a=(0,o.default)(i.default.mark((function o(a){return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,t.parent.checkInterfaceSupport(a,t.methodName);case 2:t.parent.handleCall(r,a.methods[t.methodName],n,s,e);case 3:case"end":return i.stop()}}),o)})));return function(e){return a.apply(this,arguments)}}()).catch((function(t){"function"!=typeof e?r.reject(t):e(t,null)})),r.eventEmitter},l.prototype.send=function(e,t){var r=this,n=new a,s=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.getResolver(this.ensName).then(function(){var a=(0,o.default)(i.default.mark((function o(a){return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,r.parent.checkInterfaceSupport(a,r.methodName);case 2:r.parent.handleSend(n,a.methods[r.methodName],s,e,t);case 3:case"end":return i.stop()}}),o)})));return function(e){return a.apply(this,arguments)}}()).catch((function(e){"function"!=typeof t?n.reject(e):t(e,null)})),n.eventEmitter},l.prototype.handleCall=function(e,t,r,n,i){return t.apply(this,r).call().then((function(t){n&&(t=n(t)),"function"!=typeof i?e.resolve(t):i(t,t)})).catch((function(t){"function"!=typeof i?e.reject(t):i(t,null)})),e},l.prototype.handleSend=function(e,t,r,n,i){return t.apply(this,r).send(n).on("sending",(function(){e.eventEmitter.emit("sending")})).on("sent",(function(){e.eventEmitter.emit("sent")})).on("transactionHash",(function(t){e.eventEmitter.emit("transactionHash",t)})).on("confirmation",(function(t,r){e.eventEmitter.emit("confirmation",t,r)})).on("receipt",(function(t){e.eventEmitter.emit("receipt",t),e.resolve(t),"function"==typeof i&&i(t,t)})).on("error",(function(t){e.eventEmitter.emit("error",t),"function"!=typeof i?e.reject(t):i(t,null)})),e},l.prototype.prepareArguments=function(e,t){var r=s.hash(e);return t.length>0?(t.unshift(r),t):[r]},l.prototype.checkInterfaceSupport=function(){var e=(0,o.default)(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u[r]){e.next=2;break}return e.abrupt("return");case 2:return n=!1,e.prev=3,e.next=6,t.methods.supportsInterface(u[r]).call();case 6:n=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.warn('Could not verify interface of resolver contract at "'+t.options.address+'". ');case 12:if(n){e.next=14;break}throw c.ResolverMethodMissingError(t.options.address,r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,r){return e.apply(this,arguments)}}(),e.exports=l},22689:(e,t,r)=>{"use strict";var n=r(94308);e.exports={decode:function(e){var t=null,r=null,i=null;if(e&&e.error)return{protocolType:null,decoded:e.error};if(e)try{t=n.decode(e);var o=n.getCodec(e);"ipfs-ns"===o?r="ipfs":"swarm-ns"===o?r="bzz":"onion"===o?r="onion":"onion3"===o?r="onion3":t=e}catch(e){i=e.message}return{protocolType:r,decoded:t,error:i}},encode:function(e){var t,r,i=!1;if(e){var o=e.match(/^(ipfs|bzz|onion|onion3):\/\/(.*)/)||e.match(/\/(ipfs)\/(.*)/);o&&(r=o[1],t=o[2]);try{if("ipfs"===r)t.length>=4&&(i="0x"+n.fromIpfs(t));else if("bzz"===r)t.length>=4&&(i="0x"+n.fromSwarm(t));else if("onion"===r)16===t.length&&(i="0x"+n.encode("onion",t));else{if("onion3"!==r)throw new Error("Could not encode content hash: unsupported content type");56===t.length&&(i="0x"+n.encode("onion3",t))}}catch(e){throw e}}return i}}},43205:e=>{"use strict";e.exports=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setSubnodeRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},48384:e=>{"use strict";e.exports=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setMultihash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"multihash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"contenthash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setContenthash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},30006:(e,t,r)=>{"use strict";var n=r(28847),i=n(r(69721)),o=n(r(58985)),a=r(48161),s=r(31734),c=function(e){var t="A".charCodeAt(0),r="Z".charCodeAt(0);return(e=(e=e.toUpperCase()).slice(4)+e.slice(0,4)).split("").map((function(e){var n=e.charCodeAt(0);return n>=t&&n<=r?n-t+10:e})).join("")},u=function(e){for(var t,r=e;r.length>2;)t=r.slice(0,9),r=parseInt(t,10)%97+r.slice(t.length);return parseInt(r,10)%97},l=function(){function e(t){(0,i.default)(this,e),this._iban=t}return(0,o.default)(e,[{key:"isValid",value:function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===u(c(this._iban))}},{key:"isDirect",value:function(){return 34===this._iban.length||35===this._iban.length}},{key:"isIndirect",value:function(){return 20===this._iban.length}},{key:"checksum",value:function(){return this._iban.slice(2,4)}},{key:"institution",value:function(){return this.isIndirect()?this._iban.slice(7,11):""}},{key:"client",value:function(){return this.isIndirect()?this._iban.slice(11):""}},{key:"toAddress",value:function(){if(this.isDirect()){var e=this._iban.slice(4),t=new s(e,36);return a.toChecksumAddress(t.toString(16,20))}return""}},{key:"toString",value:function(){return this._iban}}],[{key:"toAddress",value:function(t){if(!(t=new e(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()}},{key:"toIban",value:function(t){return e.fromAddress(t).toString()}},{key:"fromAddress",value:function(t){if(!a.isAddress(t))throw new Error("Provided address is not a valid address: "+t);t=t.replace("0x","").replace("0X","");var r=function(e){for(var t=e;t.length<30;)t="0"+t;return t}(new s(t,16).toString(36));return e.fromBban(r.toUpperCase())}},{key:"fromBban",value:function(t){return new e("XE"+("0"+(98-u(c("XE00"+t)))).slice(-2)+t)}},{key:"createIndirect",value:function(t){return e.fromBban("ETH"+t.institution+t.identifier)}},{key:"isValid",value:function(t){return new e(t).isValid()}}]),e}();e.exports=l},96306:(e,t,r)=>{"use strict";var n=r(80606),i=r(53349),o=r(48161),a=r(473),s=r(11314).formatters,c=function(){var e=this;n.packageInit(this,arguments),this.net=new a(this);var t=null,r="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return t},set:function(e){return e&&(t=o.toChecksumAddress(s.inputAddressFormatter(e))),c.forEach((function(e){e.defaultAccount=t})),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return r},set:function(e){return r=e,c.forEach((function(e){e.defaultBlock=r})),e},enumerable:!0});var c=[new i({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:o.toChecksumAddress}),new i({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:o.toChecksumAddress}),new i({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[s.inputAddressFormatter,null,null]}),new i({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[s.inputAddressFormatter]}),new i({name:"importRawKey",call:"personal_importRawKey",params:2}),new i({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"signTransaction",call:"personal_signTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"sign",call:"personal_sign",params:3,inputFormatter:[s.inputSignFormatter,s.inputAddressFormatter,null]}),new i({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[s.inputSignFormatter,null]})];c.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount}))};n.addProviders(c),e.exports=c},28130:e=>{"use strict";e.exports=function(e){var t,r=this;return this.net.getId().then((function(e){return t=e,r.getBlock(0)})).then((function(r){var n="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===r.hash&&1===t&&(n="main"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===r.hash&&3===t&&(n="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===r.hash&&4===t&&(n="rinkeby"),"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a"===r.hash&&5===t&&(n="goerli"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===r.hash&&42===t&&(n="kovan"),"function"==typeof e&&e(null,n),n})).catch((function(t){if("function"!=typeof e)throw t;e(t)}))}},66748:(e,t,r)=>{"use strict";var n=r(80606),i=r(11314),o=r(34178).subscriptions,a=r(53349),s=r(48161),c=r(473),u=r(30715),l=r(96306),d=r(58164),f=r(30006),h=r(99819),p=r(79901),g=r(28130),m=i.formatters,y=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},v=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},b=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},w=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},A=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},_=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),e.personal.setRequestManager(r),e.accounts.setRequestManager(r),e.Contract._requestManager=e._requestManager,e.Contract.currentProvider=e._provider,!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager),e.ens._detectedAddress=null,e.ens._lastSyncCheck=null};var i,_,E,S=!1,k=null,x="latest",C=50,I=24,T=750,O=1e3,P=10,M=100;Object.defineProperty(this,"handleRevert",{get:function(){return S},set:function(t){S=t,e.Contract.handleRevert=S,L.forEach((function(e){e.handleRevert=S}))},enumerable:!0}),Object.defineProperty(this,"defaultCommon",{get:function(){return E},set:function(t){E=t,e.Contract.defaultCommon=E,L.forEach((function(e){e.defaultCommon=E}))},enumerable:!0}),Object.defineProperty(this,"defaultHardfork",{get:function(){return _},set:function(t){_=t,e.Contract.defaultHardfork=_,L.forEach((function(e){e.defaultHardfork=_}))},enumerable:!0}),Object.defineProperty(this,"defaultChain",{get:function(){return i},set:function(t){i=t,e.Contract.defaultChain=i,L.forEach((function(e){e.defaultChain=i}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingTimeout",{get:function(){return T},set:function(t){T=t,e.Contract.transactionPollingTimeout=T,L.forEach((function(e){e.transactionPollingTimeout=T}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingInterval",{get:function(){return O},set:function(t){O=t,e.Contract.transactionPollingInterval=O,L.forEach((function(e){e.transactionPollingInterval=O}))},enumerable:!0}),Object.defineProperty(this,"transactionConfirmationBlocks",{get:function(){return I},set:function(t){I=t,e.Contract.transactionConfirmationBlocks=I,L.forEach((function(e){e.transactionConfirmationBlocks=I}))},enumerable:!0}),Object.defineProperty(this,"transactionBlockTimeout",{get:function(){return C},set:function(t){C=t,e.Contract.transactionBlockTimeout=C,L.forEach((function(e){e.transactionBlockTimeout=C}))},enumerable:!0}),Object.defineProperty(this,"blockHeaderTimeout",{get:function(){return P},set:function(t){P=t,e.Contract.blockHeaderTimeout=P,L.forEach((function(e){e.blockHeaderTimeout=P}))},enumerable:!0}),Object.defineProperty(this,"defaultAccount",{get:function(){return k},set:function(t){return t&&(k=s.toChecksumAddress(m.inputAddressFormatter(t))),e.Contract.defaultAccount=k,e.personal.defaultAccount=k,L.forEach((function(e){e.defaultAccount=k})),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return x},set:function(t){return x=t,e.Contract.defaultBlock=x,e.personal.defaultBlock=x,L.forEach((function(e){e.defaultBlock=x})),t},enumerable:!0}),Object.defineProperty(this,"maxListenersWarningThreshold",{get:function(){return M},set:function(t){e.currentProvider&&e.currentProvider.setMaxListeners&&(M=t,e.currentProvider.setMaxListeners(t))},enumerable:!0}),this.clearSubscriptions=e._requestManager.clearSubscriptions.bind(e._requestManager),this.removeSubscriptionById=e._requestManager.removeSubscription.bind(e._requestManager),this.net=new c(this),this.net.getNetworkType=g.bind(this),this.accounts=new h(this),this.personal=new l(this),this.personal.defaultAccount=this.defaultAccount,this.maxListenersWarningThreshold=M;var R=this,N=function(){d.apply(this,arguments);var e=this,t=R.setProvider;R.setProvider=function(){t.apply(R,arguments),n.packageInit(e,[R])}};N.setProvider=function(){d.setProvider.apply(this,arguments)},(N.prototype=Object.create(d.prototype)).constructor=N,this.Contract=N,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.transactionBlockTimeout=this.transactionBlockTimeout,this.Contract.transactionConfirmationBlocks=this.transactionConfirmationBlocks,this.Contract.transactionPollingTimeout=this.transactionPollingTimeout,this.Contract.transactionPollingInterval=this.transactionPollingInterval,this.Contract.blockHeaderTimeout=this.blockHeaderTimeout,this.Contract.handleRevert=this.handleRevert,this.Contract._requestManager=this._requestManager,this.Contract._ethAccounts=this.accounts,this.Contract.currentProvider=this._requestManager.provider,this.Iban=f,this.abi=p,this.ens=new u(this);var L=[new a({name:"getNodeInfo",call:"web3_clientVersion"}),new a({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new a({name:"getCoinbase",call:"eth_coinbase",params:0}),new a({name:"isMining",call:"eth_mining",params:0}),new a({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:s.hexToNumber}),new a({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:m.outputSyncingFormatter}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:m.outputBigNumberFormatter}),new a({name:"getFeeHistory",call:"eth_feeHistory",params:3,inputFormatter:[s.numberToHex,m.inputBlockNumberFormatter,null]}),new a({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:s.toChecksumAddress}),new a({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:s.hexToNumber}),new a({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputBigNumberFormatter}),new a({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[m.inputAddressFormatter,s.numberToHex,m.inputDefaultBlockNumberFormatter]}),new a({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter]}),new a({name:"getBlock",call:y,params:2,inputFormatter:[m.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:m.outputBlockFormatter}),new a({name:"getUncle",call:b,params:2,inputFormatter:[m.inputBlockNumberFormatter,s.numberToHex],outputFormatter:m.outputBlockFormatter}),new a({name:"getBlockTransactionCount",call:w,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"getBlockUncleCount",call:A,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionFormatter}),new a({name:"getTransactionFromBlock",call:v,params:2,inputFormatter:[m.inputBlockNumberFormatter,s.numberToHex],outputFormatter:m.outputTransactionFormatter}),new a({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionReceiptFormatter}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null],abiCoder:p}),new a({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[m.inputTransactionFormatter]}),new a({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[m.inputTransactionFormatter],abiCoder:p}),new a({name:"sign",call:"eth_sign",params:2,inputFormatter:[m.inputSignFormatter,m.inputAddressFormatter],transformPayload:function(e){return e.params.reverse(),e}}),new a({name:"call",call:"eth_call",params:2,inputFormatter:[m.inputCallFormatter,m.inputDefaultBlockNumberFormatter],abiCoder:p}),new a({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[m.inputCallFormatter],outputFormatter:s.hexToNumber}),new a({name:"submitWork",call:"eth_submitWork",params:3}),new a({name:"getWork",call:"eth_getWork",params:0}),new a({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter}),new a({name:"getChainId",call:"eth_chainId",params:0,outputFormatter:s.hexToNumber}),new a({name:"requestAccounts",call:"eth_requestAccounts",params:0,outputFormatter:s.toChecksumAddress}),new a({name:"getProof",call:"eth_getProof",params:3,inputFormatter:[m.inputAddressFormatter,m.inputStorageKeysFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputProofFormatter}),new a({name:"getPendingTransactions",call:"eth_pendingTransactions",params:0,outputFormatter:m.outputTransactionFormatter}),new a({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[m.inputTransactionFormatter,m.inputDefaultBlockNumberFormatter]}),new o({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:m.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter,subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},syncing:{params:0,outputFormatter:m.outputSyncingFormatter,subscriptionHandler:function(e){var t=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",t._isSyncing),"function"==typeof this.callback&&this.callback(null,t._isSyncing,this),setTimeout((function(){t.emit("data",e),"function"==typeof t.callback&&t.callback(null,e,t)}),0)):(this.emit("data",e),"function"==typeof t.callback&&this.callback(null,e,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout((function(){e.currentBlock>e.highestBlock-200&&(t._isSyncing=!1,t.emit("changed",t._isSyncing),"function"==typeof t.callback&&t.callback(null,t._isSyncing,t))}),500))}}}})];L.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager,e.accounts),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount,t.transactionBlockTimeout=e.transactionBlockTimeout,t.transactionConfirmationBlocks=e.transactionConfirmationBlocks,t.transactionPollingTimeout=e.transactionPollingTimeout,t.transactionPollingInterval=e.transactionPollingInterval,t.handleRevert=e.handleRevert}))};n.addProviders(_),e.exports=_},473:(e,t,r)=>{"use strict";var n=r(80606),i=r(53349),o=r(48161),a=function(){var e=this;n.packageInit(this,arguments),[new i({name:"getId",call:"net_version",params:0,outputFormatter:parseInt}),new i({name:"isListening",call:"net_listening",params:0}),new i({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:o.hexToNumber})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};n.addProviders(a),e.exports=a},14565:(e,t,r)=>{"use strict";var n=r(11314).errors,i=r(33768),o=r(29519),a=r(90912);r(54258).polyfill(),void 0===r.g||r.g.AbortController||r(53368);var s=function(e,t){t=t||{},this.withCredentials=t.withCredentials,this.timeout=t.timeout||0,this.headers=t.headers,this.agent=t.agent,this.forceGlobalFetch=t.forceGlobalFetch||!1,this.connected=!1;var r=!1!==t.keepAlive;this.host=e||"http://localhost:8545",this.agent||("https"===this.host.substring(0,5)?this.httpsAgent=new a.Agent({keepAlive:r}):this.httpAgent=new o.Agent({keepAlive:r}))};s.prototype.send=function(e,t){var r,o={method:"POST",body:JSON.stringify(e)},a={},s=this.forceGlobalFetch?globalThis.fetch:i;if("undefined"!=typeof AbortController?r=new AbortController:"undefined"!=typeof window&&void 0!==window.AbortController&&(r=new window.AbortController),void 0!==r&&(o.signal=r.signal),"undefined"==typeof XMLHttpRequest){var c={httpsAgent:this.httpsAgent,httpAgent:this.httpAgent};this.agent&&(c.httpsAgent=this.agent.https,c.httpAgent=this.agent.http),"https"===this.host.substring(0,5)?o.agent=c.httpsAgent:o.agent=c.httpAgent}this.headers&&this.headers.forEach((function(e){a[e.name]=e.value})),a["Content-Type"]||(a["Content-Type"]="application/json"),this.withCredentials?o.credentials="include":o.credentials="omit",o.headers=a,this.timeout>0&&void 0!==r&&(this.timeoutId=setTimeout((function(){r.abort()}),this.timeout)),s(this.host,o).then(function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),e.json().then((function(e){t(null,e)}),(function(){e.text().then((function(e){t(n.InvalidResponse(e))}),(function(){t(n.InvalidResponse(""))}))}))}.bind(this),function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),"AbortError"!==e.name?t(n.InvalidConnection(this.host,e)):t(n.ConnectionTimeout(this.timeout))}.bind(this))},s.prototype.disconnect=function(){},s.prototype.supportsSubscriptions=function(){return!1},e.exports=s},52683:(e,t,r)=>{"use strict";var n=r(11314).errors,i=r(83150),o=function(e,t){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=e,this.connected=!1,this.connection=t.connect({path:this.path}),this.addDefaultEvents();var n=function(e){var t=null;Array.isArray(e)?e.forEach((function(e){r.responseCallbacks[e.id]&&(t=e.id)})):t=e.id,t||-1===e.method.indexOf("_subscription")?r.responseCallbacks[t]&&(r.responseCallbacks[t](null,e),delete r.responseCallbacks[t]):r.notificationCallbacks.forEach((function(t){"function"==typeof t&&t(e)}))};"Socket"===t.constructor.name?i(this.connection).done(n):this.connection.on("data",(function(e){r._parseResponse(e.toString()).forEach(n)}))};o.prototype.addDefaultEvents=function(){var e=this;this.connection.on("connect",(function(){e.connected=!0})),this.connection.on("close",(function(){e.connected=!1})),this.connection.on("error",(function(){e._timeout()})),this.connection.on("end",(function(){e._timeout()})),this.connection.on("timeout",(function(){e._timeout()}))},o.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var i=null;try{i=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){throw t._timeout(),n.InvalidResponse(e)}),15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,i&&r.push(i)})),r},o.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,n=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=n},o.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](n.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},o.prototype.reconnect=function(){this.connection.connect({path:this.path})},o.prototype.send=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},o.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");"data"===e?this.notificationCallbacks.push(t):this.connection.on(e,t)},o.prototype.once=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");this.connection.once(e,t)},o.prototype.removeListener=function(e,t){var r=this;"data"===e?this.notificationCallbacks.forEach((function(e,n){e===t&&r.notificationCallbacks.splice(n,1)})):this.connection.removeListener(e,t)},o.prototype.removeAllListeners=function(e){"data"===e?this.notificationCallbacks=[]:this.connection.removeAllListeners(e)},o.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},o.prototype.supportsSubscriptions=function(){return!0},e.exports=o},40360:(e,t,r)=>{"use strict";var n=r(19142),i=r(29033).Buffer,o=r(28847)(r(3355)),a="[object process]"===Object.prototype.toString.call(void 0!==n?n:0),s="undefined"!=typeof navigator&&"ReactNative"===navigator.product,c=null,u=null;if(a||s){c=function(e){return i.from(e).toString("base64")};var l=r(51143);if(l.URL){var d=l.URL;u=function(e){return new d(e)}}else u=r(51143).parse}else c=btoa.bind("object"===("undefined"==typeof globalThis?"undefined":(0,o.default)(globalThis))?globalThis:self),u=function(e){return new URL(e)};e.exports={parseURL:u,btoa:c}},77651:(e,t,r)=>{"use strict";var n=r(98008),i=r(40360),o=r(11314).errors,a=r(1158).w3cwebsocket,s=function(e,t){n.call(this),t=t||{},this.url=e,this._customTimeout=t.timeout||15e3,this.headers=t.headers||{},this.protocol=t.protocol||void 0,this.reconnectOptions=Object.assign({auto:!1,delay:5e3,maxAttempts:!1,onTimeout:!1},t.reconnect),this.clientConfig=t.clientConfig||void 0,this.requestOptions=t.requestOptions||void 0,this.DATA="data",this.CLOSE="close",this.ERROR="error",this.CONNECT="connect",this.RECONNECT="reconnect",this.connection=null,this.requestQueue=new Map,this.responseQueue=new Map,this.reconnectAttempts=0,this.reconnecting=!1,this.connectFailedDescription=null;var r=i.parseURL(e);r.username&&r.password&&(this.headers.authorization="Basic "+i.btoa(r.username+":"+r.password)),r.auth&&(this.headers.authorization="Basic "+i.btoa(r.auth)),Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0}),this.connect()};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype.connect=function(){this.connection=new a(this.url,this.protocol,void 0,this.headers,this.requestOptions,this.clientConfig),this._addSocketListeners()},s.prototype._onMessage=function(e){var t=this;this._parseResponse("string"==typeof e.data?e.data:"").forEach((function(e){if(e.method&&-1!==e.method.indexOf("_subscription"))t.emit(t.DATA,e);else{var r=e.id;Array.isArray(e)&&(r=e[0].id),t.responseQueue.has(r)&&(void 0!==t.responseQueue.get(r).callback&&t.responseQueue.get(r).callback(!1,e),t.responseQueue.delete(r))}}))},s.prototype._onConnect=function(){if(this.emit(this.CONNECT),this.reconnectAttempts=0,this.reconnecting=!1,this.requestQueue.size>0){var e=this;this.requestQueue.forEach((function(t,r){e.send(t.payload,t.callback),e.requestQueue.delete(r)}))}},s.prototype._onConnectFailed=function(e){this.connectFailedDescription=e.toString().split("\n")[0];var t=this;this.connectFailedDescription&&(e.description=this.connectFailedDescription,this.connectFailedDescription=null),e.code=1006,e.reason="connection failed",!this.reconnectOptions.auto||[1e3,1001].includes(e.code)&&!1!==e.wasClean?(this.emit(this.ERROR,e),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(o.ConnectionNotOpenError(e)),t.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(o.InvalidConnection("on WS",e)),t.responseQueue.delete(n)})),this.connection._connection&&this.connection._connection.removeAllListeners(),this.connection._client.removeAllListeners(),this.connection._readyState=3,this.emit(this.CLOSE,e)):this.reconnect()},s.prototype._onClose=function(e){var t=this;!this.reconnectOptions.auto||[1e3,1001].includes(e.code)&&!1!==e.wasClean?(this.emit(this.CLOSE,e),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(o.ConnectionNotOpenError(e)),t.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(o.InvalidConnection("on WS",e)),t.responseQueue.delete(n)})),this._removeSocketListeners(),this.removeAllListeners()):this.reconnect()},s.prototype._addSocketListeners=function(){this.connection.addEventListener("message",this._onMessage.bind(this)),this.connection.addEventListener("open",this._onConnect.bind(this)),this.connection.addEventListener("close",this._onClose.bind(this)),this.connection._client&&(this.connection._client.removeAllListeners("connectFailed"),this.connection._client.on("connectFailed",this._onConnectFailed.bind(this)))},s.prototype._removeSocketListeners=function(){this.connection.removeEventListener("message",this._onMessage),this.connection.removeEventListener("open",this._onConnect),this.connection.removeEventListener("close",this._onClose),this.connection._connection&&this.connection._client.removeListener("connectFailed",this._onConnectFailed)},s.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var n=null;try{n=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){t.reconnectOptions.auto&&t.reconnectOptions.onTimeout?t.reconnect():(t.emit(t.ERROR,o.ConnectionTimeout(t._customTimeout)),t.requestQueue.size>0&&t.requestQueue.forEach((function(e,r){e.callback(o.ConnectionTimeout(t._customTimeout)),t.requestQueue.delete(r)})))}),t._customTimeout))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,n&&r.push(n)})),r},s.prototype.send=function(e,t){var r=e.id,n={payload:e,callback:t};if(Array.isArray(e)&&(r=e[0].id),this.connection.readyState===this.connection.CONNECTING||this.reconnecting)this.requestQueue.set(r,n);else{if(this.connection.readyState!==this.connection.OPEN)return this.requestQueue.delete(r),this.emit(this.ERROR,o.ConnectionNotOpenError()),void n.callback(o.ConnectionNotOpenError());this.responseQueue.set(r,n),this.requestQueue.delete(r);try{this.connection.send(JSON.stringify(n.payload))}catch(e){n.callback(e),this.responseQueue.delete(r)}}},s.prototype.reset=function(){this.responseQueue.clear(),this.requestQueue.clear(),this.removeAllListeners(),this._removeSocketListeners(),this._addSocketListeners()},s.prototype.disconnect=function(e,t){this._removeSocketListeners(),this.connection.close(e||1e3,t)},s.prototype.supportsSubscriptions=function(){return!0},s.prototype.reconnect=function(){var e=this;this.reconnecting=!0,this.responseQueue.size>0&&this.responseQueue.forEach((function(t,r){try{e.responseQueue.delete(r),t.callback(o.PendingRequestsOnReconnectingError())}catch(e){console.error("Error encountered in reconnect: ",e)}})),!this.reconnectOptions.maxAttempts||this.reconnectAttempts0&&this.requestQueue.forEach((function(t,r){t.callback(o.MaxAttemptsReachedOnReconnectingError()),e.requestQueue.delete(r)})))},e.exports=s},92565:(e,t,r)=>{"use strict";var n=r(80606),i=r(34178).subscriptions,o=r(53349),a=r(473),s=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager)},this.net=new a(this),[new i({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new o({name:"getVersion",call:"shh_version",params:0}),new o({name:"getInfo",call:"shh_info",params:0}),new o({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new o({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new o({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new o({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new o({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new o({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new o({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new o({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new o({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new o({name:"newSymKey",call:"shh_newSymKey",params:0}),new o({name:"addSymKey",call:"shh_addSymKey",params:1}),new o({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new o({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new o({name:"getSymKey",call:"shh_getSymKey",params:1}),new o({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new o({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new o({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new o({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new o({name:"post",call:"shh_post",params:1,inputFormatter:[null]}),new o({name:"unsubscribe",call:"shh_unsubscribe",params:1})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};s.prototype.clearSubscriptions=function(){this._requestManager.clearSubscriptions()},n.addProviders(s),e.exports=s},48161:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(17130),o=r(90323),a=r(747),s=r(75010),c=r(31734),u=function e(t,r){var i=[];return r.forEach((function(r){if("object"===(0,n.default)(r.components)){if("tuple"!==r.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var o="",a=r.type.indexOf("[");a>=0&&(o=r.type.substring(a));var s=e(t,r.components);Array.isArray(s)&&t?i.push("tuple("+s.join(",")+")"+o):t?i.push("("+s+")"):i.push("("+s.join(",")+")"+o)}else i.push(r.type)})),i},l=function(e){if(!o.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r7?r+=e[n].toUpperCase():r+=e[n];return r},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,stripHexPrefix:o.stripHexPrefix,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:l,toAscii:l,asciiToHex:d,fromAscii:d,unitMap:i.unitMap,toWei:function(e,t){if(t=f(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?i.toWei(e,t):i.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=f(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?i.fromWei(e,t):i.fromWei(e,t).toString(10)},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement,isBloom:o.isBloom,isUserEthereumAddressInBloom:o.isUserEthereumAddressInBloom,isContractAddressInBloom:o.isContractAddressInBloom,isTopic:o.isTopic,isTopicInBloom:o.isTopicInBloom,isInBloom:o.isInBloom,compareBlockNumbers:function(e,t){if(e===t)return 0;if("genesis"!==e&&"earliest"!==e&&0!==e||"genesis"!==t&&"earliest"!==t&&0!==t){if("genesis"===e||"earliest"===e||0===e)return-1;if("genesis"===t||"earliest"===t||0===t)return 1;if("latest"===e||"finalized"===e)return"pending"===t?-1:1;if("latest"===t||"finalized"===t)return"pending"===e?1:-1;if("pending"===e)return 1;if("pending"===t)return-1;if("safe"===e||"safe"===t)return;var r=new c(e),n=new c(t);return r.lt(n)?-1:r.eq(n)?0:1}return 0},toNumber:o.toNumber}},747:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(31734),o=r(90323),a=function(e){var t=(0,n.default)(e);if("string"===t)return o.isHexStrict(e)?new i(e.replace(/0x/i,""),16):new i(e,10);if("number"===t)return new i(e);if(o.isBigNumber(e))return new i(e.toString(10));if(o.isBN(e))return e;throw new Error(e+" is not a number")},s=function(e,t,r){var n,s;if("bytes"===(e=function(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}(e))){if(t.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+t.length);return t}if("string"===e)return o.utf8ToHex(t);if("bool"===e)return t?"01":"00";if(e.startsWith("address")){if(n=r?64:40,!o.isAddress(t))throw new Error(t+" is not a valid address, or the checksum is invalid.");return o.leftPad(t.toLowerCase(),n)}if(n=function(e){var t=/^\D+(\d+).*$/.exec(e);return t?parseInt(t[1],10):null}(e),e.startsWith("bytes")){if(!n)throw new Error("bytes[] not yet supported in solidity");if(r&&(n=32),n<1||n>32||n256)throw new Error("Invalid uint"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s.lt(new i(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return n?o.leftPad(s.toString("hex"),n/8*2):s}if(e.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.lt(new i(0))?s.toTwos(n).toString("hex"):n?o.leftPad(s.toString("hex"),n/8*2):s}throw new Error("Unsupported or invalid type: "+e)},c=function(e){if(Array.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,r,a="";if(e&&"object"===(0,n.default)(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,a=e.hasOwnProperty("v")?e.v:e.value):(t=o.toHex(e,!0),a=o.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof a||/^(-)?0x/i.test(a)||(a=new i(a)),Array.isArray(a)){if(r=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e);return t?parseInt(t[1],10):null}(t),r&&a.length!==r)throw new Error(t+" is not matching the given array "+JSON.stringify(a));r=a.length}return Array.isArray(a)?a.map((function(e){return s(t,e,r).toString("hex").replace("0x","")})).join(""):s(t,a,r).toString("hex").replace("0x","")};e.exports={soliditySha3:function(){var e=Array.prototype.slice.call(arguments).map(c);return o.sha3("0x"+e.join(""))},soliditySha3Raw:function(){return o.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(c).join(""))},encodePacked:function(){return"0x"+Array.prototype.slice.call(arguments).map(c).join("").toLowerCase()}}},90323:(e,t,r)=>{"use strict";var n=r(29033).Buffer,i=r(28847),o=i(r(74519)),a=i(r(3355)),s=r(31734),c=r(77277),u=r(88632),l=r(65907),d=r(19313),f=r(1243).keccak256,h=function(e){return s.isBN(e)},p=function(e){return e&&e.constructor&&"BigNumber"===e.constructor.name},g=function(e){try{return c.apply(null,arguments)}catch(t){throw new Error(t+' Given value: "'+e+'"')}},m=function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(e)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(e))||y(e))},y=function(e){e=e.replace(/^0x/i,"");for(var t=k(e.toLowerCase()).replace(/^0x/i,""),r=0;r<40;r++)if(parseInt(t[r],16)>7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1;return!0},v=function(e){var t="";e=(e=(e=(e=(e=u.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r1&&void 0!==arguments[1]&&arguments[1];if(!e)return e;if("string"==typeof e&&!_(e))throw new Error('Given value "'+e+'" is not a valid hex string.');var r=g(e);return t&&(r>Number.MAX_SAFE_INTEGER||r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x"+t.join("")},isHex:E,isHexStrict:_,stripHexPrefix:function(e){return 0!==e&&E(e)?e.replace(/^(-)?0x/i,"$1"):e},leftPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+new Array(i).join(r||"0")+e},rightPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(i).join(r||"0")},toTwosComplement:function(e){return"0x"+g(e).toTwos(256).toString(16,64)},sha3:k,sha3Raw:function(e){return null===(e=k(e))?S:e},toNumber:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"number"==typeof e?e:b(A(e),t)}}},17001:(e,t,r)=>{"use strict";var n=r(78920).i8,i=r(80606),o=r(66748),a=r(473),s=r(96306),c=r(92565),u=r(42463),l=r(48161),d=function(){var e=this;i.packageInit(this,arguments),this.version=n,this.utils=l,this.eth=new o(this),this.shh=new c(this),this.bzz=new u(this);var t=this.setProvider;this.setProvider=function(r,n){return t.apply(e,arguments),e.eth.setRequestManager(e._requestManager),e.shh.setRequestManager(e._requestManager),e.bzz.setProvider(r),!0}};d.version=n,d.utils=l,d.modules={Eth:o,Net:a,Personal:s,Shh:c,Bzz:u},i.addProviders(d),e.exports=d},89214:()=>{},52361:()=>{},94616:()=>{},38768:e=>{"use strict";e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},77907:(e,t,r)=>{"use strict";var n=r(38768);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},58975:e=>{"use strict";e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},94571:e=>{"use strict";function t(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=e.apply(r,n);function s(e){t(a,i,o,s,c,"next",e)}function c(e){t(a,i,o,s,c,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},69721:e=>{"use strict";e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},14727:(e,t,r)=>{"use strict";var n=r(38746),i=r(36923);function o(t,r,a){return i()?(e.exports=o=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=o=function(e,t,r){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return r&&n(o,r.prototype),o},e.exports.__esModule=!0,e.exports.default=e.exports),o.apply(null,arguments)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},58985:(e,t,r)=>{"use strict";var n=r(32310);function i(e,t){for(var r=0;r{"use strict";var n=r(32310);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},119:(e,t,r)=>{"use strict";var n=r(47460);function i(){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=i=Reflect.get.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=i=function(e,t,r){var i=n(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},e.exports.__esModule=!0,e.exports.default=e.exports),i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},21949:e=>{"use strict";function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},15163:(e,t,r)=>{"use strict";var n=r(38746);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},28847:e=>{"use strict";e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},78958:e=>{"use strict";e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports},36923:e=>{"use strict";e.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(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},41642:e=>{"use strict";e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},91436:e=>{"use strict";e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},82966:e=>{"use strict";e.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.")},e.exports.__esModule=!0,e.exports.default=e.exports},22344:e=>{"use strict";e.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.")},e.exports.__esModule=!0,e.exports.default=e.exports},34650:(e,t,r)=>{"use strict";var n=r(3355).default,i=r(58975);e.exports=function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},82028:(e,t,r)=>{"use strict";var n=r(3355).default;function i(){e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),s=new I(n||[]);return a(o,"_invoke",{value:S(e,r,s)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p={};function g(){}function m(){}function y(){}var v={};d(v,c,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(T([])));w&&w!==r&&o.call(w,c)&&(v=w);var A=y.prototype=g.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,s,c){var u=h(e[i],e,a);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==n(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,c)}))}c(u.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}})}function S(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=k(a,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var i=h(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function T(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;C(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},38746:e=>{"use strict";function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},74519:(e,t,r)=>{"use strict";var n=r(12338),i=r(91436),o=r(46906),a=r(82966);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},47460:(e,t,r)=>{"use strict";var n=r(21949);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},93106:(e,t,r)=>{"use strict";var n=r(77907),i=r(41642),o=r(46906),a=r(22344);e.exports=function(e){return n(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},79662:(e,t,r)=>{"use strict";var n=r(3355).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},32310:(e,t,r)=>{"use strict";var n=r(3355).default,i=r(79662);e.exports=function(e){var t=i(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},3355:e=>{"use strict";function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},46906:(e,t,r)=>{"use strict";var n=r(38768);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},22940:(e,t,r)=>{"use strict";var n=r(21949),i=r(38746),o=r(78958),a=r(14727);function s(t){var r="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return a(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},82247:(e,t,r)=>{"use strict";var n=r(28847)(r(3355)),i=r(82028)();e.exports=i;try{regeneratorRuntime=i}catch(e){"object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},43604:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t{"use strict";e.exports=JSON.parse('{"name":"goerli","chainId":5,"networkId":5,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"Cross-client PoA test network","url":"https://github.com/goerli/testnet","genesis":{"hash":"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a","timestamp":"0x5c51a607","gasLimit":10485760,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xa3f5ab08"},{"name":"homestead","block":0,"forkHash":"0xa3f5ab08"},{"name":"tangerineWhistle","block":0,"forkHash":"0xa3f5ab08"},{"name":"spuriousDragon","block":0,"forkHash":"0xa3f5ab08"},{"name":"byzantium","block":0,"forkHash":"0xa3f5ab08"},{"name":"constantinople","block":0,"forkHash":"0xa3f5ab08"},{"name":"petersburg","block":0,"forkHash":"0xa3f5ab08"},{"name":"istanbul","block":1561651,"forkHash":"0xc25efa5c"},{"name":"berlin","block":4460644,"forkHash":"0x757a1c47"},{"name":"london","block":5062605,"forkHash":"0xb8c6299d"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"51.141.78.53","port":30303,"id":"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a","location":"","comment":"Upstream bootnode 1"},{"ip":"13.93.54.137","port":30303,"id":"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b","location":"","comment":"Upstream bootnode 2"},{"ip":"94.237.54.114","port":30313,"id":"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291","location":"","comment":"Upstream bootnode 3"},{"ip":"18.218.250.66","port":30313,"id":"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949","location":"","comment":"Upstream bootnode 4"},{"ip":"3.11.147.67","port":30303,"id":"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91","location":"","comment":"Ethereum Foundation bootnode"},{"ip":"51.15.116.226","port":30303,"id":"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":30303,"id":"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":40303,"id":"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd","location":"","comment":"Goerli Initiative bootnode"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]}')},37098:e=>{"use strict";e.exports=JSON.parse('{"name":"kovan","chainId":42,"networkId":42,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"aura","aura":{}},"comment":"Parity PoA test network","url":"https://kovan-testnet.github.io/website/","genesis":{"hash":"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9","timestamp":null,"gasLimit":6000000,"difficulty":131072,"nonce":"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","extraData":"0x","stateRoot":"0x2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x010ffe56"},{"name":"homestead","block":0,"forkHash":"0x010ffe56"},{"name":"tangerineWhistle","block":0,"forkHash":"0x010ffe56"},{"name":"spuriousDragon","block":0,"forkHash":"0x010ffe56"},{"name":"byzantium","block":5067000,"forkHash":"0x7f83c620"},{"name":"constantinople","block":9200000,"forkHash":"0xa94e3dc4"},{"name":"petersburg","block":10255201,"forkHash":"0x186874aa"},{"name":"istanbul","block":14111141,"forkHash":"0x7f6599a6"},{"name":"berlin","block":24770900,"forkHash":"0x1a0f10d9"},{"name":"london","block":26741100,"forkHash":"0x1ed20b71"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"116.203.116.241","port":30303,"id":"16898006ba2cd4fa8bf9a3dfe32684c178fa861df144bfc21fe800dc4838a03e342056951fa9fd533dcb0be1219e306106442ff2cf1f7e9f8faa5f2fc1a3aa45","location":"","comment":"1"},{"ip":"3.217.96.11","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"2"},{"ip":"108.61.170.124","port":30303,"id":"740e1c8ea64e71762c71a463a04e2046070a0c9394fcab5891d41301dc473c0cff00ebab5a9bc87fbcb610ab98ac18225ff897bc8b7b38def5975d5ceb0a7d7c","location":"","comment":"3"},{"ip":"157.230.31.163","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"4"}]}')},87295:e=>{"use strict";e.exports=JSON.parse('{"name":"mainnet","chainId":1,"networkId":1,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"The Ethereum main chain","url":"https://ethstats.net/","genesis":{"hash":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3","timestamp":null,"gasLimit":5000,"difficulty":17179869184,"nonce":"0x0000000000000042","extraData":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa","stateRoot":"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xfc64ec04"},{"name":"homestead","block":1150000,"forkHash":"0x97c2c34c"},{"name":"dao","block":1920000,"forkHash":"0x91d1f948"},{"name":"tangerineWhistle","block":2463000,"forkHash":"0x7a64da13"},{"name":"spuriousDragon","block":2675000,"forkHash":"0x3edd5b10"},{"name":"byzantium","block":4370000,"forkHash":"0xa00bc324"},{"name":"constantinople","block":7280000,"forkHash":"0x668db0af"},{"name":"petersburg","block":7280000,"forkHash":"0x668db0af"},{"name":"istanbul","block":9069000,"forkHash":"0x879d6e30"},{"name":"muirGlacier","block":9200000,"forkHash":"0xe029e991"},{"name":"berlin","block":12244000,"forkHash":"0x0eb440f6"},{"name":"london","block":12965000,"forkHash":"0xb715077d"},{"name":"arrowGlacier","block":13773000,"forkHash":"0x20c327fc"},{"name":"grayGlacier","block":15050000,"forkHash":"0xf0afd0e3"},{"name":"mergeForkIdTransition","block":null,"forkHash":null},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"18.138.108.67","port":30303,"id":"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666","location":"ap-southeast-1-001","comment":"bootnode-aws-ap-southeast-1-001"},{"ip":"3.209.45.79","port":30303,"id":"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de","location":"us-east-1-001","comment":"bootnode-aws-us-east-1-001"},{"ip":"34.255.23.113","port":30303,"id":"ca6de62fce278f96aea6ec5a2daadb877e51651247cb96ee310a318def462913b653963c155a0ef6c7d50048bba6e6cea881130857413d9f50a621546b590758","location":"eu-west-1-001","comment":"bootnode-aws-eu-west-1-001"},{"ip":"35.158.244.151","port":30303,"id":"279944d8dcd428dffaa7436f25ca0ca43ae19e7bcf94a8fb7d1641651f92d121e972ac2e8f381414b80cc8e5555811c2ec6e1a99bb009b3f53c4c69923e11bd8","location":"eu-central-1-001","comment":"bootnode-aws-eu-central-1-001"},{"ip":"52.187.207.27","port":30303,"id":"8499da03c47d637b20eee24eec3c356c9a2e6148d6fe25ca195c7949ab8ec2c03e3556126b0d7ed644675e78c4318b08691b7b57de10e5f0d40d05b09238fa0a","location":"australiaeast-001","comment":"bootnode-azure-australiaeast-001"},{"ip":"191.234.162.198","port":30303,"id":"103858bdb88756c71f15e9b5e09b56dc1be52f0a5021d46301dbbfb7e130029cc9d0d6f73f693bc29b665770fff7da4d34f3c6379fe12721b5d7a0bcb5ca1fc1","location":"brazilsouth-001","comment":"bootnode-azure-brazilsouth-001"},{"ip":"52.231.165.108","port":30303,"id":"715171f50508aba88aecd1250af392a45a330af91d7b90701c436b618c86aaa1589c9184561907bebbb56439b8f8787bc01f49a7c77276c58c1b09822d75e8e8","location":"koreasouth-001","comment":"bootnode-azure-koreasouth-001"},{"ip":"104.42.217.25","port":30303,"id":"5d6d7cd20d6da4bb83a1d28cadb5d409b64edf314c0335df658c1a54e32c7c4a7ab7823d57c39b6a757556e68ff1df17c748b698544a55cb488b52479a92b60f","location":"westus-001","comment":"bootnode-azure-westus-001"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]}')},40439:e=>{"use strict";e.exports=JSON.parse('{"name":"rinkeby","chainId":4,"networkId":4,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"PoA test network","url":"https://www.rinkeby.io","genesis":{"hash":"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177","timestamp":"0x58ee40ba","gasLimit":4700000,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x3b8e0691"},{"name":"homestead","block":1,"forkHash":"0x60949295"},{"name":"tangerineWhistle","block":2,"forkHash":"0x8bde40dd"},{"name":"spuriousDragon","block":3,"forkHash":"0xcb3a64bb"},{"name":"byzantium","block":1035301,"forkHash":"0x8d748b57"},{"name":"constantinople","block":3660663,"forkHash":"0xe49cab14"},{"name":"petersburg","block":4321234,"forkHash":"0xafec6b27"},{"name":"istanbul","block":5435345,"forkHash":"0xcbdb8838"},{"name":"berlin","block":8290928,"forkHash":"0x6910c8bd"},{"name":"london","block":8897988,"forkHash":"0x8e29f2f3"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"52.169.42.101","port":30303,"id":"a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf","location":"","comment":"IE"},{"ip":"52.3.158.184","port":30303,"id":"343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8","location":"","comment":"INFURA"},{"ip":"159.89.28.211","port":30303,"id":"b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6","location":"","comment":"AKASHA"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net"]}')},31227:e=>{"use strict";e.exports=JSON.parse('{"name":"ropsten","chainId":3,"networkId":3,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"PoW test network","url":"https://github.com/ethereum/ropsten","genesis":{"hash":"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d","timestamp":null,"gasLimit":16777216,"difficulty":1048576,"nonce":"0x0000000000000042","extraData":"0x3535353535353535353535353535353535353535353535353535353535353535","stateRoot":"0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x30c7ddbc"},{"name":"homestead","block":0,"forkHash":"0x30c7ddbc"},{"name":"tangerineWhistle","block":0,"forkHash":"0x30c7ddbc"},{"name":"spuriousDragon","block":10,"forkHash":"0x63760190"},{"name":"byzantium","block":1700000,"forkHash":"0x3ea159c7"},{"name":"constantinople","block":4230000,"forkHash":"0x97b544f3"},{"name":"petersburg","block":4939394,"forkHash":"0xd6e2149b"},{"name":"istanbul","block":6485846,"forkHash":"0x4bc66396"},{"name":"muirGlacier","block":7117117,"forkHash":"0x6727ef90"},{"name":"berlin","block":9812189,"forkHash":"0xa157d377"},{"name":"london","block":10499401,"forkHash":"0x7119b6b3"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"52.176.7.10","port":30303,"id":"30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606","location":"","comment":"US-Azure geth"},{"ip":"52.176.100.77","port":30303,"id":"865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c","location":"","comment":"US-Azure parity"},{"ip":"52.232.243.152","port":30303,"id":"6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f","location":"","comment":"Parity"},{"ip":"192.81.208.223","port":30303,"id":"94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09","location":"","comment":"@gpip"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net"]}')},49422:e=>{"use strict";e.exports=JSON.parse('{"name":"sepolia","chainId":11155111,"networkId":11155111,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"PoW test network to replace Ropsten","url":"https://github.com/ethereum/go-ethereum/pull/23730","genesis":{"hash":"0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9","timestamp":"0x6159af19","gasLimit":30000000,"difficulty":131072,"nonce":"0x0000000000000000","extraData":"0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521","stateRoot":"0x5eb6e371a698b8d68f665192350ffcecbbbf322916f4b51bd79bb6887da3f494"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xfe3366e7"},{"name":"homestead","block":0,"forkHash":"0xfe3366e7"},{"name":"tangerineWhistle","block":0,"forkHash":"0xfe3366e7"},{"name":"spuriousDragon","block":0,"forkHash":"0xfe3366e7"},{"name":"byzantium","block":0,"forkHash":"0xfe3366e7"},{"name":"constantinople","block":0,"forkHash":"0xfe3366e7"},{"name":"petersburg","block":0,"forkHash":"0xfe3366e7"},{"name":"istanbul","block":0,"forkHash":"0xfe3366e7"},{"name":"muirGlacier","block":0,"forkHash":"0xfe3366e7"},{"name":"berlin","block":0,"forkHash":"0xfe3366e7"},{"name":"london","block":0,"forkHash":"0xfe3366e7"},{"name":"merge","block":null,"forkHash":null},{"name":"shanghai","block":null,"forkHash":null}],"bootstrapNodes":[{"ip":"18.168.182.86","port":30303,"id":"9246d00bc8fd1742e5ad2428b80fc4dc45d786283e05ef6edbd9002cbc335d40998444732fbe921cb88e1d2c73d1b1de53bae6a2237996e9bfe14f871baf7066","location":"","comment":"geth"},{"ip":"52.14.151.177","port":30303,"id":"ec66ddcf1a974950bd4c782789a7e04f8aa7110a72569b6e65fcd51e937e74eed303b1ea734e4d19cfaec9fbff9b6ee65bf31dcb50ba79acce9dd63a6aca61c7","location":"","comment":"besu"}],"dnsNetworks":[]}')},96561:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-1153","number":1153,"comment":"Transient Storage","url":"https://eips.ethereum.org/EIPS/eip-1153","status":"Review","minimumHardfork":"chainstart","requiredEIPs":[],"gasConfig":{},"gasPrices":{"tstore":{"v":100,"d":"Base fee of the TSTORE opcode"},"tload":{"v":100,"d":"Base fee of the TLOAD opcode"}},"vm":{},"pow":{}}')},77523:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-1559","number":1559,"comment":"Fee market change for ETH 1.0 chain","url":"https://eips.ethereum.org/EIPS/eip-1559","status":"Final","minimumHardfork":"berlin","requiredEIPs":[2930],"gasConfig":{"baseFeeMaxChangeDenominator":{"v":8,"d":"Maximum base fee change denominator"},"elasticityMultiplier":{"v":2,"d":"Maximum block gas target elasticity"},"initialBaseFee":{"v":1000000000,"d":"Initial base fee on first EIP1559 block"}},"gasPrices":{},"vm":{},"pow":{}}')},83339:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2315","number":2315,"comment":"Simple subroutines for the EVM","url":"https://eips.ethereum.org/EIPS/eip-2315","status":"Draft","minimumHardfork":"istanbul","gasConfig":{},"gasPrices":{"beginsub":{"v":2,"d":"Base fee of the BEGINSUB opcode"},"returnsub":{"v":5,"d":"Base fee of the RETURNSUB opcode"},"jumpsub":{"v":10,"d":"Base fee of the JUMPSUB opcode"}},"vm":{},"pow":{}}')},26769:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2537","number":2537,"comment":"BLS12-381 precompiles","url":"https://eips.ethereum.org/EIPS/eip-2537","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"Bls12381G1AddGas":{"v":600,"d":"Gas cost of a single BLS12-381 G1 addition precompile-call"},"Bls12381G1MulGas":{"v":12000,"d":"Gas cost of a single BLS12-381 G1 multiplication precompile-call"},"Bls12381G2AddGas":{"v":4500,"d":"Gas cost of a single BLS12-381 G2 addition precompile-call"},"Bls12381G2MulGas":{"v":55000,"d":"Gas cost of a single BLS12-381 G2 multiplication precompile-call"},"Bls12381PairingBaseGas":{"v":115000,"d":"Base gas cost of BLS12-381 pairing check"},"Bls12381PairingPerPairGas":{"v":23000,"d":"Per-pair gas cost of BLS12-381 pairing check"},"Bls12381MapG1Gas":{"v":5500,"d":"Gas cost of BLS12-381 map field element to G1"},"Bls12381MapG2Gas":{"v":110000,"d":"Gas cost of BLS12-381 map field element to G2"},"Bls12381MultiExpGasDiscount":{"v":[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],"d":"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair"}},"vm":{},"pow":{}}')},17897:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2565","number":2565,"comment":"ModExp gas cost","url":"https://eips.ethereum.org/EIPS/eip-2565","status":"Final","minimumHardfork":"byzantium","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":3,"d":"Gquaddivisor from modexp precompile for gas calculation"}},"vm":{},"pow":{}}')},62170:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2718","comment":"Typed Transaction Envelope","url":"https://eips.ethereum.org/EIPS/eip-2718","status":"Final","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},88436:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2929","comment":"Gas cost increases for state access opcodes","url":"https://eips.ethereum.org/EIPS/eip-2929","status":"Final","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"coldsload":{"v":2100,"d":"Gas cost of the first read of storage from a given location (per transaction)"},"coldaccountaccess":{"v":2600,"d":"Gas cost of the first read of a given address (per transaction)"},"warmstorageread":{"v":100,"d":"Gas cost of reading storage locations which have already loaded \'cold\'"},"sstoreCleanGasEIP2200":{"v":2900,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreNoopGasEIP2200":{"v":100,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":100,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitRefundEIP2200":{"v":19900,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanRefundEIP2200":{"v":4900,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"call":{"v":0,"d":"Base fee of the CALL opcode"},"callcode":{"v":0,"d":"Base fee of the CALLCODE opcode"},"delegatecall":{"v":0,"d":"Base fee of the DELEGATECALL opcode"},"staticcall":{"v":0,"d":"Base fee of the STATICCALL opcode"},"balance":{"v":0,"d":"Base fee of the BALANCE opcode"},"extcodesize":{"v":0,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":0,"d":"Base fee of the EXTCODECOPY opcode"},"extcodehash":{"v":0,"d":"Base fee of the EXTCODEHASH opcode"},"sload":{"v":0,"d":"Base fee of the SLOAD opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"}},"vm":{},"pow":{}}')},96213:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-2930","comment":"Optional access lists","url":"https://eips.ethereum.org/EIPS/eip-2930","status":"Final","minimumHardfork":"istanbul","requiredEIPs":[2718,2929],"gasConfig":{},"gasPrices":{"accessListStorageKeyCost":{"v":1900,"d":"Gas cost per storage key in an Access List transaction"},"accessListAddressCost":{"v":2400,"d":"Gas cost per storage key in an Access List transaction"}},"vm":{},"pow":{}}')},25491:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3198","number":3198,"comment":"BASEFEE opcode","url":"https://eips.ethereum.org/EIPS/eip-3198","status":"Final","minimumHardfork":"london","gasConfig":{},"gasPrices":{"basefee":{"v":2,"d":"Gas cost of the BASEFEE opcode"}},"vm":{},"pow":{}}')},20070:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3529","comment":"Reduction in refunds","url":"https://eips.ethereum.org/EIPS/eip-3529","status":"Final","minimumHardfork":"berlin","requiredEIPs":[2929],"gasConfig":{"maxRefundQuotient":{"v":5,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"selfdestructRefund":{"v":0,"d":"Refunded following a selfdestruct operation"},"sstoreClearRefundEIP2200":{"v":4800,"d":"Once per SSTORE operation for clearing an originally existing storage slot"}},"vm":{},"pow":{}}')},52256:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3540","number":3540,"comment":"EVM Object Format (EOF) v1","url":"https://eips.ethereum.org/EIPS/eip-3540","status":"Review","minimumHardfork":"london","requiredEIPs":[3541],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},21871:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3541","comment":"Reject new contracts starting with the 0xEF byte","url":"https://eips.ethereum.org/EIPS/eip-3541","status":"Final","minimumHardfork":"berlin","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},47225:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3554","comment":"Reduction in refunds","url":"Difficulty Bomb Delay to December 1st 2021","status":"Final","minimumHardfork":"muirGlacier","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9500000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},3968:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3607","number":3607,"comment":"Reject transactions from senders with deployed code","url":"https://eips.ethereum.org/EIPS/eip-3607","status":"Final","minimumHardfork":"chainstart","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},29496:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3651","number":3198,"comment":"Warm COINBASE","url":"https://eips.ethereum.org/EIPS/eip-3651","status":"Review","minimumHardfork":"london","requiredEIPs":[2929],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},74290:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3670","number":3670,"comment":"EOF - Code Validation","url":"https://eips.ethereum.org/EIPS/eip-3670","status":"Review","minimumHardfork":"london","requiredEIPs":[3540],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},98571:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3675","number":3675,"comment":"Upgrade consensus to Proof-of-Stake","url":"https://eips.ethereum.org/EIPS/eip-3675","status":"Review","minimumHardfork":"london","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},64551:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3855","number":3855,"comment":"PUSH0 instruction","url":"https://eips.ethereum.org/EIPS/eip-3855","status":"Review","minimumHardfork":"chainstart","requiredEIPs":[],"gasConfig":{},"gasPrices":{"push0":{"v":2,"d":"Base fee of the PUSH0 opcode"}},"vm":{},"pow":{}}')},94300:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-3860","number":3860,"comment":"Limit and meter initcode","url":"https://eips.ethereum.org/EIPS/eip-3860","status":"Review","minimumHardfork":"spuriousDragon","requiredEIPs":[],"gasConfig":{},"gasPrices":{"initCodeWordCost":{"v":2,"d":"Gas to pay for each word (32 bytes) of initcode when creating a contract"}},"vm":{"maxInitCodeSize":{"v":49152,"d":"Maximum length of initialization code when creating a contract"}},"pow":{}}')},74818:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-4345","number":4345,"comment":"Difficulty Bomb Delay to June 2022","url":"https://eips.ethereum.org/EIPS/eip-4345","status":"Final","minimumHardfork":"london","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":10700000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},68372:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-4399","number":4399,"comment":"Supplant DIFFICULTY opcode with PREVRANDAO","url":"https://eips.ethereum.org/EIPS/eip-4399","status":"Review","minimumHardfork":"london","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},4759:e=>{"use strict";e.exports=JSON.parse('{"name":"EIP-5133","number":5133,"comment":"Delaying Difficulty Bomb to mid-September 2022","url":"https://eips.ethereum.org/EIPS/eip-5133","status":"Draft","minimumHardfork":"grayGlacier","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":11400000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},51971:e=>{"use strict";e.exports=JSON.parse('{"name":"arrowGlacier","comment":"HF to delay the difficulty bomb","url":"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md","status":"Final","eips":[4345],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},20015:e=>{"use strict";e.exports=JSON.parse('{"name":"berlin","comment":"HF targeted for July 2020 following the Muir Glacier HF","url":"https://eips.ethereum.org/EIPS/eip-2070","status":"Final","eips":[2565,2929,2718,2930]}')},26985:e=>{"use strict";e.exports=JSON.parse('{"name":"byzantium","comment":"Hardfork with new precompiles, instructions and other protocol changes","url":"https://eips.ethereum.org/EIPS/eip-609","status":"Final","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":20,"d":"Gquaddivisor from modexp precompile for gas calculation"},"ecAdd":{"v":500,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":40000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":100000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":80000,"d":"Gas costs regarding curve pairing precompile input length"},"revert":{"v":0,"d":"Base fee of the REVERT opcode"},"staticcall":{"v":700,"d":"Base fee of the STATICCALL opcode"},"returndatasize":{"v":2,"d":"Base fee of the RETURNDATASIZE opcode"},"returndatacopy":{"v":3,"d":"Base fee of the RETURNDATACOPY opcode"}},"vm":{},"pow":{"minerReward":{"v":"3000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":3000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},60114:e=>{"use strict";e.exports=JSON.parse('{"name":"chainstart","comment":"Start of the Ethereum main chain","url":"","status":"","gasConfig":{"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"},"maxRefundQuotient":{"v":2,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"base":{"v":2,"d":"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},"tierStep":{"v":[0,2,3,5,8,10,20],"d":"Once per operation, for a selection of them"},"exp":{"v":10,"d":"Base fee of the EXP opcode"},"expByte":{"v":10,"d":"Times ceil(log256(exponent)) for the EXP instruction"},"sha3":{"v":30,"d":"Base fee of the SHA3 opcode"},"sha3Word":{"v":6,"d":"Once per word of the SHA3 operation\'s data"},"sload":{"v":50,"d":"Base fee of the SLOAD opcode"},"sstoreSet":{"v":20000,"d":"Once per SSTORE operation if the zeroness changes from zero"},"sstoreReset":{"v":5000,"d":"Once per SSTORE operation if the zeroness does not change from zero"},"sstoreRefund":{"v":15000,"d":"Once per SSTORE operation if the zeroness changes to zero"},"jumpdest":{"v":1,"d":"Base fee of the JUMPDEST opcode"},"log":{"v":375,"d":"Base fee of the LOG opcode"},"logData":{"v":8,"d":"Per byte in a LOG* operation\'s data"},"logTopic":{"v":375,"d":"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},"create":{"v":32000,"d":"Base fee of the CREATE opcode"},"call":{"v":40,"d":"Base fee of the CALL opcode"},"callStipend":{"v":2300,"d":"Free gas given at beginning of call"},"callValueTransfer":{"v":9000,"d":"Paid for CALL when the value transfor is non-zero"},"callNewAccount":{"v":25000,"d":"Paid for CALL when the destination address didn\'t exist prior"},"selfdestructRefund":{"v":24000,"d":"Refunded following a selfdestruct operation"},"memory":{"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"},"createData":{"v":200,"d":""},"tx":{"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"},"txDataZero":{"v":4,"d":"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},"txDataNonZero":{"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"},"copy":{"v":3,"d":"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},"ecRecover":{"v":3000,"d":""},"sha256":{"v":60,"d":""},"sha256Word":{"v":12,"d":""},"ripemd160":{"v":600,"d":""},"ripemd160Word":{"v":120,"d":""},"identity":{"v":15,"d":""},"identityWord":{"v":3,"d":""},"stop":{"v":0,"d":"Base fee of the STOP opcode"},"add":{"v":3,"d":"Base fee of the ADD opcode"},"mul":{"v":5,"d":"Base fee of the MUL opcode"},"sub":{"v":3,"d":"Base fee of the SUB opcode"},"div":{"v":5,"d":"Base fee of the DIV opcode"},"sdiv":{"v":5,"d":"Base fee of the SDIV opcode"},"mod":{"v":5,"d":"Base fee of the MOD opcode"},"smod":{"v":5,"d":"Base fee of the SMOD opcode"},"addmod":{"v":8,"d":"Base fee of the ADDMOD opcode"},"mulmod":{"v":8,"d":"Base fee of the MULMOD opcode"},"signextend":{"v":5,"d":"Base fee of the SIGNEXTEND opcode"},"lt":{"v":3,"d":"Base fee of the LT opcode"},"gt":{"v":3,"d":"Base fee of the GT opcode"},"slt":{"v":3,"d":"Base fee of the SLT opcode"},"sgt":{"v":3,"d":"Base fee of the SGT opcode"},"eq":{"v":3,"d":"Base fee of the EQ opcode"},"iszero":{"v":3,"d":"Base fee of the ISZERO opcode"},"and":{"v":3,"d":"Base fee of the AND opcode"},"or":{"v":3,"d":"Base fee of the OR opcode"},"xor":{"v":3,"d":"Base fee of the XOR opcode"},"not":{"v":3,"d":"Base fee of the NOT opcode"},"byte":{"v":3,"d":"Base fee of the BYTE opcode"},"address":{"v":2,"d":"Base fee of the ADDRESS opcode"},"balance":{"v":20,"d":"Base fee of the BALANCE opcode"},"origin":{"v":2,"d":"Base fee of the ORIGIN opcode"},"caller":{"v":2,"d":"Base fee of the CALLER opcode"},"callvalue":{"v":2,"d":"Base fee of the CALLVALUE opcode"},"calldataload":{"v":3,"d":"Base fee of the CALLDATALOAD opcode"},"calldatasize":{"v":2,"d":"Base fee of the CALLDATASIZE opcode"},"calldatacopy":{"v":3,"d":"Base fee of the CALLDATACOPY opcode"},"codesize":{"v":2,"d":"Base fee of the CODESIZE opcode"},"codecopy":{"v":3,"d":"Base fee of the CODECOPY opcode"},"gasprice":{"v":2,"d":"Base fee of the GASPRICE opcode"},"extcodesize":{"v":20,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":20,"d":"Base fee of the EXTCODECOPY opcode"},"blockhash":{"v":20,"d":"Base fee of the BLOCKHASH opcode"},"coinbase":{"v":2,"d":"Base fee of the COINBASE opcode"},"timestamp":{"v":2,"d":"Base fee of the TIMESTAMP opcode"},"number":{"v":2,"d":"Base fee of the NUMBER opcode"},"difficulty":{"v":2,"d":"Base fee of the DIFFICULTY opcode"},"gaslimit":{"v":2,"d":"Base fee of the GASLIMIT opcode"},"pop":{"v":2,"d":"Base fee of the POP opcode"},"mload":{"v":3,"d":"Base fee of the MLOAD opcode"},"mstore":{"v":3,"d":"Base fee of the MSTORE opcode"},"mstore8":{"v":3,"d":"Base fee of the MSTORE8 opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"},"jump":{"v":8,"d":"Base fee of the JUMP opcode"},"jumpi":{"v":10,"d":"Base fee of the JUMPI opcode"},"pc":{"v":2,"d":"Base fee of the PC opcode"},"msize":{"v":2,"d":"Base fee of the MSIZE opcode"},"gas":{"v":2,"d":"Base fee of the GAS opcode"},"push":{"v":3,"d":"Base fee of the PUSH opcode"},"dup":{"v":3,"d":"Base fee of the DUP opcode"},"swap":{"v":3,"d":"Base fee of the SWAP opcode"},"callcode":{"v":40,"d":"Base fee of the CALLCODE opcode"},"return":{"v":0,"d":"Base fee of the RETURN opcode"},"invalid":{"v":0,"d":"Base fee of the INVALID opcode"},"selfdestruct":{"v":0,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{"stackLimit":{"v":1024,"d":"Maximum size of VM stack allowed"},"callCreateDepth":{"v":1024,"d":"Maximum depth of call/create stack"},"maxExtraDataSize":{"v":32,"d":"Maximum size extra data may be after Genesis"}},"pow":{"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"},"epochDuration":{"v":30000,"d":"Duration between proof-of-work epochs"},"timebombPeriod":{"v":100000,"d":"Exponential difficulty timebomb period"},"minerReward":{"v":"5000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":0,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},35993:e=>{"use strict";e.exports=JSON.parse('{"name":"constantinople","comment":"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)","url":"https://eips.ethereum.org/EIPS/eip-1013","status":"Final","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":200,"d":"Once per SSTORE operation if the value doesn\'t change"},"netSstoreInitGas":{"v":20000,"d":"Once per SSTORE operation from clean zero"},"netSstoreCleanGas":{"v":5000,"d":"Once per SSTORE operation from clean non-zero"},"netSstoreDirtyGas":{"v":200,"d":"Once per SSTORE operation from dirty"},"netSstoreClearRefund":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"netSstoreResetRefund":{"v":4800,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"netSstoreResetClearRefund":{"v":19800,"d":"Once per SSTORE operation for resetting to the original zero value"},"shl":{"v":3,"d":"Base fee of the SHL opcode"},"shr":{"v":3,"d":"Base fee of the SHR opcode"},"sar":{"v":3,"d":"Base fee of the SAR opcode"},"extcodehash":{"v":400,"d":"Base fee of the EXTCODEHASH opcode"},"create2":{"v":32000,"d":"Base fee of the CREATE2 opcode"}},"vm":{},"pow":{"minerReward":{"v":"2000000000000000000","d":"The amount a miner gets rewarded for mining a block"},"difficultyBombDelay":{"v":5000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},7197:e=>{"use strict";e.exports=JSON.parse('{"name":"dao","comment":"DAO rescue hardfork","url":"https://eips.ethereum.org/EIPS/eip-779","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},31088:e=>{"use strict";e.exports=JSON.parse('{"name":"grayGlacier","comment":"Delaying the difficulty bomb to Mid September 2022","url":"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md","status":"Draft","eips":[5133],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},62800:e=>{"use strict";e.exports=JSON.parse('{"name":"homestead","comment":"Homestead hardfork with protocol and network changes","url":"https://eips.ethereum.org/EIPS/eip-606","status":"Final","gasConfig":{},"gasPrices":{"delegatecall":{"v":40,"d":"Base fee of the DELEGATECALL opcode"}},"vm":{},"pow":{}}')},83166:e=>{"use strict";e.exports=JSON.parse('{"name":"istanbul","comment":"HF targeted for December 2019 following the Constantinople/Petersburg HF","url":"https://eips.ethereum.org/EIPS/eip-1679","status":"Final","gasConfig":{},"gasPrices":{"blake2Round":{"v":1,"d":"Gas cost per round for the Blake2 F precompile"},"ecAdd":{"v":150,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":6000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":45000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":34000,"d":"Gas costs regarding curve pairing precompile input length"},"txDataNonZero":{"v":16,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"sstoreSentryGasEIP2200":{"v":2300,"d":"Minimum gas required to be present for an SSTORE call, not consumed"},"sstoreNoopGasEIP2200":{"v":800,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":800,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitGasEIP2200":{"v":20000,"d":"Once per SSTORE operation from clean zero to non-zero"},"sstoreInitRefundEIP2200":{"v":19200,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanGasEIP2200":{"v":5000,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreCleanRefundEIP2200":{"v":4200,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"sstoreClearRefundEIP2200":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"balance":{"v":700,"d":"Base fee of the BALANCE opcode"},"extcodehash":{"v":700,"d":"Base fee of the EXTCODEHASH opcode"},"chainid":{"v":2,"d":"Base fee of the CHAINID opcode"},"selfbalance":{"v":5,"d":"Base fee of the SELFBALANCE opcode"},"sload":{"v":800,"d":"Base fee of the SLOAD opcode"}},"vm":{},"pow":{}}')},61250:e=>{"use strict";e.exports=JSON.parse('{"name":"london","comment":"HF targeted for July 2021 following the Berlin fork","url":"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md","status":"Final","eips":[1559,3198,3529,3541]}')},88648:e=>{"use strict";e.exports=JSON.parse('{"name":"merge","comment":"Hardfork to upgrade the consensus mechanism to Proof-of-Stake","url":"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md","status":"Draft","consensus":{"type":"pos","algorithm":"casper","casper":{}},"eips":[3675,4399]}')},49347:e=>{"use strict";e.exports=JSON.parse('{"name":"mergeForkIdTransition","comment":"Pre-merge hardfork to fork off non-upgraded clients","url":"https://eips.ethereum.org/EIPS/eip-3675","status":"Draft","eips":[]}')},42946:e=>{"use strict";e.exports=JSON.parse('{"name":"muirGlacier","comment":"HF to delay the difficulty bomb","url":"https://eips.ethereum.org/EIPS/eip-2384","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},4064:e=>{"use strict";e.exports=JSON.parse('{"name":"petersburg","comment":"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople","url":"https://eips.ethereum.org/EIPS/eip-1716","status":"Final","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreInitGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreCleanGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreDirtyGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreClearRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetClearRefund":{"v":null,"d":"Removed along EIP-1283"}},"vm":{},"pow":{}}')},5553:e=>{"use strict";e.exports=JSON.parse('{"name":"shanghai","comment":"Next feature hardfork after the merge hardfork","url":"https://github.com/ethereum/pm/issues/356","status":"Pre-Draft","eips":[]}')},90716:e=>{"use strict";e.exports=JSON.parse('{"name":"spuriousDragon","comment":"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit","url":"https://eips.ethereum.org/EIPS/eip-607","status":"Final","gasConfig":{},"gasPrices":{"expByte":{"v":50,"d":"Times ceil(log256(exponent)) for the EXP instruction"}},"vm":{"maxCodeSize":{"v":24576,"d":"Maximum length of contract code"}},"pow":{}}')},22302:e=>{"use strict";e.exports=JSON.parse('{"name":"tangerineWhistle","comment":"Hardfork with gas cost changes for IO-heavy operations","url":"https://eips.ethereum.org/EIPS/eip-608","status":"Final","gasConfig":{},"gasPrices":{"sload":{"v":200,"d":"Once per SLOAD operation"},"call":{"v":700,"d":"Once per CALL operation & message call transaction"},"extcodesize":{"v":700,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":700,"d":"Base fee of the EXTCODECOPY opcode"},"balance":{"v":400,"d":"Base fee of the BALANCE opcode"},"delegatecall":{"v":700,"d":"Base fee of the DELEGATECALL opcode"},"callcode":{"v":700,"d":"Base fee of the CALLCODE opcode"},"selfdestruct":{"v":5000,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{},"pow":{}}')},44946:e=>{"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},75207:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:e=>{"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},83630:e=>{"use strict";e.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"blake3":30,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"dag-jose":133,"dag-cose":134,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"bitcoin-witness-commitment":178,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"x25519-pub":236,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"libp2p-peer-record":769,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,"x11":4352,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082,"zeroxcert-imprint-256":52753,"fil-commitment-unsealed":61697,"fil-commitment-sealed":61698,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},29799:e=>{"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},18597:e=>{"use strict";e.exports={i8:"6.5.4"}},24070:e=>{"use strict";e.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"x11":4352,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},22562:e=>{"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},19794:e=>{"use strict";e.exports={version:"1.0.34"}},78920:e=>{"use strict";e.exports={i8:"1.10.4"}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n](o,o.exports,r),o.loaded=!0,o.exports}return r.amdO={},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r(17001)})(),e.exports=t()},39298:(e,t,r)=>{"use strict";r.r(t),r.d(t,{create:()=>d,createStore:()=>n.y,default:()=>f,useStore:()=>u});var n=r(15507),i=r(9950),o=r(53044);const{useDebugValue:a}=i,{useSyncExternalStoreWithSelector:s}=o;const c=e=>e;function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c,r=arguments.length>2?arguments[2]:void 0;const n=s(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return a(n),n}const l=e=>{const t="function"===typeof e?(0,n.y)(e):e,r=(e,r)=>u(t,e,r);return Object.assign(r,t),r},d=e=>e?l(e):l;var f=e=>d(e)},40655:(e,t,r)=>{"use strict";r.r(t),r.d(t,{createWithEqualityFn:()=>d,useStoreWithEqualityFn:()=>u});var n=r(9950),i=r(53044),o=r(15507);const{useDebugValue:a}=n,{useSyncExternalStoreWithSelector:s}=i,c=e=>e;function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c,r=arguments.length>2?arguments[2]:void 0;const n=s(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return a(n),n}const l=(e,t)=>{const r=(0,o.y)(e),n=function(e){return u(r,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t)};return Object.assign(n,r),n},d=(e,t)=>e?l(e,t):l},99432:()=>{},47790:()=>{},73776:()=>{},79368:()=>{},15340:()=>{},79838:()=>{},71281:()=>{},48738:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e="",t=0;t{"use strict";const n=r(60079);e.exports=a;const i=function(){function e(e){return"undefined"!==typeof e&&e}try{return"undefined"!==typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},o={mapHttpRequest:f,mapHttpResponse:f,wrapRequestSerializer:h,wrapResponseSerializer:h,wrapErrorSerializer:h,req:f,res:f,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t}};function a(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!==typeof t.send)throw Error("pino: transmit option must have a send function");const r=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},o=function(e,t){if(Array.isArray(e))return e.filter((function(e){return"!stdSerializers.err"!==e}));return!0===e&&Object.keys(t)}(e.browser.serialize,n);let f=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(f=!1);"function"===typeof r&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),!1===e.enabled&&(e.level="silent");const h=e.level||"info",g=Object.create(r);g.log||(g.log=p),Object.defineProperty(g,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(g,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,s(m,g,"error","log"),s(m,g,"fatal","error"),s(m,g,"warn","error"),s(m,g,"info","log"),s(m,g,"debug","log"),s(m,g,"trace","log")}});const m={transmit:t,serialize:o,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:d(e)};return g.levels=a.levels,g.level=h,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prependOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=p,g.serializers=n,g._serialize=o,g._stdErrSerialize=f,g.child=function(r,i){if(!r)throw new Error("missing bindings for child Pino");i=i||{},o&&r.serializers&&(i.serializers=r.serializers);const a=i.serializers;if(o&&a){var s=Object.assign({},n,a),d=!0===e.browser.serialize?Object.keys(s):o;delete r.serializers,c([r],d,s,this._stdErrSerialize)}function f(e){this._childLevel=1+(0|e._childLevel),this.error=u(e,r,"error"),this.fatal=u(e,r,"fatal"),this.warn=u(e,r,"warn"),this.info=u(e,r,"info"),this.debug=u(e,r,"debug"),this.trace=u(e,r,"trace"),s&&(this.serializers=s,this._serialize=d),t&&(this._logEvent=l([].concat(e._logEvent.bindings,r)))}return f.prototype=this,new f(this)},t&&(g._logEvent=l()),g}function s(e,t,r,o){const s=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?p:s[r]?s[r]:i[r]||i[o]||p,function(e,t,r){if(!e.transmit&&t[r]===p)return;t[r]=(o=t[r],function(){const s=e.timestamp(),u=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var f=0;f-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function u(e,t,r){return function(){const n=new Array(1+arguments.length);n[0]=t;for(var i=1;i{"use strict";r.r(t),r.d(t,{ApolloCache:()=>ye,ApolloClient:()=>ge,ApolloError:()=>S.K4,ApolloLink:()=>o.C,Cache:()=>le,DocumentTransform:()=>p.c,HttpLink:()=>St.HttpLink,InMemoryCache:()=>bt,MissingFieldError:()=>ve,NetworkStatus:()=>k.pT,Observable:()=>_.c,ObservableQuery:()=>D,checkFetcher:()=>St.checkFetcher,concat:()=>Et,createHttpLink:()=>St.createHttpLink,createSignalIfSupported:()=>St.createSignalIfSupported,defaultDataIdFromObject:()=>Ee,defaultPrinter:()=>St.defaultPrinter,disableExperimentalFragmentVariables:()=>qt,disableFragmentWarnings:()=>Ft,empty:()=>wt,enableExperimentalFragmentVariables:()=>zt,execute:()=>a,fallbackHttpConfig:()=>St.fallbackHttpConfig,from:()=>At,fromError:()=>Ct.N,fromPromise:()=>xt,gql:()=>Ut,isApolloError:()=>S.Mn,isNetworkRequestSettled:()=>k.D2,isReference:()=>b.A_,makeReference:()=>b.WU,makeVar:()=>ue,mergeOptions:()=>fe.l,parseAndCheckHttpResponse:()=>St.parseAndCheckHttpResponse,resetCaches:()=>jt,rewriteURIForGET:()=>St.rewriteURIForGET,selectHttpOptionsAndBody:()=>St.selectHttpOptionsAndBody,selectHttpOptionsAndBodyInternal:()=>St.selectHttpOptionsAndBodyInternal,selectURI:()=>St.selectURI,serializeFetchParameter:()=>St.serializeFetchParameter,setLogVerbosity:()=>Tt.Q9,split:()=>_t,throwServerError:()=>It.A,toPromise:()=>kt});var n=r(37827),i=r(69055),o=r(7771),a=o.C.execute,s=r(17107),c=r(25113),u=r(28453),l=r(41237),d=r(62210),f=r(70446),h=r(68765),p=r(61337),g=r(41851),m=r(72543),y=r(38676),v=r(17128),b=r(4906),w=r(32728),A=r(28426),_=r(81609),E=r(7634),S=r(37355),k=r(84711),x=r(33753),C=r(38359),I=r(5334),T=r(39835),O=r(90575);function P(e,t,r,i){var o=t.data,a=(0,n.__rest)(t,["data"]),s=r.data,c=(0,n.__rest)(r,["data"]);return(0,u.A)(a,c)&&M((0,v.Vn)(e).selectionSet,o,s,{fragmentMap:(0,O.JG)((0,v.zK)(e)),variables:i})}function M(e,t,r,n){if(t===r)return!0;var i=new Set;return e.selections.every((function(e){if(i.has(e))return!0;if(i.add(e),!(0,d.MS)(e,n.variables))return!0;if(R(e))return!0;if((0,b.dt)(e)){var o=(0,b.ue)(e),a=t&&t[o],s=r&&r[o],c=e.selectionSet;if(!c)return(0,u.A)(a,s);var l=Array.isArray(a),f=Array.isArray(s);if(l!==f)return!1;if(l&&f){var h=a.length;if(s.length!==h)return!1;for(var p=0;p0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(e){return this.queryManager.transform(e)},t}(_.c);function U(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(e,t){return this.nextFetchPolicy=n,"function"===typeof this.nextFetchPolicy?this.nextFetchPolicy(e,t):r}}):e.reobserve()}function j(e){!1!==globalThis.__DEV__&&i.V1.error(24,e.message,e.stack)}function F(e){!1!==globalThis.__DEV__&&e&&!1!==globalThis.__DEV__&&i.V1.debug(25,e)}function z(e){return"network-only"===e||"no-cache"===e||"standby"===e}(0,T.r)(D);var q=r(50090),H=r(61707),V=new(H.et?WeakMap:Map);function $(e,t){var r=e[t];"function"===typeof r&&(e[t]=function(){return V.set(e,(V.get(e)+1)%1e15),r.apply(this,arguments)})}function K(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var W=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;V.has(r)||(V.set(r,0),$(r,"evict"),$(r,"modify"),$(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||k.pT.loading;return this.variables&&this.networkStatus!==k.pT.loading&&!(0,u.L)(this.variables,e.variables)&&(t=k.pT.setVariables),(0,u.L)(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){K(this),this.dirty=!1},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var e=this.getDiffOptions();if(this.lastDiff&&(0,u.L)(e,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var t=this.observableQuery;if(t&&"no-cache"===t.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(e);return this.updateLastDiff(r,e),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t,r=this,n=this.lastDiff&&this.lastDiff.diff;e&&!e.complete&&(null===(t=this.observableQuery)||void 0===t?void 0:t.getLastError())||(this.updateLastDiff(e),this.dirty||(0,u.L)(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return r.notify()}),0))))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():U(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;K(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,k.bi)(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel;var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var i=(0,n.__assign)((0,n.__assign)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,u.L)(i,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===V.get(this.cache)&&(0,u.L)(t,r.variables)&&(0,u.L)(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=new q.ZI,a=(0,y.E)(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&(0,y.E)(e.incremental)){var s=(0,l.bd)(this.getDiff().result,e);e.data=s}else if("hasNext"in e&&e.hasNext){var c=this.getDiff();e.data=o.merge(c.result,e.data)}this.graphQLErrors=a,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(G(e,r.errorPolicy)?this.cache.performTransaction((function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:V.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete)return void(e.data=i.lastDiff.diff.result);var a=i.getDiffOptions(r.variables),s=o.diff(a);!i.stopped&&(0,u.L)(i.variables,r.variables)&&i.updateWatch(r.variables),i.updateLastDiff(s,a),s.complete&&(e.data=s.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=k.pT.ready},e.prototype.markError=function(e){return this.networkStatus=k.pT.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function G(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!(0,m.t)(e);return!n&&r&&e.data&&(n=!0),n}var Q=r(67733),Y=r(66581),Z=r(50983),J=r(60108),X=Object.prototype.hasOwnProperty,ee=Object.create(null),te=function(){function e(e){var t=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new Z.A(J.v["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Y.b(!1);var r=new p.c((function(e){return t.cache.transformDocument(e)}),{cache:!1});this.cache=e.cache,this.link=e.link,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientAwareness=e.clientAwareness,this.localState=e.localState,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults;var n=e.documentTransform;this.documentTransform=n?r.concat(n).concat(r):r,this.defaultContext=e.defaultContext||Object.create(null),(this.onBroadcast=e.onBroadcast)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches((0,i.vA)(26))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){return(0,n.__awaiter)(this,arguments,void 0,(function(e){var t,r,o,a,s,c,u,l=e.mutation,d=e.variables,f=e.optimisticResponse,h=e.updateQueries,p=e.refetchQueries,y=void 0===p?[]:p,v=e.awaitRefetchQueries,b=void 0!==v&&v,w=e.update,A=e.onQueryUpdated,_=e.fetchPolicy,E=void 0===_?(null===(c=this.defaultOptions.mutate)||void 0===c?void 0:c.fetchPolicy)||"network-only":_,k=e.errorPolicy,x=void 0===k?(null===(u=this.defaultOptions.mutate)||void 0===u?void 0:u.errorPolicy)||"none":k,C=e.keepRootFields,I=e.context;return(0,n.__generator)(this,(function(e){switch(e.label){case 0:return(0,i.V1)(l,27),(0,i.V1)("network-only"===E||"no-cache"===E,28),t=this.generateMutationId(),l=this.cache.transformForLink(this.transform(l)),r=this.getDocumentInfo(l).hasClientExports,d=this.getVariables(l,d),r?[4,this.localState.addExportedVariables(l,d,I)]:[3,2];case 1:d=e.sent(),e.label=2;case 2:return o=this.mutationStore&&(this.mutationStore[t]={mutation:l,variables:d,loading:!0,error:null}),a=f&&this.markMutationOptimistic(f,{mutationId:t,document:l,variables:d,fetchPolicy:E,errorPolicy:x,context:I,updateQueries:h,update:w,keepRootFields:C}),this.broadcastQueries(),s=this,[2,new Promise((function(e,r){return(0,g.x)(s.getObservableFromLink(l,(0,n.__assign)((0,n.__assign)({},I),{optimisticResponse:a?f:void 0}),d,{},!1),(function(e){if((0,m.t)(e)&&"none"===x)throw new S.K4({graphQLErrors:(0,m.M)(e)});o&&(o.loading=!1,o.error=null);var r=(0,n.__assign)({},e);return"function"===typeof y&&(y=y(r)),"ignore"===x&&(0,m.t)(r)&&delete r.errors,s.markMutationResult({mutationId:t,result:r,document:l,variables:d,fetchPolicy:E,errorPolicy:x,context:I,update:w,updateQueries:h,awaitRefetchQueries:b,refetchQueries:y,removeOptimistic:a?t:void 0,onQueryUpdated:A,keepRootFields:C})})).subscribe({next:function(t){s.broadcastQueries(),"hasNext"in t&&!1!==t.hasNext||e(t)},error:function(e){o&&(o.loading=!1,o.error=e),a&&s.cache.removeOptimistic(t),s.broadcastQueries(),r(e instanceof S.K4?e:new S.K4({networkError:e}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var i=e.result,o=[],a="no-cache"===e.fetchPolicy;if(!a&&G(i,e.errorPolicy)){if((0,l.ST)(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),(0,l.ST)(i)&&(0,y.E)(i.incremental)){var s=t.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),c=void 0;s.result&&(c=(0,l.bd)(s.result,i)),"undefined"!==typeof c&&(i.data=c,o.push({result:c,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var u=e.updateQueries;u&&this.queries.forEach((function(e,n){var a=e.observableQuery,s=a&&a.queryName;if(s&&X.call(u,s)){var c=u[s],l=r.queries.get(n),d=l.document,f=l.variables,h=t.diff({query:d,variables:f,returnPartialData:!0,optimistic:!1}),p=h.result;if(h.complete&&p){var g=c(p,{mutationResult:i,queryName:d&&(0,v.n4)(d)||void 0,queryVariables:f});g&&o.push({result:g,dataId:"ROOT_QUERY",query:d,variables:f})}}}))}if(o.length>0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var d=[];if(this.refetchQueries({updateCache:function(t){a||o.forEach((function(e){return t.write(e)}));var s=e.update,c=!(0,l.YX)(i)||(0,l.ST)(i)&&!i.hasNext;if(s){if(!a){var u=t.diff({id:"ROOT_MUTATION",query:r.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});u.complete&&("incremental"in(i=(0,n.__assign)((0,n.__assign)({},i),{data:u.result}))&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}c&&s(t,i,{context:e.context,variables:e.variables})}a||e.keepRootFields||!c||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return d.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(d).then((function(){return i}))}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(e,t){var r=this,o="function"===typeof e?e(t.variables,{IGNORE:ee}):e;return o!==ee&&(this.cache.recordOptimisticTransaction((function(e){try{r.markMutationResult((0,n.__assign)((0,n.__assign)({},t),{result:{data:o}}),e)}catch(a){!1!==globalThis.__DEV__&&i.V1.error(a)}}),t.mutationId),!0)},e.prototype.fetchQuery=function(e,t,r){return this.fetchConcastWithInfo(e,t,r).concast.promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},e.prototype.getDocumentInfo=function(e){var t=this.transformCache;if(!t.has(e)){var r={hasClientExports:(0,d.f2)(e),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:(0,d.d8)(["nonreactive"],e),clientQuery:this.localState.clientQuery(e),serverQuery:(0,f.iz)([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],e),defaultVars:(0,v.wY)((0,v.Vu)(e)),asQuery:(0,n.__assign)((0,n.__assign)({},e),{definitions:e.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,n.__assign)((0,n.__assign)({},e),{operation:"query"}):e}))})};t.set(e,r)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.__assign)((0,n.__assign)({},this.getDocumentInfo(e).defaultVars),t)},e.prototype.watchQuery=function(e){var t=this.transform(e.query);"undefined"===typeof(e=(0,n.__assign)((0,n.__assign)({},e),{variables:this.getVariables(t,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var r=new W(this),i=new D({queryManager:this,queryInfo:r,options:e});return i.lastQuery=t,this.queries.set(i.queryId,r),r.init({document:t,observableQuery:i,variables:i.variables}),i},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),(0,i.V1)(e.query,29),(0,i.V1)("Document"===e.query.kind,30),(0,i.V1)(!e.returnPartialData,31),(0,i.V1)(!e.pollInterval,32),this.fetchQuery(t,(0,n.__assign)((0,n.__assign)({},e),{query:this.transform(e.query)})).finally((function(){return r.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches((0,i.vA)(33)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=k.pT.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,o=new Map,a=new Set;return Array.isArray(e)&&e.forEach((function(e){"string"===typeof e?o.set(e,!1):(0,b.Kc)(e)?o.set(t.transform(e),!1):(0,w.U)(e)&&e.query&&a.add(e)})),this.queries.forEach((function(t,n){var i=t.observableQuery,a=t.document;if(i){if("all"===e)return void r.set(n,i);var s=i.queryName;if("standby"===i.options.fetchPolicy||"active"===e&&!i.hasObservers())return;("active"===e||s&&o.has(s)||a&&o.has(a))&&(r.set(n,i),s&&o.set(s,!0),a&&o.set(a,!0))}})),a.size&&a.forEach((function(e){var o=(0,A.v)("legacyOneTimeQuery"),a=t.getQuery(o).init({document:e.query,variables:e.variables}),s=new D({queryManager:t,queryInfo:a,options:(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"network-only"})});(0,i.V1)(s.queryId===o),a.setObservableQuery(s),r.set(o,s)})),!1!==globalThis.__DEV__&&o.size&&o.forEach((function(e,t){e||!1!==globalThis.__DEV__&&i.V1.warn("string"===typeof t?34:35,t)})),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach((function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=void 0===i?"none":i,a=e.variables,s=e.context,c=void 0===s?{}:s,u=e.extensions,l=void 0===u?{}:u;r=this.transform(r),a=this.getVariables(r,a);var d=function(e){return t.getObservableFromLink(r,c,e,l).map((function(i){"no-cache"!==n&&(G(i,o)&&t.cache.write({query:r,result:i.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var a=(0,m.t)(i),s=(0,S.uR)(i);if(a||s){var c={};if(a&&(c.graphQLErrors=i.errors),s&&(c.protocolErrors=i.extensions[S.K$]),"none"===o||s)throw new S.K4(c)}return"ignore"===o&&delete i.errors,i}))};if(this.getDocumentInfo(r).hasClientExports){var f=this.localState.addExportedVariables(r,a,c).then(d);return new _.c((function(e){var t=null;return f.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return d(a)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,i,o){var s,c,u=this;void 0===o&&(o=null!==(s=null===t||void 0===t?void 0:t.queryDeduplication)&&void 0!==s?s:this.queryDeduplication);var l=this.getDocumentInfo(e),d=l.serverQuery,f=l.clientQuery;if(d){var p=this.inFlightLinkObservables,m=this.link,y={query:d,variables:r,operationName:(0,v.n4)(d)||void 0,context:this.prepareContext((0,n.__assign)((0,n.__assign)({},t),{forceFetch:!o})),extensions:i};if(t=y.context,o){var b=(0,Q.y)(d),w=(0,h.M)(r),A=p.lookup(b,w);if(!(c=A.observable)){var S=new E.E([a(m,y)]);c=A.observable=S,S.beforeNext((function(){p.remove(b,w)}))}}else c=new E.E([a(m,y)])}else c=new E.E([_.c.of({data:{}})]),t=this.prepareContext(t);return f&&(c=(0,g.x)(c,(function(e){return u.localState.runResolvers({document:f,remoteResult:e,context:t,variables:r})}))),c},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(r.query);return(0,g.x)(this.getObservableFromLink(i,r.context,r.variables),(function(o){var a=(0,m.M)(o),s=a.length>0,c=r.errorPolicy;if(n>=e.lastRequestId){if(s&&"none"===c)throw e.markError(new S.K4({graphQLErrors:a}));e.markResult(o,i,r,t),e.markReady()}var u={data:o.data,loading:!1,networkStatus:k.pT.ready};return s&&"none"===c&&(u.data=void 0),s&&"ignore"!==c&&(u.errors=a,u.networkStatus=k.pT.error),u}),(function(t){var r=(0,S.Mn)(t)?t:new S.K4({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r}))},e.prototype.fetchConcastWithInfo=function(e,t,r,n){var i=this;void 0===r&&(r=k.pT.loading),void 0===n&&(n=t.query);var o,a,s=this.getVariables(n,t.variables),c=this.getQuery(e),u=this.defaultOptions.watchQuery,l=t.fetchPolicy,d=void 0===l?u&&u.fetchPolicy||"cache-first":l,f=t.errorPolicy,h=void 0===f?u&&u.errorPolicy||"none":f,p=t.returnPartialData,g=void 0!==p&&p,m=t.notifyOnNetworkStatusChange,y=void 0!==m&&m,v=t.context,b=void 0===v?{}:v,w=Object.assign({},t,{query:n,variables:s,fetchPolicy:d,errorPolicy:h,returnPartialData:g,notifyOnNetworkStatusChange:y,context:b}),A=function(e){w.variables=e;var n=i.fetchQueryByPolicy(c,w,r);return"standby"!==w.fetchPolicy&&n.sources.length>0&&c.observableQuery&&c.observableQuery.applyNextFetchPolicy("after-fetch",t),n},_=function(){return i.fetchCancelFns.delete(e)};if(this.fetchCancelFns.set(e,(function(e){_(),setTimeout((function(){return o.cancel(e)}))})),this.getDocumentInfo(w.query).hasClientExports)o=new E.E(this.localState.addExportedVariables(w.query,w.variables,w.context).then(A).then((function(e){return e.sources}))),a=!0;else{var S=A(w.variables);a=S.fromLink,o=new E.E(S.sources)}return o.promise.then(_,_),{concast:o,fromLink:a}},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?(0,A.v)("refetchQueries"):void 0:a,c=e.onQueryUpdated,u=new Map;n&&this.getObservableQueries(n).forEach((function(e,r){u.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})}));var l=new Map;return r&&this.cache.batch({update:r,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof W&&e.watcher.observableQuery;if(n){if(c){u.delete(n.queryId);var i=c(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&l.set(n,i),i}null!==c&&u.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),u.size&&u.forEach((function(e,r){var n,i=e.oq,o=e.lastDiff,a=e.diff;if(c){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}n=c(i,a,o)}c&&!0!==n||(n=i.refetch()),!1!==n&&l.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)})),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,r){var i=this,o=t.query,a=t.variables,s=t.fetchPolicy,c=t.refetchWritePolicy,l=t.errorPolicy,d=t.returnPartialData,f=t.context,h=t.notifyOnNetworkStatusChange,p=e.networkStatus;e.init({document:o,variables:a,networkStatus:r});var g=function(){return e.getDiff()},m=function(t,r){void 0===r&&(r=e.networkStatus||k.pT.loading);var s=t.result;!1===globalThis.__DEV__||d||(0,u.L)(s,{})||F(t.missing);var c=function(e){return _.c.of((0,n.__assign)({data:e,loading:(0,k.bi)(r),networkStatus:r},t.complete?null:{partial:!0}))};return s&&i.getDocumentInfo(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:s},context:f,variables:a,onlyRunForcedResolvers:!0}).then((function(e){return c(e.data||void 0)})):"none"===l&&r===k.pT.refetch&&Array.isArray(t.missing)?c(void 0):c(s)},y="no-cache"===s?0:r===k.pT.refetch&&"merge"!==c?1:2,v=function(){return i.getResultsFromLink(e,y,{query:o,variables:a,context:f,fetchPolicy:s,errorPolicy:l})},b=h&&"number"===typeof p&&p!==r&&(0,k.bi)(r);switch(s){default:case"cache-first":return(w=g()).complete?{fromLink:!1,sources:[m(w,e.markReady())]}:d||b?{fromLink:!0,sources:[m(w),v()]}:{fromLink:!0,sources:[v()]};case"cache-and-network":var w;return(w=g()).complete||d||b?{fromLink:!0,sources:[m(w),v()]}:{fromLink:!0,sources:[v()]};case"cache-only":return{fromLink:!1,sources:[m(g(),e.markReady())]};case"network-only":return b?{fromLink:!0,sources:[m(g()),v()]}:{fromLink:!0,sources:[v()]};case"no-cache":return b?{fromLink:!0,sources:[m(e.getDiff()),v()]}:{fromLink:!0,sources:[v()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new W(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.defaultContext),t),{clientAwareness:this.clientAwareness})},e}(),re=r(78449),ne=r(74815),ie=r(18684),oe=new ie.DX,ae=new WeakMap;function se(e){var t=ae.get(e);return t||ae.set(e,t={vars:new Set,dep:(0,ie.yN)()}),t}function ce(e){se(e).vars.forEach((function(t){return t.forgetCache(e)}))}function ue(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){se(e).dep.dirty(n),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)}));var a=Array.from(r);r.clear(),a.forEach((function(t){return t(e)}))}}else{var s=oe.getValue();s&&(i(s),se(s).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){return t.add(e),se(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}var le,de=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=(0,q.D9)(t.resolvers,e)})):this.resolvers=(0,q.D9)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){return(0,n.__awaiter)(this,arguments,void 0,(function(e){var t=e.document,r=e.remoteResult,i=e.context,o=e.variables,a=e.onlyRunForcedResolvers,s=void 0!==a&&a;return(0,n.__generator)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,i,o,this.fragmentMatcher,s).then((function(e){return(0,n.__assign)((0,n.__assign)({},r),{data:e.result})}))]:[2,r]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return(0,d.d8)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return(0,f.er)(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.__assign)((0,n.__assign)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e){return(0,n.__awaiter)(this,arguments,void 0,(function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,n.__generator)(this,(function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return(0,n.__assign)((0,n.__assign)({},t),e.exportedVariables)}))]:[2,(0,n.__assign)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,re.YR)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return re.sP}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,f.zc)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t){return(0,n.__awaiter)(this,arguments,void 0,(function(e,t,r,i,o,a){var s,c,u,l,d,f,h,p,g,m;return void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o=function(){return!0}),void 0===a&&(a=!1),(0,n.__generator)(this,(function(y){return s=(0,v.Vn)(e),c=(0,v.zK)(e),u=(0,O.JG)(c),l=this.collectSelectionsToResolve(s,u),d=s.operation,f=d?d.charAt(0).toUpperCase()+d.slice(1):"Query",p=(h=this).cache,g=h.client,m={fragmentMap:u,context:(0,n.__assign)((0,n.__assign)({},r),{cache:p,client:g}),variables:i,fragmentMatcher:o,defaultOperationType:f,exportedVariables:{},selectionsToResolve:l,onlyRunForcedResolvers:a},[2,this.resolveSelectionSet(s.selectionSet,false,t,m).then((function(e){return{result:e,exportedVariables:m.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r,o){return(0,n.__awaiter)(this,void 0,void 0,(function(){var a,s,c,u,l,f=this;return(0,n.__generator)(this,(function(h){return a=o.fragmentMap,s=o.context,c=o.variables,u=[r],l=function(e){return(0,n.__awaiter)(f,void 0,void 0,(function(){var l,f;return(0,n.__generator)(this,(function(n){return(t||o.selectionsToResolve.has(e))&&(0,d.MS)(e,c)?(0,b.dt)(e)?[2,this.resolveField(e,t,r,o).then((function(t){var r;"undefined"!==typeof t&&u.push(((r={})[(0,b.ue)(e)]=t,r))}))]:((0,b.kd)(e)?l=e:(l=a[e.name.value],(0,i.V1)(l,18,e.name.value)),l&&l.typeCondition&&(f=l.typeCondition.name.value,o.fragmentMatcher(r,f,s))?[2,this.resolveSelectionSet(l.selectionSet,t,r,o).then((function(e){u.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(l)).then((function(){return(0,q.IM)(u)}))]}))}))},e.prototype.resolveField=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,a,s,c,u,l,d,f,h,p=this;return(0,n.__generator)(this,(function(n){return r?(o=i.variables,a=e.name.value,s=(0,b.ue)(e),c=a!==s,u=r[s]||r[a],l=Promise.resolve(u),i.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(d=r.__typename||i.defaultOperationType,(f=this.resolvers&&this.resolvers[d])&&(h=f[c?a:s])&&(l=Promise.resolve(oe.withValue(this.cache,h,[r,(0,b.MB)(e,o),i.context,{field:e,fragmentMap:i.fragmentMap}])))),[2,l.then((function(r){var n,o;if(void 0===r&&(r=u),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(i.exportedVariables[e.value.value]=r)}))})),!e.selectionSet)return r;if(null==r)return r;var a=null!==(o=null===(n=e.directives)||void 0===n?void 0:n.some((function(e){return"client"===e.name.value})))&&void 0!==o&&o;return Array.isArray(r)?p.resolveSubSelectedArray(e,t||a,r,i):e.selectionSet?p.resolveSelectionSet(e.selectionSet,t||a,r,i):void 0}))]):[2,null]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var i=this;return Promise.all(r.map((function(r){return null===r?null:Array.isArray(r)?i.resolveSubSelectedArray(e,t,r,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,r,n):void 0})))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;return function e(o){if(!n.has(o)){var a=new Set;n.set(o,a),(0,re.YR)(o,{Directive:function(e,t,n,i,o){"client"===e.name.value&&o.forEach((function(e){r(e)&&(0,ne.VK)(e)&&a.add(e)}))},FragmentSpread:function(n,o,s,c,u){var l=t[n.name.value];(0,i.V1)(l,19,n.name.value);var d=e(l);d.size>0&&(u.forEach((function(e){r(e)&&(0,ne.VK)(e)&&a.add(e)})),a.add(n),d.forEach((function(e){a.add(e)})))}})}return n.get(o)}(e)},e}(),fe=r(40704),he=r(18363),pe=!1,ge=function(){function e(e){var t=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw(0,i.vA)(15);var r=e.uri,a=e.credentials,u=e.headers,l=e.cache,d=e.documentTransform,f=e.ssrMode,h=void 0!==f&&f,p=e.ssrForceFetchDelay,g=void 0===p?0:p,m=e.connectToDevTools,y=e.queryDeduplication,v=void 0===y||y,b=e.defaultOptions,w=e.defaultContext,A=e.assumeImmutableResults,_=void 0===A?l.assumeImmutableResults:A,E=e.resolvers,S=e.typeDefs,k=e.fragmentMatcher,x=e.name,C=e.version,I=e.devtools,T=e.link;T||(T=r?new c.P({uri:r,credentials:a,headers:u}):o.C.empty()),this.link=T,this.cache=l,this.disableNetworkFetches=h||g>0,this.queryDeduplication=v,this.defaultOptions=b||Object.create(null),this.typeDefs=S,this.devtoolsConfig=(0,n.__assign)((0,n.__assign)({},I),{enabled:(null===I||void 0===I?void 0:I.enabled)||m}),void 0===this.devtoolsConfig.enabled&&(this.devtoolsConfig.enabled=!1!==globalThis.__DEV__),g&&setTimeout((function(){return t.disableNetworkFetches=!1}),g),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=s.r,this.localState=new de({cache:l,client:this,resolvers:E,fragmentMatcher:k}),this.queryManager=new te({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:w,documentTransform:d,queryDeduplication:v,ssrMode:h,clientAwareness:{name:x,version:C},localState:this.localState,assumeImmutableResults:_,onBroadcast:this.devtoolsConfig.enabled?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){if("undefined"!==typeof window){var e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this,pe||!1===globalThis.__DEV__||(pe=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout((function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var e=window.navigator,t=e&&e.userAgent,r=void 0;"string"===typeof t&&(t.indexOf("Chrome/")>-1?r="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":t.indexOf("Firefox/")>-1&&(r="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),r&&!1!==globalThis.__DEV__&&i.V1.log("Download the Apollo DevTools for a better development experience: %s",r)}}),1e4))}},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=(0,fe.l)(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=(0,fe.l)(this.defaultOptions.query,e)),(0,i.V1)("cache-and-network"!==e.fetchPolicy,16),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=(0,fe.l)(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.watchFragment=function(e){return this.cache.watchFragment(e)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return a(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach((function(e,t){r.push(t),n.push(e)}));var o=Promise.all(n);return o.queries=r,o.results=n,o.catch((function(e){!1!==globalThis.__DEV__&&i.V1.debug(17,e)})),o},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();!1!==globalThis.__DEV__&&(ge.prototype.getMemoryInternals=he.ep),le||(le={});var me=r(59248),ye=function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=(0,ie.LV)(O.ct,{max:J.v["cache.fragmentQueryDocuments"]||1e3,cache:me.l})}return e.prototype.batch=function(e){var t,r=this,n="string"===typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(r)}),n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.watchFragment=function(e){var t,r=this,i=e.fragment,o=e.fragmentName,a=e.from,s=e.optimistic,c=void 0===s||s,u=(0,n.__rest)(e,["fragment","fragmentName","from","optimistic"]),l=this.getFragmentDoc(i,o),d=(0,n.__assign)((0,n.__assign)({},u),{returnPartialData:!0,id:"string"===typeof a?a:this.identify(a),query:l,optimistic:c});return new _.c((function(e){return r.watch((0,n.__assign)((0,n.__assign)({},d),{immediate:!0,callback:function(r){if(!t||!P(l,{data:null===t||void 0===t?void 0:t.result},{data:r.result})){var n={data:r.result,complete:!!r.complete};r.missing&&(n.missing=(0,q.IM)(r.missing.map((function(e){return e.missing})))),t=r,e.next(n)}}}))}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,i=(0,n.__rest)(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,i=e.fragment,o=e.fragmentName,a=(0,n.__rest)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var i=r.readQuery(e),o=t(i);return void 0===o||null===o?i:(r.writeQuery((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var i=r.readFragment(e),o=t(i);return void 0===o||null===o?i:(r.writeFragment((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e}();!1!==globalThis.__DEV__&&(ye.prototype.getMemoryInternals=he.tQ);var ve=function(e){function t(r,n,i,o){var a,s=e.call(this,r)||this;if(s.message=r,s.path=n,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var c=s.path.length-1;c>=0;--c)s.missing=((a={})[s.path[c]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return(0,n.__extends)(t,e),t}(Error),be=r(466),we=r(45901),Ae=Object.prototype.hasOwnProperty;function _e(e){return null===e||void 0===e}function Ee(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"===typeof r&&(t&&(t.keyObject=_e(n)?_e(i)?void 0:{_id:i}:{id:n}),_e(n)&&!_e(i)&&(n=i),!_e(n)))return"".concat(r,":").concat("number"===typeof n||"string"===typeof n?n:JSON.stringify(n))}var Se={dataIdFromObject:Ee,addTypename:!0,resultCaching:!0,canonizeResults:!1};function ke(e){var t=e.canonizeResults;return void 0===t?Se.canonizeResults:t}var xe=/^[_a-z][_0-9a-z]*/i;function Ce(e){var t=e.match(xe);return t?t[0]:e}function Ie(e,t,r){return!!(0,w.U)(t)&&((0,y.c)(t)?t.every((function(t){return Ie(e,t,r)})):e.selections.every((function(e){if((0,b.dt)(e)&&(0,d.MS)(e,r)){var n=(0,b.ue)(e);return Ae.call(t,n)&&(!e.selectionSet||Ie(e.selectionSet,t[n],r))}return!0})))}function Te(e){return(0,w.U)(e)&&!(0,b.A_)(e)&&!(0,y.c)(e)}function Oe(e,t){var r=(0,O.JG)((0,v.zK)(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}var Pe=Object.create(null),Me=function(){return Pe},Re=Object.create(null),Ne=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return(0,we.G)((0,b.A_)(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return(0,b.A_)(e)?r.has(e.__ref):"object"===typeof e},this.toReference=function(e,t){if("string"===typeof e)return(0,b.WU)(e);if((0,b.A_)(e))return e;var n=r.policies.identify(e)[0];if(n){var i=(0,b.WU)(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,n.__assign)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),Ae.call(this.data,e)){var r=this.data[e];if(r&&Ae.call(r,t))return r[t]}return"__typename"===t&&Ae.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Ue?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),Ae.call(this.data,e)?this.data[e]:this instanceof Ue?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;(0,b.A_)(e)&&(e=e.__ref),(0,b.A_)(t)&&(t=t.__ref);var o="string"===typeof e?this.lookup(r=e):e,a="string"===typeof t?this.lookup(r=t):t;if(a){(0,i.V1)("string"===typeof r,1);var s=new q.ZI(Fe).merge(o,a);if(this.data[r]=s,s!==o&&(delete this.refs[r],this.group.caching)){var c=Object.create(null);o||(c.__exists=1),Object.keys(a).forEach((function(e){if(!o||o[e]!==s[e]){c[e]=1;var t=Ce(e);t===e||n.policies.hasKeyArgs(s.__typename,t)||(c[t]=1),void 0!==s[e]||n instanceof Ue||delete s[e]}})),!c.__typename||o&&o.__typename||this.policies.rootTypenamesById[r]!==s.__typename||delete c.__typename,Object.keys(c).forEach((function(e){return n.group.dirty(r,e)}))}}},e.prototype.modify=function(e,t){var r=this,o=this.lookup(e);if(o){var a=Object.create(null),s=!1,c=!0,u={DELETE:Pe,INVALIDATE:Re,isReference:b.A_,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"===typeof t?{fieldName:t,from:n||(0,b.WU)(e)}:t,{store:r})}};if(Object.keys(o).forEach((function(l){var d=Ce(l),f=o[l];if(void 0!==f){var h="function"===typeof t?t:t[l]||t[d];if(h){var p=h===Me?Pe:h((0,we.G)(f),(0,n.__assign)((0,n.__assign)({},u),{fieldName:d,storeFieldName:l,storage:r.getStorage(e,l)}));if(p===Re)r.group.dirty(e,l);else if(p===Pe&&(p=void 0),p!==f&&(a[l]=p,s=!0,f=p,!1!==globalThis.__DEV__)){var g=function(e){if(void 0===r.lookup(e.__ref))return!1!==globalThis.__DEV__&&i.V1.warn(2,e),!0};if((0,b.A_)(p))g(p);else if(Array.isArray(p))for(var m=!1,y=void 0,v=0,w=p;v0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Ue?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach((function(n){Ae.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])}));var n=Object.keys(r);if(n.length){for(var i=this;i instanceof Ue;)i=i.parent;n.forEach((function(e){return i.delete(e)}))}return n},e.prototype.findChildRefIds=function(e){if(!Ae.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach((function(e){(0,b.A_)(e)&&(t[e.__ref]=!0),(0,w.U)(e)&&Object.keys(e).forEach((function(t){var r=e[t];(0,w.U)(r)&&n.add(r)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Le=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?(0,ie.yN)():null,this.keyMaker=new Y.b(H.et)},e.prototype.depend=function(e,t){if(this.d){this.d(Be(e,t));var r=Ce(t);r!==t&&this.d(Be(e,r)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Be(e,t),"__exists"===t?"forget":"setDirty")},e}();function Be(e,t){return t+"#"+e}function De(e,t){ze(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,o=t.seed,a=e.call(this,r,new Le(i))||this;return a.stump=new je(a),a.storageTrie=new Y.b(H.et),o&&a.replace(o),a}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(Ne||(Ne={}));var Ue=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach((function(r){(0,u.L)(n[r],i[r])||t.group.dirty(e,r)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(r){t.group.dirty(e,r)}))):t.delete(e)})),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,n.__assign)((0,n.__assign)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return Ae.call(this.data,t)?(0,n.__assign)((0,n.__assign)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(Ne),je=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Le(t.group.caching,t.group))||this}return(0,n.__extends)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(e,t){return this.parent.merge(e,t)},t}(Ue);function Fe(e,t,r){var n=e[r],i=t[r];return(0,u.L)(n,i)?n:i}function ze(e){return!!(e instanceof Ne&&e.group.caching)}var qe=function(){function e(){this.known=new(H.En?WeakSet:Set),this.pool=new Y.b(H.et),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return(0,w.U)(e)&&this.known.has(e)},e.prototype.pass=function(e){if((0,w.U)(e)){var t=function(e){return(0,w.U)(e)?(0,y.c)(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if((0,w.U)(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var n=e.map(this.admit,this);return(s=this.pool.lookupArray(n)).array||(this.known.add(s.array=n),!1!==globalThis.__DEV__&&Object.freeze(n)),s.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],a=this.sortedKeys(e);o.push(a.json);var s,c=o.length;if(a.sorted.forEach((function(r){o.push(t.admit(e[r]))})),!(s=this.pool.lookupArray(o)).object){var u=s.object=Object.create(i);this.known.add(u),a.sorted.forEach((function(e,t){u[e]=o[c+t]})),!1!==globalThis.__DEV__&&Object.freeze(u)}return s.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}();function He(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var Ve=function(){function e(e){var t=this;this.knownResults=new(H.et?WeakMap:Map),this.config=(0,x.o)(e,{addTypename:!1!==e.addTypename,canonizeResults:ke(e)}),this.canon=e.canon||new qe,this.executeSelectionSet=(0,ie.LV)((function(e){var r,i=e.context.canonizeResults,o=He(e);o[3]=!i;var a=(r=t.executeSelectionSet).peek.apply(r,o);return a?i?(0,n.__assign)((0,n.__assign)({},a),{result:t.canon.admit(a.result)}):a:(De(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize||J.v["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:He,makeCacheKey:function(e,t,r,n){if(ze(r.store))return r.store.makeCacheKey(e,(0,b.A_)(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=(0,ie.LV)((function(e){return De(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize||J.v["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(ze(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new qe},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,i=e.rootId,o=void 0===i?"ROOT_QUERY":i,a=e.variables,s=e.returnPartialData,c=void 0===s||s,u=e.canonizeResults,l=void 0===u?this.config.canonizeResults:u,d=this.config.cache.policies;a=(0,n.__assign)((0,n.__assign)({},(0,v.wY)((0,v.AT)(r))),a);var f,p=(0,b.WU)(o),g=this.executeSelectionSet({selectionSet:(0,v.Vn)(r).selectionSet,objectOrReference:p,enclosingRef:p,context:(0,n.__assign)({store:t,query:r,policies:d,variables:a,varString:(0,h.M)(a),canonizeResults:l},Oe(r,this.config.fragments))});if(g.missing&&(f=[new ve($e(g.missing),g.missing,r,a)],!c))throw f[0];return{result:g.result,complete:!f,missing:f}},e.prototype.isFresh=function(e,t,r,n){if(ze(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,r=e.selectionSet,n=e.objectOrReference,o=e.enclosingRef,a=e.context;if((0,b.A_)(n)&&!a.policies.rootTypenamesById[n.__ref]&&!a.store.has(n.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(n.__ref," object")};var s,c=a.variables,u=a.policies,l=a.store.getFieldValue(n,"__typename"),h=[],p=new q.ZI;function g(e,t){var r;return e.missing&&(s=p.merge(s,((r={})[t]=e.missing,r))),e.result}this.config.addTypename&&"string"===typeof l&&!u.rootIdsByTypename[l]&&h.push({__typename:l});var m=new Set(r.selections);m.forEach((function(e){var r,v;if((0,d.MS)(e,c))if((0,b.dt)(e)){var w=u.readField({fieldName:e.name.value,field:e,variables:a.variables,from:n},a),A=(0,b.ue)(e);void 0===w?f.XY.added(e)||(s=p.merge(s,((r={})[A]="Can't find field '".concat(e.name.value,"' on ").concat((0,b.A_)(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2)),r))):(0,y.c)(w)?w.length>0&&(w=g(t.executeSubSelectedArray({field:e,array:w,enclosingRef:o,context:a}),A)):e.selectionSet?null!=w&&(w=g(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:w,enclosingRef:(0,b.A_)(w)?w:o,context:a}),A)):a.canonizeResults&&(w=t.canon.pass(w)),void 0!==w&&h.push(((v={})[A]=w,v))}else{var _=(0,O.HQ)(e,a.lookupFragment);if(!_&&e.kind===be.b.FRAGMENT_SPREAD)throw(0,i.vA)(9,e.name.value);_&&u.fragmentMatches(_,l)&&_.selectionSet.selections.forEach(m.add,m)}}));var v={result:(0,q.IM)(h),missing:s},w=a.canonizeResults?this.canon.admit(v):(0,we.G)(v);return w.result&&this.knownResults.set(w.result,r),w},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,o=e.array,a=e.enclosingRef,s=e.context,c=new q.ZI;function u(e,r){var n;return e.missing&&(t=c.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(o=o.filter(s.store.canRead)),o=o.map((function(e,t){return null===e?null:(0,y.c)(e)?u(r.executeSubSelectedArray({field:n,array:e,enclosingRef:a,context:s}),t):n.selectionSet?u(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:(0,b.A_)(e)?e:a,context:s}),t):(!1!==globalThis.__DEV__&&function(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach((function(r){(0,w.U)(r)&&((0,i.V1)(!(0,b.A_)(r),10,function(e,t){return(0,b.A_)(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,r),t.name.value),Object.values(r).forEach(n.add,n))}))}}(s.store,n,e),e)})),{result:s.canonizeResults?this.canon.admit(o):o,missing:t}},e}();function $e(e){try{JSON.stringify(e,(function(e,t){if("string"===typeof t)throw t;return t}))}catch(t){return t}}var Ke=r(8450),We=Object.create(null);function Ge(e){var t=JSON.stringify(e);return We[t]||(We[t]=Object.create(null))}function Qe(e){var t=Ge(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},o=r.keyObject=Ze(e,(function(e){var o=et(r.storeObject,e,n);return void 0===o&&t!==r.storeObject&&Ae.call(t,e[0])&&(o=et(t,e,Xe)),(0,i.V1)(void 0!==o,4,e.join("."),t),o}));return"".concat(r.typename,":").concat(JSON.stringify(o))})}function Ye(e){var t=Ge(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,a=Ze(e,(function(e){var r=e[0],o=r.charAt(0);if("@"!==o)if("$"!==o){if(t)return et(t,e)}else{var a=r.slice(1);if(i&&Ae.call(i,a)){var s=e.slice(0);return s[0]=a,et(i,s)}}else if(n&&(0,y.E)(n.directives)){var c=r.slice(1),u=n.directives.find((function(e){return e.name.value===c})),l=u&&(0,b.MB)(u,i);return l&&et(l,e.slice(1))}})),s=JSON.stringify(a);return(t||"{}"!==s)&&(o+=":"+s),o})}function Ze(e,t){var r=new q.ZI;return Je(e).reduce((function(e,n){var i,o=t(n);if(void 0!==o){for(var a=n.length-1;a>=0;--a)(i={})[n[a]]=o,o=i;e=r.merge(e,o)}return e}),Object.create(null))}function Je(e){var t=Ge(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach((function(t,i){(0,y.c)(t)?(Je(t).forEach((function(e){return r.push(n.concat(e))})),n.length=0):(n.push(t),(0,y.c)(e[i+1])||(r.push(n.slice(0)),n.length=0))}))}return t.paths}function Xe(e,t){return e[t]}function et(e,t,r){return r=r||Xe,tt(t.reduce((function e(t,n){return(0,y.c)(t)?t.map((function(t){return e(t,n)})):t&&r(t,n)}),e))}function tt(e){return(0,w.U)(e)?(0,y.c)(e)?e.map(tt):Ze(Object.keys(e).sort(),(function(t){return et(e,t)})):e}function rt(e){return void 0!==e.args?e.args:e.field?(0,b.MB)(e.field,e.variables):null}var nt=function(){},it=function(e,t){return t.fieldName},ot=function(e,t,r){return(0,r.mergeObjects)(e,t)},at=function(e,t){return t},st=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,n.__assign)({dataIdFromObject:Ee},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var r,i=this,o=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a,s=t&&t.storeObject||e,c=(0,n.__assign)((0,n.__assign)({},t),{typename:o,storeObject:s,readField:t&&t.readField||function(){var e=ut(arguments,s);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),u=o&&this.getTypePolicy(o),l=u&&u.keyFn||this.config.dataIdFromObject;l;){var d=l((0,n.__assign)((0,n.__assign)({},e),s),c);if(!(0,y.c)(d)){a=d;break}l=Qe(d)}return a=a?String(a):void 0,c.keyObject?[a,c.keyObject]:[a]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(r){var i=e[r],o=i.queryType,a=i.mutationType,s=i.subscriptionType,c=(0,n.__rest)(i,["queryType","mutationType","subscriptionType"]);o&&t.setRootTypename("Query",r),a&&t.setRootTypename("Mutation",r),s&&t.setRootTypename("Subscription",r),Ae.call(t.toBeAdded,r)?t.toBeAdded[r].push(c):t.toBeAdded[r]=[c]}))},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"===typeof t?t:!0===t?ot:!1===t?at:e.merge}a(n,t.merge),n.keyFn=!1===i?nt:(0,y.c)(i)?Qe(i):"function"===typeof i?i:n.keyFn,o&&Object.keys(o).forEach((function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"===typeof i)n.read=i;else{var s=i.keyArgs,c=i.read,u=i.merge;n.keyFn=!1===s?it:(0,y.c)(s)?Ye(s):"function"===typeof s?s:n.keyFn,"function"===typeof c&&(n.read=c),a(n,u)}n.read&&n.merge&&(n.keyFn=n.keyFn||it)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&((0,i.V1)(!n||n===e,5,e),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(r){t.getSupertypeSet(r,!0),e[r].forEach((function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match(xe);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!Ae.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(e);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach((function(r,n){if(r.test(e)){var o=t.supertypeMap.get(n);o&&o.forEach((function(e){return i.add(e)}))}}))),i&&i.size&&i.forEach((function(e){var i=t.getTypePolicy(e),o=i.fields,a=(0,n.__rest)(i,["fields"]);Object.assign(r,a),Object.assign(r.fields,o)}))}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach((function(r){t.updateTypePolicy(e,r)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var o=this;if(!e.typeCondition)return!0;if(!t)return!1;var a=e.typeCondition.name.value;if(t===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var s=this.getSupertypeSet(t,!0),c=[s],u=function(e){var t=o.getSupertypeSet(e,!1);t&&t.size&&c.indexOf(t)<0&&c.push(t)},l=!(!r||!this.fuzzySubtypes.size),d=!1,f=0;f1?s:t}:(o=(0,n.__assign)({},a),Ae.call(o,"from")||(o.from=t)),!1!==globalThis.__DEV__&&void 0===o.from&&!1!==globalThis.__DEV__&&i.V1.warn(7,(0,Ke.p)(Array.from(e))),void 0===o.variables&&(o.variables=r),o}function lt(e){return function(t,r){if((0,y.c)(t)||(0,y.c)(r))throw(0,i.vA)(8);if((0,w.U)(t)&&(0,w.U)(r)){var o=e.getFieldValue(t,"__typename"),a=e.getFieldValue(r,"__typename");if(o&&a&&o!==a)return r;if((0,b.A_)(t)&&Te(r))return e.merge(t.__ref,r),t;if(Te(t)&&(0,b.A_)(r))return e.merge(t,r.__ref),r;if(Te(t)&&Te(r))return(0,n.__assign)((0,n.__assign)({},t),r)}return r}}function dt(e,t,r){var i="".concat(t).concat(r),o=e.flavors.get(i);return o||e.flavors.set(i,o=e.clientOnly===t&&e.deferred===r?e:(0,n.__assign)((0,n.__assign)({},e),{clientOnly:t,deferred:r})),o}var ft=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,o=t.query,a=t.result,s=t.dataId,c=t.variables,l=t.overwrite,d=(0,v.Vu)(o),f=new q.ZI;c=(0,n.__assign)((0,n.__assign)({},(0,v.wY)(d)),c);var p=(0,n.__assign)((0,n.__assign)({store:e,written:Object.create(null),merge:function(e,t){return f.merge(e,t)},variables:c,varString:(0,h.M)(c)},Oe(o,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),g=this.processSelectionSet({result:a||Object.create(null),dataId:s,selectionSet:d.selectionSet,mergeTree:{map:new Map},context:p});if(!(0,b.A_)(g))throw(0,i.vA)(11,a);return p.incomingById.forEach((function(t,o){var a=t.storeObject,s=t.mergeTree,c=t.fieldNodeSet,l=(0,b.WU)(o);if(s&&s.map.size){var d=r.applyMerges(s,l,a,p);if((0,b.A_)(d))return;a=d}if(!1!==globalThis.__DEV__&&!p.overwrite){var f=Object.create(null);c.forEach((function(e){e.selectionSet&&(f[e.name.value]=!0)}));Object.keys(a).forEach((function(e){(function(e){return!0===f[Ce(e)]})(e)&&!function(e){var t=s&&s.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,r,o){var a=function(e){var t=o.getFieldValue(e,r);return"object"===typeof t&&t},s=a(e);if(!s)return;var c=a(t);if(!c)return;if((0,b.A_)(s))return;if((0,u.L)(s,c))return;if(Object.keys(s).every((function(e){return void 0!==o.getFieldValue(c,e)})))return;var l=o.getFieldValue(e,"__typename")||o.getFieldValue(t,"__typename"),d=Ce(r),f="".concat(l,".").concat(d);if(vt.has(f))return;vt.add(f);var h=[];(0,y.c)(s)||(0,y.c)(c)||[s,c].forEach((function(e){var t=o.getFieldValue(e,"__typename");"string"!==typeof t||h.includes(t)||h.push(t)}));!1!==globalThis.__DEV__&&i.V1.warn(14,d,l,h.length?"either ensure all objects of type "+h.join(" and ")+" have an ID or a custom merge function, or ":"",f,(0,n.__assign)({},s),(0,n.__assign)({},c))}(l,a,e,p.store)}))}e.merge(o,a)})),e.retain(g.__ref),g},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,o=e.result,a=e.selectionSet,s=e.context,c=e.mergeTree,u=this.cache.policies,l=Object.create(null),d=r&&u.rootTypenamesById[r]||(0,b.D$)(o,a,s.fragmentMap)||r&&s.store.get(r,"__typename");"string"===typeof d&&(l.__typename=d);var h=function(){var e=ut(arguments,l,s.variables);if((0,b.A_)(e.from)){var t=s.incomingById.get(e.from.__ref);if(t){var r=u.readField((0,n.__assign)((0,n.__assign)({},e),{from:t.storeObject}),s);if(void 0!==r)return r}}return u.readField(e,s)},p=new Set;this.flattenFields(a,o,s,d).forEach((function(e,r){var n,a=(0,b.ue)(r),s=o[a];if(p.add(r),void 0!==s){var g=u.getStoreFieldName({typename:d,fieldName:r.name.value,field:r,variables:e.variables}),m=pt(c,g),y=t.processFieldValue(s,r,r.selectionSet?dt(e,!1,!1):e,m),v=void 0;r.selectionSet&&((0,b.A_)(y)||Te(y))&&(v=h("__typename",y));var w=u.getMergeFunction(d,r.name.value,v);w?m.info={field:r,typename:d,merge:w}:yt(c,g),l=e.merge(l,((n={})[g]=y,n))}else!1===globalThis.__DEV__||e.clientOnly||e.deferred||f.XY.added(r)||u.getReadFunction(d,r.name.value)||!1!==globalThis.__DEV__&&i.V1.error(12,(0,b.ue)(r),o)}));try{var g=u.identify(o,{typename:d,selectionSet:a,fragmentMap:s.fragmentMap,storeObject:l,readField:h}),m=g[0],y=g[1];r=r||m,y&&(l=s.merge(l,y))}catch(_){if(!r)throw _}if("string"===typeof r){var v=(0,b.WU)(r),w=s.written[r]||(s.written[r]=[]);if(w.indexOf(a)>=0)return v;if(w.push(a),this.reader&&this.reader.isFresh(o,v,a,s))return v;var A=s.incomingById.get(r);return A?(A.storeObject=s.merge(A.storeObject,l),A.mergeTree=gt(A.mergeTree,c),p.forEach((function(e){return A.fieldNodeSet.add(e)}))):s.incomingById.set(r,{storeObject:l,mergeTree:mt(c)?void 0:c,fieldNodeSet:p}),v}return l},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?(0,y.c)(e)?e.map((function(e,o){var a=i.processFieldValue(e,t,r,pt(n,o));return yt(n,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):!1!==globalThis.__DEV__?(0,C.m)(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=(0,b.D$)(t,e,r.fragmentMap));var o=new Map,a=this.cache.policies,s=new Y.b(!1);return function e(c,u){var l=s.lookup(c,u.clientOnly,u.deferred);l.visited||(l.visited=!0,c.selections.forEach((function(s){if((0,d.MS)(s,r.variables)){var c=u.clientOnly,l=u.deferred;if(c&&l||!(0,y.E)(s.directives)||s.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(c=!0),"defer"===t){var n=(0,b.MB)(e,r.variables);n&&!1===n.if||(l=!0)}})),(0,b.dt)(s)){var f=o.get(s);f&&(c=c&&f.clientOnly,l=l&&f.deferred),o.set(s,dt(r,c,l))}else{var h=(0,O.HQ)(s,r.lookupFragment);if(!h&&s.kind===be.b.FRAGMENT_SPREAD)throw(0,i.vA)(13,s.name.value);h&&a.fragmentMatches(h,n,t,r.variables)&&e(h.selectionSet,dt(r,c,l))}}})))}(e,r),o},e.prototype.applyMerges=function(e,t,r,o,a){var s,c=this;if(e.map.size&&!(0,b.A_)(r)){var u,l=(0,y.c)(r)||!(0,b.A_)(t)&&!Te(t)?void 0:t,d=r;l&&!a&&(a=[(0,b.A_)(l)?l.__ref:l]);var f=function(e,t){return(0,y.c)(e)?"number"===typeof t?e[t]:void 0:o.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var r=f(l,t),n=f(d,t);if(void 0!==n){a&&a.push(t);var s=c.applyMerges(e,r,n,o,a);s!==n&&(u=u||new Map).set(t,s),a&&(0,i.V1)(a.pop()===t)}})),u&&(r=(0,y.c)(d)?d.slice(0):(0,n.__assign)({},d),u.forEach((function(e,t){r[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,o,a&&(s=o.store).getStorage.apply(s,a)):r},e}(),ht=[];function pt(e,t){var r=e.map;return r.has(t)||r.set(t,ht.pop()||{map:new Map}),r.get(t)}function gt(e,t){if(e===t||!t||mt(t))return e;if(!e||mt(e))return t;var r=e.info&&t.info?(0,n.__assign)((0,n.__assign)({},e.info),t.info):e.info||t.info,i=e.map.size&&t.map.size,o={info:r,map:i?new Map:e.map.size?e.map:t.map};if(i){var a=new Set(t.map.keys());e.map.forEach((function(e,r){o.map.set(r,gt(e,t.map.get(r))),a.delete(r)})),a.forEach((function(r){o.map.set(r,gt(t.map.get(r),e.map.get(r)))}))}return o}function mt(e){return!e||!(e.info||e.map.size)}function yt(e,t){var r=e.map,n=r.get(t);n&&mt(n)&&(ht.push(n),r.delete(t))}var vt=new Set;var bt=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.addTypenameTransform=new p.c(f.XY),r.assumeImmutableResults=!0,r.makeVar=ue,r.txCount=0,r.config=function(e){return(0,x.o)(Se,e)}(t),r.addTypename=!!r.config.addTypename,r.policies=new st({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return(0,n.__extends)(t,e),t.prototype.init=function(){var e=this.data=new Ne.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new ft(this,this.storeReader=new Ve({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:ke(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=(0,ie.LV)((function(e,r){return t.broadcastWatch(e,r)}),{max:this.config.resultCacheMaxSize||J.v["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if(ze(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,(0,h.M)({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r})).result||null}catch(i){if(i instanceof ve)return null;throw i}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(Ae.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t,r=this;return this.watches.size||se(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){r.watches.delete(e)&&!r.watches.size&&ce(r),r.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){var t;h.M.reset(),Q.y.reset(),this.addTypenameTransform.resetCache(),null===(t=this.config.fragments)||void 0===t||t.resetCaches();var r=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),r},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if((0,b.A_)(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(t){!1!==globalThis.__DEV__&&i.V1.warn(t)}},t.prototype.evict=function(e){if(!e.id){if(Ae.call(e,"id"))return!1;e=(0,n.__assign)((0,n.__assign)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),h.M.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),ce(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,i=e.update,o=e.optimistic,a=void 0===o||o,s=e.removeOptimistic,c=e.onWatchUpdated,u=function(e){var n=r,o=n.data,a=n.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=i(r)}finally{--r.txCount,r.data=o,r.optimisticData=a}},l=new Set;return c&&!this.txCount&&this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"===typeof a?this.optimisticData=this.optimisticData.addLayer(a,u):!1===a?u(this.data):u(),"string"===typeof s&&(this.optimisticData=this.optimisticData.removeLayer(s)),c&&l.size?(this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e,t){var r=c.call(this,e,t);return!1!==r&&l.delete(e),r}})),l.size&&l.forEach((function(e){return r.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){return this.addTypenameToDocument(this.addFragmentsToDocument(e))},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(r){return t.maybeBroadcastWatch(r,e)}))},t.prototype.addFragmentsToDocument=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.addTypenameToDocument=function(e){return this.addTypename?this.addTypenameTransform.transformDocument(e):e},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);t&&(e.optimistic&&"string"===typeof t.optimistic&&(n.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,n,r))||r&&(0,u.L)(r.result,n.result)||e.callback(e.lastDiff=n,r)},t}(ye);!1!==globalThis.__DEV__&&(bt.prototype.getMemoryInternals=he.cM);var wt=o.C.empty,At=o.C.from,_t=o.C.split,Et=o.C.concat,St=r(38598);function kt(e){var t=!1;return new Promise((function(r,n){e.subscribe({next:function(e){t?!1!==globalThis.__DEV__&&i.V1.warn(43):(t=!0,r(e))},error:n})}))}function xt(e){return new _.c((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}var Ct=r(29404),It=r(84651),Tt=r(44696),Ot=r(28882),Pt=new Map,Mt=new Map,Rt=!0,Nt=!1;function Lt(e){return e.replace(/[\s,]+/g," ").trim()}function Bt(e){var t=new Set,r=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,i=Lt((a=e.loc).source.body.substring(a.start,a.end)),o=Mt.get(n);o&&!o.has(i)?Rt&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||Mt.set(n,o=new Set),o.add(i),t.has(i)||(t.add(i),r.push(e))}else r.push(e);var a})),(0,n.__assign)((0,n.__assign)({},e),{definitions:r})}function Dt(e){var t=Lt(e);if(!Pt.has(t)){var r=(0,Ot.qg)(e,{experimentalFragmentVariables:Nt,allowLegacyFragmentVariables:Nt});if(!r||"Document"!==r.kind)throw new Error("Not a valid GraphQL document.");Pt.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(r){var n=e[r];n&&"object"===typeof n&&t.add(n)}))}));var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}(Bt(r)))}return Pt.get(t)}function Ut(e){for(var t=[],r=1;r{"use strict";var n;function i(e){return!!e&&e<7}function o(e){return 7===e||8===e}r.d(t,{D2:()=>o,bi:()=>i,pT:()=>n}),function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(n||(n={}))},37355:(e,t,r)=>{"use strict";r.d(t,{K$:()=>o,K4:()=>c,Mn:()=>s,uR:()=>a});var n=r(37827),i=(r(69055),r(32728)),o=Symbol();function a(e){return!!e.extensions&&Array.isArray(e.extensions[o])}function s(e){return e.hasOwnProperty("graphQLErrors")}var c=function(e){function t(r){var o=r.graphQLErrors,a=r.protocolErrors,s=r.clientErrors,c=r.networkError,u=r.errorMessage,l=r.extraInfo,d=e.call(this,u)||this;return d.name="ApolloError",d.graphQLErrors=o||[],d.protocolErrors=a||[],d.clientErrors=s||[],d.networkError=c||null,d.message=u||function(e){var t=(0,n.__spreadArray)((0,n.__spreadArray)((0,n.__spreadArray)([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map((function(e){return(0,i.U)(e)&&e.message||"Error message not found."})).join("\n")}(d),d.extraInfo=l,d.cause=(0,n.__spreadArray)((0,n.__spreadArray)((0,n.__spreadArray)([c],o||[],!0),a||[],!0),s||[],!0).find((function(e){return!!e}))||null,d.__proto__=t.prototype,d}return(0,n.__extends)(t,e),t}(Error)},84161:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ApolloCache:()=>n.ApolloCache,ApolloClient:()=>n.ApolloClient,ApolloConsumer:()=>u,ApolloError:()=>n.ApolloError,ApolloLink:()=>n.ApolloLink,ApolloProvider:()=>o.X,Cache:()=>n.Cache,DocumentTransform:()=>n.DocumentTransform,DocumentType:()=>w.KG,HttpLink:()=>n.HttpLink,InMemoryCache:()=>n.InMemoryCache,MissingFieldError:()=>n.MissingFieldError,NetworkStatus:()=>n.NetworkStatus,Observable:()=>n.Observable,ObservableQuery:()=>n.ObservableQuery,checkFetcher:()=>n.checkFetcher,concat:()=>n.concat,createHttpLink:()=>n.createHttpLink,createQueryPreloader:()=>Me,createSignalIfSupported:()=>n.createSignalIfSupported,defaultDataIdFromObject:()=>n.defaultDataIdFromObject,defaultPrinter:()=>n.defaultPrinter,disableExperimentalFragmentVariables:()=>n.disableExperimentalFragmentVariables,disableFragmentWarnings:()=>n.disableFragmentWarnings,empty:()=>n.empty,enableExperimentalFragmentVariables:()=>n.enableExperimentalFragmentVariables,execute:()=>n.execute,fallbackHttpConfig:()=>n.fallbackHttpConfig,from:()=>n.from,fromError:()=>n.fromError,fromPromise:()=>n.fromPromise,getApolloContext:()=>c.l,gql:()=>n.gql,isApolloError:()=>n.isApolloError,isNetworkRequestSettled:()=>n.isNetworkRequestSettled,isReference:()=>n.isReference,makeReference:()=>n.makeReference,makeVar:()=>n.makeVar,mergeOptions:()=>n.mergeOptions,operationName:()=>w.Xn,parseAndCheckHttpResponse:()=>n.parseAndCheckHttpResponse,parser:()=>w.K3,resetApolloContext:()=>c.E,resetCaches:()=>n.resetCaches,rewriteURIForGET:()=>n.rewriteURIForGET,selectHttpOptionsAndBody:()=>n.selectHttpOptionsAndBody,selectHttpOptionsAndBodyInternal:()=>n.selectHttpOptionsAndBodyInternal,selectURI:()=>n.selectURI,serializeFetchParameter:()=>n.serializeFetchParameter,setLogVerbosity:()=>n.setLogVerbosity,skipToken:()=>ve,split:()=>n.split,throwServerError:()=>n.throwServerError,toPromise:()=>n.toPromise,useApolloClient:()=>l.m,useBackgroundQuery:()=>Se,useFragment:()=>Z,useLazyQuery:()=>H,useLoadableQuery:()=>Ce,useMutation:()=>V.n,useQuery:()=>T,useQueryRefHandlers:()=>Ie,useReactiveVar:()=>G,useReadQuery:()=>Oe,useSubscription:()=>W,useSuspenseQuery:()=>be});var n=r(61389),i=r(69055),o=r(97837),a=r(73121),s=r.t(a,2),c=r(34949),u=function(e){var t=(0,c.l)();return a.createElement(t.Consumer,null,(function(t){return(0,i.V1)(t&&t.client,45),e.children(t.client)}))},l=r(45039),d=r(37827),f=r(40704),h=r(61707),p=!1,g=s.useSyncExternalStore||function(e,t,r){var n=t();!1===globalThis.__DEV__||p||n===t()||(p=!0,!1!==globalThis.__DEV__&&i.V1.error(60));var o=a.useState({inst:{value:n,getSnapshot:t}}),s=o[0].inst,c=o[1];return h.JR?a.useLayoutEffect((function(){Object.assign(s,{value:n,getSnapshot:t}),m(s)&&c({inst:s})}),[e,n,t]):Object.assign(s,{value:n,getSnapshot:t}),a.useEffect((function(){return m(s)&&c({inst:s}),e((function(){m(s)&&c({inst:s})}))}),[e]),n};function m(e){var t=e.value,r=e.getSnapshot;try{return t!==r()}catch(n){return!0}}var y=r(28453),v=r(37355),b=r(84711),w=r(64803),A=r(33753),_=r(38676),E=r(45901),S=Symbol.for("apollo.hook.wrappers");function k(e,t,r){var n=r.queryManager,i=n&&n[S],o=i&&i[e];return o?o(t):t}var x=Object.prototype.hasOwnProperty;function C(){}var I=Symbol();function T(e,t){return void 0===t&&(t=Object.create(null)),k("useQuery",O,(0,l.m)(t&&t.client))(e,t)}function O(e,t){var r=P(e,t),n=r.result,i=r.obsQueryFields;return a.useMemo((function(){return(0,d.__assign)((0,d.__assign)({},n),i)}),[n,i])}function P(e,t){var r=(0,l.m)(t.client),n=a.useContext((0,c.l)()).renderPromises,i=!!n,o=r.disableNetworkFetches,s=!1!==t.ssr&&!t.skip,u=t.partialRefetch,f=M(r,e,t,i),h=function(e,t,r,n,i){function o(o){var a;return(0,w.D$)(t,w.KG.Query),{client:e,query:t,observable:n&&n.getSSRObservable(i())||e.watchQuery(R(void 0,e,r,i())),resultData:{previousData:null===(a=null===o||void 0===o?void 0:o.resultData.current)||void 0===a?void 0:a.data}}}var s=a.useState(o),c=s[0],u=s[1];function l(e){var t,r;Object.assign(c.observable,((t={})[I]=e,t));var n=c.resultData;u((0,d.__assign)((0,d.__assign)({},c),{query:e.query,resultData:Object.assign(n,{previousData:(null===(r=n.current)||void 0===r?void 0:r.data)||n.previousData,current:void 0})}))}if(e!==c.client||t!==c.query){var f=o(c);return u(f),[f,l]}return[c,l]}(r,e,t,n,f),p=h[0],m=p.observable,v=p.resultData,A=h[1],_=f(m);!function(e,t,r,n,i){var o;t[I]&&!(0,y.L)(t[I],i)&&(t.reobserve(R(t,r,n,i)),e.previousData=(null===(o=e.current)||void 0===o?void 0:o.data)||e.previousData,e.current=void 0);t[I]=i}(v,m,r,t,_);var E=a.useMemo((function(){return function(e){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}(m)}),[m]);!function(e,t,r){t&&r&&(t.registerSSRObservable(e),e.getCurrentResult().loading&&t.addObservableQueryPromise(e))}(m,n,s);var S=function(e,t,r,n,i,o,s,c,u){var l=a.useRef(u);a.useEffect((function(){l.current=u}));var d=!c&&!o||!1!==n.ssr||n.skip?n.skip||"standby"===i.fetchPolicy?F:void 0:j,f=e.previousData,h=a.useMemo((function(){return d&&U(d,f,t,r)}),[r,t,d,f]);return g(a.useCallback((function(n){if(c)return function(){};var i=function(){var i=e.current,o=t.getCurrentResult();i&&i.loading===o.loading&&i.networkStatus===o.networkStatus&&(0,y.L)(i.data,o.data)||N(o,e,t,r,s,n,l.current)},o=function(c){if(a.current.unsubscribe(),a.current=t.resubscribeAfterError(i,o),!x.call(c,"graphQLErrors"))throw c;var u=e.current;(!u||u&&u.loading||!(0,y.L)(c,u.error))&&N({data:u&&u.data,error:c,loading:!1,networkStatus:b.pT.error},e,t,r,s,n,l.current)},a={current:t.subscribe(i,o)};return function(){setTimeout((function(){return a.current.unsubscribe()}))}}),[o,c,t,e,s,r]),(function(){return h||L(e,t,l.current,s,r)}),(function(){return h||L(e,t,l.current,s,r)}))}(v,m,r,t,_,o,u,i,{onCompleted:t.onCompleted||C,onError:t.onError||C});return{result:S,obsQueryFields:E,observable:m,resultData:v,client:r,onQueryExecuted:A}}function M(e,t,r,n){void 0===r&&(r={});var i=r.skip,o=(r.ssr,r.onCompleted,r.onError,r.defaultOptions),a=(0,d.__rest)(r,["skip","ssr","onCompleted","onError","defaultOptions"]);return function(r){var s=Object.assign(a,{query:t});return!n||"network-only"!==s.fetchPolicy&&"cache-and-network"!==s.fetchPolicy||(s.fetchPolicy="cache-first"),s.variables||(s.variables={}),i?(s.initialFetchPolicy=s.initialFetchPolicy||s.fetchPolicy||B(o,e.defaultOptions),s.fetchPolicy="standby"):s.fetchPolicy||(s.fetchPolicy=(null===r||void 0===r?void 0:r.options.initialFetchPolicy)||B(o,e.defaultOptions)),s}}function R(e,t,r,n){var i=[],o=t.defaultOptions.watchQuery;return o&&i.push(o),r.defaultOptions&&i.push(r.defaultOptions),i.push((0,A.o)(e&&e.options,n)),i.reduce(f.l)}function N(e,t,r,n,o,a,s){var c=t.current;c&&c.data&&(t.previousData=c.data),!e.error&&(0,_.E)(e.errors)&&(e.error=new v.K4({graphQLErrors:e.errors})),t.current=U(function(e,t,r){if(e.partial&&r&&!e.loading&&(!e.data||0===Object.keys(e.data).length)&&"cache-only"!==t.options.fetchPolicy)return t.refetch(),(0,d.__assign)((0,d.__assign)({},e),{loading:!0,networkStatus:b.pT.refetch});return e}(e,r,o),t.previousData,r,n),a(),function(e,t,r){if(!e.loading){var n=D(e);Promise.resolve().then((function(){n?r.onError(n):e.data&&t!==e.networkStatus&&e.networkStatus===b.pT.ready&&r.onCompleted(e.data)})).catch((function(e){!1!==globalThis.__DEV__&&i.V1.warn(e)}))}}(e,null===c||void 0===c?void 0:c.networkStatus,s)}function L(e,t,r,n,i){return e.current||N(t.getCurrentResult(),e,t,i,n,(function(){}),r),e.current}function B(e,t){var r;return(null===e||void 0===e?void 0:e.fetchPolicy)||(null===(r=null===t||void 0===t?void 0:t.watchQuery)||void 0===r?void 0:r.fetchPolicy)||"cache-first"}function D(e){return(0,_.E)(e.errors)?new v.K4({graphQLErrors:e.errors}):e.error}function U(e,t,r,n){var i=e.data,o=(e.partial,(0,d.__rest)(e,["data","partial"]));return(0,d.__assign)((0,d.__assign)({data:i},o),{client:n,observable:r,variables:r.variables,called:e!==j&&e!==F,previousData:t})}var j=(0,E.G)({loading:!0,data:void 0,error:void 0,networkStatus:b.pT.loading}),F=(0,E.G)({loading:!1,data:void 0,error:void 0,networkStatus:b.pT.ready});var z=r(74477),q=["refetch","reobserve","fetchMore","updateQuery","startPolling","stopPolling","subscribeToMore"];function H(e,t){var r,n=a.useRef(),i=a.useRef(),o=a.useRef(),s=(0,f.l)(t,n.current||{}),c=null!==(r=null===s||void 0===s?void 0:s.query)&&void 0!==r?r:e;i.current=t,o.current=c;var u=(0,d.__assign)((0,d.__assign)({},s),{skip:!n.current}),l=P(c,u),h=l.obsQueryFields,p=l.result,g=l.client,m=l.resultData,y=l.observable,v=l.onQueryExecuted,b=y.options.initialFetchPolicy||B(u.defaultOptions,g.defaultOptions),w=a.useReducer((function(e){return e+1}),0)[1],A=a.useMemo((function(){for(var e={},t=function(t){var r=h[t];e[t]=function(){return n.current||(n.current=Object.create(null),w()),r.apply(this,arguments)}},r=0,i=q;r{"use strict";r.r(t),r.d(t,{setContext:()=>a});var n=r(37827),i=r(7771),o=r(81609);function a(e){return new i.C((function(t,r){var i=(0,n.__rest)(t,[]);return new o.c((function(n){var o,a=!1;return Promise.resolve(i).then((function(r){return e(r,t.getContext())})).then(t.setContext).then((function(){a||(o=r(t).subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)}))})).catch(n.error.bind(n)),function(){a=!0,o&&o.unsubscribe()}}))}))}},7771:(e,t,r)=>{"use strict";r.d(t,{C:()=>l});var n=r(69055),i=r(81609),o=r(37827);var a=r(17128);function s(e,t){return t?t(e):i.c.of()}function c(e){return"function"===typeof e?new l(e):e}function u(e){return e.request.length<=1}var l=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return i.c.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(c).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,r,n){var o,a=c(r),l=c(n||new e(s));return o=u(a)&&u(l)?new e((function(e){return t(e)?a.request(e)||i.c.of():l.request(e)||i.c.of()})):new e((function(e,r){return t(e)?a.request(e,r)||i.c.of():l.request(e,r)||i.c.of()})),Object.assign(o,{left:a,right:l})},e.execute=function(e,t){return e.request(function(e,t){var r=(0,o.__assign)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r="function"===typeof e?(0,o.__assign)((0,o.__assign)({},r),e(r)):(0,o.__assign)((0,o.__assign)({},r),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,o.__assign)({},r)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!==typeof t.query?(0,a.n4)(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,i=Object.keys(e);r{"use strict";r.r(t),r.d(t,{ErrorLink:()=>s,onError:()=>a});var n=r(37827),i=r(81609),o=r(7771);function a(e){return new o.C((function(t,r){return new i.c((function(n){var i,o,a;try{i=r(t).subscribe({next:function(i){i.errors&&(a=e({graphQLErrors:i.errors,response:i,operation:t,forward:r}))?o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)}):n.next(i)},error:function(i){(a=e({operation:t,networkError:i,graphQLErrors:i&&i.result&&i.result.errors||void 0,forward:r}))?o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)}):n.error(i)},complete:function(){a||n.complete.bind(n)()}})}catch(s){e({networkError:s,operation:t,forward:r}),n.error(s)}return function(){i&&i.unsubscribe(),o&&i.unsubscribe()}}))}))}var s=function(e){function t(t){var r=e.call(this)||this;return r.link=a(t),r}return(0,n.__extends)(t,e),t.prototype.request=function(e,t){return this.link.request(e,t)},t}(o.C)},25113:(e,t,r)=>{"use strict";r.d(t,{P:()=>a});var n=r(37827),i=r(7771),o=r(44790),a=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,(0,o.$)(t).request)||this;return r.options=t,r}return(0,n.__extends)(t,e),t}(i.C)},32446:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});var n=r(69055),i=function(e){if(!e&&"undefined"===typeof fetch)throw(0,n.vA)(38)}},44790:(e,t,r)=>{"use strict";r.d(t,{$:()=>b});var n=r(37827),i=r(69055),o=r(7771),a=r(62210),s=r(81609),c=r(3928),u=r(12695),l=r(42422),d=r(32446),f=r(13314),h=r(40794),p=r(29404),g=r(78449);var m=r(70446),y=r(17128),v=(0,i.no)((function(){return fetch})),b=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,b=e.fetch,w=e.print,A=void 0===w?f.i1:w,_=e.includeExtensions,E=e.preserveHeaderCase,S=e.useGETForQueries,k=e.includeUnusedVariables,x=void 0!==k&&k,C=(0,n.__rest)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);!1!==globalThis.__DEV__&&(0,d.S)(b||v);var I={http:{includeExtensions:_,preserveHeaderCase:E},options:C.fetchOptions,credentials:C.credentials,headers:C.headers};return new o.C((function(e){var t=(0,u.z)(e,r),o=e.getContext(),d={};if(o.clientAwareness){var w=o.clientAwareness,_=w.name,E=w.version;_&&(d["apollographql-client-name"]=_),E&&(d["apollographql-client-version"]=E)}var k=(0,n.__assign)((0,n.__assign)({},d),o.headers),C={http:o.http,options:o.fetchOptions,credentials:o.credentials,headers:k};if((0,a.d8)(["client"],e.query)){var T=(0,m.er)(e.query);if(!T)return(0,p.N)(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));e.query=T}var O,P=(0,f.HY)(e,A,f.R4,I,C),M=P.options,R=P.body;R.variables&&!x&&(R.variables=function(e,t){var r=(0,n.__assign)({},e),i=new Set(Object.keys(e));return(0,g.YR)(t,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&i.delete(e.name.value)}}),i.forEach((function(e){delete r[e]})),r}(R.variables,e.query)),M.signal||"undefined"===typeof AbortController||(O=new AbortController,M.signal=O.signal);var N,L="OperationDefinition"===(N=(0,y.Vn)(e.query)).kind&&"subscription"===N.operation,B=(0,a.d8)(["defer"],e.query);if(S&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(M.method="GET"),B||L){M.headers=M.headers||{};var D="multipart/mixed;";L&&B&&!1!==globalThis.__DEV__&&i.V1.warn(39),L?D+="boundary=graphql;subscriptionSpec=1.0,application/json":B&&(D+="deferSpec=20220824,application/json"),M.headers.accept=D}if("GET"===M.method){var U=(0,h.E)(t,R),j=U.newURI,F=U.parseError;if(F)return(0,p.N)(F);t=j}else try{M.body=(0,c.Y)(R,"Payload")}catch(F){return(0,p.N)(F)}return new s.c((function(r){var n=b||(0,i.no)((function(){return fetch}))||v,o=r.next.bind(r);return n(t,M).then((function(t){var r;e.setContext({response:t});var n=null===(r=t.headers)||void 0===r?void 0:r.get("content-type");return null!==n&&/^multipart\/mixed/i.test(n)?(0,l.tD)(t,o):(0,l.OQ)(e)(t).then(o)})).then((function(){O=void 0,r.complete()})).catch((function(e){O=void 0,(0,l.H4)(e,r)})),function(){O&&O.abort()}}))}))}},38598:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HttpLink:()=>l.P,checkFetcher:()=>a.S,createHttpLink:()=>u.$,createSignalIfSupported:()=>s,defaultPrinter:()=>o.i1,fallbackHttpConfig:()=>o.R4,parseAndCheckHttpResponse:()=>n.OQ,rewriteURIForGET:()=>d.E,selectHttpOptionsAndBody:()=>o.Wz,selectHttpOptionsAndBodyInternal:()=>o.HY,selectURI:()=>c.z,serializeFetchParameter:()=>i.Y});r(69055);var n=r(42422),i=r(3928),o=r(13314),a=r(32446),s=function(){if("undefined"===typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}},c=r(12695),u=r(44790),l=r(25113),d=r(40794)},42422:(e,t,r)=>{"use strict";r.d(t,{H4:()=>g,OQ:()=>m,tD:()=>f});var n=r(37827),i=r(61707);function o(e){var t=null,r=null,n=!1,o=[],a=[];function s(e){if(!r){if(a.length){var t=a.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}o.push(e)}}function c(e){r=e,a.slice().forEach((function(t){t[1](e)})),!t||t()}function u(){n=!0,a.slice().forEach((function(e){e[0]({value:void 0,done:!0})})),!t||t()}t=function(){t=null,e.removeListener("data",s),e.removeListener("error",c),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",s),e.on("error",c),e.on("end",u),e.on("finish",u),e.on("close",u);var l={next:function(){return new Promise((function(e,t){return r?t(r):o.length?e({value:o.shift(),done:!1}):n?e({value:void 0,done:!0}):void a.push([e,t])}))}};return i.uJ&&(l[Symbol.asyncIterator]=function(){return this}),l}function a(e){var t={next:function(){return e.read()}};return i.uJ&&(t[Symbol.asyncIterator]=function(){return this}),t}function s(e){var t=e;if(e.body&&(t=e.body),function(e){return!(!i.uJ||!e[Symbol.asyncIterator])}(t))return function(e){var t,r=e[Symbol.asyncIterator]();return(t={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},t}(t);if(function(e){return!!e.getReader}(t))return a(t.getReader());if(function(e){return!!e.stream}(t))return a(t.stream().getReader());if(function(e){return!!e.arrayBuffer}(t))return function(e){var t=!1,r={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise((function(t,r){e.then((function(e){t({value:e,done:!1})})).catch(r)})))}};return i.uJ&&(r[Symbol.asyncIterator]=function(){return this}),r}(t.arrayBuffer());if(function(e){return!!e.pipe}(t))return o(t);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var c=r(84651),u=r(37355),l=r(41237),d=Object.prototype.hasOwnProperty;function f(e,t){return(0,n.__awaiter)(this,void 0,void 0,(function(){var r,i,o,a,c,d,f,g,m,y,v,b,w,A,_,E,S,k,x,C,I,T,O,P;return(0,n.__generator)(this,(function(M){switch(M.label){case 0:if(void 0===TextDecoder)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");r=new TextDecoder("utf-8"),i=null===(P=e.headers)||void 0===P?void 0:P.get("content-type"),o="boundary=",a=(null===i||void 0===i?void 0:i.includes(o))?null===i||void 0===i?void 0:i.substring((null===i||void 0===i?void 0:i.indexOf(o))+9).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",c="\r\n--".concat(a),d="",f=s(e),g=!0,M.label=1;case 1:return g?[4,f.next()]:[3,3];case 2:for(m=M.sent(),y=m.value,v=m.done,b="string"===typeof y?y:r.decode(y),w=d.length-c.length+1,g=!v,A=(d+=b).indexOf(c,w);A>-1;){if(_=void 0,T=[d.slice(0,A),d.slice(A+c.length)],d=T[1],E=(_=T[0]).indexOf("\r\n\r\n"),S=h(_.slice(0,E)),(k=S["content-type"])&&-1===k.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");if(x=_.slice(E))if(C=p(e,x),Object.keys(C).length>1||"data"in C||"incremental"in C||"errors"in C||"payload"in C)if((0,l.Nw)(C)){if(I={},"payload"in C){if(1===Object.keys(C).length&&null===C.payload)return[2];I=(0,n.__assign)({},C.payload)}"errors"in C&&(I=(0,n.__assign)((0,n.__assign)({},I),{extensions:(0,n.__assign)((0,n.__assign)({},"extensions"in I?I.extensions:null),(O={},O[u.K$]=C.errors,O))})),t(I)}else t(C);else if(1===Object.keys(C).length&&"hasNext"in C&&!C.hasNext)return[2];A=d.indexOf(c)}return[3,1];case 3:return[2]}}))}))}function h(e){var t={};return e.split("\n").forEach((function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}})),t}function p(e,t){if(e.status>=300){(0,c.A)(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status))}try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function g(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function m(e){return function(t){return t.text().then((function(e){return p(t,e)})).then((function(r){return Array.isArray(r)||d.call(r,"data")||d.call(r,"errors")||(0,c.A)(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),r}))}}},40794:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(3928);function i(e,t){var r=[],i=function(e,t){r.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&i("query",t.query),t.operationName&&i("operationName",t.operationName),t.variables){var o=void 0;try{o=(0,n.Y)(t.variables,"Variables map")}catch(d){return{parseError:d}}i("variables",o)}if(t.extensions){var a=void 0;try{a=(0,n.Y)(t.extensions,"Extensions map")}catch(d){return{parseError:d}}i("extensions",a)}var s="",c=e,u=e.indexOf("#");-1!==u&&(s=e.substr(u),c=e.substr(0,u));var l=-1===c.indexOf("?")?"?":"&";return{newURI:c+l+r.join("&")+s}}},13314:(e,t,r)=>{"use strict";r.d(t,{HY:()=>c,R4:()=>o,Wz:()=>s,i1:()=>a});var n=r(37827),i=r(67733),o={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},a=function(e,t){return t(e)};function s(e,t){for(var r=[],i=2;i{"use strict";r.d(t,{z:()=>n});var n=function(e,t){var r=e.getContext().uri;return r||("function"===typeof t?t(e):t||"/graphql")}},3928:(e,t,r)=>{"use strict";r.d(t,{Y:()=>i});var n=r(69055),i=function(e,t){var r;try{r=JSON.stringify(e)}catch(o){var i=(0,n.vA)(40,t,o.message);throw i.parseError=o,i}return r}},4909:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GraphQLWsLink:()=>u});var n=r(37827),i=r(67733),o=r(7771),a=r(32728),s=r(81609),c=r(37355);var u=function(e){function t(t){var r=e.call(this)||this;return r.client=t,r}return(0,n.__extends)(t,e),t.prototype.request=function(e){var t=this;return new s.c((function(r){return t.client.subscribe((0,n.__assign)((0,n.__assign)({},e),{query:(0,i.y)(e.query)}),{next:r.next.bind(r),complete:r.complete.bind(r),error:function(e){if(e instanceof Error)return r.error(e);var t,n=(t=e,(0,a.U)(t)&&"code"in t&&"reason"in t);return n||function(e){var t;return(0,a.U)(e)&&(null===(t=e.target)||void 0===t?void 0:t.readyState)===WebSocket.CLOSED}(e)?r.error(new Error("Socket closed".concat(n?" with event ".concat(e.code):"").concat(n?" ".concat(e.reason):""))):r.error(new c.K4({graphQLErrors:Array.isArray(e)?e:[e]}))}})}))},t}(o.C)},29404:(e,t,r)=>{"use strict";r.d(t,{N:()=>i});var n=r(81609);function i(e){return new n.c((function(t){t.error(e)}))}},84651:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var n=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n}},34949:(e,t,r)=>{"use strict";var n;r.d(t,{E:()=>u,l:()=>c});var i=r(73121),o=r(61707),a=r(69055),s=o.ol?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function c(){(0,a.V1)("createContext"in(n||(n=r.t(i,2))),46);var e=i.createContext[s];return e||(Object.defineProperty(i.createContext,s,{value:e=i.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}var u=c},97837:(e,t,r)=>{"use strict";r.d(t,{X:()=>s});var n=r(37827),i=r(69055),o=r(73121),a=r(34949),s=function(e){var t=e.client,r=e.children,s=(0,a.l)(),c=o.useContext(s),u=o.useMemo((function(){return(0,n.__assign)((0,n.__assign)({},c),{client:t||c.client})}),[c,t]);return(0,i.V1)(u.client,47),o.createElement(s.Provider,{value:u},r)}},74477:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(73121),i=r(61707).Sw?n.useLayoutEffect:n.useEffect},45039:(e,t,r)=>{"use strict";r.d(t,{m:()=>a});var n=r(69055),i=r(73121),o=r(34949);function a(e){var t=i.useContext((0,o.l)()),r=e||t.client;return(0,n.V1)(!!r,50),r}},37740:(e,t,r)=>{"use strict";r.d(t,{n:()=>d});var n=r(37827),i=r(73121),o=r(40704),a=r(28453),s=r(64803),c=r(37355),u=r(45039),l=r(74477);function d(e,t){var r=(0,u.m)(null===t||void 0===t?void 0:t.client);(0,s.D$)(e,s.KG.Mutation);var d=i.useState({called:!1,loading:!1,client:r}),f=d[0],h=d[1],p=i.useRef({result:f,mutationId:0,isMounted:!0,client:r,mutation:e,options:t});(0,l.E)((function(){Object.assign(p.current,{client:r,options:t,mutation:e})}));var g=i.useCallback((function(e){void 0===e&&(e={});var t=p.current,r=t.options,i=t.mutation,s=(0,n.__assign)((0,n.__assign)({},r),{mutation:i}),u=e.client||p.current.client;p.current.result.loading||s.ignoreResults||!p.current.isMounted||h(p.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:u});var l=++p.current.mutationId,d=(0,o.l)(s,e);return u.mutate(d).then((function(t){var r,n,i=t.data,o=t.errors,s=o&&o.length>0?new c.K4({graphQLErrors:o}):void 0,f=e.onError||(null===(r=p.current.options)||void 0===r?void 0:r.onError);if(s&&f&&f(s,d),l===p.current.mutationId&&!d.ignoreResults){var g={called:!0,loading:!1,data:i,error:s,client:u};p.current.isMounted&&!(0,a.L)(p.current.result,g)&&h(p.current.result=g)}var m=e.onCompleted||(null===(n=p.current.options)||void 0===n?void 0:n.onCompleted);return s||null===m||void 0===m||m(t.data,d),t})).catch((function(t){var r;if(l===p.current.mutationId&&p.current.isMounted){var n={loading:!1,error:t,data:void 0,called:!0,client:u};(0,a.L)(p.current.result,n)||h(p.current.result=n)}var i=e.onError||(null===(r=p.current.options)||void 0===r?void 0:r.onError);if(i)return i(t,d),{data:void 0,errors:t};throw t}))}),[]),m=i.useCallback((function(){if(p.current.isMounted){var e={called:!1,loading:!1,client:p.current.client};Object.assign(p.current,{mutationId:0,result:e}),h(e)}}),[]);return i.useEffect((function(){var e=p.current;return e.isMounted=!0,function(){e.isMounted=!1}}),[]),[g,(0,n.__assign)({reset:m},f)]}},64803:(e,t,r)=>{"use strict";r.d(t,{D$:()=>d,K3:()=>l,KG:()=>n,Xn:()=>u});var n,i,o=r(69055),a=r(50983),s=r(60108),c=r(18363);function u(e){var t;switch(e){case n.Query:t="Query";break;case n.Mutation:t="Mutation";break;case n.Subscription:t="Subscription"}return t}function l(e){i||(i=new a.A(s.v.parser||1e3));var t,r,c=i.get(e);if(c)return c;(0,o.V1)(!!e&&!!e.kind,62,e);for(var u=[],l=[],d=[],f=[],h=0,p=e.definitions;h{"use strict";r.d(t,{A:()=>s,V:()=>c});var n=r(59248),i=r(53191),o=new WeakSet;function a(e){e.size<=(e.max||-1)||o.has(e)||(o.add(e),setTimeout((function(){e.clean(),o.delete(e)}),100))}var s=function(e,t){var r=new n.l(e,t);return r.set=function(e,t){var r=n.l.prototype.set.call(this,e,t);return a(this),r},r},c=function(e,t){var r=new i.C(e,t);return r.set=function(e,t){var r=i.C.prototype.set.call(this,e,t);return a(this),r},r}},18363:(e,t,r)=>{"use strict";r.d(t,{D_:()=>a,cM:()=>c,ep:()=>s,tQ:()=>u});var n=r(37827),i=r(60108),o={};function a(e,t){o[e]=t}var s=!1!==globalThis.__DEV__?function(){var e,t,r,i,a;if(!1===globalThis.__DEV__)throw new Error("only supported in development mode");return{limits:l(),sizes:(0,n.__assign)({print:null===(e=o.print)||void 0===e?void 0:e.call(o),parser:null===(t=o.parser)||void 0===t?void 0:t.call(o),canonicalStringify:null===(r=o.canonicalStringify)||void 0===r?void 0:r.call(o),links:m(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:p(this.queryManager.documentTransform)}},null===(a=(i=this.cache).getMemoryInternals)||void 0===a?void 0:a.call(i))}}:void 0,c=!1!==globalThis.__DEV__?function(){var e=this.config.fragments;return(0,n.__assign)((0,n.__assign)({},d.apply(this)),{addTypenameDocumentTransform:p(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:f(this.storeReader.executeSelectionSet),executeSubSelectedArray:f(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:f(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:f(null===e||void 0===e?void 0:e.findFragmentSpreads),lookup:f(null===e||void 0===e?void 0:e.lookup),transform:f(null===e||void 0===e?void 0:e.transform)}})}:void 0,u=!1!==globalThis.__DEV__?d:void 0;function l(){return Object.fromEntries(Object.entries({parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4}).map((function(e){var t=e[0],r=e[1];return[t,i.v[t]||r]})))}function d(){return{cache:{fragmentQueryDocuments:f(this.getFragmentDoc)}}}function f(e){return function(e){return!!e&&"dirtyKey"in e}(e)?e.size:void 0}function h(e){return null!=e}function p(e){return g(e).map((function(e){return{cache:e}}))}function g(e){return e?(0,n.__spreadArray)((0,n.__spreadArray)([f(null===e||void 0===e?void 0:e.performWork)],g(null===e||void 0===e?void 0:e.left),!0),g(null===e||void 0===e?void 0:e.right),!0).filter(h):[]}function m(e){var t;return e?(0,n.__spreadArray)((0,n.__spreadArray)([null===(t=null===e||void 0===e?void 0:e.getMemoryInternals)||void 0===t?void 0:t.call(e)],m(null===e||void 0===e?void 0:e.left),!0),m(null===e||void 0===e?void 0:e.right),!0).filter(h):[]}},60108:(e,t,r)=>{"use strict";r.d(t,{v:()=>a});var n=r(37827),i=r(69055),o=Symbol.for("apollo.cacheSize"),a=(0,n.__assign)({},i.Sf[o])},38676:(e,t,r)=>{"use strict";r.d(t,{E:()=>i,c:()=>n});var n=Array.isArray;function i(e){return Array.isArray(e)&&e.length>0}},61707:(e,t,r)=>{"use strict";r.d(t,{En:()=>a,JR:()=>d,Sw:()=>u,et:()=>o,ol:()=>s,uJ:()=>c});var n=r(69055),i="ReactNative"==(0,n.no)((function(){return navigator.product})),o="function"===typeof WeakMap&&!(i&&!global.HermesInternal),a="function"===typeof WeakSet,s="function"===typeof Symbol&&"function"===typeof Symbol.for,c=s&&Symbol.asyncIterator,u="function"===typeof(0,n.no)((function(){return window.document.createElement})),l=(0,n.no)((function(){return navigator.userAgent.indexOf("jsdom")>=0}))||!1,d=(u||i)&&!l},68765:(e,t,r)=>{"use strict";r.d(t,{M:()=>s});var n,i=r(50983),o=r(60108),a=r(18363),s=Object.assign((function(e){return JSON.stringify(e,c)}),{reset:function(){n=new i.V(o.v.canonicalStringify||1e3)}});function c(e,t){if(t&&"object"===typeof t){var r=Object.getPrototypeOf(t);if(r===Object.prototype||null===r){var i=Object.keys(t);if(i.every(u))return t;var o=JSON.stringify(i),a=n.get(o);if(!a){i.sort();var s=JSON.stringify(i);a=n.get(s)||i,n.set(o,a),n.set(s,a)}var c=Object.create(r);return a.forEach((function(e){c[e]=t[e]})),c}}return t}function u(e,t,r){return 0===t||r[t-1]<=e}!1!==globalThis.__DEV__&&(0,a.D_)("canonicalStringify",(function(){return n.size})),s.reset()},38359:(e,t,r)=>{"use strict";r.d(t,{m:()=>i});var n=Object.prototype.toString;function i(e){return o(e)}function o(e,t){switch(n.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach((function(e,n){r[n]=o(e,t)})),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var i=Object.create(Object.getPrototypeOf(e));return t.set(e,i),Object.keys(e).forEach((function(r){i[r]=o(e[r],t)})),i;default:return e}}},33753:(e,t,r)=>{"use strict";function n(){for(var e=[],t=0;tn})},72543:(e,t,r)=>{"use strict";r.d(t,{M:()=>a,t:()=>o});var n=r(38676),i=r(41237);function o(e){var t=a(e);return(0,n.E)(t)}function a(e){var t=(0,n.E)(e.errors)?e.errors.slice(0):[];return(0,i.ST)(e)&&(0,n.E)(e.incremental)&&e.incremental.forEach((function(e){e.errors&&t.push.apply(t,e.errors)})),t}},41237:(e,t,r)=>{"use strict";r.d(t,{EQ:()=>s,Nw:()=>u,ST:()=>a,YX:()=>c,bd:()=>l});var n=r(32728),i=r(38676),o=r(50090);function a(e){return"incremental"in e}function s(e){return"hasNext"in e&&"data"in e}function c(e){return a(e)||s(e)}function u(e){return(0,n.U)(e)&&"payload"in e}function l(e,t){var r=e,n=new o.ZI;return a(t)&&(0,i.E)(t.incremental)&&t.incremental.forEach((function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var a=i[o],s=!isNaN(+a)?[]:{};s[a]=t,t=s}r=n.merge(r,t)})),r}},28426:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=new Map;function i(e){var t=n.get(e)||1;return n.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}},45901:(e,t,r)=>{"use strict";r.d(t,{G:()=>o});var n=r(32728);function i(e){var t=new Set([e]);return t.forEach((function(e){(0,n.U)(e)&&function(e){if(!1!==globalThis.__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(r){(0,n.U)(e[r])&&t.add(e[r])}))})),e}function o(e){return!1!==globalThis.__DEV__&&i(e),e}},50090:(e,t,r)=>{"use strict";r.d(t,{D9:()=>a,IM:()=>s,ZI:()=>u});var n=r(37827),i=r(32728),o=Object.prototype.hasOwnProperty;function a(){for(var e=[],t=0;t1)for(var n=new u,i=1;i{"use strict";r.d(t,{l:()=>o});var n=r(37827),i=r(33753);function o(e,t){return(0,i.o)(e,t,t.variables&&{variables:(0,i.o)((0,n.__assign)((0,n.__assign)({},e&&e.variables),t.variables))})}},32728:(e,t,r)=>{"use strict";function n(e){return null!==e&&"object"===typeof e}function i(e){return null!==e&&"object"===typeof e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}r.d(t,{Q:()=>i,U:()=>n})},8450:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var n=r(28426);function i(e,t){void 0===t&&(t=0);var r=(0,n.v)("stringifyForDisplay");return JSON.stringify(e,(function(e,t){return void 0===t?r:t}),t).split(JSON.stringify(r)).join("")}},42848:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(82775);const i=(0,n.n)((function(){return globalThis}))||(0,n.n)((function(){return window}))||(0,n.n)((function(){return self}))||(0,n.n)((function(){return global}))||(0,n.n)((function(){return n.n.constructor("return this")()}))},69055:(e,t,r)=>{"use strict";r.d(t,{IJ:()=>a,Sf:()=>o.A,V1:()=>n.V1,no:()=>i.n,vA:()=>n.vA});var n=r(23603),i=r(82775),o=r(42848),a=!1!==globalThis.__DEV__},23603:(e,t,r)=>{"use strict";r.d(t,{V1:()=>c,vA:()=>u});var n=r(44696),i=r(17107),o=r(42848),a=r(8450);function s(e){return function(t){for(var r=[],n=1;n"}}function f(e,t){if(void 0===t&&(t=[]),e)return o.A[l]&&o.A[l](e,t.map(d))}function h(e,t){if(void 0===t&&(t=[]),e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:i.r,message:e,args:t.map(d)})))}},82775:(e,t,r)=>{"use strict";function n(e){try{return e()}catch(t){}}r.d(t,{n:()=>n})},61337:(e,t,r)=>{"use strict";r.d(t,{c:()=>d});var n=r(66581),i=r(61707),o=r(17128),a=r(69055),s=r(59248),c=r(18684),u=r(60108);function l(e){return e}var d=function(){function e(e,t){void 0===t&&(t=Object.create(null)),this.resultCache=i.En?new WeakSet:new Set,this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=!1!==t.cache,this.resetCache()}return e.prototype.getCacheKey=function(e){return[e]},e.identity=function(){return new e(l,{cache:!1})},e.split=function(t,r,n){return void 0===n&&(n=e.identity()),Object.assign(new e((function(e){return(t(e)?r:n).transformDocument(e)}),{cache:!1}),{left:r,right:n})},e.prototype.resetCache=function(){var t=this;if(this.cached){var r=new n.b(i.et);this.performWork=(0,c.LV)(e.prototype.performWork.bind(this),{makeCacheKey:function(e){var n=t.getCacheKey(e);if(n)return(0,a.V1)(Array.isArray(n),69),r.lookupArray(n)},max:u.v["documentTransform.cache"],cache:s.l})}},e.prototype.performWork=function(e){return(0,o.sw)(e),this.transform(e)},e.prototype.transformDocument=function(e){if(this.resultCache.has(e))return e;var t=this.performWork(e);return this.resultCache.add(t),t},e.prototype.concat=function(t){var r=this;return Object.assign(new e((function(e){return t.transformDocument(r.transformDocument(e))}),{cache:!1}),{left:this,right:t})},e}()},62210:(e,t,r)=>{"use strict";r.d(t,{I5:()=>c,MS:()=>o,d8:()=>u,f2:()=>l,hE:()=>s,sx:()=>a,tY:()=>d});var n=r(69055),i=r(78449);function o(e,t){var r=e.directives;return!r||!r.length||d(r).every((function(e){var r=e.directive,i=e.ifArgument,o=!1;return"Variable"===i.value.kind?(o=t&&t[i.value.name.value],(0,n.V1)(void 0!==o,70,r.name.value)):o=i.value.value,"skip"===r.name.value?!o:o}))}function a(e){var t=[];return(0,i.YR)(e,{Directive:function(e){t.push(e.name.value)}}),t}var s=function(e,t){return u(e,t,!1)},c=function(e,t){return u(e,t,!0)};function u(e,t,r){var n=new Set(e),o=n.size;return(0,i.YR)(t,{Directive:function(e){if(n.delete(e.name.value)&&(!r||!n.size))return i.sP}}),r?!n.size:n.size{"use strict";r.d(t,{HQ:()=>s,JG:()=>a,ct:()=>o});var n=r(37827),i=r(69055);function o(e,t){var r=t,o=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw(0,i.vA)(74,e.operation,e.name?" named '".concat(e.name.value,"'"):"");"FragmentDefinition"===e.kind&&o.push(e)})),"undefined"===typeof r&&((0,i.V1)(1===o.length,75,o.length),r=o[0].name.value),(0,n.__assign)((0,n.__assign)({},e),{definitions:(0,n.__spreadArray)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)})}function a(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function s(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=e.name.value;if("function"===typeof t)return t(r);var n=t&&t[r];return(0,i.V1)(n,76,r),n||null;default:return null}}},17128:(e,t,r)=>{"use strict";r.d(t,{AT:()=>u,E4:()=>l,Vn:()=>d,Vu:()=>a,n4:()=>s,sw:()=>o,wY:()=>f,zK:()=>c});var n=r(69055),i=r(4906);function o(e){(0,n.V1)(e&&"Document"===e.kind,77);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw(0,n.vA)(78,e.kind);return e}));return(0,n.V1)(t.length<=1,79,t.length),e}function a(e){return o(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function s(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&!!e.name})).map((function(e){return e.name.value}))[0]||null}function c(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function u(e){var t=a(e);return(0,n.V1)(t&&"query"===t.operation,80),t}function l(e){(0,n.V1)("Document"===e.kind,81),(0,n.V1)(e.definitions.length<=1,82);var t=e.definitions[0];return(0,n.V1)("FragmentDefinition"===t.kind,83),t}function d(e){var t;o(e);for(var r=0,i=e.definitions;r{"use strict";r.d(t,{y:()=>c});var n,i=r(70807),o=r(50983),a=r(60108),s=r(18363),c=Object.assign((function(e){var t=n.get(e);return t||(t=(0,i.y)(e),n.set(e,t)),t}),{reset:function(){n=new o.A(a.v.print||2e3)}});c.reset(),!1!==globalThis.__DEV__&&(0,s.D_)("print",(function(){return n?n.size:0}))},4906:(e,t,r)=>{"use strict";r.d(t,{A_:()=>c,D$:()=>y,Ii:()=>d,J:()=>l,Kc:()=>u,MB:()=>g,WU:()=>s,dt:()=>v,kd:()=>b,o5:()=>p,ue:()=>m});var n=r(69055),i=r(32728),o=r(90575),a=r(68765);function s(e){return{__ref:String(e)}}function c(e){return Boolean(e&&"object"===typeof e&&"string"===typeof e.__ref)}function u(e){return(0,i.U)(e)&&"Document"===e.kind&&Array.isArray(e.definitions)}function l(e,t,r,i){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var o={};r.fields.map((function(e){return l(o,e.name,e.value,i)})),e[t.value]=o}else if(function(e){return"Variable"===e.kind}(r)){var a=(i||{})[r.name.value];e[t.value]=a}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return l(r,t,e,i),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw(0,n.vA)(85,t.value,r.kind);e[t.value]=null}}function d(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var i=n.name,o=n.value;return l(r[e.name.value],i,o,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return l(n,r,i,t)}))),p(e.name.value,n,r)}var f=["connection","include","skip","client","rest","export","nonreactive"],h=a.M,p=Object.assign((function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach((function(e){i[e]=t[e]})),"".concat(r.connection.key,"(").concat(h(i),")")}return r.connection.key}var o=e;if(t){var a=h(t);o+="(".concat(a,")")}return r&&Object.keys(r).forEach((function(e){-1===f.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(h(r[e]),")"):o+="@".concat(e))})),o}),{setStringify:function(e){var t=h;return h=e,t}});function g(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return l(r,n,i,t)})),r}return null}function m(e){return e.alias?e.alias.value:e.name.value}function y(e,t,r){for(var n,i=0,a=t.selections;i{"use strict";r.d(t,{TC:()=>A,XY:()=>y,er:()=>E,hX:()=>b,it:()=>w,iz:()=>m,zc:()=>_});var n=r(37827),i=r(69055),o=r(466),a=r(78449),s=r(17128),c=r(4906),u=r(90575),l=r(38676),d={kind:o.b.FIELD,name:{kind:o.b.NAME,value:"__typename"}};function f(e,t){return!e||e.selectionSet.selections.every((function(e){return e.kind===o.b.FRAGMENT_SPREAD&&f(t[e.name.value],t)}))}function h(e){return f((0,s.Vu)(e)||(0,s.E4)(e),(0,u.JG)((0,s.zK)(e)))?null:e}function p(e){var t=new Map,r=new Map;return e.forEach((function(e){e&&(e.name?t.set(e.name,e):e.test&&r.set(e.test,e))})),function(e){var n=t.get(e.name.value);return!n&&r.size&&r.forEach((function(t,r){r(e)&&(n=t)})),n}}function g(e){var t=new Map;return function(r){void 0===r&&(r=e);var n=t.get(r);return n||t.set(r,n={variables:new Set,fragmentSpreads:new Set}),n}}function m(e,t){(0,s.sw)(t);for(var r=g(""),c=g(""),u=function(e){for(var t=0,n=void 0;t=0;--f)t.definitions[f].kind===o.b.OPERATION_DEFINITION&&++d;var m=p(e),y=function(e){return(0,l.E)(e)&&e.map(m).some((function(e){return e&&e.remove}))},v=new Map,b=!1,w={enter:function(e){if(y(e.directives))return b=!0,null}},A=(0,a.YR)(t,{Field:w,InlineFragment:w,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,r,n,i){var o=u(i);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,r,n,i){if(y(e.directives))return b=!0,null;var o=u(i);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,r,n){v.set(JSON.stringify(n),e)},leave:function(e,t,r,n){return e===v.get(JSON.stringify(n))?e:d>0&&e.selectionSet.selections.every((function(e){return e.kind===o.b.FIELD&&"__typename"===e.name.value}))?(c(e.name.value).removed=!0,b=!0,null):void 0}},Directive:{leave:function(e){if(m(e))return b=!0,null}}});if(!b)return t;var _=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach((function(t){_(c(t)).transitiveVars.forEach((function(t){e.transitiveVars.add(t)}))}))),e},E=new Set;A.definitions.forEach((function(e){e.kind===o.b.OPERATION_DEFINITION?_(r(e.name&&e.name.value)).fragmentSpreads.forEach((function(e){E.add(e)})):e.kind!==o.b.FRAGMENT_DEFINITION||0!==d||c(e.name.value).removed||E.add(e.name.value)})),E.forEach((function(e){_(c(e)).fragmentSpreads.forEach((function(e){E.add(e)}))}));var S={enter:function(e){if(t=e.name.value,!E.has(t)||c(t).removed)return null;var t}};return h((0,a.YR)(A,{FragmentSpread:S,FragmentDefinition:S,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=_(r(e.name&&e.name.value)).transitiveVars;if(t.size{"use strict";r.r(t),r.d(t,{AutoCleanedStrongCache:()=>H.V,AutoCleanedWeakCache:()=>H.A,Concast:()=>I.E,DEV:()=>n.IJ,DeepMerger:()=>m.ZI,DocumentTransform:()=>o.c,Observable:()=>_.c,addTypenameToDocument:()=>l.XY,argumentsObjectFromField:()=>u.MB,asyncMap:()=>C.x,buildQueryFromSelectionSet:()=>l.zc,cacheSizes:()=>V.v,canUseAsyncIteratorSymbol:()=>R.uJ,canUseDOM:()=>R.Sw,canUseLayoutEffect:()=>R.JR,canUseSymbol:()=>R.ol,canUseWeakMap:()=>R.et,canUseWeakSet:()=>R.En,canonicalStringify:()=>j.M,checkDocument:()=>s.sw,cloneDeep:()=>S.m,compact:()=>N.o,concatPagination:()=>y,createFragmentMap:()=>a.JG,createFulfilledPromise:()=>E.$D,createRejectedPromise:()=>E.Il,fixObservableSubclass:()=>T.r,getDefaultValues:()=>s.wY,getDirectiveNames:()=>i.sx,getFragmentDefinition:()=>s.E4,getFragmentDefinitions:()=>s.zK,getFragmentFromSelection:()=>a.HQ,getFragmentQueryDocument:()=>a.ct,getGraphQLErrorsFromResult:()=>M.M,getInclusionDirectives:()=>i.tY,getMainDefinition:()=>s.Vn,getOperationDefinition:()=>s.Vu,getOperationName:()=>s.n4,getQueryDefinition:()=>s.AT,getStoreKeyName:()=>u.o5,getTypenameFromResult:()=>u.D$,graphQLResultHasError:()=>M.t,hasAllDirectives:()=>i.I5,hasAnyDirectives:()=>i.hE,hasClientExports:()=>i.f2,hasDirectives:()=>i.d8,isApolloPayloadResult:()=>U.Nw,isArray:()=>O.c,isDocumentNode:()=>u.Kc,isExecutionPatchIncrementalResult:()=>U.ST,isExecutionPatchInitialResult:()=>U.EQ,isExecutionPatchResult:()=>U.YX,isField:()=>u.dt,isInlineFragment:()=>u.kd,isMutationOperation:()=>f,isNonEmptyArray:()=>O.E,isNonNullObject:()=>P.U,isPlainObject:()=>P.Q,isQueryOperation:()=>h,isReference:()=>u.A_,isStatefulPromise:()=>E.Sz,isSubscriptionOperation:()=>p,iterateObserversSafely:()=>x.w,makeReference:()=>u.WU,makeUniqueId:()=>L.v,maybe:()=>n.no,maybeDeepFreeze:()=>k.G,mergeDeep:()=>m.D9,mergeDeepArray:()=>m.IM,mergeIncrementalData:()=>U.bd,mergeOptions:()=>D.l,offsetLimitPagination:()=>v,omitDeep:()=>F,print:()=>c.y,relayStylePagination:()=>b,removeArgumentsFromDocument:()=>l.it,removeClientSetsFromDocument:()=>l.er,removeConnectionDirectiveFromDocument:()=>l.hX,removeDirectivesFromDocument:()=>l.iz,removeFragmentSpreadFromDocument:()=>l.TC,resultKeyNameFromField:()=>u.ue,shouldInclude:()=>i.MS,storeKeyNameFromField:()=>u.Ii,stringifyForDisplay:()=>B.p,stripTypename:()=>q,valueToObjectRepresentation:()=>u.J,wrapPromiseWithState:()=>E.zq});var n=r(69055),i=r(62210),o=r(61337),a=r(90575),s=r(17128),c=r(67733),u=r(4906),l=r(70446);function d(e,t){var r;return(null===(r=(0,s.Vu)(e))||void 0===r?void 0:r.operation)===t}function f(e){return d(e,"mutation")}function h(e){return d(e,"query")}function p(e){return d(e,"subscription")}var g=r(37827),m=r(50090);function y(e){return void 0===e&&(e=!1),{keyArgs:e,merge:function(e,t){return e?(0,g.__spreadArray)((0,g.__spreadArray)([],e,!0),t,!0):t}}}function v(e){return void 0===e&&(e=!1),{keyArgs:e,merge:function(e,t,r){var n=r.args,i=e?e.slice(0):[];if(t)if(n)for(var o=n.offset,a=void 0===o?0:o,s=0;s1&&o===a&&(o="");var s=e.pageInfo||{},c=s.startCursor,u=s.endCursor;return(0,g.__assign)((0,g.__assign)({},w(e)),{edges:i,pageInfo:(0,g.__assign)((0,g.__assign)({},e.pageInfo),{startCursor:c||o,endCursor:u||a})})},merge:function(e,t,r){var n=r.args,i=r.isReference,o=r.readField;if(e||(e={edges:[],pageInfo:{hasPreviousPage:!1,hasNextPage:!0,startCursor:"",endCursor:""}}),!t)return e;var a=t.edges?t.edges.map((function(e){return i(e=(0,g.__assign)({},e))&&(e.cursor=o("cursor",e)),e})):[];if(t.pageInfo){var s=t.pageInfo,c=s.startCursor,u=s.endCursor,l=a[0],d=a[a.length-1];l&&c&&(l.cursor=c),d&&u&&(d.cursor=u);var f=l&&l.cursor;f&&!c&&(t=(0,m.D9)(t,{pageInfo:{startCursor:f}}));var h=d&&d.cursor;h&&!u&&(t=(0,m.D9)(t,{pageInfo:{endCursor:h}}))}var p=e.edges,y=[];if(n&&n.after)(v=p.findIndex((function(e){return e.cursor===n.after})))>=0&&(p=p.slice(0,v+1));else if(n&&n.before){var v;y=(v=p.findIndex((function(e){return e.cursor===n.before})))<0?p:p.slice(v),p=[]}else t.edges&&(p=[]);var b=(0,g.__spreadArray)((0,g.__spreadArray)((0,g.__spreadArray)([],p,!0),a,!0),y,!0),A=(0,g.__assign)((0,g.__assign)({},t.pageInfo),e.pageInfo);if(t.pageInfo){var _=t.pageInfo,E=_.hasPreviousPage,S=_.hasNextPage,k=(c=_.startCursor,u=_.endCursor,(0,g.__rest)(_,["hasPreviousPage","hasNextPage","startCursor","endCursor"]));Object.assign(A,k),p.length||(void 0!==E&&(A.hasPreviousPage=E),void 0!==c&&(A.startCursor=c)),y.length||(void 0!==S&&(A.hasNextPage=S),void 0!==u&&(A.endCursor=u))}return(0,g.__assign)((0,g.__assign)((0,g.__assign)({},w(e)),w(t)),{edges:b,pageInfo:A})}}}var w=function(e){return(0,g.__rest)(e,A)},A=["edges","pageInfo"];var _=r(81609),E=r(99465),S=r(38359),k=r(45901),x=r(5334),C=r(41851),I=r(7634),T=r(39835),O=r(38676),P=r(32728),M=r(72543),R=r(61707),N=r(33753),L=r(28426),B=r(8450),D=r(40704),U=r(41237),j=r(68765);function F(e,t){return z(e,t)}function z(e,t,r){if(void 0===r&&(r=new Map),r.has(e))return r.get(e);var n=!1;if(Array.isArray(e)){var i=[];if(r.set(e,i),e.forEach((function(e,o){var a=z(e,t,r);n||(n=a!==e),i[o]=a})),n)return i}else if((0,P.Q)(e)){var o=Object.create(Object.getPrototypeOf(e));if(r.set(e,o),Object.keys(e).forEach((function(i){if(i!==t){var a=z(e[i],t,r);n||(n=a!==e[i]),o[i]=a}else n=!0})),n)return o}return e}function q(e){return F(e,"__typename")}var H=r(50983),V=r(60108)},7634:(e,t,r)=>{"use strict";r.d(t,{E:()=>c});var n=r(37827),i=r(81609),o=r(5334),a=r(39835);function s(e){return e&&"function"===typeof e.then}var c=function(e){function t(t){var r=e.call(this,(function(e){return r.addObserver(e),function(){return r.removeObserver(e)}}))||this;return r.observers=new Set,r.promise=new Promise((function(e,t){r.resolve=e,r.reject=t})),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],r.notify("next",e),(0,o.w)(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest=["error",e],r.reject(e),r.notify("error",e),(0,o.w)(r.observers,"error",e))},complete:function(){var e=r,t=e.sub,n=e.sources;if(null!==t){var i=(void 0===n?[]:n).shift();i?s(i)?i.then((function(e){return r.sub=e.subscribe(r.handlers)}),r.handlers.error):r.sub=i.subscribe(r.handlers):(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),(0,o.w)(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.error(e)},r.promise.catch((function(e){})),"function"===typeof t&&(t=[new i.c(t)]),s(t)?t.then((function(e){return r.start(e)}),r.handlers.error):r.start(t),r}return(0,n.__extends)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var r=this.nextResultListeners;r.size&&(this.nextResultListeners=new Set,r.forEach((function(r){return r(e,t)})))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add((function(r,n){t||(t=!0,e(r,n))}))},t}(i.c);(0,a.r)(c)},41851:(e,t,r)=>{"use strict";r.d(t,{x:()=>i});var n=r(81609);function i(e,t,r){return new n.c((function(n){var i={then:function(e){return new Promise((function(t){return t(e())}))}};function o(e,t){return function(r){if(e){var o=function(){return n.closed?0:e(r)};i=i.then(o,o).then((function(e){return n.next(e)}),(function(e){return n.error(e)}))}else n[t](r)}}var a={next:o(t,"next"),error:o(r,"error"),complete:function(){i.then((function(){return n.complete()}))}},s=e.subscribe(a);return function(){return s.unsubscribe()}}))}},5334:(e,t,r)=>{"use strict";function n(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}r.d(t,{w:()=>n})},39835:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var n=r(81609),i=r(61707);function o(e){function t(t){Object.defineProperty(e,t,{value:n.c})}return i.ol&&Symbol.species&&t(Symbol.species),t("@@species"),e}},99465:(e,t,r)=>{"use strict";function n(e){var t=Promise.resolve(e);return t.status="fulfilled",t.value=e,t}function i(e){var t=Promise.reject(e);return t.catch((function(){})),t.status="rejected",t.reason=e,t}function o(e){return"status"in e}function a(e){if(o(e))return e;var t=e;return t.status="pending",t.then((function(e){if("pending"===t.status){var r=t;r.status="fulfilled",r.value=e}}),(function(e){if("pending"===t.status){var r=t;r.status="rejected",r.reason=e}})),e}r.d(t,{$D:()=>n,Il:()=>i,Sz:()=>o,zq:()=>a})},17107:(e,t,r)=>{"use strict";r.d(t,{r:()=>n});var n="3.11.4"},45875:(e,t,r)=>{"use strict";r.d(t,{r:()=>a});var n=r(4159),i=r(60111),o=r(37609);n.extend(o),n.extend(i),n.updateLocale("en",{relativeTime:{future:"in %s",past:"%s ago",s:"%s sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}});const a={getYear(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(new Date).toISOString();return n(e).year()},getRelativeDateFromNow:e=>n(e).fromNow(!0)}},88224:(e,t,r)=>{"use strict";r.r(t),r.d(t,{W3mModal:()=>l});var n=r(50022),i=r(24896),o=r(61939),a=r(69895);const s=o.AH` :host { z-index: var(--w3m-z-index); display: block; backface-visibility: hidden; will-change: opacity; position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; opacity: 0; background-color: var(--wui-cover); } @keyframes zoom-in { 0% { transform: scale(0.95) translateY(0); } 100% { transform: scale(1) translateY(0); } } @keyframes slide-in { 0% { transform: scale(1) translateY(50px); } 100% { transform: scale(1) translateY(0); } } wui-card { max-width: 360px; width: 100%; position: relative; animation-delay: 0.3s; animation-duration: 0.2s; animation-name: zoom-in; animation-fill-mode: backwards; animation-timing-function: var(--wui-ease-out-power-2); outline: none; } wui-flex { overflow-x: hidden; overflow-y: auto; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; } @media (max-height: 700px) and (min-width: 431px) { wui-flex { align-items: flex-start; } wui-card { margin: var(--wui-spacing-xxl) 0px; } } @media (max-width: 430px) { wui-flex { align-items: flex-end; } wui-card { max-width: 100%; border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: none; animation-name: slide-in; } } `;var c=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};const u="scroll-lock";let l=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.open=n.W3.state.open,this.caipAddress=n.Uj.state.address,this.isSiweEnabled=n.jF.state.isSiweEnabled,this.initializeTheming(),n.Np.prefetch(),this.unsubscribe.push(n.W3.subscribeKey("open",(e=>e?this.onOpen():this.onClose())),n.jF.subscribeKey("isSiweEnabled",(e=>{this.isSiweEnabled=e})),n.Uj.subscribe((e=>this.onNewAccountState(e)))),n.En.sendEvent({type:"track",event:"MODAL_LOADED"})}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),this.onRemoveKeyboardListener()}render(){return this.open?o.qy` `:null}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){this.isSiweEnabled&&"success"!==n.jF.state.status&&await n.x4.disconnect(),n.W3.close()}initializeTheming(){const{themeVariables:e,themeMode:t}=n.Wn.state,r=i.UiHelperUtil.getColorTheme(t);(0,i.initializeTheming)(e,r)}async onClose(){this.onScrollUnlock(),await this.animate([{opacity:1},{opacity:0}],{duration:200,easing:"ease",fill:"forwards"}).finished,n.Pt.hide(),this.open=!1,this.onRemoveKeyboardListener()}async onOpen(){this.onScrollLock(),this.open=!0,await this.animate([{opacity:0},{opacity:1}],{duration:200,easing:"ease",fill:"forwards",delay:300}).finished,this.onAddKeyboardListener()}onScrollLock(){const e=document.createElement("style");e.dataset.w3m=u,e.textContent="\n html, body {\n touch-action: none;\n overflow: hidden;\n overscroll-behavior: contain;\n }\n w3m-modal {\n pointer-events: auto;\n }\n ",document.head.appendChild(e)}onScrollUnlock(){const e=document.head.querySelector(`style[data-w3m="${u}"]`);e&&e.remove()}onAddKeyboardListener(){this.abortController=new AbortController;const e=this.shadowRoot?.querySelector("wui-card");e?.focus(),window.addEventListener("keydown",(t=>{if("Escape"===t.key)this.handleClose();else if("Tab"===t.key){const{tagName:r}=t.target;!r||r.includes("W3M-")||r.includes("WUI-")||e?.focus()}}),this.abortController)}onRemoveKeyboardListener(){this.abortController?.abort(),this.abortController=void 0}async onNewAccountState(e){const{isConnected:t,caipAddress:r}=e;if(this.isSiweEnabled){t&&!this.caipAddress&&(this.caipAddress=r),t&&r&&this.caipAddress!==r&&(await n.jF.signOut(),this.onSiweNavigation(),this.caipAddress=r);try{const e=await n.jF.getSession();e&&!t?await n.jF.signOut():t&&!e&&this.onSiweNavigation()}catch(i){t&&this.onSiweNavigation()}}}onSiweNavigation(){this.open?n.IN.push("ConnectingSiwe"):n.W3.open({view:"ConnectingSiwe"})}};l.styles=s,c([(0,a.wk)()],l.prototype,"open",void 0),c([(0,a.wk)()],l.prototype,"caipAddress",void 0),c([(0,a.wk)()],l.prototype,"isSiweEnabled",void 0),l=c([(0,i.customElement)("w3m-modal")],l)},63103:(e,t,r)=>{"use strict";r.d(t,{mN:()=>x,AH:()=>u,W3:()=>E,Ec:()=>S,iz:()=>c});const n=globalThis,i=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),a=new WeakMap;class s{constructor(e,t,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=a.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&a.set(t,e))}return e}toString(){return this.cssText}}const c=e=>new s("string"==typeof e?e:e+"",void 0,o),u=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;nt+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new s(i,e,o)},l=(e,t)=>{if(i)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),i=n.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=r.cssText,e.appendChild(t)}},d=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return c(t)})(e):e,{is:f,defineProperty:h,getOwnPropertyDescriptor:p,getOwnPropertyNames:g,getOwnPropertySymbols:m,getPrototypeOf:y}=Object,v=globalThis,b=v.trustedTypes,w=b?b.emptyScript:"",A=v.reactiveElementPolyfillSupport,_=(e,t)=>e,E={toAttribute(e,t){switch(t){case Boolean:e=e?w:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},S=(e,t)=>!f(e,t),k={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:S};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;class x extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k;if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&h(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:i}=p(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);i.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??k}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;const e=y(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){const e=this.properties,t=[...g(e),...m(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const e=this._$Eu(t,r);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(d(e))}else void 0!==e&&t.push(d(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return l(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:E).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:E;this._$Em=n,this[n]=i.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??S)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}x.elementStyles=[],x.shadowRootOptions={mode:"open"},x[_("elementProperties")]=new Map,x[_("finalized")]=new Map,A?.({ReactiveElement:x}),(v.reactiveElementVersions??=[]).push("2.0.4")},50022:(e,t,r)=>{"use strict";r.d(t,{Uj:()=>u,Np:()=>I,$m:()=>Q,TP:()=>U,x4:()=>V,aK:()=>A,oU:()=>a,wE:()=>s,En:()=>M,W3:()=>B,p_:()=>k,Hd:()=>b,z3:()=>E,IN:()=>N,aS:()=>Y,jF:()=>K,Pt:()=>F,iT:()=>g,Wn:()=>G,WC:()=>q});var n=r(95499);function i(e,t,r,i){let o=e[t];return(0,n.B1)(e,(()=>{const n=e[t];Object.is(o,n)||r(o=n)}),i)}Symbol();const o="https://secure.web3modal.com",a={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,ONE_SEC_MS:1e3,SECURE_SITE:o,SECURE_SITE_DASHBOARD:`${o}/dashboard`,SECURE_SITE_FAVICON:`${o}/images/favicon.png`,RESTRICTED_TIMEZONES:["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet"}},s={isMobile:()=>"undefined"!==typeof window&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid(){const e=window.navigator.userAgent.toLowerCase();return s.isMobile()&&e.includes("android")},isIos(){const e=window.navigator.userAgent.toLowerCase();return s.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isClient:()=>"undefined"!==typeof window,isPairingExpired:e=>!e||e-Date.now()<=a.TEN_SEC_MS,isAllowedRetry:e=>Date.now()-e>=a.ONE_SEC_MS,copyToClopboard(e){navigator.clipboard.writeText(e)},getPairingExpiry:()=>Date.now()+a.FOUR_MINUTES_MS,getPlainAddress:e=>e.split(":")[2],wait:async e=>new Promise((t=>{setTimeout(t,e)})),debounce(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var n=arguments.length,i=new Array(n),o=0;oe.startsWith("http://")||e.startsWith("https://"),formatNativeUrl(e,t){if(s.isHttpUrl(e))return this.formatUniversalUrl(e,t);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`);return{redirect:`${r}wc?uri=${encodeURIComponent(t)}`,href:r}},formatUniversalUrl(e,t){if(!s.isHttpUrl(e))return this.formatNativeUrl(e,t);let r=e;r.endsWith("/")||(r=`${r}/`);return{redirect:`${r}wc?uri=${encodeURIComponent(t)}`,href:r}},openHref(e,t){window.open(e,t,"noreferrer noopener")},async preloadImage(e){const t=new Promise(((t,r)=>{const n=new Image;n.onload=t,n.onerror=r,n.crossOrigin="anonymous",n.src=e}));return Promise.race([t,s.wait(2e3)])},formatBalance(e,t){let r;if("0"===e)r="0.000";else if("string"===typeof e){const t=Number(e);t&&(r=t.toString().match(/^-?\d+(?:\.\d{0,3})?/u)?.[0])}return r?`${r} ${t}`:`0.000 ${t}`},isRestrictedRegion(){try{const{timeZone:e}=(new Intl.DateTimeFormat).resolvedOptions(),t=e.toUpperCase();return a.RESTRICTED_TIMEZONES.includes(t)}catch{return!1}},getApiUrl:()=>s.isRestrictedRegion()?"https://api.web3modal.org":"https://api.web3modal.com",getBlockchainApiUrl:()=>s.isRestrictedRegion()?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com",getAnalyticsUrl:()=>s.isRestrictedRegion()?"https://pulse.walletconnect.org":"https://pulse.walletconnect.com",getUUID:()=>crypto?.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),parseError:e=>"string"===typeof e?e:"string"===typeof e?.issues?.[0]?.message?e.issues[0].message:e instanceof Error?e.message:"Unknown error"},c=(0,n.BX)({isConnected:!1}),u={state:c,subscribe:e=>(0,n.B1)(c,(()=>e(c))),subscribeKey:(e,t)=>i(c,e,t),setIsConnected(e){c.isConnected=e},setCaipAddress(e){c.caipAddress=e,c.address=e?s.getPlainAddress(e):void 0},setBalance(e,t){c.balance=e,c.balanceSymbol=t},setProfileName(e){c.profileName=e},setProfileImage(e){c.profileImage=e},setAddressExplorerUrl(e){c.addressExplorerUrl=e},resetAccount(){c.isConnected=!1,c.caipAddress=void 0,c.address=void 0,c.balance=void 0,c.balanceSymbol=void 0,c.profileName=void 0,c.profileImage=void 0,c.addressExplorerUrl=void 0}};class l{constructor(e){let{baseUrl:t}=e;this.baseUrl=t}async get(e){let{headers:t,...r}=e;const n=this.createUrl(r);return(await fetch(n,{method:"GET",headers:t})).json()}async getBlob(e){let{headers:t,...r}=e;const n=this.createUrl(r);return(await fetch(n,{method:"GET",headers:t})).blob()}async post(e){let{body:t,headers:r,...n}=e;const i=this.createUrl(n);return(await fetch(i,{method:"POST",headers:r,body:t?JSON.stringify(t):void 0})).json()}async put(e){let{body:t,headers:r,...n}=e;const i=this.createUrl(n);return(await fetch(i,{method:"PUT",headers:r,body:t?JSON.stringify(t):void 0})).json()}async delete(e){let{body:t,headers:r,...n}=e;const i=this.createUrl(n);return(await fetch(i,{method:"DELETE",headers:r,body:t?JSON.stringify(t):void 0})).json()}createUrl(e){let{path:t,params:r}=e;const n=new URL(t,this.baseUrl);return r&&Object.entries(r).forEach((e=>{let[t,r]=e;r&&n.searchParams.append(t,r)})),n}}const d="WALLETCONNECT_DEEPLINK_CHOICE",f="@w3m/recent",h="@w3m/connected_wallet_image_url",p="@w3m/connected_connector",g={setWalletConnectDeepLink(e){let{href:t,name:r}=e;try{localStorage.setItem(d,JSON.stringify({href:t,name:r}))}catch{console.info("Unable to set WalletConnect deep link")}},getWalletConnectDeepLink(){try{const e=localStorage.getItem(d);if(e)return JSON.parse(e)}catch{console.info("Unable to get WalletConnect deep link")}},deleteWalletConnectDeepLink(){try{localStorage.removeItem(d)}catch{console.info("Unable to delete WalletConnect deep link")}},setWeb3ModalRecent(e){try{const t=g.getRecentWallets();t.find((t=>t.id===e.id))||(t.unshift(e),t.length>2&&t.pop(),localStorage.setItem(f,JSON.stringify(t)))}catch{console.info("Unable to set Web3Modal recent")}},getRecentWallets(){try{const e=localStorage.getItem(f);return e?JSON.parse(e):[]}catch{console.info("Unable to get Web3Modal recent")}return[]},setConnectedWalletImageUrl(e){try{localStorage.setItem(h,e)}catch{console.info("Unable to set Connected Wallet Image Url")}},getConnectedWalletImageUrl(){try{return localStorage.getItem(h)}catch{console.info("Unable to set Connected Wallet Image Url")}},setConnectedConnector(e){try{localStorage.setItem(p,e)}catch{console.info("Unable to set Connected Connector")}},getConnectedConnector(){try{return localStorage.getItem(p)}catch{console.info("Unable to get Connected Connector")}}},m=(0,n.BX)({walletImages:{},networkImages:{},connectorImages:{},tokenImages:{}}),y={state:m,subscribeNetworkImages:e=>(0,n.B1)(m.networkImages,(()=>e(m.networkImages))),subscribeKey:(e,t)=>i(m,e,t),setWalletImage(e,t){m.walletImages[e]=t},setNetworkImage(e,t){m.networkImages[e]=t},setConnectorImage(e,t){m.connectorImages[e]=t},setTokenImage(e,t){m.tokenImages[e]=t}},v=(0,n.BX)({projectId:"",sdkType:"w3m",sdkVersion:"html-wagmi-undefined"}),b={state:v,subscribeKey:(e,t)=>i(v,e,t),setProjectId(e){v.projectId=e},setIncludeWalletIds(e){v.includeWalletIds=e},setExcludeWalletIds(e){v.excludeWalletIds=e},setFeaturedWalletIds(e){v.featuredWalletIds=e},setTokens(e){v.tokens=e},setTermsConditionsUrl(e){v.termsConditionsUrl=e},setPrivacyPolicyUrl(e){v.privacyPolicyUrl=e},setCustomWallets(e){v.customWallets=e},setEnableAnalytics(e){v.enableAnalytics=e},setSdkVersion(e){v.sdkVersion=e},setMetadata(e){v.metadata=e}},w=(0,n.BX)({connectors:[]}),A={state:w,subscribeKey:(e,t)=>i(w,e,t),setConnectors(e){w.connectors=e.map((e=>(0,n.KR)(e)))},addConnector(e){if(w.connectors.push((0,n.KR)(e)),"w3mEmail"===e.id){const t=e,r=(0,n.P9)(b.state);t?.provider?.syncDappData?.({metadata:r.metadata,sdkVersion:r.sdkVersion,projectId:r.projectId})}},getEmailConnector:()=>w.connectors.find((e=>"EMAIL"===e.type)),getAnnouncedConnectorRdns:()=>w.connectors.filter((e=>"ANNOUNCED"===e.type)).map((e=>e.info?.rdns)),getConnectors:()=>w.connectors},_=(0,n.BX)({open:!1,selectedNetworkId:void 0}),E={state:_,subscribe:e=>(0,n.B1)(_,(()=>e(_))),set(e){Object.assign(_,{..._,...e})}},S=(0,n.BX)({supportsAllNetworks:!0,isDefaultCaipNetwork:!1}),k={state:S,subscribeKey:(e,t)=>i(S,e,t),_getClient(){if(!S._client)throw new Error("NetworkController client not set");return S._client},setClient(e){S._client=(0,n.KR)(e)},setCaipNetwork(e){S.caipNetwork=e,E.set({selectedNetworkId:e?.id})},setDefaultCaipNetwork(e){S.caipNetwork=e,E.set({selectedNetworkId:e?.id}),S.isDefaultCaipNetwork=!0},setRequestedCaipNetworks(e){S.requestedCaipNetworks=e},async getApprovedCaipNetworksData(){const e=await this._getClient().getApprovedCaipNetworksData();S.supportsAllNetworks=e.supportsAllNetworks,S.approvedCaipNetworkIds=e.approvedCaipNetworkIds},async switchActiveNetwork(e){await this._getClient().switchCaipNetwork(e),S.caipNetwork=e},resetNetwork(){S.isDefaultCaipNetwork||(S.caipNetwork=void 0),S.approvedCaipNetworkIds=void 0,S.supportsAllNetworks=!0}},x=new l({baseUrl:s.getApiUrl()}),C=(0,n.BX)({page:1,count:0,featured:[],recommended:[],wallets:[],search:[]}),I={state:C,subscribeKey:(e,t)=>i(C,e,t),_getApiHeaders(){const{projectId:e,sdkType:t,sdkVersion:r}=b.state;return{"x-project-id":e,"x-sdk-type":t,"x-sdk-version":r}},async _fetchWalletImage(e){const t=`${x.baseUrl}/getWalletImage/${e}`,r=await x.getBlob({path:t,headers:I._getApiHeaders()});y.setWalletImage(e,URL.createObjectURL(r))},async _fetchNetworkImage(e){const t=`${x.baseUrl}/public/getAssetImage/${e}`,r=await x.getBlob({path:t,headers:I._getApiHeaders()});y.setNetworkImage(e,URL.createObjectURL(r))},async _fetchConnectorImage(e){const t=`${x.baseUrl}/public/getAssetImage/${e}`,r=await x.getBlob({path:t,headers:I._getApiHeaders()});y.setConnectorImage(e,URL.createObjectURL(r))},async fetchNetworkImages(){const{requestedCaipNetworks:e}=k.state,t=e?.map((e=>{let{imageId:t}=e;return t})).filter(Boolean);t&&await Promise.allSettled(t.map((e=>I._fetchNetworkImage(e))))},async fetchConnectorImages(){const{connectors:e}=A.state,t=e.map((e=>{let{imageId:t}=e;return t})).filter(Boolean);await Promise.allSettled(t.map((e=>I._fetchConnectorImage(e))))},async fetchFeaturedWallets(){const{featuredWalletIds:e}=b.state;if(e?.length){const{data:t}=await x.get({path:"/getWallets",headers:I._getApiHeaders(),params:{page:"1",entries:e?.length?String(e.length):"4",include:e?.join(",")}});t.sort(((t,r)=>e.indexOf(t.id)-e.indexOf(r.id)));const r=t.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled(r.map((e=>I._fetchWalletImage(e)))),C.featured=t}},async fetchRecommendedWallets(){const{includeWalletIds:e,excludeWalletIds:t,featuredWalletIds:r}=b.state,n=[...t??[],...r??[]].filter(Boolean),{data:i,count:o}=await x.get({path:"/getWallets",headers:I._getApiHeaders(),params:{page:"1",entries:"4",include:e?.join(","),exclude:n?.join(",")}}),a=g.getRecentWallets(),s=i.map((e=>e.image_id)).filter(Boolean),c=a.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled([...s,...c].map((e=>I._fetchWalletImage(e)))),C.recommended=i,C.count=o??0},async fetchWallets(e){let{page:t}=e;const{includeWalletIds:r,excludeWalletIds:n,featuredWalletIds:i}=b.state,o=[...C.recommended.map((e=>{let{id:t}=e;return t})),...n??[],...i??[]].filter(Boolean),{data:a,count:c}=await x.get({path:"/getWallets",headers:I._getApiHeaders(),params:{page:String(t),entries:"40",include:r?.join(","),exclude:o.join(",")}}),u=a.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled([...u.map((e=>I._fetchWalletImage(e))),s.wait(300)]),C.wallets=[...C.wallets,...a],C.count=c>C.count?c:C.count,C.page=t},async searchWallet(e){let{search:t}=e;const{includeWalletIds:r,excludeWalletIds:n}=b.state;C.search=[];const{data:i}=await x.get({path:"/getWallets",headers:I._getApiHeaders(),params:{page:"1",entries:"100",search:t,include:r?.join(","),exclude:n?.join(",")}}),o=i.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled([...o.map((e=>I._fetchWalletImage(e))),s.wait(300)]),C.search=i},prefetch(){C.prefetchPromise=Promise.race([Promise.allSettled([I.fetchFeaturedWallets(),I.fetchRecommendedWallets(),I.fetchNetworkImages(),I.fetchConnectorImages()]),s.wait(3e3)])}},T=new l({baseUrl:s.getAnalyticsUrl()}),O=["MODAL_CREATED"],P=(0,n.BX)({timestamp:Date.now(),data:{type:"track",event:"MODAL_CREATED"}}),M={state:P,subscribe:e=>(0,n.B1)(P,(()=>e(P))),_getApiHeaders(){const{projectId:e,sdkType:t,sdkVersion:r}=b.state;return{"x-project-id":e,"x-sdk-type":t,"x-sdk-version":r}},async _sendAnalyticsEvent(e){try{if(O.includes(e.data.event)||"undefined"===typeof window)return;await T.post({path:"/e",headers:M._getApiHeaders(),body:{eventId:s.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:e.timestamp,props:e.data}})}catch{}},sendEvent(e){P.timestamp=Date.now(),P.data=e,b.state.enableAnalytics&&M._sendAnalyticsEvent(P)}},R=(0,n.BX)({view:"Connect",history:["Connect"]}),N={state:R,subscribeKey:(e,t)=>i(R,e,t),push(e,t){e!==R.view&&(R.view=e,R.history.push(e),R.data=t)},reset(e){R.view=e,R.history=[e]},replace(e,t){R.history.length>1&&R.history.at(-1)!==e&&(R.view=e,R.history[R.history.length-1]=e,R.data=t)},goBack(){if(R.history.length>1){R.history.pop();const[e]=R.history.slice(-1);e&&(R.view=e)}},goBackToIndex(e){if(R.history.length>1){R.history=R.history.slice(0,e+1);const[t]=R.history.slice(-1);t&&(R.view=t)}}},L=(0,n.BX)({loading:!1,open:!1}),B={state:L,subscribe:e=>(0,n.B1)(L,(()=>e(L))),subscribeKey:(e,t)=>i(L,e,t),async open(e){await I.state.prefetchPromise,e?.view?N.reset(e.view):u.state.isConnected?N.reset("Account"):N.reset("Connect"),L.open=!0,E.set({open:!0}),M.sendEvent({type:"track",event:"MODAL_OPEN"})},close(){L.open=!1,E.set({open:!1}),M.sendEvent({type:"track",event:"MODAL_CLOSE"})},setLoading(e){L.loading=e}},D=new l({baseUrl:s.getBlockchainApiUrl()}),U={fetchIdentity(e){let{caipChainId:t,address:r}=e;return D.get({path:`/v1/identity/${r}`,params:{chainId:t,projectId:b.state.projectId}})},fetchTransactions(e){let{account:t,projectId:r,cursor:n}=e;const i=n?{cursor:n}:{};return D.get({path:`/v1/account/${t}/history?projectId=${r}`,params:i})}},j=(0,n.BX)({message:"",variant:"success",open:!1}),F={state:j,subscribeKey:(e,t)=>i(j,e,t),showSuccess(e){j.message=e,j.variant="success",j.open=!0},showError(e){const t=s.parseError(e);j.message=t,j.variant="error",j.open=!0},hide(){j.open=!1}},z=(0,n.BX)({transactions:[],transactionsByYear:{},loading:!1,empty:!1,next:void 0}),q={state:z,subscribe:e=>(0,n.B1)(z,(()=>e(z))),async fetchTransactions(e){const{projectId:t}=b.state;if(!t||!e)throw new Error("Transactions can't be fetched without a projectId and an accountAddress");z.loading=!0;try{const r=await U.fetchTransactions({account:e,projectId:t,cursor:z.next}),n=this.filterSpamTransactions(r.data),i=[...z.transactions,...n];z.loading=!1,z.transactions=i,z.transactionsByYear=this.groupTransactionsByYear(z.transactionsByYear,n),z.empty=0===i.length,z.next=r.next?r.next:void 0}catch(r){M.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:e,projectId:t,cursor:z.next}}),F.showError("Failed to fetch transactions"),z.loading=!1,z.empty=!0}},groupTransactionsByYear(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((t=>{const r=new Date(t.metadata.minedAt).getFullYear();e[r]||(e[r]=[]),e[r]?.push(t)})),e},filterSpamTransactions:e=>e.filter((e=>!e.transfers.every((e=>!0===e.nft_info?.flags.is_spam)))),resetTransactions(){z.transactions=[],z.transactionsByYear={},z.loading=!1,z.empty=!1,z.next=void 0}},H=(0,n.BX)({wcError:!1,buffering:!1}),V={state:H,subscribeKey:(e,t)=>i(H,e,t),_getClient(){if(!H._client)throw new Error("ConnectionController client not set");return H._client},setClient(e){H._client=(0,n.KR)(e)},connectWalletConnect(){H.wcPromise=this._getClient().connectWalletConnect((e=>{H.wcUri=e,H.wcPairingExpiry=s.getPairingExpiry()}))},async connectExternal(e){await(this._getClient().connectExternal?.(e)),g.setConnectedConnector(e.type)},async signMessage(e){return this._getClient().signMessage(e)},checkInstalled(e){return this._getClient().checkInstalled?.(e)},resetWcConnection(){H.wcUri=void 0,H.wcPairingExpiry=void 0,H.wcPromise=void 0,H.wcLinking=void 0,H.recentWallet=void 0,q.resetTransactions(),g.deleteWalletConnectDeepLink()},setWcLinking(e){H.wcLinking=e},setWcError(e){H.wcError=e,H.buffering=!1},setRecentWallet(e){H.recentWallet=e},setBuffering(e){H.buffering=e},async disconnect(){await this._getClient().disconnect(),this.resetWcConnection()}},$=(0,n.BX)({status:"uninitialized",isSiweEnabled:!1}),K={state:$,subscribeKey:(e,t)=>i($,e,t),subscribe:e=>(0,n.B1)($,(()=>e($))),_getClient(){if(!$._client)throw new Error("SIWEController client not set");return $._client},async getNonce(){const e=this._getClient(),t=await e.getNonce();return this.setNonce(t),t},async getSession(){const e=this._getClient(),t=await e.getSession();return t&&(this.setSession(t),this.setStatus("success")),t},createMessage(e){const t=this._getClient().createMessage(e);return this.setMessage(t),t},async verifyMessage(e){const t=this._getClient();return await t.verifyMessage(e)},async signIn(){const e=this._getClient();return await e.signIn()},async signOut(){const e=this._getClient();await e.signOut(),this.setStatus("ready"),e.onSignOut?.()},onSignIn(e){const t=this._getClient();t.onSignIn?.(e)},onSignOut(){const e=this._getClient();e.onSignOut?.()},setSIWEClient(e){$._client=(0,n.KR)(e),$.status="ready",$.isSiweEnabled=e.options.enabled},setNonce(e){$.nonce=e},setStatus(e){$.status=e},setMessage(e){$.message=e},setSession(e){$.session=e}},W=(0,n.BX)({themeMode:"dark",themeVariables:{}}),G={state:W,subscribe:e=>(0,n.B1)(W,(()=>e(W))),setThemeMode(e){W.themeMode=e},setThemeVariables(e){W.themeVariables={...W.themeVariables,...e}},getSnapshot:()=>(0,n.P9)(W)},Q={getWalletImage:e=>e?.image_url?e?.image_url:e?.image_id?y.state.walletImages[e.image_id]:void 0,getNetworkImage:e=>e?.imageUrl?e?.imageUrl:e?.imageId?y.state.networkImages[e.imageId]:void 0,getConnectorImage:e=>e?.imageUrl?e.imageUrl:e?.imageId?y.state.connectorImages[e.imageId]:void 0},Y={goBackOrCloseModal(){N.state.history.length>1?N.goBack():B.close()},navigateAfterNetworkSwitch(){const{history:e}=N.state,t=e.findIndex((e=>"Networks"===e));t>=1?N.goBackToIndex(t-1):B.close()}}},24896:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TransactionUtil:()=>Ln,UiHelperUtil:()=>ct,WuiAccountButton:()=>wt,WuiAllWalletsImage:()=>xt,WuiAvatar:()=>pt,WuiButton:()=>Tt,WuiCard:()=>y,WuiCardSelect:()=>Ft,WuiCardSelectLoader:()=>Rt,WuiChip:()=>Ht,WuiConnectButton:()=>Kt,WuiCtaButton:()=>Qt,WuiEmailInput:()=>rr,WuiFlex:()=>dt,WuiGrid:()=>In,WuiIcon:()=>_e,WuiIconBox:()=>yt,WuiIconLink:()=>or,WuiImage:()=>ke,WuiInputElement:()=>cr,WuiInputNumeric:()=>dr,WuiInputText:()=>Xt,WuiLink:()=>pr,WuiListAccordion:()=>bn,WuiListContent:()=>_n,WuiListItem:()=>yr,WuiListWallet:()=>Rr,WuiListWalletTransaction:()=>kn,WuiLoadingHexagon:()=>Ie,WuiLoadingSpinner:()=>Pe,WuiLoadingThumbnail:()=>Ne,WuiLogo:()=>Br,WuiLogoSelect:()=>jr,WuiNetworkButton:()=>qr,WuiNetworkImage:()=>Dt,WuiNoticeCard:()=>mn,WuiOtp:()=>$r,WuiQrCode:()=>Zr,WuiSearchBar:()=>en,WuiSeparator:()=>Pn,WuiShimmer:()=>De,WuiSnackbar:()=>nn,WuiTabs:()=>sn,WuiTag:()=>Or,WuiText:()=>He,WuiTooltip:()=>ln,WuiTransactionListItem:()=>Sr,WuiTransactionListItemLoader:()=>Cr,WuiTransactionVisual:()=>Ar,WuiVisual:()=>at,WuiVisualThumbnail:()=>hn,WuiWalletImage:()=>Et,customElement:()=>p,initializeTheming:()=>s,setColorTheme:()=>c,setThemeVariables:()=>u});var n=r(61939);let i,o,a;function s(e,t){i=document.createElement("style"),o=document.createElement("style"),a=document.createElement("style"),i.textContent=l(e).core.cssText,o.textContent=l(e).dark.cssText,a.textContent=l(e).light.cssText,document.head.appendChild(i),document.head.appendChild(o),document.head.appendChild(a),c(t)}function c(e){o&&a&&("light"===e?(o.removeAttribute("media"),a.media="enabled"):(a.removeAttribute("media"),o.media="enabled"))}function u(e){i&&o&&a&&(i.textContent=l(e).core.cssText,o.textContent=l(e).dark.cssText,a.textContent=l(e).light.cssText)}function l(e){return{core:n.AH` @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); :root { --w3m-color-mix-strength: ${(0,n.iz)(e?.["--w3m-color-mix-strength"]?`${e["--w3m-color-mix-strength"]}%`:"0%")}; --w3m-font-family: ${(0,n.iz)(e?.["--w3m-font-family"]||"Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;")}; --w3m-font-size-master: ${(0,n.iz)(e?.["--w3m-font-size-master"]||"10px")}; --w3m-border-radius-master: ${(0,n.iz)(e?.["--w3m-border-radius-master"]||"4px")}; --w3m-z-index: ${(0,n.iz)(e?.["--w3m-z-index"]||100)}; --wui-font-family: var(--w3m-font-family); --wui-font-size-micro: var(--w3m-font-size-master); --wui-font-size-tiny: calc(var(--w3m-font-size-master) * 1.2); --wui-font-size-small: calc(var(--w3m-font-size-master) * 1.4); --wui-font-size-paragraph: calc(var(--w3m-font-size-master) * 1.6); --wui-font-size-large: calc(var(--w3m-font-size-master) * 2); --wui-border-radius-5xs: var(--w3m-border-radius-master); --wui-border-radius-4xs: calc(var(--w3m-border-radius-master) * 1.5); --wui-border-radius-3xs: calc(var(--w3m-border-radius-master) * 2); --wui-border-radius-xxs: calc(var(--w3m-border-radius-master) * 3); --wui-border-radius-xs: calc(var(--w3m-border-radius-master) * 4); --wui-border-radius-s: calc(var(--w3m-border-radius-master) * 5); --wui-border-radius-m: calc(var(--w3m-border-radius-master) * 7); --wui-border-radius-l: calc(var(--w3m-border-radius-master) * 9); --wui-border-radius-3xl: calc(var(--w3m-border-radius-master) * 20); --wui-font-weight-light: 400; --wui-font-weight-regular: 500; --wui-font-weight-medium: 600; --wui-font-weight-bold: 700; --wui-letter-spacing-large: -0.8px; --wui-letter-spacing-paragraph: -0.64px; --wui-letter-spacing-small: -0.56px; --wui-letter-spacing-tiny: -0.48px; --wui-letter-spacing-micro: -0.2px; --wui-spacing-0: 0px; --wui-spacing-4xs: 2px; --wui-spacing-3xs: 4px; --wui-spacing-xxs: 6px; --wui-spacing-2xs: 7px; --wui-spacing-xs: 8px; --wui-spacing-1xs: 10px; --wui-spacing-s: 12px; --wui-spacing-m: 14px; --wui-spacing-l: 16px; --wui-spacing-2l: 18px; --wui-spacing-xl: 20px; --wui-spacing-xxl: 24px; --wui-spacing-2xl: 32px; --wui-spacing-3xl: 40px; --wui-spacing-4xl: 90px; --wui-icon-box-size-xxs: 14px; --wui-icon-box-size-xs: 20px; --wui-icon-box-size-sm: 24px; --wui-icon-box-size-md: 32px; --wui-icon-box-size-lg: 40px; --wui-icon-box-size-xl: 64px; --wui-icon-size-inherit: inherit; --wui-icon-size-xxs: 10px; --wui-icon-size-xs: 12px; --wui-icon-size-sm: 14px; --wui-icon-size-md: 16px; --wui-icon-size-mdl: 18px; --wui-icon-size-lg: 20px; --wui-icon-size-xl: 24px; --wui-wallet-image-size-inherit: inherit; --wui-wallet-image-size-sm: 40px; --wui-wallet-image-size-md: 56px; --wui-wallet-image-size-lg: 80px; --wui-box-size-md: 100px; --wui-box-size-lg: 120px; --wui-ease-out-power-2: cubic-bezier(0, 0, 0.22, 1); --wui-ease-out-power-1: cubic-bezier(0, 0, 0.55, 1); --wui-ease-in-power-3: cubic-bezier(0.66, 0, 1, 1); --wui-ease-in-power-2: cubic-bezier(0.45, 0, 1, 1); --wui-ease-in-power-1: cubic-bezier(0.3, 0, 1, 1); --wui-ease-inout-power-1: cubic-bezier(0.45, 0, 0.55, 1); --wui-duration-lg: 200ms; --wui-duration-md: 125ms; --wui-duration-sm: 75ms; --wui-path-network: path( 'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z' ); --wui-path-network-lg: path( 'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z' ); --wui-color-inherit: inherit; --wui-color-inverse-100: #fff; --wui-color-inverse-000: #000; --wui-cover: rgba(20, 20, 20, 0.8); --wui-color-modal-bg: var(--wui-color-modal-bg-base); --wui-color-blue-100: var(--wui-color-blue-base-100); --wui-color-accent-100: var(--wui-color-accent-base-100); --wui-color-accent-090: var(--wui-color-accent-base-090); --wui-color-accent-080: var(--wui-color-accent-base-080); --wui-accent-glass-090: var(--wui-accent-glass-base-090); --wui-accent-glass-080: var(--wui-accent-glass-base-080); --wui-accent-glass-020: var(--wui-accent-glass-base-020); --wui-accent-glass-015: var(--wui-accent-glass-base-015); --wui-accent-glass-010: var(--wui-accent-glass-base-010); --wui-accent-glass-005: var(--wui-accent-glass-base-005); --wui-accent-glass-002: var(--wui-accent-glass-base-002); --wui-color-fg-100: var(--wui-color-fg-base-100); --wui-color-fg-125: var(--wui-color-fg-base-125); --wui-color-fg-150: var(--wui-color-fg-base-150); --wui-color-fg-175: var(--wui-color-fg-base-175); --wui-color-fg-200: var(--wui-color-fg-base-200); --wui-color-fg-225: var(--wui-color-fg-base-225); --wui-color-fg-250: var(--wui-color-fg-base-250); --wui-color-fg-275: var(--wui-color-fg-base-275); --wui-color-fg-300: var(--wui-color-fg-base-300); --wui-color-bg-100: var(--wui-color-bg-base-100); --wui-color-bg-125: var(--wui-color-bg-base-125); --wui-color-bg-150: var(--wui-color-bg-base-150); --wui-color-bg-175: var(--wui-color-bg-base-175); --wui-color-bg-200: var(--wui-color-bg-base-200); --wui-color-bg-225: var(--wui-color-bg-base-225); --wui-color-bg-250: var(--wui-color-bg-base-250); --wui-color-bg-275: var(--wui-color-bg-base-275); --wui-color-bg-300: var(--wui-color-bg-base-300); --wui-color-success-100: var(--wui-color-success-base-100); --wui-color-error-100: var(--wui-color-error-base-100); --wui-icon-box-bg-error-100: var(--wui-icon-box-bg-error-base-100); --wui-icon-box-bg-blue-100: var(--wui-icon-box-bg-blue-base-100); --wui-icon-box-bg-success-100: var(--wui-icon-box-bg-success-base-100); --wui-icon-box-bg-inverse-100: var(--wui-icon-box-bg-inverse-base-100); --wui-all-wallets-bg-100: var(--wui-all-wallets-bg-base-100); --wui-avatar-border: var(--wui-avatar-border-base); --wui-thumbnail-border: var(--wui-thumbnail-border-base); --wui-box-shadow-blue: rgba(71, 161, 255, 0.16); } @supports (background: color-mix(in srgb, white 50%, black)) { :root { --wui-color-modal-bg: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-modal-bg-base) ); --wui-box-shadow-blue: color-mix(in srgb, var(--wui-color-accent-100) 16%, transparent); --wui-color-accent-090: color-mix( in srgb, var(--wui-color-accent-base-100) 90%, var(--w3m-default) ); --wui-color-accent-080: color-mix( in srgb, var(--wui-color-accent-base-100) 80%, var(--w3m-default) ); --wui-color-accent-090: color-mix( in srgb, var(--wui-color-accent-base-100) 90%, transparent ); --wui-color-accent-080: color-mix( in srgb, var(--wui-color-accent-base-100) 80%, transparent ); --wui-accent-glass-090: color-mix( in srgb, var(--wui-color-accent-base-100) 90%, transparent ); --wui-accent-glass-080: color-mix( in srgb, var(--wui-color-accent-base-100) 80%, transparent ); --wui-accent-glass-020: color-mix( in srgb, var(--wui-color-accent-base-100) 20%, transparent ); --wui-accent-glass-015: color-mix( in srgb, var(--wui-color-accent-base-100) 15%, transparent ); --wui-accent-glass-010: color-mix( in srgb, var(--wui-color-accent-base-100) 10%, transparent ); --wui-accent-glass-005: color-mix( in srgb, var(--wui-color-accent-base-100) 5%, transparent ); --wui-color-accent-002: color-mix( in srgb, var(--wui-color-accent-base-100) 2%, transparent ); --wui-color-fg-100: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-fg-base-100) ); --wui-color-fg-125: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-fg-base-125) ); --wui-color-fg-150: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-fg-base-150) ); --wui-color-fg-175: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-fg-base-175) ); --wui-color-fg-200: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-fg-base-200) ); --wui-color-fg-225: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-fg-base-225) ); --wui-color-fg-250: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-fg-base-250) ); --wui-color-fg-275: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-fg-base-275) ); --wui-color-fg-300: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-fg-base-300) ); --wui-color-bg-100: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-bg-base-100) ); --wui-color-bg-125: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-bg-base-125) ); --wui-color-bg-150: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-bg-base-150) ); --wui-color-bg-175: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-bg-base-175) ); --wui-color-bg-200: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-bg-base-200) ); --wui-color-bg-225: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-bg-base-225) ); --wui-color-bg-250: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-bg-base-250) ); --wui-color-bg-275: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-bg-base-275) ); --wui-color-bg-300: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-bg-base-300) ); --wui-color-success-100: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-success-base-100) ); --wui-color-error-100: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-color-error-base-100) ); --wui-icon-box-bg-error-100: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-icon-box-bg-error-base-100) ); --wui-icon-box-bg-accent-100: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-icon-box-bg-blue-base-100) ); --wui-icon-box-bg-success-100: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-icon-box-bg-success-base-100) ); --wui-icon-box-bg-inverse-100: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-icon-box-bg-inverse-base-100) ); --wui-all-wallets-bg-100: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-all-wallets-bg-base-100) ); --wui-avatar-border: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-avatar-border-base) ); --wui-thumbnail-border: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--wui-thumbnail-border-base) ); } } `,light:n.AH` :root { --w3m-color-mix: ${(0,n.iz)(e?.["--w3m-color-mix"]||"#fff")}; --w3m-accent: ${(0,n.iz)(e?.["--w3m-accent"]||"#47a1ff")}; --w3m-default: #fff; --wui-color-modal-bg-base: #191a1a; --wui-color-blue-base-100: #47a1ff; --wui-color-accent-base-100: var(--w3m-accent); --wui-color-accent-base-090: #59aaff; --wui-color-accent-base-080: #6cb4ff; --wui-accent-glass-base-090: rgba(71, 161, 255, 0.9); --wui-accent-glass-base-080: rgba(71, 161, 255, 0.8); --wui-accent-glass-base-020: rgba(71, 161, 255, 0.2); --wui-accent-glass-base-015: rgba(71, 161, 255, 0.15); --wui-accent-glass-base-010: rgba(71, 161, 255, 0.1); --wui-accent-glass-base-005: rgba(71, 161, 255, 0.05); --wui-accent-glass-base-002: rgba(71, 161, 255, 0.02); --wui-color-fg-base-100: #e4e7e7; --wui-color-fg-base-125: #d0d5d5; --wui-color-fg-base-150: #a8b1b1; --wui-color-fg-base-175: #a8b0b0; --wui-color-fg-base-200: #949e9e; --wui-color-fg-base-225: #868f8f; --wui-color-fg-base-250: #788080; --wui-color-fg-base-275: #788181; --wui-color-fg-base-300: #6e7777; --wui-color-bg-base-100: #141414; --wui-color-bg-base-125: #191a1a; --wui-color-bg-base-150: #1e1f1f; --wui-color-bg-base-175: #222525; --wui-color-bg-base-200: #272a2a; --wui-color-bg-base-225: #2c3030; --wui-color-bg-base-250: #313535; --wui-color-bg-base-275: #363b3b; --wui-color-bg-base-300: #3b4040; --wui-color-success-base-100: #26d962; --wui-color-error-base-100: #f25a67; --wui-success-glass-001: rgba(38, 217, 98, 0.01); --wui-success-glass-002: rgba(38, 217, 98, 0.02); --wui-success-glass-005: rgba(38, 217, 98, 0.05); --wui-success-glass-010: rgba(38, 217, 98, 0.1); --wui-success-glass-015: rgba(38, 217, 98, 0.15); --wui-success-glass-020: rgba(38, 217, 98, 0.2); --wui-success-glass-025: rgba(38, 217, 98, 0.25); --wui-success-glass-030: rgba(38, 217, 98, 0.3); --wui-success-glass-060: rgba(38, 217, 98, 0.6); --wui-success-glass-080: rgba(38, 217, 98, 0.8); --wui-icon-box-bg-error-base-100: #3c2426; --wui-icon-box-bg-blue-base-100: #20303f; --wui-icon-box-bg-success-base-100: var(--wui-success-glass-015); --wui-icon-box-bg-inverse-base-100: #243240; --wui-all-wallets-bg-base-100: #222b35; --wui-avatar-border-base: #252525; --wui-thumbnail-border-base: #252525; --wui-gray-glass-001: rgba(255, 255, 255, 0.01); --wui-gray-glass-002: rgba(255, 255, 255, 0.02); --wui-gray-glass-005: rgba(255, 255, 255, 0.05); --wui-gray-glass-010: rgba(255, 255, 255, 0.1); --wui-gray-glass-015: rgba(255, 255, 255, 0.15); --wui-gray-glass-020: rgba(255, 255, 255, 0.2); --wui-gray-glass-025: rgba(255, 255, 255, 0.25); --wui-gray-glass-030: rgba(255, 255, 255, 0.3); --wui-gray-glass-060: rgba(255, 255, 255, 0.6); --wui-gray-glass-080: rgba(255, 255, 255, 0.8); } `,dark:n.AH` :root { --w3m-color-mix: ${(0,n.iz)(e?.["--w3m-color-mix"]||"#000")}; --w3m-accent: ${(0,n.iz)(e?.["--w3m-accent"]||"#3396ff")}; --w3m-default: #000; --wui-color-modal-bg-base: #fff; --wui-color-blue-base-100: #3396ff; --wui-color-accent-base-100: var(--w3m-accent); --wui-color-accent-base-090: #2d7dd2; --wui-color-accent-base-080: #2978cc; --wui-accent-glass-base-090: rgba(51, 150, 255, 0.9); --wui-accent-glass-base-080: rgba(51, 150, 255, 0.8); --wui-accent-glass-base-020: rgba(51, 150, 255, 0.2); --wui-accent-glass-base-015: rgba(51, 150, 255, 0.15); --wui-accent-glass-base-010: rgba(51, 150, 255, 0.1); --wui-accent-glass-base-005: rgba(51, 150, 255, 0.05); --wui-accent-glass-base-002: rgba(51, 150, 255, 0.02); --wui-color-fg-base-100: #141414; --wui-color-fg-base-125: #2d3131; --wui-color-fg-base-150: #474d4d; --wui-color-fg-base-175: #636d6d; --wui-color-fg-base-200: #798686; --wui-color-fg-base-225: #828f8f; --wui-color-fg-base-250: #8b9797; --wui-color-fg-base-275: #95a0a0; --wui-color-fg-base-300: #9ea9a9; --wui-color-bg-base-100: #ffffff; --wui-color-bg-base-125: #f5fafa; --wui-color-bg-base-150: #f3f8f8; --wui-color-bg-base-175: #eef4f4; --wui-color-bg-base-200: #eaf1f1; --wui-color-bg-base-225: #e5eded; --wui-color-bg-base-250: #e1e9e9; --wui-color-bg-base-275: #dce7e7; --wui-color-bg-base-300: #d8e3e3; --wui-color-success-base-100: #26b562; --wui-color-error-base-100: #f05142; --wui-success-glass-001: rgba(38, 181, 98, 0.01); --wui-success-glass-002: rgba(38, 181, 98, 0.02); --wui-success-glass-005: rgba(38, 181, 98, 0.05); --wui-success-glass-010: rgba(38, 181, 98, 0.1); --wui-success-glass-015: rgba(38, 181, 98, 0.15); --wui-success-glass-020: rgba(38, 181, 98, 0.2); --wui-success-glass-025: rgba(38, 181, 98, 0.25); --wui-success-glass-030: rgba(38, 181, 98, 0.3); --wui-success-glass-060: rgba(38, 181, 98, 0.6); --wui-success-glass-080: rgba(38, 181, 98, 0.8); --wui-icon-box-bg-error-base-100: #f4dfdd; --wui-icon-box-bg-blue-base-100: #d9ecfb; --wui-icon-box-bg-success-base-100: #daf0e4; --wui-icon-box-bg-inverse-base-100: #dcecfc; --wui-all-wallets-bg-base-100: #e8f1fa; --wui-avatar-border-base: #f3f4f4; --wui-thumbnail-border-base: #eaefef; --wui-gray-glass-001: rgba(0, 0, 0, 0.01); --wui-gray-glass-002: rgba(0, 0, 0, 0.02); --wui-gray-glass-005: rgba(0, 0, 0, 0.05); --wui-gray-glass-010: rgba(0, 0, 0, 0.1); --wui-gray-glass-015: rgba(0, 0, 0, 0.15); --wui-gray-glass-020: rgba(0, 0, 0, 0.2); --wui-gray-glass-025: rgba(0, 0, 0, 0.25); --wui-gray-glass-030: rgba(0, 0, 0, 0.3); --wui-gray-glass-060: rgba(0, 0, 0, 0.6); --wui-gray-glass-080: rgba(0, 0, 0, 0.8); } `}}const d=n.AH` *, *::after, *::before, :host { margin: 0; padding: 0; box-sizing: border-box; font-style: normal; text-rendering: optimizeSpeed; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; font-family: var(--wui-font-family); backface-visibility: hidden; } `,f=n.AH` button, a { cursor: pointer; display: flex; justify-content: center; align-items: center; position: relative; transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg); outline: none; border: 1px solid transparent; column-gap: var(--wui-spacing-3xs); background-color: transparent; text-decoration: none; } @media (hover: hover) and (pointer: fine) { button:hover:enabled { background-color: var(--wui-gray-glass-005); } button:active:enabled { transition: all var(--wui-ease-out-power-2) var(--wui-duration-sm); background-color: var(--wui-gray-glass-010); } button[data-variant='fill']:hover:enabled { background-color: var(--wui-color-accent-090); } button[data-variant='accentBg']:hover:enabled { background: var(--wui-accent-glass-015); } button[data-variant='accentBg']:active:enabled { background: var(--wui-accent-glass-020); } } button:disabled { cursor: not-allowed; background-color: var(--wui-gray-glass-005); } button[data-variant='shade']:disabled, button[data-variant='accent']:disabled, button[data-variant='accentBg']:disabled { background-color: var(--wui-gray-glass-010); color: var(--wui-gray-glass-015); filter: grayscale(1); } button:disabled > wui-wallet-image, button:disabled > wui-all-wallets-image, button:disabled > wui-network-image, button:disabled > wui-image, button:disabled > wui-icon-box, button:disabled > wui-transaction-visual, button:disabled > wui-logo { filter: grayscale(1); } button:focus-visible, a:focus-visible { border: 1px solid var(--wui-color-accent-100); background-color: var(--wui-gray-glass-005); -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); } button[data-variant='fill']:focus-visible { background-color: var(--wui-color-accent-090); } button[data-variant='fill'] { color: var(--wui-color-inverse-100); background-color: var(--wui-color-accent-100); } button[data-variant='fill']:disabled { color: var(--wui-gray-glass-015); background-color: var(--wui-gray-glass-015); } button[data-variant='fill']:disabled > wui-icon { color: var(--wui-gray-glass-015); } button[data-variant='shade'] { color: var(--wui-color-fg-200); } button[data-variant='accent'], button[data-variant='accentBg'] { color: var(--wui-color-accent-100); } button[data-variant='accentBg'] { background: var(--wui-accent-glass-010); border: 1px solid var(--wui-accent-glass-010); } button[data-variant='fullWidth'] { width: 100%; border-radius: var(--wui-border-radius-xs); height: 56px; border: none; background-color: var(--wui-gray-glass-002); color: var(--wui-color-fg-200); gap: var(--wui-spacing-xs); } button:active:enabled { background-color: var(--wui-gray-glass-010); } button[data-variant='fill']:active:enabled { background-color: var(--wui-color-accent-080); border: 1px solid var(--wui-gray-glass-010); } input { border: none; outline: none; appearance: none; } `,h=n.AH` .wui-color-inherit { color: var(--wui-color-inherit); } .wui-color-accent-100 { color: var(--wui-color-accent-100); } .wui-color-error-100 { color: var(--wui-color-error-100); } .wui-color-success-100 { color: var(--wui-color-success-100); } .wui-color-inverse-100 { color: var(--wui-color-inverse-100); } .wui-color-inverse-000 { color: var(--wui-color-inverse-000); } .wui-color-fg-100 { color: var(--wui-color-fg-100); } .wui-color-fg-200 { color: var(--wui-color-fg-200); } .wui-color-fg-300 { color: var(--wui-color-fg-300); } .wui-bg-color-inherit { background-color: var(--wui-color-inherit); } .wui-bg-color-blue-100 { background-color: var(--wui-color-accent-100); } .wui-bg-color-error-100 { background-color: var(--wui-color-error-100); } .wui-bg-color-success-100 { background-color: var(--wui-color-success-100); } .wui-bg-color-inverse-100 { background-color: var(--wui-color-inverse-100); } .wui-bg-color-inverse-000 { background-color: var(--wui-color-inverse-000); } .wui-bg-color-fg-100 { background-color: var(--wui-color-fg-100); } .wui-bg-color-fg-200 { background-color: var(--wui-color-fg-200); } .wui-bg-color-fg-300 { background-color: var(--wui-color-fg-300); } `;function p(e){return function(t){return"function"===typeof t?function(e,t){return customElements.get(e)||customElements.define(e,t),t}(e,t):function(e,t){const{kind:r,elements:n}=t;return{kind:r,elements:n,finisher(t){customElements.get(e)||customElements.define(e,t)}}}(e,t)}}const g=n.AH` :host { display: block; border-radius: clamp(0px, var(--wui-border-radius-l), 44px); border: 1px solid var(--wui-gray-glass-005); background-color: var(--wui-color-modal-bg); overflow: hidden; } `;var m=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let y=class extends n.WF{render(){return n.qy``}};y.styles=[d,g],y=m([p("wui-card")],y);var v=r(69895);const b=n.AH` :host { display: flex; aspect-ratio: 1 / 1; color: var(--local-color); width: var(--local-width); } svg { width: inherit; height: inherit; object-fit: contain; object-position: center; } `,w=n.JW` `,A=n.JW` `,_=n.JW` `,E=n.JW` `,S=n.JW` `,k=n.JW` `,x=n.JW` `,C=n.JW` `,I=n.JW` `,T=n.JW` `,O=n.JW` `,P=n.JW` `,M=n.JW` `,R=n.JW` `,N=n.JW` `,L=n.JW` `,B=n.JW` `,D=n.JW` `,U=n.JW` `,j=n.JW` `,F=n.JW` `,z=n.JW` `,q=n.JW` `,H=n.JW` `,V=n.JW` `,$=n.JW` `,K=n.JW` `,W=n.JW` `,G=n.JW` `,Q=n.JW` `,Y=n.JW` `,Z=n.JW` `,J=n.JW` `,X=n.JW` `,ee=n.JW` `,te=n.JW` `,re=n.JW` `,ne=n.JW` `,ie=n.JW` `,oe=n.JW` `,ae=n.JW` `,se=n.JW` `,ce=n.JW` `,ue=n.JW` `,le=n.JW` `,de=n.JW` `,fe=n.JW` `,he=n.JW` `,pe=n.JW` `,ge=n.JW` `,me=n.JW` `,ye=n.JW` `,ve=n.JW` `,be=n.JW` `;var we=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};const Ae={allWallets:w,alpha:n.JW` `,appStore:A,chromeStore:R,apple:_,arrowBottom:E,arrowLeft:S,arrowRight:k,arrowTop:x,browser:C,checkmark:I,chevronBottom:T,chevronLeft:O,chevronRight:P,chevronTop:M,clock:N,close:L,compass:D,coinPlaceholder:B,copy:U,cursor:j,desktop:F,disconnect:z,discord:q,etherscan:H,extension:V,externalLink:$,facebook:K,filters:W,github:G,google:Q,helpCircle:Y,infoCircle:Z,mail:J,mobile:X,networkPlaceholder:ee,nftPlaceholder:te,off:re,playStore:ne,qrCode:ie,refresh:oe,search:ae,swapHorizontal:se,swapHorizontalBold:ce,swapVertical:ue,telegram:le,twitch:de,twitter:fe,twitterIcon:he,verify:pe,verifyFilled:ge,wallet:ye,walletConnect:ve,walletPlaceholder:me,warningCircle:be};let _e=class extends n.WF{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300"}render(){return this.style.cssText=`\n --local-color: var(--wui-color-${this.color});\n --local-width: var(--wui-icon-size-${this.size});\n `,n.qy`${Ae[this.name]}`}};_e.styles=[d,h,b],we([(0,v.MZ)()],_e.prototype,"size",void 0),we([(0,v.MZ)()],_e.prototype,"name",void 0),we([(0,v.MZ)()],_e.prototype,"color",void 0),_e=we([p("wui-icon")],_e);const Ee=n.AH` :host { display: block; width: 100%; height: 100%; } img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center center; border-radius: inherit; } `;var Se=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let ke=class extends n.WF{constructor(){super(...arguments),this.src="./path/to/image.jpg",this.alt="Image"}render(){return n.qy`${this.alt}`}};ke.styles=[d,h,Ee],Se([(0,v.MZ)()],ke.prototype,"src",void 0),Se([(0,v.MZ)()],ke.prototype,"alt",void 0),ke=Se([p("wui-image")],ke);const xe=n.AH` :host { display: block; width: var(--wui-box-size-lg); height: var(--wui-box-size-lg); } svg { width: var(--wui-box-size-lg); height: var(--wui-box-size-lg); fill: none; stroke: transparent; stroke-linecap: round; transition: all var(--wui-ease-in-power-3) var(--wui-duration-lg); } use { stroke: var(--wui-color-accent-100); stroke-width: 2px; stroke-dasharray: 54, 118; stroke-dashoffset: 172; animation: dash 1s linear infinite; } @keyframes dash { to { stroke-dashoffset: 0px; } } `;var Ce=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Ie=class extends n.WF{render(){return n.qy` `}};Ie.styles=[d,xe],Ie=Ce([p("wui-loading-hexagon")],Ie);const Te=n.AH` :host { display: flex; } :host([data-size='sm']) > svg { width: 12px; height: 12px; } :host([data-size='md']) > svg { width: 16px; height: 16px; } :host([data-size='lg']) > svg { width: 24px; height: 24px; } :host([data-size='xl']) > svg { width: 32px; height: 32px; } svg { animation: rotate 2s linear infinite; transition: all var(--wui-ease-in-power-3) var(--wui-duration-lg); } circle { fill: none; stroke: var(--local-color); stroke-width: 4px; stroke-dasharray: 1, 124; stroke-dashoffset: 0; stroke-linecap: round; animation: dash 1.5s ease-in-out infinite; } :host([data-size='md']) > svg > circle { stroke-width: 6px; } :host([data-size='sm']) > svg > circle { stroke-width: 8px; } @keyframes rotate { 100% { transform: rotate(360deg); } } @keyframes dash { 0% { stroke-dasharray: 1, 124; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 124; stroke-dashoffset: -35; } 100% { stroke-dashoffset: -125; } } `;var Oe=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Pe=class extends n.WF{constructor(){super(...arguments),this.color="accent-100",this.size="lg"}render(){return this.style.cssText=`--local-color: var(--wui-color-${this.color});`,this.dataset.size=this.size,n.qy` `}};Pe.styles=[d,Te],Oe([(0,v.MZ)()],Pe.prototype,"color",void 0),Oe([(0,v.MZ)()],Pe.prototype,"size",void 0),Pe=Oe([p("wui-loading-spinner")],Pe);const Me=n.AH` :host { display: block; width: var(--wui-box-size-md); height: var(--wui-box-size-md); } svg { width: var(--wui-box-size-md); height: var(--wui-box-size-md); transition: all var(--wui-ease-in-power-3) var(--wui-duration-lg); } rect { fill: none; stroke: var(--wui-color-accent-100); stroke-width: 4px; stroke-linecap: round; animation: dash 1s linear infinite; } @keyframes dash { to { stroke-dashoffset: 0px; } } `;var Re=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Ne=class extends n.WF{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const e=this.radius>50?50:this.radius,t=36-e,r=116+t,i=245+t,o=360+1.75*t;return n.qy` `}};Ne.styles=[d,Me],Re([(0,v.MZ)({type:Number})],Ne.prototype,"radius",void 0),Ne=Re([p("wui-loading-thumbnail")],Ne);const Le=n.AH` :host { display: block; box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005); background: linear-gradient( 120deg, var(--wui-color-bg-200) 5%, var(--wui-color-bg-200) 48%, var(--wui-color-bg-300) 55%, var(--wui-color-bg-300) 60%, var(--wui-color-bg-300) calc(60% + 10px), var(--wui-color-bg-200) calc(60% + 12px), var(--wui-color-bg-200) 100% ); background-size: 250%; animation: shimmer 3s linear infinite reverse; } @keyframes shimmer { from { background-position: -250% 0; } to { background-position: 250% 0; } } `;var Be=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let De=class extends n.WF{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m"}render(){return this.style.cssText=`\n width: ${this.width};\n height: ${this.height};\n border-radius: clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px);\n `,n.qy``}};De.styles=[Le],Be([(0,v.MZ)()],De.prototype,"width",void 0),Be([(0,v.MZ)()],De.prototype,"height",void 0),Be([(0,v.MZ)()],De.prototype,"borderRadius",void 0),De=Be([p("wui-shimmer")],De);var Ue=r(29489),je=r(47035);const Fe=(0,je.u$)(class extends je.WL{constructor(e){if(super(e),e.type!==je.OA.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,t){let[r]=t;if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in r)r[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(r)}const n=e.element.classList;for(const i of this.st)i in r||(n.remove(i),this.st.delete(i));for(const i in r){const e=!!r[i];e===this.st.has(i)||this.nt?.has(i)||(e?(n.add(i),this.st.add(i)):(n.remove(i),this.st.delete(i)))}return Ue.c0}}),ze=n.AH` :host { display: flex !important; } slot { display: inline-block; font-style: normal; font-family: var(--wui-font-family); font-feature-settings: 'tnum' on, 'lnum' on, 'case' on; line-height: 130%; font-weight: var(--wui-font-weight-regular); overflow: inherit; text-overflow: inherit; text-align: var(--local-align); color: var(--local-color); } .wui-font-large-500, .wui-font-large-600, .wui-font-large-700 { font-size: var(--wui-font-size-large); letter-spacing: var(--wui-letter-spacing-large); } .wui-font-paragraph-500, .wui-font-paragraph-600, .wui-font-paragraph-700 { font-size: var(--wui-font-size-paragraph); letter-spacing: var(--wui-letter-spacing-paragraph); } .wui-font-small-400, .wui-font-small-500, .wui-font-small-600 { font-size: var(--wui-font-size-small); letter-spacing: var(--wui-letter-spacing-small); } .wui-font-tiny-500, .wui-font-tiny-600 { font-size: var(--wui-font-size-tiny); letter-spacing: var(--wui-letter-spacing-tiny); } .wui-font-micro-700, .wui-font-micro-600 { font-size: var(--wui-font-size-micro); letter-spacing: var(--wui-letter-spacing-micro); text-transform: uppercase; } .wui-font-small-400, .wui-font-paragraph-400 { font-weight: var(--wui-font-weight-light); } .wui-font-large-700, .wui-font-paragraph-700, .wui-font-micro-700 { font-weight: var(--wui-font-weight-bold); } .wui-font-large-600, .wui-font-paragraph-600, .wui-font-small-600, .wui-font-tiny-600, .wui-font-micro-600 { font-weight: var(--wui-font-weight-medium); } `;var qe=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let He=class extends n.WF{constructor(){super(...arguments),this.variant="paragraph-500",this.color="fg-300",this.align="left"}render(){const e={[`wui-font-${this.variant}`]:!0,[`wui-color-${this.color}`]:!0};return this.style.cssText=`\n --local-align: ${this.align};\n --local-color: var(--wui-color-${this.color});\n `,n.qy``}};He.styles=[d,ze],qe([(0,v.MZ)()],He.prototype,"variant",void 0),qe([(0,v.MZ)()],He.prototype,"color",void 0),qe([(0,v.MZ)()],He.prototype,"align",void 0),He=qe([p("wui-text")],He);const Ve=n.JW` `,$e=n.JW` `,Ke=n.JW` `,We=n.JW` `,Ge=n.JW` `,Qe=n.JW` `,Ye=n.JW` `,Ze=n.JW` `,Je=n.JW` `,Xe=n.JW` `,et=n.JW` `,tt=n.JW` `,rt=n.JW` `,nt=n.AH` :host { display: block; width: 55px; height: 55px; } `;var it=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};const ot={browser:Ve,dao:$e,defi:Ke,defiAlt:We,eth:Ge,layers:Qe,lock:Ye,login:Ze,network:Je,nft:Xe,noun:et,profile:tt,system:rt};let at=class extends n.WF{constructor(){super(...arguments),this.name="browser"}render(){return n.qy`${ot[this.name]}`}};at.styles=[d,nt],it([(0,v.MZ)()],at.prototype,"name",void 0),at=it([p("wui-visual")],at);var st=r(85371);const ct={getSpacingStyles:(e,t)=>Array.isArray(e)?e[t]?`var(--wui-spacing-${e[t]})`:void 0:"string"===typeof e?`var(--wui-spacing-${e})`:void 0,getFormattedDate:e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(e),getHostName:e=>new URL(e).hostname,getTruncateString(e){let{string:t,charsStart:r,charsEnd:n,truncate:i}=e;return t.length<=r+n?t:"end"===i?`${t.substring(0,r)}...`:"start"===i?`...${t.substring(t.length-n)}`:`${t.substring(0,Math.floor(r))}...${t.substring(t.length-Math.floor(n))}`},generateAvatarColors(e){const t=e.toLowerCase().replace(/^0x/iu,"").substring(0,6),r=this.hexToRgb(t),n=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),i=100-3*Number(n?.replace("px","")),o=`${i}% ${i}% at 65% 40%`,a=[];for(let s=0;s<5;s+=1){const e=this.tintColor(r,.15*s);a.push(`rgb(${e[0]}, ${e[1]}, ${e[2]})`)}return`\n --local-color-1: ${a[0]};\n --local-color-2: ${a[1]};\n --local-color-3: ${a[2]};\n --local-color-4: ${a[3]};\n --local-color-5: ${a[4]};\n --local-radial-circle: ${o}\n `},hexToRgb(e){const t=parseInt(e,16);return[t>>16&255,t>>8&255,255&t]},tintColor(e,t){const[r,n,i]=e;return[Math.round(r+(255-r)*t),Math.round(n+(255-n)*t),Math.round(i+(255-i)*t)]},isNumber:e=>/^[0-9]+$/u.test(e),getColorTheme:e=>e||("undefined"!==typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark")},ut=n.AH` :host { display: flex; width: inherit; height: inherit; } `;var lt=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let dt=class extends n.WF{render(){return this.style.cssText=`\n flex-direction: ${this.flexDirection};\n flex-wrap: ${this.flexWrap};\n flex-basis: ${this.flexBasis};\n flex-grow: ${this.flexGrow};\n flex-shrink: ${this.flexShrink};\n align-items: ${this.alignItems};\n justify-content: ${this.justifyContent};\n column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};\n row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};\n gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};\n padding-top: ${this.padding&&ct.getSpacingStyles(this.padding,0)};\n padding-right: ${this.padding&&ct.getSpacingStyles(this.padding,1)};\n padding-bottom: ${this.padding&&ct.getSpacingStyles(this.padding,2)};\n padding-left: ${this.padding&&ct.getSpacingStyles(this.padding,3)};\n margin-top: ${this.margin&&ct.getSpacingStyles(this.margin,0)};\n margin-right: ${this.margin&&ct.getSpacingStyles(this.margin,1)};\n margin-bottom: ${this.margin&&ct.getSpacingStyles(this.margin,2)};\n margin-left: ${this.margin&&ct.getSpacingStyles(this.margin,3)};\n `,n.qy``}};dt.styles=[d,ut],lt([(0,v.MZ)()],dt.prototype,"flexDirection",void 0),lt([(0,v.MZ)()],dt.prototype,"flexWrap",void 0),lt([(0,v.MZ)()],dt.prototype,"flexBasis",void 0),lt([(0,v.MZ)()],dt.prototype,"flexGrow",void 0),lt([(0,v.MZ)()],dt.prototype,"flexShrink",void 0),lt([(0,v.MZ)()],dt.prototype,"alignItems",void 0),lt([(0,v.MZ)()],dt.prototype,"justifyContent",void 0),lt([(0,v.MZ)()],dt.prototype,"columnGap",void 0),lt([(0,v.MZ)()],dt.prototype,"rowGap",void 0),lt([(0,v.MZ)()],dt.prototype,"gap",void 0),lt([(0,v.MZ)()],dt.prototype,"padding",void 0),lt([(0,v.MZ)()],dt.prototype,"margin",void 0),dt=lt([p("wui-flex")],dt);const ft=n.AH` :host { display: block; width: var(--wui-icon-box-size-xl); height: var(--wui-icon-box-size-xl); border-radius: var(--wui-border-radius-3xl); box-shadow: 0 0 0 8px var(--wui-gray-glass-005); overflow: hidden; position: relative; } :host([data-variant='generated']) { --mixed-local-color-1: var(--local-color-1); --mixed-local-color-2: var(--local-color-2); --mixed-local-color-3: var(--local-color-3); --mixed-local-color-4: var(--local-color-4); --mixed-local-color-5: var(--local-color-5); } @supports (background: color-mix(in srgb, white 50%, black)) { :host([data-variant='generated']) { --mixed-local-color-1: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--local-color-1) ); --mixed-local-color-2: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--local-color-2) ); --mixed-local-color-3: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--local-color-3) ); --mixed-local-color-4: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--local-color-4) ); --mixed-local-color-5: color-mix( in srgb, var(--w3m-color-mix) var(--w3m-color-mix-strength), var(--local-color-5) ); } } :host([data-variant='generated']) { box-shadow: 0 0 0 8px var(--wui-gray-glass-005); background: radial-gradient( var(--local-radial-circle), #fff 0.52%, var(--mixed-local-color-5) 31.25%, var(--mixed-local-color-3) 51.56%, var(--mixed-local-color-2) 65.63%, var(--mixed-local-color-1) 82.29%, var(--mixed-local-color-4) 100% ); } :host([data-variant='default']) { box-shadow: 0 0 0 8px var(--wui-gray-glass-005); background: radial-gradient( 75.29% 75.29% at 64.96% 24.36%, #fff 0.52%, #f5ccfc 31.25%, #dba4f5 51.56%, #9a8ee8 65.63%, #6493da 82.29%, #6ebdea 100% ); } `;var ht=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let pt=class extends n.WF{constructor(){super(...arguments),this.imageSrc=void 0,this.alt=void 0,this.address=void 0}render(){return n.qy`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",n.qy``;if(this.address){this.dataset.variant="generated";const e=ct.generateAvatarColors(this.address);return this.style.cssText=e,null}return this.dataset.variant="default",null}};pt.styles=[d,ft],ht([(0,v.MZ)()],pt.prototype,"imageSrc",void 0),ht([(0,v.MZ)()],pt.prototype,"alt",void 0),ht([(0,v.MZ)()],pt.prototype,"address",void 0),pt=ht([p("wui-avatar")],pt);const gt=n.AH` :host { display: inline-flex; justify-content: center; align-items: center; position: relative; overflow: hidden; background-color: var(--wui-gray-glass-020); border-radius: var(--local-border-radius); box-shadow: 0 0 0 1px var(--local-border); width: var(--local-size); height: var(--local-size); min-height: var(--local-size); min-width: var(--local-size); } @supports (background: color-mix(in srgb, white 50%, black)) { :host { background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent); } } `;var mt=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let yt=class extends n.WF{constructor(){super(...arguments),this.size="md",this.backgroundColor="accent-100",this.iconColor="accent-100",this.background="transparent",this.border=!1,this.borderColor="wui-color-bg-125",this.icon="copy"}render(){const e=this.iconSize||this.size,t="lg"===this.size,r="xl"===this.size,i=t?"12%":"16%",o=t?"xxs":r?"s":"3xl",a="gray"===this.background,s="opaque"===this.background,c="accent-100"===this.backgroundColor&&s||"success-100"===this.backgroundColor&&s||"error-100"===this.backgroundColor&&s||"inverse-100"===this.backgroundColor&&s;let u=`var(--wui-color-${this.backgroundColor})`;return c?u=`var(--wui-icon-box-bg-${this.backgroundColor})`:a&&(u=`var(--wui-gray-${this.backgroundColor})`),this.style.cssText=`\n --local-bg-value: ${u};\n --local-bg-mix: ${c||a?"100%":i};\n --local-border-radius: var(--wui-border-radius-${o});\n --local-size: var(--wui-icon-box-size-${this.size});\n --local-border: ${"wui-color-bg-125"===this.borderColor?"2px":"1px"} solid ${this.border?`var(--${this.borderColor})`:"transparent"}\n `,n.qy` `}};yt.styles=[d,f,gt],mt([(0,v.MZ)()],yt.prototype,"size",void 0),mt([(0,v.MZ)()],yt.prototype,"backgroundColor",void 0),mt([(0,v.MZ)()],yt.prototype,"iconColor",void 0),mt([(0,v.MZ)()],yt.prototype,"iconSize",void 0),mt([(0,v.MZ)()],yt.prototype,"background",void 0),mt([(0,v.MZ)({type:Boolean})],yt.prototype,"border",void 0),mt([(0,v.MZ)()],yt.prototype,"borderColor",void 0),mt([(0,v.MZ)()],yt.prototype,"icon",void 0),yt=mt([p("wui-icon-box")],yt);const vt=n.AH` :host { display: block; } button { border-radius: var(--wui-border-radius-3xl); background: var(--wui-gray-glass-002); display: flex; gap: var(--wui-spacing-xs); padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) var(--wui-spacing-3xs) var(--wui-spacing-xs); border: 1px solid var(--wui-gray-glass-005); } button:disabled { background: var(--wui-gray-glass-015); } button:disabled > wui-text { color: var(--wui-gray-glass-015); } button:disabled > wui-flex > wui-text { color: var(--wui-gray-glass-015); } button:disabled > wui-image, button:disabled > wui-icon-box, button:disabled > wui-flex > wui-avatar { filter: grayscale(1); } button:has(wui-image) { padding: var(--wui-spacing-3xs) var(--wui-spacing-3xs) var(--wui-spacing-3xs) var(--wui-spacing-xs); } wui-text { color: var(--wui-color-fg-100); } wui-flex > wui-text { color: var(--wui-color-fg-200); transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg); } wui-image, wui-icon-box { border-radius: var(--wui-border-radius-3xl); width: 24px; height: 24px; box-shadow: 0 0 0 2px var(--wui-gray-glass-005); } wui-flex { border-radius: var(--wui-border-radius-3xl); border: 1px solid var(--wui-gray-glass-005); background: var(--wui-gray-glass-005); padding: 4px var(--wui-spacing-m) 4px var(--wui-spacing-xxs); } button.local-no-balance { border-radius: 0px; border: none; background: transparent; } wui-avatar { width: 20px; height: 20px; box-shadow: 0 0 0 2px var(--wui-accent-glass-010); } @media (max-width: 500px) { button { gap: 0px; padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) !important; height: 32px; } wui-image, wui-icon-box, button > wui-text { visibility: hidden; width: 0px; height: 0px; } button { border-radius: 0px; border: none; background: transparent; padding: 0px; } } @media (hover: hover) and (pointer: fine) { button:hover:enabled > wui-flex > wui-text { color: var(--wui-color-fg-175); } button:active:enabled > wui-flex > wui-text { color: var(--wui-color-fg-175); } } `;var bt=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let wt=class extends n.WF{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.balance=void 0,this.disabled=!1,this.isProfileName=!1,this.address="",this.charsStart=4,this.charsEnd=6}render(){return n.qy` `}balanceTemplate(){if(this.balance){const e=this.networkSrc?n.qy``:n.qy` `;return n.qy` ${e} ${this.balance} `}return null}};wt.styles=[d,f,vt],bt([(0,v.MZ)()],wt.prototype,"networkSrc",void 0),bt([(0,v.MZ)()],wt.prototype,"avatarSrc",void 0),bt([(0,v.MZ)()],wt.prototype,"balance",void 0),bt([(0,v.MZ)({type:Boolean})],wt.prototype,"disabled",void 0),bt([(0,v.MZ)({type:Boolean})],wt.prototype,"isProfileName",void 0),bt([(0,v.MZ)()],wt.prototype,"address",void 0),bt([(0,v.MZ)()],wt.prototype,"charsStart",void 0),bt([(0,v.MZ)()],wt.prototype,"charsEnd",void 0),wt=bt([p("wui-account-button")],wt);const At=n.AH` :host { position: relative; background-color: var(--wui-gray-glass-002); display: flex; justify-content: center; align-items: center; width: var(--local-size); height: var(--local-size); border-radius: inherit; border-radius: var(--local-border-radius); } :host > wui-flex { overflow: hidden; border-radius: inherit; border-radius: var(--local-border-radius); } :host::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; right: 0; border-radius: inherit; border: 1px solid var(--wui-gray-glass-010); pointer-events: none; } :host([name='Extension'])::after { border: 1px solid var(--wui-accent-glass-010); } :host([data-wallet-icon='allWallets']) { background-color: var(--wui-all-wallets-bg-100); } :host([data-wallet-icon='allWallets'])::after { border: 1px solid var(--wui-accent-glass-010); } wui-icon[data-parent-size='inherit'] { width: 75%; height: 75%; align-items: center; } wui-icon[data-parent-size='sm'] { width: 18px; height: 18px; } wui-icon[data-parent-size='md'] { width: 24px; height: 24px; } wui-icon[data-parent-size='lg'] { width: 42px; height: 42px; } wui-icon[data-parent-size='full'] { width: 100%; height: 100%; } :host > wui-icon-box { position: absolute; overflow: hidden; right: -1px; bottom: -2px; z-index: 1; border: 2px solid var(--wui-color-bg-base-150, #1e1f1f); padding: 1px; } `;var _t=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Et=class extends n.WF{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="xxs";return e="lg"===this.size?"m":"md"===this.size?"xs":"xxs",this.style.cssText=`\n --local-border-radius: var(--wui-border-radius-${e});\n --local-size: var(--wui-wallet-image-size-${this.size});\n `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),n.qy` ${this.templateVisual()} `}templateVisual(){return this.imageSrc?n.qy``:this.walletIcon?n.qy``:n.qy``}};Et.styles=[d,At],_t([(0,v.MZ)()],Et.prototype,"size",void 0),_t([(0,v.MZ)()],Et.prototype,"name",void 0),_t([(0,v.MZ)()],Et.prototype,"imageSrc",void 0),_t([(0,v.MZ)()],Et.prototype,"walletIcon",void 0),_t([(0,v.MZ)({type:Boolean})],Et.prototype,"installed",void 0),_t([(0,v.MZ)()],Et.prototype,"badgeSize",void 0),Et=_t([p("wui-wallet-image")],Et);const St=n.AH` :host { position: relative; border-radius: var(--wui-border-radius-xxs); width: 40px; height: 40px; overflow: hidden; background: var(--wui-gray-glass-002); display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: var(--wui-spacing-4xs); padding: 3.75px !important; } :host::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; right: 0; border-radius: inherit; border: 1px solid var(--wui-gray-glass-010); pointer-events: none; } :host > wui-wallet-image { width: 14px; height: 14px; border-radius: var(--wui-border-radius-5xs); } :host > wui-flex { padding: 2px; position: fixed; overflow: hidden; left: 34px; bottom: 8px; background: var(--dark-background-150, #1e1f1f); border-radius: 50%; z-index: 2; display: flex; } `;var kt=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let xt=class extends n.WF{constructor(){super(...arguments),this.walletImages=[]}render(){const e=this.walletImages.length<4;return n.qy`${this.walletImages.slice(0,4).map((e=>{let{src:t,walletName:r}=e;return n.qy` `}))} ${e?[...Array(4-this.walletImages.length)].map((()=>n.qy` `)):null} `}};xt.styles=[d,St],kt([(0,v.MZ)({type:Array})],xt.prototype,"walletImages",void 0),xt=kt([p("wui-all-wallets-image")],xt);const Ct=n.AH` :host { width: var(--local-width); position: relative; } button { border: 1px solid var(--wui-gray-glass-010); border-radius: var(--wui-border-radius-m); width: var(--local-width); } button:disabled { border: 1px solid var(--wui-gray-glass-010); } button[data-size='sm'] { padding: var(--wui-spacing-xxs) var(--wui-spacing-s); } button[data-size='sm'][data-icon-left='true'] { padding: var(--wui-spacing-xxs) var(--wui-spacing-s) var(--wui-spacing-xxs) var(--wui-spacing-xs); } button[data-size='sm'][data-icon-right='true'] { padding: var(--wui-spacing-xxs) var(--wui-spacing-xs) var(--wui-spacing-xxs) var(--wui-spacing-s); } ::slotted(*) { transition: opacity 200ms ease-in-out; opacity: var(--local-opacity-100); } button > wui-text { transition: opacity 200ms ease-in-out; opacity: var(--local-opacity-100); } button[data-size='md'] { padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l); } button[data-size='md'][data-icon-left='true'] { padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s); } button[data-size='md'][data-icon-right='true'] { padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l); } wui-loading-spinner { position: absolute; left: 50%; top: 50%; transition: all 200ms ease-in-out; transform: translate(-50%, -50%); opacity: var(--local-opacity-000); } `;var It=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Tt=class extends n.WF{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="fill",this.hasIconLeft=!1,this.hasIconRight=!1}render(){this.style.cssText=`\n --local-width: ${this.fullWidth?"100%":"auto"};\n --local-opacity-100: ${this.loading?0:1};\n --local-opacity-000: ${this.loading?1:0};`;const e="md"===this.size?"paragraph-600":"small-600";return n.qy` `}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){return this.loading?n.qy``:n.qy``}};Tt.styles=[d,f,Ct],It([(0,v.MZ)()],Tt.prototype,"size",void 0),It([(0,v.MZ)({type:Boolean})],Tt.prototype,"disabled",void 0),It([(0,v.MZ)({type:Boolean})],Tt.prototype,"fullWidth",void 0),It([(0,v.MZ)({type:Boolean})],Tt.prototype,"loading",void 0),It([(0,v.MZ)()],Tt.prototype,"variant",void 0),It([(0,v.MZ)({type:Boolean})],Tt.prototype,"hasIconLeft",void 0),It([(0,v.MZ)({type:Boolean})],Tt.prototype,"hasIconRight",void 0),Tt=It([p("wui-button")],Tt);const Ot=n.JW` `,Pt=n.AH` :host { display: flex; flex-direction: column; align-items: center; width: 76px; row-gap: var(--wui-spacing-xs); padding: var(--wui-spacing-xs) 10px; background-color: var(--wui-gray-glass-002); border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); position: relative; } wui-shimmer[data-type='network'] { border: none; -webkit-clip-path: var(--wui-path-network); clip-path: var(--wui-path-network); } svg { position: absolute; width: 48px; height: 54px; z-index: 1; } svg > path { stroke: var(--wui-gray-glass-010); stroke-width: 1px; } `;var Mt=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Rt=class extends n.WF{constructor(){super(...arguments),this.type="wallet"}render(){return n.qy` ${this.shimmerTemplate()} `}shimmerTemplate(){return"network"===this.type?n.qy` ${Ot}`:n.qy``}};Rt.styles=[d,f,Pt],Mt([(0,v.MZ)()],Rt.prototype,"type",void 0),Rt=Mt([p("wui-card-select-loader")],Rt);const Nt=n.JW` `,Lt=n.AH` :host { position: relative; border-radius: inherit; display: flex; justify-content: center; align-items: center; width: var(--local-width); height: var(--local-height); } svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; fill: var(--wui-gray-glass-002); } svg > path { stroke: var(--local-stroke); transition: stroke var(--wui-ease-out-power-1) var(--wui-duration-lg); } wui-image { width: 100%; height: 100%; -webkit-clip-path: var(--local-path); clip-path: var(--local-path); background: var(--wui-gray-glass-002); } wui-icon { transform: translateY(-5%); width: var(--local-icon-size); height: var(--local-icon-size); } `;var Bt=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Dt=class extends n.WF{constructor(){super(...arguments),this.size="md",this.name="uknown",this.selected=!1}render(){const e="lg"===this.size;return this.style.cssText=`\n --local-stroke: ${this.selected?"var(--wui-color-accent-100)":"var(--wui-gray-glass-010)"};\n --local-path: ${e?"var(--wui-path-network-lg)":"var(--wui-path-network)"};\n --local-width: ${e?"86px":"48px"};\n --local-height: ${e?"96px":"54px"};\n --local-icon-size: ${e?"42px":"24px"};\n `,n.qy`${this.templateVisual()} ${e?Nt:Ot}`}templateVisual(){return this.imageSrc?n.qy``:n.qy``}};Dt.styles=[d,Lt],Bt([(0,v.MZ)()],Dt.prototype,"size",void 0),Bt([(0,v.MZ)()],Dt.prototype,"name",void 0),Bt([(0,v.MZ)()],Dt.prototype,"imageSrc",void 0),Bt([(0,v.MZ)({type:Boolean})],Dt.prototype,"selected",void 0),Dt=Bt([p("wui-network-image")],Dt);const Ut=n.AH` button { flex-direction: column; width: 76px; row-gap: var(--wui-spacing-xs); padding: var(--wui-spacing-xs) var(--wui-spacing-0); background-color: var(--wui-gray-glass-002); border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); } button > wui-text { color: var(--wui-color-fg-100); max-width: var(--wui-icon-box-size-xl); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: center; } button:disabled > wui-text { color: var(--wui-gray-glass-015); } [data-selected='true'] { background-color: var(--wui-accent-glass-020); } @media (hover: hover) and (pointer: fine) { [data-selected='true']:hover:enabled { background-color: var(--wui-accent-glass-015); } } [data-selected='true']:active:enabled { background-color: var(--wui-accent-glass-010); } `;var jt=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Ft=class extends n.WF{constructor(){super(...arguments),this.name="Unknown",this.type="wallet",this.imageSrc=void 0,this.disabled=!1,this.selected=!1,this.installed=!1}render(){return n.qy` `}imageTemplate(){return"network"===this.type?n.qy` `:n.qy` `}};Ft.styles=[d,f,Ut],jt([(0,v.MZ)()],Ft.prototype,"name",void 0),jt([(0,v.MZ)()],Ft.prototype,"type",void 0),jt([(0,v.MZ)()],Ft.prototype,"imageSrc",void 0),jt([(0,v.MZ)({type:Boolean})],Ft.prototype,"disabled",void 0),jt([(0,v.MZ)({type:Boolean})],Ft.prototype,"selected",void 0),jt([(0,v.MZ)({type:Boolean})],Ft.prototype,"installed",void 0),Ft=jt([p("wui-card-select")],Ft);const zt=n.AH` a { border: 1px solid var(--wui-gray-glass-010); border-radius: var(--wui-border-radius-3xl); } wui-image { border-radius: var(--wui-border-radius-3xl); overflow: hidden; } a.disabled > wui-icon, a.disabled > wui-image { filter: grayscale(1); } a[data-variant='fill'] { color: var(--wui-color-inverse-100); background-color: var(--wui-color-accent-100); } a[data-variant='shade'], a[data-variant='shadeSmall'] { background-color: transparent; background-color: var(--wui-gray-glass-010); color: var(--wui-color-fg-200); } a[data-variant='success'] { column-gap: var(--wui-spacing-xxs); border: 1px solid var(--wui-success-glass-010); background-color: var(--wui-success-glass-010); color: var(--wui-color-success-100); } a[data-variant='transparent'] { column-gap: var(--wui-spacing-xxs); background-color: transparent; color: var(--wui-color-fg-150); } a[data-variant='transparent'], a[data-variant='success'], a[data-variant='shadeSmall'] { padding: 7px var(--wui-spacing-s) 7px 10px; } a[data-variant='transparent']:has(wui-text:first-child), a[data-variant='success']:has(wui-text:first-child), a[data-variant='shadeSmall']:has(wui-text:first-child) { padding: 7px var(--wui-spacing-s); } a[data-variant='fill'], a[data-variant='shade'] { column-gap: var(--wui-spacing-xs); padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs) var(--wui-spacing-xs); } a[data-variant='fill']:has(wui-text:first-child), a[data-variant='shade']:has(wui-text:first-child) { padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m); } a[data-variant='fill'] > wui-image, a[data-variant='shade'] > wui-image { width: 24px; height: 24px; } a[data-variant='fill'] > wui-image { box-shadow: inset 0 0 0 1px var(--wui-color-accent-090); } a[data-variant='shade'] > wui-image, a[data-variant='shadeSmall'] > wui-image { box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010); } a[data-variant='fill'] > wui-icon, a[data-variant='shade'] > wui-icon { width: 14px; height: 14px; } a[data-variant='transparent'] > wui-image, a[data-variant='success'] > wui-image, a[data-variant='shadeSmall'] > wui-image { width: 14px; height: 14px; } a[data-variant='transparent'] > wui-icon, a[data-variant='success'] > wui-icon, a[data-variant='shadeSmall'] > wui-icon { width: 12px; height: 12px; } a[data-variant='fill']:focus-visible { background-color: var(--wui-color-accent-090); } a[data-variant='shade']:focus-visible, a[data-variant='shadeSmall']:focus-visible { background-color: var(--wui-gray-glass-015); } a[data-variant='transparent']:focus-visible { background-color: var(--wui-gray-glass-005); } a[data-variant='success']:focus-visible { background-color: var(--wui-success-glass-015); } a.disabled { color: var(--wui-gray-glass-015); background-color: var(--wui-gray-glass-015); pointer-events: none; } @media (hover: hover) and (pointer: fine) { a[data-variant='fill']:hover { background-color: var(--wui-color-accent-090); } a[data-variant='shade']:hover, a[data-variant='shadeSmall']:hover { background-color: var(--wui-gray-glass-015); } a[data-variant='transparent']:hover { background-color: var(--wui-gray-glass-005); } a[data-variant='success']:hover { background-color: var(--wui-success-glass-015); } } a[data-variant='fill']:active { background-color: var(--wui-color-accent-080); } a[data-variant='shade']:active, a[data-variant='shadeSmall']:active { background-color: var(--wui-gray-glass-020); } a[data-variant='transparent']:active { background-color: var(--wui-gray-glass-010); } a[data-variant='success']:active { background-color: var(--wui-success-glass-020); } `;var qt=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Ht=class extends n.WF{constructor(){super(...arguments),this.variant="fill",this.imageSrc=void 0,this.disabled=!1,this.icon="externalLink",this.href="",this.text=void 0}render(){const e="success"===this.variant||"transparent"===this.variant||"shadeSmall"===this.variant?"small-600":"paragraph-600";return n.qy` ${this.imageTemplate()} ${this.title?this.title:ct.getHostName(this.href)} `}imageTemplate(){return this.imageSrc?n.qy``:null}};Ht.styles=[d,f,zt],qt([(0,v.MZ)()],Ht.prototype,"variant",void 0),qt([(0,v.MZ)()],Ht.prototype,"imageSrc",void 0),qt([(0,v.MZ)({type:Boolean})],Ht.prototype,"disabled",void 0),qt([(0,v.MZ)()],Ht.prototype,"icon",void 0),qt([(0,v.MZ)()],Ht.prototype,"href",void 0),qt([(0,v.MZ)()],Ht.prototype,"text",void 0),Ht=qt([p("wui-chip")],Ht);const Vt=n.AH` :host { position: relative; display: block; } button { background: var(--wui-color-accent-100); border: 1px solid var(--wui-gray-glass-010); border-radius: var(--wui-border-radius-m); gap: var(--wui-spacing-xs); } button.loading { background: var(--wui-gray-glass-010); border: 1px solid var(--wui-gray-glass-010); pointer-events: none; } button:disabled { background-color: var(--wui-gray-glass-015); border: 1px solid var(--wui-gray-glass-010); } button:disabled > wui-text { color: var(--wui-gray-glass-015); } @media (hover: hover) and (pointer: fine) { button:hover:enabled { background-color: var(--wui-color-accent-090); } button:active:enabled { background-color: var(--wui-color-accent-080); } } button:focus-visible { border: 1px solid var(--wui-gray-glass-010); background-color: var(--wui-color-accent-090); -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); } button[data-size='sm'] { padding: 6.75px 10px 7.25px; } ::slotted(*) { transition: opacity 200ms ease-in-out; opacity: var(--local-opacity-100); } button > wui-text { transition: opacity 200ms ease-in-out; opacity: var(--local-opacity-100); color: var(--wui-color-inverse-100); } button[data-size='md'] { padding: 9px var(--wui-spacing-l) 9px var(--wui-spacing-l); } button[data-size='md'] + wui-text { padding-left: var(--wui-spacing-3xs); } @media (max-width: 500px) { button[data-size='md'] { height: 32px; padding: 5px 12px; } button[data-size='md'] > wui-text > slot { font-size: 14px !important; } } wui-loading-spinner { width: 14px; height: 14px; } wui-loading-spinner::slotted(svg) { width: 10px !important; height: 10px !important; } button[data-size='sm'] > wui-loading-spinner { width: 12px; height: 12px; } `;var $t=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Kt=class extends n.WF{constructor(){super(...arguments),this.size="md",this.loading=!1}render(){const e="md"===this.size?"paragraph-600":"small-600";return n.qy` `}loadingTemplate(){return this.loading?n.qy``:null}};Kt.styles=[d,f,Vt],$t([(0,v.MZ)()],Kt.prototype,"size",void 0),$t([(0,v.MZ)({type:Boolean})],Kt.prototype,"loading",void 0),Kt=$t([p("wui-connect-button")],Kt);const Wt=n.AH` wui-flex { width: 100%; background-color: var(--wui-gray-glass-002); border-radius: var(--wui-border-radius-xs); } `;var Gt=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Qt=class extends n.WF{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return n.qy` ${this.label} ${this.buttonLabel} `}};Qt.styles=[d,f,Wt],Gt([(0,v.MZ)({type:Boolean})],Qt.prototype,"disabled",void 0),Gt([(0,v.MZ)()],Qt.prototype,"label",void 0),Gt([(0,v.MZ)()],Qt.prototype,"buttonLabel",void 0),Qt=Gt([p("wui-cta-button")],Qt);var Yt=r(47920);const Zt=n.AH` :host { position: relative; width: 100%; display: inline-block; color: var(--wui-color-fg-275); } input { width: 100%; border-radius: var(--wui-border-radius-xs); border: 1px solid var(--wui-gray-glass-005); background: var(--wui-gray-glass-005); font-size: var(--wui-font-size-paragraph); font-weight: var(--wui-font-weight-light); letter-spacing: var(--wui-letter-spacing-paragraph); color: var(--wui-color-fg-100); transition: all var(--wui-ease-inout-power-1) var(--wui-duration-lg); caret-color: var(--wui-color-accent-100); } input:disabled { cursor: not-allowed; border: 1px solid var(--wui-gray-glass-010); } input:disabled::placeholder, input:disabled + wui-icon { color: var(--wui-color-fg-300); } input::placeholder { color: var(--wui-color-fg-275); } input:focus:enabled { transition: all var(--wui-ease-out-power-2) var(--wui-duration-sm); background-color: var(--wui-gray-glass-010); border: 1px solid var(--wui-color-accent-100); -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); } input:hover:enabled { background-color: var(--wui-gray-glass-010); } wui-icon { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; } .wui-size-sm { padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s); } wui-icon + .wui-size-sm { padding: 9px var(--wui-spacing-m) 10px 36px; } wui-icon[data-input='sm'] { left: var(--wui-spacing-s); } .wui-size-md { padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m); } wui-icon + .wui-size-md, wui-loading-spinner + .wui-size-md { padding: 10.5px var(--wui-spacing-3xl) 10.5px 40px; } wui-icon[data-input='md'] { left: var(--wui-spacing-l); } input:placeholder-shown ~ ::slotted(wui-input-element), input:placeholder-shown ~ ::slotted(wui-icon) { opacity: 0; pointer-events: none; } ::slotted(wui-input-element), ::slotted(wui-icon) { position: absolute; top: 50%; transform: translateY(-50%); transition: all var(--wui-ease-in-power-2) var(--wui-duration-md); } ::slotted(wui-input-element) { right: var(--wui-spacing-m); } ::slotted(wui-icon) { right: 0px; } `;var Jt=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Xt=class extends n.WF{constructor(){super(...arguments),this.inputElementRef=(0,Yt._)(),this.size="md",this.disabled=!1,this.placeholder="",this.type="text"}render(){const e=`wui-size-${this.size}`;return n.qy` ${this.templateIcon()} `}templateIcon(){return this.icon?n.qy``:null}dispatchInputChangeEvent(){this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};Xt.styles=[d,f,Zt],Jt([(0,v.MZ)()],Xt.prototype,"size",void 0),Jt([(0,v.MZ)()],Xt.prototype,"icon",void 0),Jt([(0,v.MZ)({type:Boolean})],Xt.prototype,"disabled",void 0),Jt([(0,v.MZ)()],Xt.prototype,"placeholder",void 0),Jt([(0,v.MZ)()],Xt.prototype,"type",void 0),Jt([(0,v.MZ)()],Xt.prototype,"keyHint",void 0),Jt([(0,v.MZ)()],Xt.prototype,"value",void 0),Xt=Jt([p("wui-input-text")],Xt);const er=n.AH` :host { position: relative; display: inline-block; } wui-text { margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m); } `;var tr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let rr=class extends n.WF{constructor(){super(...arguments),this.disabled=!1}render(){return n.qy` ${this.templateError()} `}templateError(){return this.errorMessage?n.qy`${this.errorMessage}`:null}};rr.styles=[d,er],tr([(0,v.MZ)()],rr.prototype,"errorMessage",void 0),tr([(0,v.MZ)({type:Boolean})],rr.prototype,"disabled",void 0),tr([(0,v.MZ)()],rr.prototype,"value",void 0),rr=tr([p("wui-email-input")],rr);const nr=n.AH` button { border-radius: var(--wui-border-radius-xxs); color: var(--wui-color-fg-100); padding: var(--wui-spacing-2xs); } @media (max-width: 700px) { button { padding: var(--wui-spacing-s); } } button > wui-icon { pointer-events: none; } button:disabled > wui-icon { color: var(--wui-color-bg-300) !important; } button:disabled { background-color: transparent; } `;var ir=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let or=class extends n.WF{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}render(){return n.qy` `}};or.styles=[d,f,h,nr],ir([(0,v.MZ)()],or.prototype,"size",void 0),ir([(0,v.MZ)({type:Boolean})],or.prototype,"disabled",void 0),ir([(0,v.MZ)()],or.prototype,"icon",void 0),ir([(0,v.MZ)()],or.prototype,"iconColor",void 0),or=ir([p("wui-icon-link")],or);const ar=n.AH` button { background-color: var(--wui-color-fg-300); border-radius: var(--wui-border-radius-4xs); width: 16px; height: 16px; } button:disabled { background-color: var(--wui-color-bg-300); } wui-icon { color: var(--wui-color-bg-200) !important; } button:focus-visible { background-color: var(--wui-color-fg-250); border: 1px solid var(--wui-color-accent-100); } button:active:enabled { background-color: var(--wui-color-fg-225); } @media (hover: hover) and (pointer: fine) { button:hover:enabled { background-color: var(--wui-color-fg-250); } } `;var sr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let cr=class extends n.WF{constructor(){super(...arguments),this.icon="copy"}render(){return n.qy` `}};cr.styles=[d,f,ar],sr([(0,v.MZ)()],cr.prototype,"icon",void 0),cr=sr([p("wui-input-element")],cr);const ur=n.AH` :host { position: relative; display: inline-block; } input { width: 50px; height: 50px; background: var(--wui-gray-glass-010); border-radius: var(--wui-border-radius-xs); border: 1px solid var(--wui-gray-glass-005); font-family: var(--wui-font-family); font-size: var(--wui-font-size-large); font-weight: var(--wui-font-weight-regular); letter-spacing: var(--wui-letter-spacing-large); text-align: center; color: var(--wui-color-fg-100); caret-color: var(--wui-color-accent-100); transition: all var(--wui-ease-inout-power-1) var(--wui-duration-lg); box-sizing: border-box; -webkit-appearance: none; -moz-appearance: textfield; padding: 0px; } input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } input[type='number'] { -moz-appearance: textfield; } input:disabled { cursor: not-allowed; border: 1px solid var(--wui-gray-glass-010); background: var(--wui-gray-glass-005); } input:focus:enabled { transition: all var(--wui-ease-out-power-2) var(--wui-duration-sm); background-color: var(--wui-gray-glass-015); border: 1px solid var(--wui-color-accent-100); -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); } @media (hover: hover) and (pointer: fine) { input:hover:enabled { background-color: var(--wui-gray-glass-015); } } `;var lr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let dr=class extends n.WF{constructor(){super(...arguments),this.disabled=!1,this.value=""}render(){return n.qy` `}};dr.styles=[d,f,ur],lr([(0,v.MZ)({type:Boolean})],dr.prototype,"disabled",void 0),lr([(0,v.MZ)({type:String})],dr.prototype,"value",void 0),dr=lr([p("wui-input-numeric")],dr);const fr=n.AH` button { padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs); border-radius: var(--wui-border-radius-3xs); background-color: transparent; color: var(--wui-color-accent-100); } button:disabled { background-color: transparent; color: var(--wui-gray-glass-015); } `;var hr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let pr=class extends n.WF{constructor(){super(...arguments),this.disabled=!1,this.color="inherit"}render(){return n.qy` `}};pr.styles=[d,f,fr],hr([(0,v.MZ)({type:Boolean})],pr.prototype,"disabled",void 0),hr([(0,v.MZ)()],pr.prototype,"color",void 0),pr=hr([p("wui-link")],pr);const gr=n.AH` button { column-gap: var(--wui-spacing-s); padding: 11px 18px 11px var(--wui-spacing-s); width: 100%; background-color: var(--wui-gray-glass-002); border-radius: var(--wui-border-radius-xs); color: var(--wui-color-fg-250); } button[data-iconvariant='square'], button[data-iconvariant='square-blue'] { padding: 6px 18px 6px 9px; } button > wui-flex { flex: 1; } button > wui-image { width: 32px; height: 32px; box-shadow: 0 0 0 2px var(--wui-gray-glass-005); border-radius: var(--wui-border-radius-3xl); } button > wui-icon { width: 36px; height: 36px; } button > wui-icon-box[data-variant='blue'] { box-shadow: 0 0 0 2px var(--wui-accent-glass-005); } button > wui-icon-box[data-variant='overlay'] { box-shadow: 0 0 0 2px var(--wui-gray-glass-005); } button > wui-icon-box[data-variant='square-blue'] { border-radius: var(--wui-border-radius-3xs); position: relative; border: none; width: 36px; height: 36px; } button > wui-icon-box[data-variant='square-blue']::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; right: 0; border-radius: inherit; border: 1px solid var(--wui-accent-glass-010); pointer-events: none; } button > wui-icon:last-child { width: 14px; height: 14px; } button:disabled { background-color: var(--wui-gray-glass-015); color: var(--wui-gray-glass-015); } button[data-loading='true'] > wui-icon { transition: opacity 200ms ease-in-out; opacity: 0; } wui-loading-spinner { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); } `;var mr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let yr=class extends n.WF{constructor(){super(...arguments),this.variant="icon",this.disabled=!1,this.imageSrc=void 0,this.alt=void 0,this.chevron=!1,this.loading=!1}render(){return n.qy` `}visualTemplate(){if("image"===this.variant&&this.imageSrc)return n.qy``;if("square"===this.iconVariant&&this.icon&&"icon"===this.variant)return n.qy``;if("icon"===this.variant&&this.icon&&this.iconVariant){const e=["blue","square-blue"].includes(this.iconVariant)?"accent-100":"fg-200",t="square-blue"===this.iconVariant?"mdl":"md",r=this.iconSize?this.iconSize:t;return n.qy` `}return null}loadingTemplate(){return this.loading?n.qy``:n.qy``}chevronTemplate(){return this.chevron?n.qy``:null}};var vr;yr.styles=[d,f,gr],mr([(0,v.MZ)()],yr.prototype,"icon",void 0),mr([(0,v.MZ)()],yr.prototype,"iconSize",void 0),mr([(0,v.MZ)()],yr.prototype,"variant",void 0),mr([(0,v.MZ)()],yr.prototype,"iconVariant",void 0),mr([(0,v.MZ)({type:Boolean})],yr.prototype,"disabled",void 0),mr([(0,v.MZ)()],yr.prototype,"imageSrc",void 0),mr([(0,v.MZ)()],yr.prototype,"alt",void 0),mr([(0,v.MZ)({type:Boolean})],yr.prototype,"chevron",void 0),mr([(0,v.MZ)({type:Boolean})],yr.prototype,"loading",void 0),yr=mr([p("wui-list-item")],yr),function(e){e.approve="approved",e.bought="bought",e.borrow="borrowed",e.burn="burnt",e.cancel="canceled",e.claim="claimed",e.deploy="deployed",e.deposit="deposited",e.execute="executed",e.mint="minted",e.receive="received",e.repay="repaid",e.send="sent",e.sell="sold",e.stake="staked",e.trade="swapped",e.unstake="unstaked",e.withdraw="withdrawn"}(vr||(vr={}));const br=n.AH` :host > wui-flex { display: flex; justify-content: center; align-items: center; position: relative; width: 40px; height: 40px; box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005); background-color: var(--wui-gray-glass-005); } :host > wui-flex wui-image { display: block; z-index: -1; } :host > wui-flex, :host > wui-flex wui-image, .swap-images-container, .swap-images-container.nft, wui-image.nft { border-top-left-radius: var(--local-left-border-radius); border-top-right-radius: var(--local-right-border-radius); border-bottom-left-radius: var(--local-left-border-radius); border-bottom-right-radius: var(--local-right-border-radius); } wui-icon { width: 20px; height: 20px; } wui-icon-box { position: absolute; right: 0; bottom: 0; transform: translate(20%, 20%); } .swap-images-container { position: relative; width: 40px; height: 40px; overflow: hidden; } .swap-images-container wui-image:first-child { position: absolute; width: 40px; height: 40px; top: 0; left: 0%; clip-path: inset(0px calc(50% + 2px) 0px 0%); } .swap-images-container wui-image:last-child { clip-path: inset(0px 0px 0px calc(50% + 2px)); } `;var wr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Ar=class extends n.WF{constructor(){super(...arguments),this.images=[],this.secondImage={type:void 0,url:""}}render(){const[e,t]=this.images,r="NFT"===e?.type,i=r?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)",o=(t?.url?"NFT"===t.type:r)?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)";return this.style.cssText=`\n --local-left-border-radius: ${i};\n --local-right-border-radius: ${o};\n `,n.qy` ${this.templateVisual()} ${this.templateIcon()} `}templateVisual(){const[e,t]=this.images,r=e?.type;return 2===this.images.length&&(e?.url||t?.url)?n.qy`
${e?.url?n.qy``:null} ${t?.url?n.qy``:null}
`:e?.url?n.qy``:"NFT"===r?n.qy``:n.qy``}templateIcon(){let e,t="accent-100";return e=this.getIcon(),this.status&&(t=this.getStatusColor()),e?n.qy` `:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():"trade"===this.type?"swapHorizontalBold":"approve"===this.type?"checkmark":"cancel"===this.type?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success-100";case"failed":return"error-100";case"pending":return"inverse-100";default:return"accent-100"}}};Ar.styles=[br],wr([(0,v.MZ)()],Ar.prototype,"type",void 0),wr([(0,v.MZ)()],Ar.prototype,"status",void 0),wr([(0,v.MZ)()],Ar.prototype,"direction",void 0),wr([(0,v.MZ)({type:Boolean})],Ar.prototype,"onlyDirectionIcon",void 0),wr([(0,v.MZ)({type:Array})],Ar.prototype,"images",void 0),wr([(0,v.MZ)({type:Object})],Ar.prototype,"secondImage",void 0),Ar=wr([p("wui-transaction-visual")],Ar);const _r=n.AH` :host > wui-flex:first-child { align-items: center; column-gap: var(--wui-spacing-s); padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs); width: 100%; } :host > wui-flex:first-child wui-text:nth-child(1) { text-transform: capitalize; } wui-transaction-visual { width: 40px; height: 40px; } wui-flex { flex: 1; } :host wui-flex wui-flex { overflow: hidden; } :host .description-container wui-text span { word-break: break-all; } :host .description-container wui-text { overflow: hidden; } :host .description-separator-icon { margin: 0px 6px; } :host wui-text > span { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; } `;var Er=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Sr=class extends n.WF{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[]}render(){return n.qy` ${vr[this.type]} ${this.templateDescription()} ${this.templateSecondDescription()} ${this.date} `}templateDescription(){const e=this.descriptions?.[0];return e?n.qy` ${e} `:null}templateSecondDescription(){const e=this.descriptions?.[1];return e?n.qy` ${e} `:null}};Sr.styles=[d,_r],Er([(0,v.MZ)()],Sr.prototype,"type",void 0),Er([(0,v.MZ)({type:Array})],Sr.prototype,"descriptions",void 0),Er([(0,v.MZ)()],Sr.prototype,"date",void 0),Er([(0,v.MZ)({type:Boolean})],Sr.prototype,"onlyDirectionIcon",void 0),Er([(0,v.MZ)()],Sr.prototype,"status",void 0),Er([(0,v.MZ)()],Sr.prototype,"direction",void 0),Er([(0,v.MZ)({type:Array})],Sr.prototype,"images",void 0),Sr=Er([p("wui-transaction-list-item")],Sr);const kr=n.AH` :host > wui-flex:first-child { column-gap: var(--wui-spacing-s); padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); width: 100%; } wui-flex { display: flex; flex: 1; } `;var xr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Cr=class extends n.WF{render(){return n.qy` `}};Cr.styles=[d,kr],Cr=xr([p("wui-transaction-list-item-loader")],Cr);const Ir=n.AH` :host { display: block; padding: 3.5px 5px !important; border-radius: var(--wui-border-radius-5xs); } :host([data-variant='main']) { background-color: var(--wui-accent-glass-015); color: var(--wui-color-accent-100); } :host([data-variant='shade']) { background-color: var(--wui-gray-glass-010); color: var(--wui-color-fg-200); } :host([data-variant='success']) { background-color: var(--wui-icon-box-bg-success-100); color: var(--wui-color-success-100); } :host([data-variant='error']) { background-color: var(--wui-icon-box-bg-error-100); color: var(--wui-color-error-100); } `;var Tr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Or=class extends n.WF{constructor(){super(...arguments),this.variant="main"}render(){return this.dataset.variant=this.variant,n.qy` `}};Or.styles=[d,Ir],Tr([(0,v.MZ)()],Or.prototype,"variant",void 0),Or=Tr([p("wui-tag")],Or);const Pr=n.AH` button { column-gap: var(--wui-spacing-s); padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); width: 100%; background-color: var(--wui-gray-glass-002); border-radius: var(--wui-border-radius-xs); color: var(--wui-color-fg-100); } button > wui-text:nth-child(2) { display: flex; flex: 1; } wui-icon { color: var(--wui-color-fg-200) !important; } button:disabled { background-color: var(--wui-gray-glass-015); color: var(--wui-gray-glass-015); } button:disabled > wui-tag { background-color: var(--wui-gray-glass-010); color: var(--wui-color-fg-300); } `;var Mr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Rr=class extends n.WF{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.installed=!1,this.disabled=!1,this.showAllWallets=!1}render(){return n.qy` `}templateAllWallets(){return this.showAllWallets&&this.imageSrc?n.qy` `:this.showAllWallets&&this.walletIcon?n.qy` `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?n.qy``:this.showAllWallets||this.imageSrc?null:n.qy``}templateStatus(){return this.tagLabel&&this.tagVariant?n.qy`${this.tagLabel}`:this.icon?n.qy``:null}};Rr.styles=[d,f,Pr],Mr([(0,v.MZ)({type:Array})],Rr.prototype,"walletImages",void 0),Mr([(0,v.MZ)()],Rr.prototype,"imageSrc",void 0),Mr([(0,v.MZ)()],Rr.prototype,"name",void 0),Mr([(0,v.MZ)()],Rr.prototype,"tagLabel",void 0),Mr([(0,v.MZ)()],Rr.prototype,"tagVariant",void 0),Mr([(0,v.MZ)()],Rr.prototype,"icon",void 0),Mr([(0,v.MZ)()],Rr.prototype,"walletIcon",void 0),Mr([(0,v.MZ)({type:Boolean})],Rr.prototype,"installed",void 0),Mr([(0,v.MZ)({type:Boolean})],Rr.prototype,"disabled",void 0),Mr([(0,v.MZ)({type:Boolean})],Rr.prototype,"showAllWallets",void 0),Rr=Mr([p("wui-list-wallet")],Rr);const Nr=n.AH` :host { display: block; width: 40px; height: 40px; border-radius: var(--wui-border-radius-3xl); border: 1px solid var(--wui-gray-glass-010); overflow: hidden; } wui-icon { width: 100%; height: 100%; } `;var Lr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Br=class extends n.WF{constructor(){super(...arguments),this.logo="google"}render(){return n.qy` `}};Br.styles=[d,Nr],Lr([(0,v.MZ)()],Br.prototype,"logo",void 0),Br=Lr([p("wui-logo")],Br);const Dr=n.AH` :host { display: block; } button { width: 50px; height: 50px; background: var(--wui-gray-glass-002); border-radius: var(--wui-border-radius-xs); } `;var Ur=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let jr=class extends n.WF{constructor(){super(...arguments),this.logo="google",this.disabled=!1}render(){return n.qy` `}};jr.styles=[d,f,Dr],Ur([(0,v.MZ)()],jr.prototype,"logo",void 0),Ur([(0,v.MZ)({type:Boolean})],jr.prototype,"disabled",void 0),jr=Ur([p("wui-logo-select")],jr);const Fr=n.AH` :host { display: block; } button { border-radius: var(--wui-border-radius-3xl); display: flex; gap: var(--wui-spacing-xs); padding: var(--wui-spacing-2xs) var(--wui-spacing-s) var(--wui-spacing-2xs) var(--wui-spacing-xs); border: 1px solid var(--wui-gray-glass-010); background-color: var(--wui-gray-glass-005); color: var(--wui-color-fg-100); } button:disabled { border: 1px solid var(--wui-gray-glass-005); background-color: var(--wui-gray-glass-015); color: var(--wui-gray-glass-015); } @media (hover: hover) and (pointer: fine) { button:hover:enabled { background-color: var(--wui-gray-glass-010); } button:active:enabled { background-color: var(--wui-gray-glass-015); } } wui-image, wui-icon-box { border-radius: var(--wui-border-radius-3xl); width: 24px; height: 24px; box-shadow: 0 0 0 2px var(--wui-gray-glass-005); } `;var zr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let qr=class extends n.WF{constructor(){super(...arguments),this.imageSrc=void 0,this.disabled=!1}render(){return n.qy` `}visualTemplate(){return this.imageSrc?n.qy``:n.qy` `}};qr.styles=[d,f,Fr],zr([(0,v.MZ)()],qr.prototype,"imageSrc",void 0),zr([(0,v.MZ)({type:Boolean})],qr.prototype,"disabled",void 0),qr=zr([p("wui-network-button")],qr);const Hr=n.AH` :host { position: relative; display: block; } `;var Vr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let $r=class extends n.WF{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map((()=>"")),this.numerics=[],this.shouldInputBeEnabled=e=>this.values.slice(0,e).every((e=>""!==e)),this.handleKeyDown=(e,t)=>{const r=e.target,n=this.getInputElement(r);if(!n)return;["ArrowLeft","ArrowRight","Shift","Delete"].includes(e.key)&&e.preventDefault();const i=n.selectionStart;switch(e.key){case"ArrowLeft":i&&n.setSelectionRange(i+1,i+1),this.focusInputField("prev",t);break;case"ArrowRight":case"Shift":this.focusInputField("next",t);break;case"Delete":case"Backspace":""===n.value?this.focusInputField("prev",t):this.updateInput(n,t,"")}},this.focusInputField=(e,t)=>{if("next"===e){const e=t+1;if(!this.shouldInputBeEnabled(e))return;const r=this.numerics[e-1?e:t],n=r?this.getInputElement(r):void 0;n&&n.focus()}}}firstUpdated(){this.otp&&(this.values=this.otp.split(""));const e=this.shadowRoot?.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),this.numerics[0]?.focus()}render(){return n.qy` ${Array.from({length:this.length}).map(((e,t)=>n.qy` this.handleInput(e,t)} @keydown=${e=>this.handleKeyDown(e,t)} .disabled=${!this.shouldInputBeEnabled(t)} .value=${this.values[t]||""} > `))} `}updateInput(e,t,r){const n=this.numerics[t],i=e||(n?this.getInputElement(n):void 0);i&&(i.value=r,this.values=this.values.map(((e,n)=>n===t?r:e)))}handleInput(e,t){const r=e.target,n=this.getInputElement(r);if(n){const r=n.value;if("insertFromPaste"===e.inputType)this.handlePaste(n,r,t);else{ct.isNumber(r)&&e.data?(this.updateInput(n,t,e.data),this.focusInputField("next",t)):this.updateInput(n,t,"")}}this.dispatchInputChangeEvent()}handlePaste(e,t,r){const n=t[0];if(n&&ct.isNumber(n)){this.updateInput(e,r,n);const i=t.substring(1);if(r+1(r%n===0?e.push([t]):e[e.length-1].push(t))&&e),[])}(e,"Q"),s=t/a.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];c.forEach((e=>{let{x:t,y:r}=e;const u=(a.length-7)*s*t,l=(a.length-7)*s*r,d=.45;for(let a=0;a `)}}));const u=Math.floor((r+25)/s),l=a.length/2-u/2,d=a.length/2+u/2-1,f=[];a.forEach(((e,t)=>{e.forEach(((e,r)=>{if(a[t][r]&&!(t<7&&r<7||t>a.length-8&&r<7||t<7&&r>a.length-8)&&!(t>l&&tl&&r{let[t,r]=e;h[t]?h[t]?.push(r):h[t]=[r]})),Object.entries(h).map((e=>{let[t,r]=e;const n=r.filter((e=>r.every((t=>!Wr(e,t,s)))));return[Number(t),n]})).forEach((e=>{let[t,r]=e;r.forEach((e=>{o.push(n.JW``)}))})),Object.entries(h).filter((e=>{let[t,r]=e;return r.length>1})).map((e=>{let[t,r]=e;const n=r.filter((e=>r.some((t=>Wr(e,t,s)))));return[Number(t),n]})).map((e=>{let[t,r]=e;r.sort(((e,t)=>ee.some((e=>Wr(i,e,s)))));e?e.push(i):n.push([i])}return[t,n.map((e=>[e[0],e[e.length-1]]))]})).forEach((e=>{let[t,r]=e;r.forEach((e=>{let[r,a]=e;o.push(n.JW` `)}))})),o}},Qr=n.AH` :host { position: relative; user-select: none; display: block; overflow: hidden; aspect-ratio: 1 / 1; width: var(--local-size); } :host([data-theme='dark']) { border-radius: clamp(0px, var(--wui-border-radius-l), 40px); background-color: var(--wui-color-inverse-100); padding: var(--wui-spacing-l); } :host([data-theme='light']) { box-shadow: 0 0 0 1px var(--wui-color-bg-125); background-color: var(--wui-color-bg-125); } svg:first-child, wui-image, wui-icon { position: absolute; top: 50%; left: 50%; transform: translateY(-50%) translateX(-50%); } wui-image { width: 25%; height: 25%; border-radius: var(--wui-border-radius-xs); } wui-icon { width: 100%; height: 100%; color: #3396ff !important; transform: translateY(-50%) translateX(-50%) scale(0.25); } `;var Yr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Zr=class extends n.WF{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0}render(){return this.dataset.theme=this.theme,this.style.cssText=`--local-size: ${this.size}px`,n.qy`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){const e="light"===this.theme?this.size:this.size-32;return n.JW` ${Gr.generate(this.uri,e,e/4)} `}templateVisual(){return this.imageSrc?n.qy``:n.qy``}};Zr.styles=[d,Qr],Yr([(0,v.MZ)()],Zr.prototype,"uri",void 0),Yr([(0,v.MZ)({type:Number})],Zr.prototype,"size",void 0),Yr([(0,v.MZ)()],Zr.prototype,"theme",void 0),Yr([(0,v.MZ)()],Zr.prototype,"imageSrc",void 0),Yr([(0,v.MZ)()],Zr.prototype,"alt",void 0),Zr=Yr([p("wui-qr-code")],Zr);const Jr=n.AH` :host { position: relative; display: inline-block; width: 100%; } `;var Xr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let en=class extends n.WF{constructor(){super(...arguments),this.inputComponentRef=(0,Yt._)()}render(){return n.qy` `}clearValue(){const e=this.inputComponentRef.value,t=e?.inputElementRef.value;t&&(t.value="",t.focus(),t.dispatchEvent(new Event("input")))}};en.styles=[d,Jr],en=Xr([p("wui-search-bar")],en);const tn=n.AH` :host { display: flex; column-gap: var(--wui-spacing-xs); align-items: center; padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs); border-radius: var(--wui-border-radius-3xl); border: 1px solid var(--wui-gray-glass-005); background-color: var(--wui-color-bg-175); box-shadow: 0px 14px 64px -4px rgba(0, 0, 0, 0.15), 0px 8px 22px -6px rgba(0, 0, 0, 0.15); } `;var rn=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let nn=class extends n.WF{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message=""}render(){return n.qy` ${this.message} `}};nn.styles=[d,tn],rn([(0,v.MZ)()],nn.prototype,"backgroundColor",void 0),rn([(0,v.MZ)()],nn.prototype,"iconColor",void 0),rn([(0,v.MZ)()],nn.prototype,"icon",void 0),rn([(0,v.MZ)()],nn.prototype,"message",void 0),nn=rn([p("wui-snackbar")],nn);const on=n.AH` :host { display: inline-flex; background-color: var(--wui-gray-glass-002); border-radius: var(--wui-border-radius-3xl); padding: var(--wui-spacing-3xs); position: relative; height: 36px; overflow: hidden; } :host::before { content: ''; position: absolute; pointer-events: none; top: 4px; left: 4px; display: block; width: var(--local-tab-width); height: 28px; border-radius: var(--wui-border-radius-3xl); background-color: var(--wui-gray-glass-002); box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002); transform: translateX(calc(var(--local-tab) * var(--local-tab-width))); transition: transform var(--wui-ease-out-power-2) var(--wui-duration-lg); } :host([data-type='flex'])::before { left: 3px; transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px))); } :host([data-type='flex']) { display: flex; padding: 0px 0px 0px 12px; gap: 4px; } :host([data-type='flex']) > button > wui-text { position: absolute; left: 18px; opacity: 0; } button[data-active='true'] > wui-icon, button[data-active='true'] > wui-text { color: var(--wui-color-fg-100); } button[data-active='false'] > wui-icon, button[data-active='false'] > wui-text { color: var(--wui-color-fg-200); } button[data-active='true']:disabled, button[data-active='false']:disabled { background-color: transparent; opacity: 0.5; cursor: not-allowed; } button[data-active='true']:disabled > wui-text { color: var(--wui-color-fg-200); } button[data-active='false']:disabled > wui-text { color: var(--wui-color-fg-300); } button > wui-icon, button > wui-text { pointer-events: none; transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg); } button { width: var(--local-tab-width); } :host([data-type='flex']) > button { width: 34px; position: relative; display: flex; justify-content: flex-start; } button:hover:enabled, button:active:enabled { background-color: transparent !important; } button:hover:enabled > wui-icon, button:active:enabled > wui-icon { color: var(--wui-color-fg-125); } button:hover:enabled > wui-text, button:active:enabled > wui-text { color: var(--wui-color-fg-125); } button { border-radius: var(--wui-border-radius-3xl); } `;var an=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let sn=class extends n.WF{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.activeTab=0,this.localTabWidth="100px",this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=`\n --local-tab: ${this.activeTab};\n --local-tab-width: ${this.localTabWidth};\n `,this.dataset.type=this.isDense?"flex":"block",this.tabs.map(((e,t)=>{const r=t===this.activeTab;return n.qy` `}))}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout((()=>{this.animateTabs(0,!0)}),0))}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,t){const r=this.buttons[this.activeTab],n=this.buttons[e],i=r?.querySelector("wui-text"),o=n?.querySelector("wui-text"),a=n?.getBoundingClientRect(),s=o?.getBoundingClientRect();r&&i&&!t&&e!==this.activeTab&&(i.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),r.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),n&&a&&s&&o&&(e!==this.activeTab||t)&&(this.localTabWidth=`${Math.round(a.width+s.width)+6}px`,n.animate([{width:`${a.width+s.width}px`}],{duration:t?0:500,fill:"forwards",easing:"ease"}),o.animate([{opacity:1}],{duration:t?0:125,delay:t?0:200,fill:"forwards",easing:"ease"}))}};sn.styles=[d,f,on],an([(0,v.MZ)({type:Array})],sn.prototype,"tabs",void 0),an([(0,v.MZ)()],sn.prototype,"onTabChange",void 0),an([(0,v.MZ)({type:Array})],sn.prototype,"buttons",void 0),an([(0,v.MZ)({type:Boolean})],sn.prototype,"disabled",void 0),an([(0,v.wk)()],sn.prototype,"activeTab",void 0),an([(0,v.wk)()],sn.prototype,"localTabWidth",void 0),an([(0,v.wk)()],sn.prototype,"isDense",void 0),sn=an([p("wui-tabs")],sn);const cn=n.AH` :host { display: block; padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s); border-radius: var(--wui-border-radius-xxs); background-color: var(--wui-color-fg-100); color: var(--wui-color-bg-100); position: relative; } wui-icon { position: absolute; width: 12px !important; height: 4px !important; } wui-icon[data-placement='top'] { bottom: 0; left: 50%; transform: translate(-50%, 95%); } wui-icon[data-placement='bottom'] { top: 0; left: 50%; transform: translate(-50%, -95%) rotate(180deg); } wui-icon[data-placement='right'] { top: 50%; left: 0; transform: translate(-65%, -50%) rotate(90deg); } wui-icon[data-placement='left'] { top: 50%; right: 0%; transform: translate(65%, -50%) rotate(270deg); } `;var un=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let ln=class extends n.WF{constructor(){super(...arguments),this.placement="top",this.message=""}render(){return n.qy` ${this.message}`}};ln.styles=[d,f,cn],un([(0,v.MZ)()],ln.prototype,"placement",void 0),un([(0,v.MZ)()],ln.prototype,"message",void 0),ln=un([p("wui-tooltip")],ln);const dn=n.AH` :host { display: flex; justify-content: center; align-items: center; width: var(--wui-icon-box-size-xl); height: var(--wui-icon-box-size-xl); box-shadow: 0 0 0 8px var(--wui-thumbnail-border); border-radius: var(--local-border-radius); overflow: hidden; } wui-icon { width: 32px; height: 32px; } `;var fn=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let hn=class extends n.WF{render(){return this.style.cssText=`--local-border-radius: ${this.borderRadiusFull?"1000px":"20px"};`,n.qy`${this.templateVisual()}`}templateVisual(){return this.imageSrc?n.qy``:n.qy``}};hn.styles=[d,dn],fn([(0,v.MZ)()],hn.prototype,"imageSrc",void 0),fn([(0,v.MZ)()],hn.prototype,"alt",void 0),fn([(0,v.MZ)({type:Boolean})],hn.prototype,"borderRadiusFull",void 0),hn=fn([p("wui-visual-thumbnail")],hn);const pn=n.AH` :host { display: block; } button { width: 100%; display: block; padding-top: var(--wui-spacing-l); padding-bottom: var(--wui-spacing-l); padding-left: var(--wui-spacing-s); padding-right: var(--wui-spacing-2l); border-radius: var(--wui-border-radius-s); background-color: var(--wui-accent-glass-015); } button:hover { background-color: var(--wui-accent-glass-010) !important; } button:active { background-color: var(--wui-accent-glass-020) !important; } `;var gn=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let mn=class extends n.WF{constructor(){super(...arguments),this.label="",this.description="",this.icon="wallet"}render(){return n.qy` `}};mn.styles=[d,f,pn],gn([(0,v.MZ)()],mn.prototype,"label",void 0),gn([(0,v.MZ)()],mn.prototype,"description",void 0),gn([(0,v.MZ)()],mn.prototype,"icon",void 0),mn=gn([p("wui-notice-card")],mn);const yn=n.AH` button { height: auto; position: relative; flex-direction: column; gap: var(--wui-spacing-s); padding: 17px 18px 17px var(--wui-spacing-m); width: 100%; background-color: var(--wui-gray-glass-002); border-radius: var(--wui-border-radius-xs); color: var(--wui-color-fg-250); } .overflowedContent { width: 100%; overflow: hidden; } .overflowedContent[data-active='false']:after { content: ''; position: absolute; top: 50%; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, var(--wui-color-bg-200), transparent); border-bottom-left-radius: var(--wui-border-radius-xs); border-bottom-right-radius: var(--wui-border-radius-xs); } .heightContent { max-height: 100px; } pre { text-align: left; white-space: pre-wrap; height: auto; overflow-x: auto; overflow-wrap: anywhere; } `;var vn=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let bn=class extends n.WF{constructor(){super(...arguments),this.textTitle="",this.overflowedContent="",this.toggled=!1,this.enableAccordion=!1,this.scrollElement=void 0,this.scrollHeightElement=0}firstUpdated(){setTimeout((()=>{const e=this.shadowRoot?.querySelector(".heightContent");if(e){this.scrollElement=e;const t=e?.scrollHeight;t&&t>100&&(this.enableAccordion=!0,this.scrollHeightElement=t,this.requestUpdate())}}),0)}render(){return n.qy` `}onClick(){const e=this.shadowRoot?.querySelector("wui-icon");this.enableAccordion&&(this.toggled=!this.toggled,this.requestUpdate(),this.scrollElement&&this.scrollElement.animate([{maxHeight:this.toggled?"100px":`${this.scrollHeightElement}px`},{maxHeight:this.toggled?`${this.scrollHeightElement}px`:"100px"}],{duration:300,fill:"forwards",easing:"ease"}),e&&e.animate([{transform:this.toggled?"rotate(0deg)":"rotate(180deg)"},{transform:this.toggled?"rotate(180deg)":"rotate(0deg)"}],{duration:300,fill:"forwards",easing:"ease"}))}chevronTemplate(){return this.enableAccordion?n.qy` `:null}};bn.styles=[d,f,yn],vn([(0,v.MZ)()],bn.prototype,"textTitle",void 0),vn([(0,v.MZ)()],bn.prototype,"overflowedContent",void 0),bn=vn([p("wui-list-accordion")],bn);const wn=n.AH` :host { display: flex; column-gap: var(--wui-spacing-s); padding: 17px 18px 17px var(--wui-spacing-m); width: 100%; background-color: var(--wui-gray-glass-002); border-radius: var(--wui-border-radius-xs); color: var(--wui-color-fg-250); } wui-image { width: var(--wui-icon-size-lg); height: var(--wui-icon-size-lg); border-radius: var(--wui-border-radius-3xl); } wui-icon { width: var(--wui-icon-size-lg); height: var(--wui-icon-size-lg); } `;var An=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let _n=class extends n.WF{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return n.qy` ${this.textTitle} ${this.templateContent()} `}templateContent(){return this.imageSrc?n.qy``:this.textValue?n.qy` ${this.textValue} `:n.qy``}};_n.styles=[d,f,wn],An([(0,v.MZ)()],_n.prototype,"imageSrc",void 0),An([(0,v.MZ)()],_n.prototype,"textTitle",void 0),An([(0,v.MZ)()],_n.prototype,"textValue",void 0),_n=An([p("wui-list-content")],_n);const En=n.AH` :host { display: flex; flex-direction: column; gap: var(--wui-spacing-l); padding: 17px 18px 17px var(--wui-spacing-m); width: 100%; background-color: var(--wui-gray-glass-002); border-radius: var(--wui-border-radius-xs); color: var(--wui-color-fg-250); } wui-image { width: var(--wui-icon-size-lg); height: var(--wui-icon-size-lg); border-radius: var(--wui-border-radius-3xl); } wui-icon { width: var(--wui-icon-size-lg); height: var(--wui-icon-size-lg); } `;var Sn=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let kn=class extends n.WF{constructor(){super(...arguments),this.amount="",this.networkCurreny="",this.networkImageUrl="",this.receiverAddress=""}render(){return n.qy` Sending ${this.amount} ${this.networkCurreny} ${this.templateNetworkVisual()} To `}templateNetworkVisual(){return this.networkImageUrl?n.qy``:n.qy``}};kn.styles=[d,f,En],Sn([(0,v.MZ)()],kn.prototype,"amount",void 0),Sn([(0,v.MZ)()],kn.prototype,"networkCurreny",void 0),Sn([(0,v.MZ)()],kn.prototype,"networkImageUrl",void 0),Sn([(0,v.MZ)()],kn.prototype,"receiverAddress",void 0),kn=Sn([p("wui-list-wallet-transaction")],kn);const xn=n.AH` :host { display: grid; width: inherit; height: inherit; } `;var Cn=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let In=class extends n.WF{render(){return this.style.cssText=`\n grid-template-rows: ${this.gridTemplateRows};\n grid-template-columns: ${this.gridTemplateColumns};\n justify-items: ${this.justifyItems};\n align-items: ${this.alignItems};\n justify-content: ${this.justifyContent};\n align-content: ${this.alignContent};\n column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};\n row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};\n gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};\n padding-top: ${this.padding&&ct.getSpacingStyles(this.padding,0)};\n padding-right: ${this.padding&&ct.getSpacingStyles(this.padding,1)};\n padding-bottom: ${this.padding&&ct.getSpacingStyles(this.padding,2)};\n padding-left: ${this.padding&&ct.getSpacingStyles(this.padding,3)};\n margin-top: ${this.margin&&ct.getSpacingStyles(this.margin,0)};\n margin-right: ${this.margin&&ct.getSpacingStyles(this.margin,1)};\n margin-bottom: ${this.margin&&ct.getSpacingStyles(this.margin,2)};\n margin-left: ${this.margin&&ct.getSpacingStyles(this.margin,3)};\n `,n.qy``}};In.styles=[d,xn],Cn([(0,v.MZ)()],In.prototype,"gridTemplateRows",void 0),Cn([(0,v.MZ)()],In.prototype,"gridTemplateColumns",void 0),Cn([(0,v.MZ)()],In.prototype,"justifyItems",void 0),Cn([(0,v.MZ)()],In.prototype,"alignItems",void 0),Cn([(0,v.MZ)()],In.prototype,"justifyContent",void 0),Cn([(0,v.MZ)()],In.prototype,"alignContent",void 0),Cn([(0,v.MZ)()],In.prototype,"columnGap",void 0),Cn([(0,v.MZ)()],In.prototype,"rowGap",void 0),Cn([(0,v.MZ)()],In.prototype,"gap",void 0),Cn([(0,v.MZ)()],In.prototype,"padding",void 0),Cn([(0,v.MZ)()],In.prototype,"margin",void 0),In=Cn([p("wui-grid")],In);const Tn=n.AH` :host { position: relative; display: flex; width: 100%; height: 1px; background-color: var(--wui-gray-glass-005); justify-content: center; align-items: center; } :host > wui-text { position: absolute; padding: 0px 10px; background-color: var(--wui-color-modal-bg); } `;var On=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let Pn=class extends n.WF{constructor(){super(...arguments),this.text=""}render(){return n.qy`${this.template()}`}template(){return this.text?n.qy`${this.text}`:null}};Pn.styles=[d,Tn],On([(0,v.MZ)()],Pn.prototype,"text",void 0),Pn=On([p("wui-separator")],Pn);var Mn=r(45875);const Rn=["receive","deposit","borrow","claim"],Nn=["withdraw","repay","burn"],Ln={getTransactionGroupTitle:e=>e===Mn.r.getYear()?"This Year":e,getTransactionImages(e){const[t,r]=e,n=Boolean(t)&&e?.every((e=>Boolean(e.nft_info))),i=e?.length>1;return 2===e?.length&&!n?[this.getTransactionImage(t),this.getTransactionImage(r)]:i?e.map((e=>this.getTransactionImage(e))):[this.getTransactionImage(t)]},getTransactionImage:e=>({type:Ln.getTransactionTransferTokenType(e),url:Ln.getTransactionImageURL(e)}),getTransactionImageURL(e){let t=null;const r=Boolean(e?.nft_info),n=Boolean(e?.fungible_info);return e&&r?t=e?.nft_info?.content?.preview?.url:e&&n&&(t=e?.fungible_info?.icon?.url),t},getTransactionTransferTokenType:e=>e?.fungible_info?"FUNGIBLE":e?.nft_info?"NFT":null,getTransactionDescriptions(e){const t=e.metadata?.operationType,r=e.transfers,n=e.transfers?.length>0,i=e.transfers?.length>1,o=n&&r?.every((e=>Boolean(e.fungible_info))),[a,s]=r;let c=this.getTransferDescription(a),u=this.getTransferDescription(s);if(!n){return("send"===t||"receive"===t)&&o?(c=ct.getTruncateString({string:e.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),u=ct.getTruncateString({string:e.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[c,u]):[e.metadata.status]}if(i)return r.map((e=>this.getTransferDescription(e)));let l="";return Rn.includes(t)?l="+":Nn.includes(t)&&(l="-"),c=l.concat(c),[c]},getTransferDescription(e){let t="";return e?(e?.nft_info?t=e?.nft_info?.name||"-":e?.fungible_info&&(t=this.getFungibleTransferDescription(e)||"-"),t):t},getFungibleTransferDescription(e){if(!e)return null;return[this.getQuantityFixedValue(e?.quantity.numeric),e?.fungible_info?.symbol].join(" ").trim()},getQuantityFixedValue(e){if(!e)return null;return parseFloat(e).toFixed(3)}}},47035:(e,t,r)=>{"use strict";r.d(t,{OA:()=>n,WL:()=>o,u$:()=>i});const n={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},i=e=>function(){for(var t=arguments.length,r=new Array(t),n=0;n{"use strict";r.d(t,{JW:()=>k,XX:()=>H,c0:()=>x,ge:()=>z,qy:()=>S,s6:()=>C});const n=globalThis,i=n.trustedTypes,o=i?i.createPolicy("lit-html",{createHTML:e=>e}):void 0,a="$lit$",s=`lit$${Math.random().toFixed(9).slice(2)}$`,c="?"+s,u=`<${c}>`,l=document,d=()=>l.createComment(""),f=e=>null===e||"object"!=typeof e&&"function"!=typeof e,h=Array.isArray,p=e=>h(e)||"function"==typeof e?.[Symbol.iterator],g="[ \t\n\f\r]",m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,v=/>/g,b=RegExp(`>|${g}(?:([^\\s"'>=/]+)(${g}*=${g}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),w=/'/g,A=/"/g,_=/^(?:script|style|textarea|title)$/i,E=e=>function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{const r=e.length-1,n=[];let i,o=2===t?"":3===t?"":"",c=m;for(let l=0;l"===d[0]?(c=i??m,f=-1):void 0===d[1]?f=-2:(f=c.lastIndex-d[2].length,r=d[1],c=void 0===d[3]?b:'"'===d[3]?A:w):c===A||c===w?c=b:c===y||c===v?c=m:(c=b,i=void 0);const p=c===b&&e[l+1].startsWith("/>")?" ":"";o+=c===m?t+u:f>=0?(n.push(r),t.slice(0,f)+a+t.slice(f)+s+p):t+s+(-2===f?l:p)}return[O(e,o+(e[r]||"")+(2===t?"":3===t?"":"")),n]};class M{constructor(e,t){let r,{strings:n,_$litType$:o}=e;this.parts=[];let u=0,l=0;const f=n.length-1,h=this.parts,[p,g]=P(n,o);if(this.el=M.createElement(p,t),T.currentNode=this.el.content,2===o||3===o){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(r=T.nextNode())&&h.length0){r.textContent=i?i.emptyScript:"";for(let n=0;n2&&void 0!==arguments[2]?arguments[2]:e,n=arguments.length>3?arguments[3]:void 0;if(t===x)return t;let i=void 0!==n?r.o?.[n]:r.l;const o=f(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(e),i._$AT(e,r,n)),void 0!==n?(r.o??=[])[n]=i:r.l=i),void 0!==i&&(t=R(e,i._$AS(e,t.values),i,n)),t}class N{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??l).importNode(t,!0);T.currentNode=n;let i=T.nextNode(),o=0,a=0,s=r[0];for(;void 0!==s;){if(o===s.index){let t;2===s.type?t=new L(i,i.nextSibling,this,e):1===s.type?t=new s.ctor(i,s.name,s.strings,this,e):6===s.type&&(t=new F(i,this,e)),this._$AV.push(t),s=r[++a]}o!==s?.index&&(i=T.nextNode(),o++)}return T.currentNode=l,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class L{get _$AU(){return this._$AM?._$AU??this.v}constructor(e,t,r,n){this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this.v=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e){e=R(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),f(e)?e===C||null==e||""===e?(this._$AH!==C&&this._$AR(),this._$AH=C):e!==this._$AH&&e!==x&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):p(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==C&&f(this._$AH)?this._$AA.nextSibling.data=e:this.T(l.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=M.createElement(O(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new N(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=I.get(e.strings);return void 0===t&&I.set(e.strings,t=new M(e)),t}k(e){h(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new L(this.O(d()),this.O(d()),this,this.options)):r=t[n],r._$AI(i),n++;n0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,t=arguments.length>1?arguments[1]:void 0;for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this.v=e,this._$AP?.(e))}}class B{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,i){this.type=1,this._$AH=C,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=C}_$AI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;const i=this.strings;let o=!1;if(void 0===i)e=R(this,e,t,0),o=!f(e)||e!==this._$AH&&e!==x,o&&(this._$AH=e);else{const n=e;let a,s;for(e=i[0],a=0;a1&&void 0!==arguments[1]?arguments[1]:this,0)??C)===x)return;const t=this._$AH,r=e===C&&t!==C||e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive,n=e!==C&&(t===C||r);r&&this.element.removeEventListener(this.name,this,t),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class F{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){R(this,e)}}const z={M:a,P:s,A:c,C:1,L:P,R:N,D:p,V:R,I:L,H:B,N:U,U:j,B:D,F:F},q=n.litHtmlPolyfillSupport;q?.(M,L),(n.litHtmlVersions??=[]).push("3.2.0");const H=(e,t,r)=>{const n=r?.renderBefore??t;let i=n._$litPart$;if(void 0===i){const e=r?.renderBefore??null;n._$litPart$=i=new L(t.insertBefore(d(),e),e,void 0,r??{})}return i._$AI(e),i}},69895:(e,t,r)=>{"use strict";r.d(t,{MZ:()=>a,wk:()=>s});var n=r(63103);const i={attribute:!0,type:String,converter:n.W3,reflect:!1,hasChanged:n.Ec},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;const{kind:n,metadata:o}=r;let a=globalThis.litPropertyMetadata.get(o);if(void 0===a&&globalThis.litPropertyMetadata.set(o,a=new Map),a.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const i=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,i,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const i=this[n];t.call(this,r),this.requestUpdate(n,i,e)}}throw Error("Unsupported decorator location: "+n)};function a(e){return(t,r)=>"object"==typeof r?o(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function s(e){return a({...e,state:!0,attribute:!1})}},85371:(e,t,r)=>{"use strict";r.d(t,{J:()=>i});var n=r(29489);const i=e=>e??n.s6},47920:(e,t,r)=>{"use strict";r.d(t,{_:()=>h,K:()=>m});var n=r(29489);const{I:i}=n.ge;var o=r(47035);const a=(e,t)=>{const r=e._$AN;if(void 0===r)return!1;for(const n of r)n._$AO?.(t,!1),a(n,t);return!0},s=e=>{let t,r;do{if(void 0===(t=e._$AM))break;r=t._$AN,r.delete(e),e=t}while(0===r?.size)},c=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(void 0===r)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),d(t)}};function u(e){void 0!==this._$AN?(s(this),this._$AM=e,c(this)):this._$AM=e}function l(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(t)if(Array.isArray(n))for(let o=r;o{e.type==o.OA.CHILD&&(e._$AP??=l,e._$AQ??=u)};class f extends o.WL{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),c(this),this.isConnected=e._$AU}_$AO(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(a(this,e),s(this))}setValue(e){if(void 0===this.t.strings)this.t._$AI(e,this);else{const t=[...this.t._$AH];t[this.i]=e,this.t._$AI(t,this,0)}}disconnected(){}reconnected(){}}const h=()=>new p;class p{}const g=new WeakMap,m=(0,o.u$)(class extends f{render(e){return n.s6}update(e,t){let[r]=t;const i=r!==this.Y;return i&&void 0!==this.Y&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.Y=r,this.ht=e.options?.host,this.rt(this.ct=e.element)),n.s6}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.Y){const t=this.ht??globalThis;let r=g.get(t);void 0===r&&(r=new WeakMap,g.set(t,r)),void 0!==r.get(this.Y)&&this.Y.call(this.ht,void 0),r.set(this.Y,e),void 0!==e&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){return"function"==typeof this.Y?g.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})},61939:(e,t,r)=>{"use strict";r.d(t,{WF:()=>o,AH:()=>n.AH,qy:()=>i.qy,JW:()=>i.JW,iz:()=>n.iz});var n=r(63103),i=r(29489);class o extends n.mN{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=(0,i.XX)(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return i.c0}}o._$litElement$=!0,o.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:o});const a=globalThis.litElementPolyfillSupport;a?.({LitElement:o});(globalThis.litElementVersions??=[]).push("4.1.0")},53191:(e,t,r)=>{"use strict";function n(){}r.d(t,{C:()=>i});class i{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){const t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)}}},59248:(e,t,r)=>{"use strict";function n(){}r.d(t,{l:()=>c});const i=n,o="undefined"!==typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},a="undefined"!==typeof WeakMap?WeakMap:Map,s="undefined"!==typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:n,unregister:n}};class c{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;this.max=e,this.dispose=t,this.map=new a,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const e=this.unfinalizedNodes.values();for(let t=0;t<10024;t++){const t=e.next().value;if(!t)break;this.unfinalizedNodes.delete(t);const r=t.key;delete t.key,t.keyRef=new o(r),this.registry.register(r,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new s(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.scheduleFinalization(r),this.map.set(e,r),this.size++,r.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){const t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}},28453:(e,t,r)=>{"use strict";r.d(t,{A:()=>c,L:()=>s});const{toString:n,hasOwnProperty:i}=Object.prototype,o=Function.prototype.toString,a=new Map;function s(e,t){try{return u(e,t)}finally{a.clear()}}const c=s;function u(e,t){if(e===t)return!0;const r=n.call(e);if(r!==n.call(t))return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(h(e,t))return!0;const r=l(e),n=l(t),o=r.length;if(o!==n.length)return!1;for(let e=0;e=0&&e.indexOf(t,r)===r}(r,f)}}return!1}function l(e){return Object.keys(e).filter(d,e)}function d(e){return void 0!==this[e]}const f="{ [native code] }";function h(e,t){let r=a.get(e);if(r){if(r.has(t))return!0}else a.set(e,r=new Set);return r.add(t),!1}},66581:(e,t,r)=>{"use strict";r.d(t,{b:()=>s});const n=()=>Object.create(null),{forEach:i,slice:o}=Array.prototype,{hasOwnProperty:a}=Object.prototype;class s{constructor(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return i.call(e,(e=>t=t.getChildTrie(e))),a.call(t,"data")?t.data:t.data=this.makeData(o.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let r=0,n=e.length;t&&r{"use strict";r.d(t,{b:()=>h});var n=r(88085),i=r(43236),o=r(49099);const a=BigInt(0),s=BigInt(36);function c(e){const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let n=0;n<40;n++)r[n]=t[n].charCodeAt(0);const o=(0,i.q5)((0,n.S)(r));for(let n=0;n<40;n+=2)o[n>>1]>>4>=8&&(t[n]=t[n].toUpperCase()),(15&o[n>>1])>=8&&(t[n+1]=t[n+1].toUpperCase());return"0x"+t.join("")}const u={};for(let p=0;p<10;p++)u[String(p)]=String(p);for(let p=0;p<26;p++)u[String.fromCharCode(65+p)]=String(10+p);const l=15;function d(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>u[e])).join("");for(;t.length>=l;){let e=t.substring(0,l);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}const f=function(){const e={};for(let t=0;t<36;t++){e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t)}return e}();function h(e){if((0,o.MR)("string"===typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=c(e);return(0,o.MR)(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,o.MR)(e.substring(2,4)===d(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=a;for(let r=0;r{"use strict";r.d(t,{S:()=>x});var n=r(78565),i=r(89806),o=r(32288);const[a,s,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),d=BigInt(2),f=BigInt(7),h=BigInt(256),p=BigInt(113);for(let C=0,I=l,T=1,O=0;C<24;C++){[T,O]=[O,(2*T+3*O)%5],a.push(2*(5*O+T)),s.push((C+1)*(C+2)/2%64);let e=u;for(let t=0;t<7;t++)I=(I<>f)*p)%h,I&d&&(e^=l<<(l<r>32?(0,i.WM)(e,t,r):(0,i.P5)(e,t,r),v=(e,t,r)=>r>32?(0,i.im)(e,t,r):(0,i.B4)(e,t,r);class b extends o.Vw{constructor(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.ai)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.DH)(this.state)}keccak(){!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24;const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let n=0;n<10;n++)r[n]=e[n]^e[n+10]^e[n+20]^e[n+30]^e[n+40];for(let n=0;n<10;n+=2){const t=(n+8)%10,i=(n+2)%10,o=r[i],a=r[i+1],s=y(o,a,1)^r[t],c=v(o,a,1)^r[t+1];for(let r=0;r<50;r+=10)e[n+r]^=s,e[n+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=s[r],o=y(t,i,n),c=v(t,i,n),u=a[r];t=e[u],i=e[u+1],e[u]=o,e[u+1]=c}for(let n=0;n<50;n+=10){for(let t=0;t<10;t++)r[t]=e[n+t];for(let t=0;t<10;t++)e[n+t]^=~r[(t+2)%10]&r[(t+4)%10]}e[0]^=g[n],e[1]^=m[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.t2)(this);const{blockLen:t,state:r}=this,i=(e=(0,o.ZJ)(e)).length;for(let n=0;n=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.ai)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.CG)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new b(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}const w=(e,t,r)=>(0,o.ld)((()=>new b(t,e,r))),A=w(1,136,32);var _=r(43236);let E=!1;const S=function(e){return A(e)};let k=S;function x(e){const t=(0,_.q5)(e,"data");return(0,_.c$)(k(t))}x._=S,x.lock=function(){E=!0},x.register=function(e){if(E)throw new TypeError("keccak256 is locked");k=e},Object.freeze(x)},2372:(e,t,r)=>{"use strict";r.d(t,{t:()=>g});const n="0x0000000000000000000000000000000000000000000000000000000000000000";var i=r(43236),o=r(18537),a=r(49099);const s=BigInt(0),c=BigInt(1),u=BigInt(2),l=BigInt(27),d=BigInt(28),f=BigInt(35),h={};function p(e){return(0,i.nx)((0,o.c4)(e),32)}class g{#e;#t;#r;#n;get r(){return this.#e}set r(e){(0,a.MR)(32===(0,i.pO)(e),"invalid r","value",e),this.#e=(0,i.c$)(e)}get s(){return this.#t}set s(e){(0,a.MR)(32===(0,i.pO)(e),"invalid s","value",e);const t=(0,i.c$)(e);(0,a.MR)(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),this.#t=t}get v(){return this.#r}set v(e){const t=(0,o.WZ)(e,"value");(0,a.MR)(27===t||28===t,"invalid v","v",e),this.#r=t}get networkV(){return this.#n}get legacyChainId(){const e=this.networkV;return null==e?null:g.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=(0,i.q5)(this.s);return this.yParity&&(e[0]|=128),(0,i.c$)(e)}get compactSerialized(){return(0,i.xW)([this.r,this.yParityAndS])}get serialized(){return(0,i.xW)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,r,n){(0,a.gk)(e,h,"Signature"),this.#e=t,this.#t=r,this.#r=n,this.#n=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new g(h,this.r,this.s,this.v);return this.networkV&&(e.#n=this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=(0,o.Ab)(e,"v");return t==l||t==d?s:((0,a.MR)(t>=f,"invalid EIP-155 v","v",e),(t-f)/u)}static getChainIdV(e,t){return(0,o.Ab)(e)*u+BigInt(35+t-27)}static getNormalizedV(e){const t=(0,o.Ab)(e);return t===s||t===l?27:t===c||t===d?28:((0,a.MR)(t>=f,"invalid v","v",e),t&c?27:28)}static from(e){function t(t,r){(0,a.MR)(t,r,"signature",e)}if(null==e)return new g(h,n,n,27);if("string"===typeof e){const r=(0,i.q5)(e,"signature");if(64===r.length){const e=(0,i.c$)(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new g(h,e,(0,i.c$)(t),n)}if(65===r.length){const e=(0,i.c$)(r.slice(0,32)),n=r.slice(32,64);t(0===(128&n[0]),"non-canonical s");const o=g.getNormalizedV(r[64]);return new g(h,e,(0,i.c$)(n),o)}t(!1,"invalid raw signature length")}if(e instanceof g)return e.clone();const r=e.r;t(null!=r,"missing r");const s=p(r),c=function(e,r){if(null!=e)return p(e);if(null!=r){t((0,i.Lo)(r,32),"invalid yParityAndS");const e=(0,i.q5)(r);return e[0]&=127,(0,i.c$)(e)}t(!1,"missing s")}(e.s,e.yParityAndS);t(0==(128&(0,i.q5)(c)[0]),"non-canonical s");const{networkV:u,v:l}=function(e,r,n){if(null!=e){const t=(0,o.Ab)(e);return{networkV:t>=f?t:void 0,v:g.getNormalizedV(t)}}if(null!=r)return t((0,i.Lo)(r,32),"invalid yParityAndS"),{v:128&(0,i.q5)(r)[0]?28:27};if(null!=n){switch((0,o.WZ)(n,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),d=new g(h,s,c,l);return u&&(d.#n=u),t(null==e.yParity||(0,o.WZ)(e.yParity,"sig.yParity")===d.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===d.yParityAndS,"yParityAndS mismatch"),d}}},92292:(e,t,r)=>{"use strict";r.d(t,{h:()=>pe});var n={};r.r(n),r.d(n,{OG:()=>v,My:()=>u,Ph:()=>f,lX:()=>h,Id:()=>y,fg:()=>A,qj:()=>m,aT:()=>d,lq:()=>p,z:()=>g,Q5:()=>E});var i=r(42527);BigInt(0);const o=BigInt(1),a=BigInt(2),s=e=>e instanceof Uint8Array,c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){if(!s(e))throw new Error("Uint8Array expected");let t="";for(let r=0;re+t.length),0));let i=0;return t.forEach((e=>{if(!s(e))throw new Error("Uint8Array expected");n.set(e,i),i+=e.length})),n}const v=e=>(a<new Uint8Array(e),w=e=>Uint8Array.from(e);function A(e,t,r){if("number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!==typeof r)throw new Error("hmacFn must be a function");let n=b(e),i=b(e),o=0;const a=()=>{n.fill(1),i.fill(0),o=0},s=function(){for(var e=arguments.length,t=new Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:b();i=s(w([0]),e),n=s(),0!==e.length&&(i=s(w([1]),e),n=s())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e{let r;for(a(),c(e);!(r=t(u()));)c();return a(),r}}const _={bigint:e=>"bigint"===typeof e,function:e=>"function"===typeof e,boolean:e=>"boolean"===typeof e,string:e=>"string"===typeof e,stringOrUint8Array:e=>"string"===typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"===typeof e&&Number.isSafeInteger(e.outputLen)};function E(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(t,r,n)=>{const i=_[r];if("function"!==typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if((!n||void 0!==o)&&!i(o,e))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[i,o]of Object.entries(t))n(i,o,!1);for(const[i,o]of Object.entries(r))n(i,o,!0);return e}const S=BigInt(0),k=BigInt(1),x=BigInt(2),C=BigInt(3),I=BigInt(4),T=BigInt(5),O=BigInt(8);BigInt(9),BigInt(16);function P(e,t){const r=e%t;return r>=S?r:t+r}function M(e,t,r){if(r<=S||t 0");if(r===k)return S;let n=k;for(;t>S;)t&k&&(n=n*e%r),e=e*e%r,t>>=k;return n}function R(e,t,r){let n=e;for(;t-- >S;)n*=n,n%=r;return n}function N(e,t){if(e===S||t<=S)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=P(e,t),n=t,i=S,o=k,a=k,s=S;for(;r!==S;){const e=n/r,t=n%r,c=i-a*e,u=o-s*e;n=r,r=t,i=a,o=s,a=c,s=u}if(n!==k)throw new Error("invert: does not exist");return P(i,t)}function L(e){if(e%I===C){const t=(e+k)/I;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%O===T){const t=(e-T)/O;return function(e,r){const n=e.mul(r,x),i=e.pow(n,t),o=e.mul(r,i),a=e.mul(e.mul(o,x),i),s=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(s),r))throw new Error("Cannot find square root");return s}}return function(e){const t=(e-k)/x;let r,n,i;for(r=e-k,n=0;r%x===S;r/=x,n++);for(i=x;in?e.create().update(r).digest():r);for(let o=0;onew q(e,t).update(r).digest();H.create=(e,t)=>new q(e,t);const V=BigInt(0),$=BigInt(1);function K(e){return E(e.Fp,B.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),E(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...D(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:W,aT:G}=n,Q={Err:class extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}},_parseInt(e){const{Err:t}=Q;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(128&n[0])throw new t("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:W(n),l:e.subarray(r+2)}},toSig(e){const{Err:t}=Q,r="string"===typeof e?G(e):e;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||48!=r[0])throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");const{d:i,l:o}=Q._parseInt(r.subarray(2)),{d:a,l:s}=Q._parseInt(o);if(s.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,a=i.length/2,s=r(o),c=r(a);return`30${r(a+o+4)}02${c}${i}02${s}${n}`}},Y=BigInt(0),Z=BigInt(1),J=(BigInt(2),BigInt(3));BigInt(4);function X(e){const t=function(e){const t=K(e);E(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==typeof r||"bigint"!==typeof r.beta||"function"!==typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{const i=t.toAffine();return y(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),i=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function o(e){const{a:n,b:i}=t,o=r.sqr(e),a=r.mul(o,e);return r.add(r.add(a,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function a(e){return"bigint"===typeof e&&Yr.eql(e,r.ZERO);return i(t)&&i(n)?h.ZERO:new h(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(h.fromAffine)}static fromHex(e){const t=h.fromAffine(i(m("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return h.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,l.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),a=o(e);if(!r.eql(i,a))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){d(e);const{px:t,py:n,pz:i}=this,{px:o,py:a,pz:s}=e,c=r.eql(r.mul(t,s),r.mul(o,i)),u=r.eql(r.mul(n,s),r.mul(a,i));return c&&u}negate(){return new h(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,J),{px:o,py:a,pz:s}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,d=r.mul(o,o),f=r.mul(a,a),p=r.mul(s,s),g=r.mul(o,a);return g=r.add(g,g),l=r.mul(o,s),l=r.add(l,l),c=r.mul(e,l),u=r.mul(i,p),u=r.add(c,u),c=r.sub(f,u),u=r.add(f,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(i,l),p=r.mul(e,p),g=r.sub(d,p),g=r.mul(e,g),g=r.add(g,l),l=r.add(d,d),d=r.add(l,d),d=r.add(d,p),d=r.mul(d,g),u=r.add(u,d),p=r.mul(a,s),p=r.add(p,p),d=r.mul(p,g),c=r.sub(c,d),l=r.mul(p,f),l=r.add(l,l),l=r.add(l,l),new h(c,u,l)}add(e){d(e);const{px:n,py:i,pz:o}=this,{px:a,py:s,pz:c}=e;let u=r.ZERO,l=r.ZERO,f=r.ZERO;const p=t.a,g=r.mul(t.b,J);let m=r.mul(n,a),y=r.mul(i,s),v=r.mul(o,c),b=r.add(n,i),w=r.add(a,s);b=r.mul(b,w),w=r.add(m,y),b=r.sub(b,w),w=r.add(n,o);let A=r.add(a,c);return w=r.mul(w,A),A=r.add(m,v),w=r.sub(w,A),A=r.add(i,o),u=r.add(s,c),A=r.mul(A,u),u=r.add(y,v),A=r.sub(A,u),f=r.mul(p,w),u=r.mul(g,v),f=r.add(u,f),u=r.sub(y,f),f=r.add(y,f),l=r.mul(u,f),y=r.add(m,m),y=r.add(y,m),v=r.mul(p,v),w=r.mul(g,w),y=r.add(y,v),v=r.sub(m,v),v=r.mul(p,v),w=r.add(w,v),m=r.mul(y,w),l=r.add(l,m),m=r.mul(A,w),u=r.mul(b,u),u=r.sub(u,m),m=r.mul(b,y),f=r.mul(A,f),f=r.add(f,m),new h(u,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(h.ZERO)}wNAF(e){return g.wNAFCached(this,l,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(h.fromAffine)}))}multiplyUnsafe(e){const n=h.ZERO;if(e===Y)return n;if(s(e),e===Z)return this;const{endo:i}=t;if(!i)return g.unsafeLadder(this,e);let{k1neg:o,k1:a,k2neg:c,k2:u}=i.splitScalar(e),l=n,d=n,f=this;for(;a>Y||u>Y;)a&Z&&(l=l.add(f)),u&Z&&(d=d.add(f)),f=f.double(),a>>=Z,u>>=Z;return o&&(l=l.negate()),c&&(d=d.negate()),d=new h(r.mul(d.px,i.beta),d.py,d.pz),l.add(d)}multiply(e){s(e);let n,i,o=e;const{endo:a}=t;if(a){const{k1neg:e,k1:t,k2neg:s,k2:c}=a.splitScalar(o);let{p:u,f:l}=this.wNAF(t),{p:d,f:f}=this.wNAF(c);u=g.constTimeNegate(e,u),d=g.constTimeNegate(s,d),d=new h(r.mul(d.px,a.beta),d.py,d.pz),n=u.add(d),i=l.add(f)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return h.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=h.BASE,i=(e,t)=>t!==Y&&t!==Z&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const a=r.mul(t,e),s=r.mul(n,e),c=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:a,y:s}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===Z)return!0;if(r)return r(h,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===Z?this:r?r(h,this):this.multiplyUnsafe(t.h)}toRawBytes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.assertValidity(),n(h,this,e)}toHex(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return u(this.toRawBytes(e))}}h.BASE=new h(t.Gx,t.Gy,r.ONE),h.ZERO=new h(r.ZERO,r.ONE,r.ZERO);const p=t.nBitLength,g=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>V;)r&$&&(n=n.add(i)),i=i.double(),r>>=$;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let a=e,s=a;for(let n=0;n>=f,n>s&&(n-=d,o+=$);const a=t,h=t+Math.abs(n)-1,p=e%2!==0,g=n<0;0===n?u=u.add(r(p,i[a])):c=c.add(r(g,i[h]))}return{p:c,f:u}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}}(h,t.endo?Math.ceil(p/2):p);return{CURVE:t,ProjectivePoint:h,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:a}}function ee(e){const t=function(e){const t=K(e);return E(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n:n}=t,i=r.BYTES+1,o=2*r.BYTES+1;function a(e){return P(e,n)}function s(e){return N(e,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:b,isWithinCurveOrder:w}=X({...t,toBytes(e,t,n){const i=t.toAffine(),o=r.toBytes(i.x),a=y;return n?a(Uint8Array.from([t.hasEvenY()?2:3]),o):a(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(e){const t=e.length,n=e[0],a=e.subarray(1);if(t!==i||2!==n&&3!==n){if(t===o&&4===n){return{x:r.fromBytes(a.subarray(0,r.BYTES)),y:r.fromBytes(a.subarray(r.BYTES,2*r.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}{const e=f(a);if(!(Y<(s=e)&&su(p(e,t.nByteLength));function S(e){return e>n>>Z}const x=(e,t,r)=>f(e.slice(t,r));class C{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=m("compactSignature",e,2*r),new C(x(e,0,r),x(e,r,2*r))}static fromDER(e){const{r:t,s:r}=Q.toSig(m("DER",e));return new C(t,r)}assertValidity(){if(!w(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!w(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new C(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:i,recovery:o}=this,u=M(m("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const l=2===o||3===o?n+t.n:n;if(l>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=0===(1&o)?"02":"03",f=c.fromHex(d+_(l)),h=s(l),p=a(-u*h),g=a(i*h),y=c.BASE.multiplyAndAddUnsafe(f,p,g);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return S(this.s)}normalizeS(){return this.hasHighS()?new C(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return d(this.toDERHex())}toDERHex(){return Q.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return d(this.toCompactHex())}toCompactHex(){return _(this.r)+_(this.s)}}const I={isValidPrivateKey(e){try{return l(e),!0}catch(t){return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{const e=j(t.n);return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=e.length,i=U(t),o=j(t);if(n<16||n1024)throw new Error(`expected ${o}-1024 bytes of input, got ${n}`);const a=P(r?f(e):h(e),t-k)+k;return r?g(a,i):p(a,i)}(t.randomBytes(e),t.n)},precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BASE;return t._setWindowSize(e),t.multiply(BigInt(3)),t}};function T(e){const t=e instanceof Uint8Array,r="string"===typeof e,n=(t||r)&&e.length;return t?n===i||n===o:r?n===2*i||n===2*o:e instanceof c}const O=t.bits2int||function(e){const r=f(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},M=t.bits2int_modN||function(e){return a(O(e))},R=v(t.nBitLength);function L(e){if("bigint"!==typeof e)throw new Error("bigint expected");if(!(Y<=e&&e2&&void 0!==arguments[2]?arguments[2]:D;if(["recovered","canonical"].some((e=>e in i)))throw new Error("sign() legacy options not supported");const{hash:o,randomBytes:u}=t;let{lowS:d,prehash:f,extraEntropy:h}=i;null==d&&(d=!0),e=m("msgHash",e),f&&(e=m("prehashed msgHash",o(e)));const p=M(e),g=l(n),v=[L(g),L(p)];if(null!=h){const e=!0===h?u(r.BYTES):h;v.push(m("extraEntropy",e))}const b=y(...v),A=p;return{seed:b,k2sig:function(e){const t=O(e);if(!w(t))return;const r=s(t),n=c.BASE.multiply(t).toAffine(),i=a(n.x);if(i===Y)return;const o=a(r*a(A+i*g));if(o===Y)return;let u=(n.x===i?0:2)|Number(n.y&Z),l=o;return d&&S(o)&&(l=function(e){return S(e)?a(-e):e}(o),u^=1),new C(i,l,u)}}}const D={lowS:t.lowS,prehash:!1},F={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(T(e))throw new Error("first arg must be private key");if(!T(t))throw new Error("second arg must be public key");return c.fromHex(t).multiply(l(e)).toRawBytes(r)},sign:function(e,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D;const{seed:i,k2sig:o}=B(e,r,n),a=t;return A(a.hash.outputLen,a.nByteLength,a.hmac)(i,o)},verify:function(e,r,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:F;const o=e;if(r=m("msgHash",r),n=m("publicKey",n),"strict"in i)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:l}=i;let d,f;try{if("string"===typeof o||o instanceof Uint8Array)try{d=C.fromDER(o)}catch(A){if(!(A instanceof Q.Err))throw A;d=C.fromCompact(o)}else{if("object"!==typeof o||"bigint"!==typeof o.r||"bigint"!==typeof o.s)throw new Error("PARSE");{const{r:e,s:t}=o;d=new C(e,t)}}f=c.fromHex(n)}catch(_){if("PARSE"===_.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&d.hasHighS())return!1;l&&(r=t.hash(r));const{r:h,s:p}=d,g=M(r),y=s(p),v=a(g*y),b=a(h*y),w=c.BASE.multiplyAndAddUnsafe(f,v,b)?.toAffine();return!!w&&a(w.x)===h},ProjectivePoint:c,Signature:C,utils:I}}function te(e){return{hash:e,hmac:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i(e+t/oe)/t;function se(e){const t=re,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),a=BigInt(23),s=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=R(l,r,t)*l%t,f=R(d,r,t)*l%t,h=R(f,oe,t)*u%t,p=R(h,i,t)*h%t,g=R(p,o,t)*p%t,m=R(g,s,t)*g%t,y=R(m,c,t)*m%t,v=R(y,s,t)*g%t,b=R(v,r,t)*l%t,w=R(b,a,t)*p%t,A=R(w,n,t)*u%t,_=R(A,oe,t);if(!ce.eql(ce.sqr(_),e))throw new Error("Cannot find square root");return _}const ce=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=S)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:o}=D(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=L(e),s=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:v(i),ZERO:S,ONE:k,create:t=>P(t,e),isValid:t=>{if("bigint"!==typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return S<=t&&te===S,isOdd:e=>(e&k)===k,neg:t=>P(-t,e),eql:(e,t)=>e===t,sqr:t=>P(t*t,e),add:(t,r)=>P(t+r,e),sub:(t,r)=>P(t-r,e),mul:(t,r)=>P(t*r,e),pow:(e,t)=>function(e,t,r){if(r 0");if(r===S)return e.ONE;if(r===k)return t;let n=e.ONE,i=t;for(;r>S;)r&k&&(n=e.mul(n,i)),i=e.sqr(i),r>>=k;return n}(s,e,t),div:(t,r)=>P(t*N(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>N(t,e),sqrt:n.sqrt||(e=>a(s,e)),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}(s,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?g(e,o):p(e,o),fromBytes:e=>{if(e.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${e.length}`);return r?h(e):f(e)}});return Object.freeze(s)}(re,void 0,void 0,{sqrt:se}),ue=function(e,t){const r=t=>ee({...e,...te(t)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:ce,n:ne,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=ne,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-ie*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,a=BigInt("0x100000000000000000000000000000000"),s=ae(o*e,t),c=ae(-n*e,t);let u=P(e-s*r-c*i,t),l=P(-s*n-c*o,t);const d=u>a,f=l>a;if(d&&(u=t-u),f&&(l=t-l),u>a||l>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}}},i.s);BigInt(0);ue.ProjectivePoint;var le=r(49099),de=r(43236),fe=r(18537),he=r(2372);class pe{#i;constructor(e){(0,le.MR)(32===(0,de.pO)(e),"invalid private key","privateKey","[REDACTED]"),this.#i=(0,de.c$)(e)}get privateKey(){return this.#i}get publicKey(){return pe.computePublicKey(this.#i)}get compressedPublicKey(){return pe.computePublicKey(this.#i,!0)}sign(e){(0,le.MR)(32===(0,de.pO)(e),"invalid digest length","digest",e);const t=ue.sign((0,de.Lm)(e),(0,de.Lm)(this.#i),{lowS:!0});return he.t.from({r:(0,fe.up)(t.r,32),s:(0,fe.up)(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=pe.computePublicKey(e);return(0,de.c$)(ue.getSharedSecret((0,de.Lm)(this.#i),(0,de.q5)(t),!1))}static computePublicKey(e,t){let r=(0,de.q5)(e,"key");if(32===r.length){const e=ue.getPublicKey(r,!!t);return(0,de.c$)(e)}if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}const n=ue.ProjectivePoint.fromHex(r);return(0,de.c$)(n.toRawBytes(t))}static recoverPublicKey(e,t){(0,le.MR)(32===(0,de.pO)(e),"invalid digest length","digest",e);const r=he.t.from(t);let n=ue.Signature.fromCompact((0,de.Lm)((0,de.xW)([r.r,r.s])));n=n.addRecoveryBit(r.yParity);const i=n.recoverPublicKey((0,de.Lm)(e));return(0,le.MR)(null!=i,"invalid signautre for digest","signature",t),"0x"+i.toHex(!1)}static addPoints(e,t,r){const n=ue.ProjectivePoint.fromHex(pe.computePublicKey(e).substring(2)),i=ue.ProjectivePoint.fromHex(pe.computePublicKey(t).substring(2));return"0x"+n.add(i).toHex(!!r)}}},43236:(e,t,r)=>{"use strict";r.d(t,{Lm:()=>a,Lo:()=>s,c$:()=>l,f:()=>c,nx:()=>p,pO:()=>f,q5:()=>o,xW:()=>d});var n=r(49099);function i(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if("string"===typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n>4]+u[15&e]}return r}function d(e){return"0x"+e.map((e=>l(e).substring(2))).join("")}function f(e){return s(e,!0)?(e.length-2)/2:o(e).length}function h(e,t,r){const i=o(e);(0,n.vA)(t>=i.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(i),length:t,offset:t+1});const a=new Uint8Array(t);return a.fill(0),r?a.set(i,t-i.length):a.set(i,0),l(a)}function p(e,t){return h(e,t,!0)}},49099:(e,t,r)=>{"use strict";r.d(t,{vA:()=>a,MR:()=>s,SP:()=>u,gk:()=>l});const n="6.13.4";var i=r(48737);function o(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(o).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let r="0x";for(let n=0;n>4],r+=t[15&e[n]];return r}if("object"===typeof e&&"function"===typeof e.toJSON)return o(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{ "+t.map((t=>`${o(t)}: ${o(e[t])}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function a(e,t,r,a){if(!e)throw function(e,t,r){let a,s=e;{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${o(r)}`);for(const e in r){if("shortMessage"===e)continue;const t=r[e];i.push(e+"="+o(t))}}i.push(`code=${t}`),i.push(`version=${n}`),i.length&&(e+=" ("+i.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":a=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":a=new RangeError(e);break;default:a=new Error(e)}return(0,i.n)(a,{code:t}),r&&Object.assign(a,r),null==a.shortMessage&&(0,i.n)(a,{shortMessage:s}),a}(t,r,a)}function s(e,t,r,n){a(e,t,"INVALID_ARGUMENT",{argument:r,value:n})}const c=["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){const e=String.fromCharCode(233).normalize("NFD");if(e!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(r){}return e}),[]);function u(e){a(c.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})}function l(e,t,r){if(null==r&&(r=""),e!==t){let e=r,t="new";r&&(e+=".",t+=" "+r),a(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}},18537:(e,t,r)=>{"use strict";r.d(t,{Ab:()=>l,JJ:()=>c,WZ:()=>f,c4:()=>p,dK:()=>u,nD:()=>g,up:()=>h});var n=r(43236),i=r(49099);const o=BigInt(0),a=BigInt(1),s=9007199254740991;function c(e,t){let r=l(e,"value");const n=BigInt(f(t,"width")),s=a<=-s&&e<=s,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){(0,i.MR)(!1,`invalid BigNumberish string: ${r.message}`,t||"value",e)}}(0,i.MR)(!1,"invalid BigNumberish value",t||"value",e)}function d(e,t){const r=l(e,t);return(0,i.vA)(r>=o,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),r}function f(e,t){switch(typeof e){case"bigint":return(0,i.MR)(e>=-s&&e<=s,"overflow",t||"value",e),Number(e);case"number":return(0,i.MR)(Number.isInteger(e),"underflow",t||"value",e),(0,i.MR)(e>=-s&&e<=s,"overflow",t||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return f(BigInt(e),t)}catch(r){(0,i.MR)(!1,`invalid numeric string: ${r.message}`,t||"value",e)}}(0,i.MR)(!1,"invalid numeric value",t||"value",e)}function h(e,t){let r=d(e,"value").toString(16);if(null==t)r.length%2&&(r="0"+r);else{const n=f(t,"width");for((0,i.vA)(2*n>=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});r.length<2*n;)r="0"+r}return"0x"+r}function p(e){const t=d(e,"value");if(t===o)return new Uint8Array([]);let r=t.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let i=0;i{"use strict";function n(e,t,r){const n=t.split("|").map((e=>e.trim()));for(let o=0;oi})},78565:(e,t,r)=>{"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function i(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&!r.includes(e.length))throw new Error(`Expected Uint8Array of length ${r}, not of length=${e.length}`)}function o(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function a(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function s(e,t){i(e);const r=t.outputLen;if(e.lengths,ai:()=>n,ee:()=>i,t2:()=>a,tW:()=>o})},64611:(e,t,r)=>{"use strict";r.d(t,{D:()=>o});var n=r(78565),i=r(32288);class o extends i.Vw{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.O8)(this.buffer)}update(e){(0,n.t2)(this);const{view:t,buffer:r,blockLen:o}=this,a=(e=(0,i.ZJ)(e)).length;for(let n=0;no-s&&(this.process(r,0),s=0);for(let n=s;n>i&o),s=Number(r&o),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,s,n)}(r,o-8,BigInt(8*this.length),a),this.process(r,0);const c=(0,i.O8)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let n=0;n{"use strict";r.d(t,{Ay:()=>d,B4:()=>c,P5:()=>s,WM:()=>u,im:()=>l,lD:()=>a});const n=BigInt(2**32-1),i=BigInt(32);function o(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&n),l:Number(e>>i&n)}:{h:0|Number(e>>i&n),l:0|Number(e&n)}}function a(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;ie<>>32-r,c=(e,t,r)=>t<>>32-r,u=(e,t,r)=>t<>>64-r,l=(e,t,r)=>e<>>64-r;const d={fromBig:o,split:a,toBig:(e,t)=>BigInt(e>>>0)<>>0),shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:s,rotlSL:c,rotlBH:u,rotlBL:l,add:function(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}},add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/2**32|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0,add5H:(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0,add5L:(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0)}},42527:(e,t,r)=>{"use strict";r.d(t,{s:()=>l});var n=r(64611),i=r(32288);const o=(e,t,r)=>e&t^e&r^t&r,a=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class u extends n.D{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[e,t,r,n,i,o,a,s]}set(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let i=0;i<16;i++,t+=4)c[i]=e.getUint32(t,!1);for(let o=16;o<64;o++){const e=c[o-15],t=c[o-2],r=(0,i.Ow)(e,7)^(0,i.Ow)(e,18)^e>>>3,n=(0,i.Ow)(t,17)^(0,i.Ow)(t,19)^t>>>10;c[o]=n+c[o-7]+r+c[o-16]|0}let{A:r,B:n,C:s,D:u,E:l,F:d,G:f,H:h}=this;for(let g=0;g<64;g++){const e=h+((0,i.Ow)(l,6)^(0,i.Ow)(l,11)^(0,i.Ow)(l,25))+((p=l)&d^~p&f)+a[g]+c[g]|0,t=((0,i.Ow)(r,2)^(0,i.Ow)(r,13)^(0,i.Ow)(r,22))+o(r,n,s)|0;h=f,f=d,d=l,l=u+e|0,u=s,s=n,n=r,r=e+t|0}var p;r=r+this.A|0,n=n+this.B|0,s=s+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(r,n,s,u,l,d,f,h)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const l=(0,i.ld)((()=>new u))},32288:(e,t,r)=>{"use strict";r.d(t,{Vw:()=>l,Id:()=>u,O8:()=>a,po:()=>f,Ow:()=>s,ZJ:()=>c,DH:()=>o,ld:()=>d});const n="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,i=e=>e instanceof Uint8Array,o=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),a=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),s=(e,t)=>e<<32-t|e>>>t;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");function c(e){if("string"===typeof e&&(e=function(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!i(e))throw new Error("expected Uint8Array, got "+typeof e);return e}function u(){for(var e=arguments.length,t=new Array(e),r=0;re+t.length),0));let o=0;return t.forEach((e=>{if(!i(e))throw new Error("Uint8Array expected");n.set(e,o),o+=e.length})),n}class l{clone(){return this._cloneInto()}}function d(e){const t=t=>e().update(c(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(n&&"function"===typeof n.getRandomValues)return n.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},52178:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CloseCode:()=>n.CloseCode,DEPRECATED_GRAPHQL_WS_PROTOCOL:()=>n.DEPRECATED_GRAPHQL_WS_PROTOCOL,GRAPHQL_TRANSPORT_WS_PROTOCOL:()=>n.GRAPHQL_TRANSPORT_WS_PROTOCOL,MessageType:()=>n.MessageType,TerminatedCloseEvent:()=>c,createClient:()=>s,isMessage:()=>n.isMessage,parseMessage:()=>n.parseMessage,stringifyMessage:()=>n.stringifyMessage,validateMessage:()=>n.validateMessage});var n=r(40616),i=r(77850),o=function(e){return this instanceof o?(this.v=e,this):new o(e)},a=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),a=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||c(e,t)}))})}function c(e,t){try{!function(e){e.value instanceof o?Promise.resolve(e.value.v).then(u,l):d(a[0][2],e)}(i[e](t))}catch(r){d(a[0][3],r)}}function u(e){c("next",e)}function l(e){c("throw",e)}function d(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}};function s(e){const{url:t,connectionParams:r,lazy:s=!0,onNonLazyError:l=console.error,lazyCloseTimeout:d=0,keepAlive:f=0,disablePong:h,connectionAckWaitTimeout:p=0,retryAttempts:g=5,retryWait:m=async function(e){let t=1e3;for(let r=0;rsetTimeout(e,t+Math.floor(2700*Math.random()+300))))},shouldRetry:y=u,isFatalConnectionProblem:v,on:b,webSocketImpl:w,generateID:A=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},jsonMessageReplacer:_,jsonMessageReviver:E}=e;let S;if(w){if(!("function"===typeof(k=w)&&"constructor"in k&&"CLOSED"in k&&"CLOSING"in k&&"CONNECTING"in k&&"OPEN"in k))throw new Error("Invalid WebSocket implementation provided");S=w}else"undefined"!==typeof WebSocket?S=WebSocket:"undefined"!==typeof global?S=global.WebSocket||global.MozWebSocket:"undefined"!==typeof window&&(S=window.WebSocket||window.MozWebSocket);var k;if(!S)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const x=S,C=(()=>{const e=(()=>{const e={};return{on:(t,r)=>(e[t]=r,()=>{delete e[t]}),emit(t){var r;"id"in t&&(null===(r=e[t.id])||void 0===r||r.call(e,t))}}})(),t={connecting:(null===b||void 0===b?void 0:b.connecting)?[b.connecting]:[],opened:(null===b||void 0===b?void 0:b.opened)?[b.opened]:[],connected:(null===b||void 0===b?void 0:b.connected)?[b.connected]:[],ping:(null===b||void 0===b?void 0:b.ping)?[b.ping]:[],pong:(null===b||void 0===b?void 0:b.pong)?[b.pong]:[],message:(null===b||void 0===b?void 0:b.message)?[e.emit,b.message]:[e.emit],closed:(null===b||void 0===b?void 0:b.closed)?[b.closed]:[],error:(null===b||void 0===b?void 0:b.error)?[b.error]:[]};return{onMessage:e.on,on(e,r){const n=t[e];return n.push(r),()=>{n.splice(n.indexOf(r),1)}},emit(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{t.forEach((e=>e())),e(r)})),C.on("closed",(r=>{t.forEach((e=>e())),e(r)}))]}let T,O,P=0,M=!1,R=0,N=!1;async function L(){clearTimeout(O);const[e,o]=await(null!==T&&void 0!==T?T:T=new Promise(((e,o)=>(async()=>{if(M){if(await m(R),!P)return T=void 0,o({code:1e3,reason:"All Subscriptions Gone"});R++}C.emit("connecting",M);const a=new x("function"===typeof t?await t():t,n.GRAPHQL_TRANSPORT_WS_PROTOCOL);let s,u;function l(){isFinite(f)&&f>0&&(clearTimeout(u),u=setTimeout((()=>{a.readyState===x.OPEN&&(a.send((0,n.stringifyMessage)({type:n.MessageType.Ping})),C.emit("ping",!1,void 0))}),f))}I((e=>{T=void 0,clearTimeout(s),clearTimeout(u),o(e),e instanceof c&&(a.close(4499,"Terminated"),a.onerror=null,a.onclose=null)})),a.onerror=e=>C.emit("error",e),a.onclose=e=>C.emit("closed",e),a.onopen=async()=>{try{C.emit("opened",a);const e="function"===typeof r?await r():r;if(a.readyState!==x.OPEN)return;a.send((0,n.stringifyMessage)(e?{type:n.MessageType.ConnectionInit,payload:e}:{type:n.MessageType.ConnectionInit},_)),isFinite(p)&&p>0&&(s=setTimeout((()=>{a.close(n.CloseCode.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")}),p)),l()}catch(e){C.emit("error",e),a.close(n.CloseCode.InternalClientError,(0,i.S4)(e instanceof Error?e.message:new Error(e).message,"Internal client error"))}};let d=!1;a.onmessage=t=>{let{data:r}=t;try{const t=(0,n.parseMessage)(r,E);if(C.emit("message",t),"ping"===t.type||"pong"===t.type)return C.emit(t.type,!0,t.payload),void("pong"===t.type?l():h||(a.send((0,n.stringifyMessage)(t.payload?{type:n.MessageType.Pong,payload:t.payload}:{type:n.MessageType.Pong})),C.emit("pong",!1,t.payload)));if(d)return;if(t.type!==n.MessageType.ConnectionAck)throw new Error(`First message cannot be of type ${t.type}`);clearTimeout(s),d=!0,C.emit("connected",a,t.payload,M),M=!1,R=0,e([a,new Promise(((e,t)=>I(t)))])}catch(o){a.onmessage=null,C.emit("error",o),a.close(n.CloseCode.BadResponse,(0,i.S4)(o instanceof Error?o.message:new Error(o).message,"Bad response"))}}})())));e.readyState===x.CLOSING&&await o;let a=()=>{};const s=new Promise((e=>a=e));return[e,a,Promise.race([s.then((()=>{if(!P){const t=()=>e.close(1e3,"Normal Closure");isFinite(d)&&d>0?O=setTimeout((()=>{e.readyState===x.OPEN&&t()}),d):t()}})),o])]}function B(e){if(u(e)&&(t=e.code,![1e3,1001,1006,1005,1012,1013,1014].includes(t)&&t>=1e3&&t<=1999||[n.CloseCode.InternalServerError,n.CloseCode.InternalClientError,n.CloseCode.BadRequest,n.CloseCode.BadResponse,n.CloseCode.Unauthorized,n.CloseCode.SubprotocolNotAcceptable,n.CloseCode.SubscriberAlreadyExists,n.CloseCode.TooManyInitialisationRequests].includes(e.code)))throw e;var t;if(N)return!1;if(u(e)&&1e3===e.code)return P>0;if(!g||R>=g)throw e;if(!y(e))throw e;if(null===v||void 0===v?void 0:v(e))throw e;return M=!0}function D(e,t){const r=A(e);let i=!1,o=!1,a=()=>{P--,i=!0};return(async()=>{for(P++;;)try{const[s,c,u]=await L();if(i)return c();const l=C.onMessage(r,(e=>{switch(e.type){case n.MessageType.Next:return void t.next(e.payload);case n.MessageType.Error:return o=!0,i=!0,t.error(e.payload),void a();case n.MessageType.Complete:return i=!0,void a()}}));return s.send((0,n.stringifyMessage)({id:r,type:n.MessageType.Subscribe,payload:e},_)),a=()=>{i||s.readyState!==x.OPEN||s.send((0,n.stringifyMessage)({id:r,type:n.MessageType.Complete},_)),P--,i=!0,c()},void await u.finally(l)}catch(s){if(!B(s))return}})().then((()=>{o||t.complete()})).catch((e=>{t.error(e)})),()=>{i||a()}}return s||(async()=>{for(P++;;)try{const[,,e]=await L();await e}catch(e){try{if(!B(e))return}catch(e){return null===l||void 0===l?void 0:l(e)}}})(),{on:C.on,subscribe:D,iterate(e){const t=[],r={done:!1,error:null,resolve:()=>{}},n=D(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),i=function(){return a(this,arguments,(function*(){for(;;){for(t.length||(yield o(new Promise((e=>r.resolve=e))));t.length;)yield yield o(t.shift());if(r.error)throw r.error;if(r.done)return yield o(void 0)}}))}();return i.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),i.return=async()=>(n(),{done:!0,value:void 0}),i},async dispose(){if(N=!0,T){const[e]=await T;e.close(1e3,"Normal Closure")}},terminate(){T&&C.emit("closed",new c)}}}class c extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function u(e){return(0,i.Gv)(e)&&"code"in e&&"reason"in e}},40616:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CloseCode:()=>a,DEPRECATED_GRAPHQL_WS_PROTOCOL:()=>o,GRAPHQL_TRANSPORT_WS_PROTOCOL:()=>i,MessageType:()=>s,isMessage:()=>u,parseMessage:()=>l,stringifyMessage:()=>d,validateMessage:()=>c});var n=r(77850);const i="graphql-transport-ws",o="graphql-ws";var a,s;function c(e){if(!(0,n.Gv)(e))throw new Error(`Message is expected to be an object, but got ${(0,n.l)(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if("string"!==typeof e.type)throw new Error(`Message is expects the 'type' property to be a string, but got ${(0,n.l)(e.type)}`);switch(e.type){case s.ConnectionInit:case s.ConnectionAck:case s.Ping:case s.Pong:if(null!=e.payload&&!(0,n.Gv)(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case s.Subscribe:if("string"!==typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${(0,n.l)(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(0,n.Gv)(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${(0,n.l)(e.payload)}`);if("string"!==typeof e.payload.query)throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${(0,n.l)(e.payload.query)}`);if(null!=e.payload.variables&&!(0,n.Gv)(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${(0,n.l)(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==(0,n.l)(e.payload.operationName))throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${(0,n.l)(e.payload.operationName)}`);if(null!=e.payload.extensions&&!(0,n.Gv)(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${(0,n.l)(e.payload.extensions)}`);break;case s.Next:if("string"!==typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${(0,n.l)(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(0,n.Gv)(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${(0,n.l)(e.payload)}`);break;case s.Error:if("string"!==typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${(0,n.l)(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(0,n.tY)(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case s.Complete:if("string"!==typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${(0,n.l)(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function u(e){try{return c(e),!0}catch(t){return!1}}function l(e,t){return c("string"===typeof e?JSON.parse(e,t):e)}function d(e,t){return c(e),JSON.stringify(e,t)}!function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"}(a||(a={})),function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"}(s||(s={}))},78462:(e,t,r)=>{"use strict";r.r(t),r.d(t,{handleProtocols:()=>pn,makeServer:()=>hn});var n=r(28882),i=r(30398),o=r(84836),a=r(78449);const s=Array.prototype.find?function(e,t){return Array.prototype.find.call(e,t)}:function(e,t){for(var r=0;r1&&"_"===e[0]&&"_"===e[1]?new o.e('Name "'.concat(e,'" must not begin with "__", which is reserved by GraphQL introspection.')):d.test(e)?void 0:new o.e('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(e,'" does not.'))}const h=Object.entries||function(e){return Object.keys(e).map((function(t){return[t,e[t]]}))};var p=r(44838);function g(e,t){return e.reduce((function(e,r){return e[t(r)]=r,e}),Object.create(null))}function m(e,t){for(var r=Object.create(null),n=0,i=h(e);n0);var s=0;do{++n,s=10*s+o-x,o=t.charCodeAt(n)}while(I(o)&&s>0);if(as)return 1}else{if(io)return 1;++r,++n}}return e.length-t.length}var x=48,C=57;function I(e){return!isNaN(e)&&x<=e&&e<=C}function T(e,t){for(var r=Object.create(null),n=new O(e),i=Math.floor(.4*e.length)+1,o=0;ot)){for(var c=this._rows,u=0;u<=s;u++)c[0][u]=u;for(var l=1;l<=a;l++){for(var d=c[(l-1)%3],f=c[l%3],h=f[0]=l,p=1;p<=s;p++){var g=n[l-1]===i[p-1]?0:1,m=Math.min(d[p]+1,f[p-1]+1,d[p-1]+g);if(l>1&&p>1&&n[l-1]===i[p-2]&&n[l-2]===i[p-1]){var y=c[(l-2)%3][p-2];m=Math.min(m,y+1)}mt)return}var v=c[a%3][s];return v<=t?v:void 0}},e}();function P(e){for(var t=e.length,r=new Array(t),n=0;n0?e:void 0}J.prototype.toString=function(){return"["+String(this.ofType)+"]"},J.prototype.toJSON=function(){return this.toString()},Object.defineProperty(J.prototype,p.Kp,{get:function(){return"GraphQLList"}}),(0,S.A)(J),X.prototype.toString=function(){return String(this.ofType)+"!"},X.prototype.toJSON=function(){return this.toString()},Object.defineProperty(X.prototype,p.Kp,{get:function(){return"GraphQLNonNull"}}),(0,S.A)(X);var ae=function(){function e(e){var t,r,n,o=null!==(t=e.parseValue)&&void 0!==t?t:E;this.name=e.name,this.description=e.description,this.specifiedByUrl=e.specifiedByUrl,this.serialize=null!==(r=e.serialize)&&void 0!==r?r:E,this.parseValue=o,this.parseLiteral=null!==(n=e.parseLiteral)&&void 0!==n?n:function(e,t){return o(L(e,t))},this.extensions=e.extensions&&y(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),"string"===typeof e.name||(0,i.A)(0,"Must provide name."),null==e.specifiedByUrl||"string"===typeof e.specifiedByUrl||(0,i.A)(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat((0,u.A)(e.specifiedByUrl),".")),null==e.serialize||"function"===typeof e.serialize||(0,i.A)(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),e.parseLiteral&&("function"===typeof e.parseValue&&"function"===typeof e.parseLiteral||(0,i.A)(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){var e;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:p.Kp,get:function(){return"GraphQLScalarType"}}]),e}();(0,S.A)(ae);var se=function(){function e(e){this.name=e.name,this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=e.extensions&&y(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._fields=ue.bind(void 0,e),this._interfaces=ce.bind(void 0,e),"string"===typeof e.name||(0,i.A)(0,"Must provide name."),null==e.isTypeOf||"function"===typeof e.isTypeOf||(0,i.A)(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat((0,u.A)(e.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return"function"===typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"===typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:de(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:p.Kp,get:function(){return"GraphQLObjectType"}}]),e}();function ce(e){var t,r=null!==(t=ie(e.interfaces))&&void 0!==t?t:[];return Array.isArray(r)||(0,i.A)(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),r}function ue(e){var t=ie(e.fields);return le(t)||(0,i.A)(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),m(t,(function(t,r){var n;le(t)||(0,i.A)(0,"".concat(e.name,".").concat(r," field config must be an object.")),!("isDeprecated"in t)||(0,i.A)(0,"".concat(e.name,".").concat(r,' should provide "deprecationReason" instead of "isDeprecated".')),null==t.resolve||"function"===typeof t.resolve||(0,i.A)(0,"".concat(e.name,".").concat(r," field resolver must be a function if ")+"provided, but got: ".concat((0,u.A)(t.resolve),"."));var o=null!==(n=t.args)&&void 0!==n?n:{};le(o)||(0,i.A)(0,"".concat(e.name,".").concat(r," args must be an object with argument names as keys."));var a=h(o).map((function(e){var t=e[0],r=e[1];return{name:t,description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:r.extensions&&y(r.extensions),astNode:r.astNode}}));return{name:r,description:t.description,type:t.type,args:a,resolve:t.resolve,subscribe:t.subscribe,isDeprecated:null!=t.deprecationReason,deprecationReason:t.deprecationReason,extensions:t.extensions&&y(t.extensions),astNode:t.astNode}}))}function le(e){return(0,_.A)(e)&&!Array.isArray(e)}function de(e){return m(e,(function(e){return{description:e.description,type:e.type,args:fe(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}))}function fe(e){return v(e,(function(e){return e.name}),(function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}))}function he(e){return K(e.type)&&void 0===e.defaultValue}(0,S.A)(se);var pe=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&y(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._fields=ue.bind(void 0,e),this._interfaces=ce.bind(void 0,e),"string"===typeof e.name||(0,i.A)(0,"Must provide name."),null==e.resolveType||"function"===typeof e.resolveType||(0,i.A)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat((0,u.A)(e.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return"function"===typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"===typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){var e;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:de(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:p.Kp,get:function(){return"GraphQLInterfaceType"}}]),e}();(0,S.A)(pe);var ge=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&y(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._types=me.bind(void 0,e),"string"===typeof e.name||(0,i.A)(0,"Must provide name."),null==e.resolveType||"function"===typeof e.resolveType||(0,i.A)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat((0,u.A)(e.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return"function"===typeof this._types&&(this._types=this._types()),this._types},t.toConfig=function(){var e;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:p.Kp,get:function(){return"GraphQLUnionType"}}]),e}();function me(e){var t=ie(e.types);return Array.isArray(t)||(0,i.A)(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}(0,S.A)(ge);var ye=function(){function e(e){var t,r;this.name=e.name,this.description=e.description,this.extensions=e.extensions&&y(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._values=(t=this.name,le(r=e.values)||(0,i.A)(0,"".concat(t," values must be an object with value names as keys.")),h(r).map((function(e){var r=e[0],n=e[1];return le(n)||(0,i.A)(0,"".concat(t,".").concat(r,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat((0,u.A)(n),".")),!("isDeprecated"in n)||(0,i.A)(0,"".concat(t,".").concat(r,' should provide "deprecationReason" instead of "isDeprecated".')),{name:r,description:n.description,value:void 0!==n.value?n.value:r,isDeprecated:null!=n.deprecationReason,deprecationReason:n.deprecationReason,extensions:n.extensions&&y(n.extensions),astNode:n.astNode}}))),this._valueLookup=new Map(this._values.map((function(e){return[e.value,e]}))),this._nameLookup=g(this._values,(function(e){return e.name})),"string"===typeof e.name||(0,i.A)(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(e){return this._nameLookup[e]},t.serialize=function(e){var t=this._valueLookup.get(e);if(void 0===t)throw new o.e('Enum "'.concat(this.name,'" cannot represent value: ').concat((0,u.A)(e)));return t.name},t.parseValue=function(e){if("string"!==typeof e){var t=(0,u.A)(e);throw new o.e('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(t,".")+ve(this,t))}var r=this.getValue(e);if(null==r)throw new o.e('Value "'.concat(e,'" does not exist in "').concat(this.name,'" enum.')+ve(this,e));return r.value},t.parseLiteral=function(e,t){if(e.kind!==M.b.ENUM){var r=(0,R.y)(e);throw new o.e('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(r,".")+ve(this,r),e)}var n=this.getValue(e.value);if(null==n){var i=(0,R.y)(e);throw new o.e('Value "'.concat(i,'" does not exist in "').concat(this.name,'" enum.')+ve(this,i),e)}return n.value},t.toConfig=function(){var e,t=v(this.getValues(),(function(e){return e.name}),(function(e){return{description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:p.Kp,get:function(){return"GraphQLEnumType"}}]),e}();function ve(e,t){return A("the enum value",T(t,e.getValues().map((function(e){return e.name}))))}(0,S.A)(ye);var be=function(){function e(e){this.name=e.name,this.description=e.description,this.extensions=e.extensions&&y(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._fields=we.bind(void 0,e),"string"===typeof e.name||(0,i.A)(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return"function"===typeof this._fields&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var e,t=m(this.getFields(),(function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},D(e,[{key:p.Kp,get:function(){return"GraphQLInputObjectType"}}]),e}();function we(e){var t=ie(e.fields);return le(t)||(0,i.A)(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),m(t,(function(t,r){return!("resolve"in t)||(0,i.A)(0,"".concat(e.name,".").concat(r," field has a resolve property, but Input Types cannot define resolvers.")),{name:r,description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions&&y(t.extensions),astNode:t.astNode}}))}function Ae(e){return K(e.type)&&void 0===e.defaultValue}function _e(e,t){return e===t||(K(e)&&K(t)||!(!$(e)||!$(t)))&&_e(e.ofType,t.ofType)}function Ee(e,t,r){return t===r||(K(r)?!!K(t)&&Ee(e,t.ofType,r.ofType):K(t)?Ee(e,t.ofType,r):$(r)?!!$(t)&&Ee(e,t.ofType,r.ofType):!$(t)&&(Z(r)&&(z(t)||F(t))&&e.isSubType(r,t)))}function Se(e,t,r){return t===r||(Z(t)?Z(r)?e.getPossibleTypes(t).some((function(t){return e.isSubType(r,t)})):e.isSubType(t,r):!!Z(r)&&e.isSubType(r,t))}(0,S.A)(be);const ke=Array.from||function(e,t,r){if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n=e[p.q4];if("function"===typeof n){for(var i,o=n.call(e),a=[],s=0;!(i=o.next()).done;++s)if(a.push(t.call(r,i.value,s)),s>9999999)throw new TypeError("Near-infinite iteration.");return a}var c=e.length;if("number"===typeof c&&c>=0&&c%1===0){for(var u=[],l=0;l1&&void 0!==arguments[1]?arguments[1]:function(e){return e};if(null==e||"object"!==Ie(e))return null;if(Array.isArray(e))return e.map(t);var r=e[p.q4];if("function"===typeof r){for(var n,i=r.call(e),o=[],a=0;!(n=i.next()).done;++a)o.push(t(n.value,a));return o}var s=e.length;if("number"===typeof s&&s>=0&&s%1===0){for(var c=[],u=0;uPe||rPe||ePe||t0)return this._typeStack[this._typeStack.length-1]},t.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},t.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},t.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},t.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},t.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},t.getDirective=function(){return this._directive},t.getArgument=function(){return this._argument},t.getEnumValue=function(){return this._enumValue},t.enter=function(e){var t=this._schema;switch(e.kind){case M.b.SELECTION_SET:var r=ne(this.getType());this._parentTypeStack.push(Y(r)?r:void 0);break;case M.b.FIELD:var n,i,o=this.getParentType();o&&(n=this._getFieldDef(t,o,e))&&(i=n.type),this._fieldDefStack.push(n),this._typeStack.push(G(i)?i:void 0);break;case M.b.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case M.b.OPERATION_DEFINITION:var a;switch(e.operation){case"query":a=t.getQueryType();break;case"mutation":a=t.getMutationType();break;case"subscription":a=t.getSubscriptionType()}this._typeStack.push(F(a)?a:void 0);break;case M.b.INLINE_FRAGMENT:case M.b.FRAGMENT_DEFINITION:var c=e.typeCondition,u=c?Mt(t,c):ne(this.getType());this._typeStack.push(G(u)?u:void 0);break;case M.b.VARIABLE_DEFINITION:var l=Mt(t,e.type);this._inputTypeStack.push(W(l)?l:void 0);break;case M.b.ARGUMENT:var d,f,h,p=null!==(d=this.getDirective())&&void 0!==d?d:this.getFieldDef();p&&(f=s(p.args,(function(t){return t.name===e.name.value})))&&(h=f.type),this._argument=f,this._defaultValueStack.push(f?f.defaultValue:void 0),this._inputTypeStack.push(W(h)?h:void 0);break;case M.b.LIST:var g=te(this.getInputType()),m=$(g)?g.ofType:g;this._defaultValueStack.push(void 0),this._inputTypeStack.push(W(m)?m:void 0);break;case M.b.OBJECT_FIELD:var y,v,b=ne(this.getInputType());V(b)&&(v=b.getFields()[e.name.value])&&(y=v.type),this._defaultValueStack.push(v?v.defaultValue:void 0),this._inputTypeStack.push(W(y)?y:void 0);break;case M.b.ENUM:var w,A=ne(this.getInputType());H(A)&&(w=A.getValue(e.value)),this._enumValue=w}},t.leave=function(e){switch(e.kind){case M.b.SELECTION_SET:this._parentTypeStack.pop();break;case M.b.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case M.b.DIRECTIVE:this._directive=null;break;case M.b.OPERATION_DEFINITION:case M.b.INLINE_FRAGMENT:case M.b.FRAGMENT_DEFINITION:this._typeStack.pop();break;case M.b.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case M.b.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case M.b.LIST:case M.b.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case M.b.ENUM:this._enumValue=null}},e}();function Nt(e,t,r){var n=r.name.value;return n===Ze.name&&e.getQueryType()===t?Ze:n===Je.name&&e.getQueryType()===t?Je:n===Xe.name&&Y(t)?Xe:F(t)||z(t)?t.getFields()[n]:void 0}function Lt(e,t){return{enter:function(r){e.enter(r);var n=(0,a.UY)(t,r.kind,!1);if(n){var i=n.apply(t,arguments);return void 0!==i&&(e.leave(r),(0,Pt.Ll)(i)&&e.enter(i)),i}},leave:function(r){var n,i=(0,a.UY)(t,r.kind,!0);return i&&(n=i.apply(t,arguments)),e.leave(r),n}}}var Bt=r(74815);function Dt(e){for(var t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null),i=0,a=e.getDocument().definitions;i0)return[[t,e.map((function(e){return e[0]}))],e.reduce((function(e,t){var r=t[1];return e.concat(r)}),[r]),e.reduce((function(e,t){var r=t[2];return e.concat(r)}),[n])]}(S,i,l,h)}}function ir(e,t){return $(e)?!$(t)||ir(e.ofType,t.ofType):!!$(t)||(K(e)?!K(t)||ir(e.ofType,t.ofType):!!K(t)||!(!Q(e)&&!Q(t))&&e!==t)}function or(e,t,r,n){var i=t.get(n);if(!i){var o=Object.create(null),a=Object.create(null);sr(e,r,n,o,a),i=[o,Object.keys(a)],t.set(n,i)}return i}function ar(e,t,r){var n=t.get(r.selectionSet);if(n)return n;var i=Mt(e.getSchema(),r.typeCondition);return or(e,t,i,r.selectionSet)}function sr(e,t,r,n,i){for(var o=0,a=r.selections;o1&&void 0!==arguments[1]?arguments[1]:Object.create(null),i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(r.kind===M.b.FRAGMENT_SPREAD){var o=r.name.value;if(!0===n[o])return!1;var a=e.getFragment(o);if(!a)return!1;try{return n[o]=!0,t(a,n,i)}finally{n[o]=null}}if(r.kind===M.b.FIELD&&("fields"===r.name.value||"interfaces"===r.name.value||"possibleTypes"===r.name.value||"inputFields"===r.name.value)&&++i>=3)return!0;if("selectionSet"in r&&r.selectionSet)for(var s=0,c=r.selectionSet.selections;s1&&e.reportError(new o.e("This anonymous operation must be the only defined operation.",r))}}},function(e){return{OperationDefinition:function(t){"subscription"===t.operation&&1!==t.selectionSet.selections.length&&e.reportError(new o.e(t.name?'Subscription "'.concat(t.name.value,'" must select only one top level field.'):"Anonymous Subscription must select only one top level field.",t.selectionSet.selections.slice(1)))}}},Dt,function(e){return{InlineFragment:function(t){var r=t.typeCondition;if(r){var n=Mt(e.getSchema(),r);if(n&&!Y(n)){var i=(0,R.y)(r);e.reportError(new o.e('Fragment cannot condition on non composite type "'.concat(i,'".'),r))}}},FragmentDefinition:function(t){var r=Mt(e.getSchema(),t.typeCondition);if(r&&!Y(r)){var n=(0,R.y)(t.typeCondition);e.reportError(new o.e('Fragment "'.concat(t.name.value,'" cannot condition on non composite type "').concat(n,'".'),t.typeCondition))}}}},function(e){return{VariableDefinition:function(t){var r=Mt(e.getSchema(),t.type);if(r&&!W(r)){var n=t.variable.name.value,i=(0,R.y)(t.type);e.reportError(new o.e('Variable "$'.concat(n,'" cannot be non-input type "').concat(i,'".'),t.type))}}}},function(e){return{Field:function(t){var r=e.getType(),n=t.selectionSet;if(r)if(Q(ne(r))){if(n){var i=t.name.value,a=(0,u.A)(r);e.reportError(new o.e('Field "'.concat(i,'" must not have a selection since type "').concat(a,'" has no subfields.'),n))}}else if(!n){var s=t.name.value,c=(0,u.A)(r);e.reportError(new o.e('Field "'.concat(s,'" of type "').concat(c,'" must have a selection of subfields. Did you mean "').concat(s,' { ... }"?'),t))}}}},function(e){return{Field:function(t){var r=e.getParentType();if(r&&!e.getFieldDef()){var n=e.getSchema(),i=t.name.value,a=A("to use an inline fragment on",function(e,t,r){if(!Z(t))return[];for(var n=new Set,i=Object.create(null),o=0,a=e.getPossibleTypes(t);o1)for(var l=0;l0&&e.reportError(new o.e("Must provide only one schema definition.",t)),++s)}}},function(e){var t=e.getSchema(),r=Object.create(null),n=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(t){for(var i,a=null!==(i=t.operationTypes)&&void 0!==i?i:[],s=0;s2&&void 0!==arguments[2]?arguments[2]:gr,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Rt(e),s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{maxErrors:void 0};t||(0,i.A)(0,"Must provide document."),gt(e);var c=Object.freeze({}),u=[],l=new vr(e,t,n,(function(e){if(null!=s.maxErrors&&u.length>=s.maxErrors)throw u.push(new o.e("Too many validation errors, error limit reached. Validation aborted.")),c;u.push(e)})),d=(0,a.oP)(r.map((function(e){return e(l)})));try{(0,a.YR)(t,Lt(n,d))}catch(f){if(f!==c)throw f}return u}function wr(e){return"function"===typeof(null===e||void 0===e?void 0:e[p.$r])}function Ar(e,t,r){return{prev:e,key:t,typename:r}}function _r(e){for(var t=[],r=e;r;)t.push(r.key),r=r.prev;return t.reverse()}function Er(e){return e.map((function(e){return"number"===typeof e?"["+e.toString()+"]":"."+e})).join("")}function Sr(e,t,r){if(e){if(e.kind===M.b.VARIABLE){var n=e.name.value;if(null==r||void 0===r[n])return;var i=r[n];if(null===i&&K(t))return;return i}if(K(t)){if(e.kind===M.b.NULL)return;return Sr(e,t.ofType,r)}if(e.kind===M.b.NULL)return null;if($(t)){var o=t.ofType;if(e.kind===M.b.LIST){for(var a=[],s=0,l=e.values;s2&&void 0!==arguments[2]?arguments[2]:Cr)}function Cr(e,t,r){var n="Invalid value "+(0,u.A)(t);throw e.length>0&&(n+=' at "value'.concat(Er(e),'"')),r.message=n+": "+r.message,r}function Ir(e,t,r,n){if(K(t))return null!=e?Ir(e,t.ofType,r,n):void r(_r(n),e,new o.e('Expected non-nullable type "'.concat((0,u.A)(t),'" not to be null.')));if(null==e)return null;if($(t)){var i=t.ofType,a=Te(e,(function(e,t){var o=Ar(n,t,void 0);return Ir(e,i,r,o)}));return null!=a?a:[Ir(e,i,r,n)]}if(V(t)){if(!(0,_.A)(e))return void r(_r(n),e,new o.e('Expected type "'.concat(t.name,'" to be an object.')));for(var s={},l=t.getFields(),d=0,f=c(l);d0&&(i+=' at "'.concat(c).concat(Er(e),'"')),n(new o.e(i+"; "+r.message,s,void 0,void 0,void 0,r.originalError))}))},s=0;s=a)throw new o.e("Too many errors processing variables, error limit reached. Execution aborted.");i.push(e)}));if(0===i.length)return{coerced:s}}catch(c){i.push(c)}return{errors:i}}function Or(e,t,r){for(var n,i={},a=g(null!==(n=t.arguments)&&void 0!==n?n:[],(function(e){return e.name.value})),s=0,c=e.args;s{await(null===f||void 0===f?void 0:f(A,e,t))};const _=u>0&&isFinite(u)?setTimeout((()=>{A.connectionInitReceived||e.close(ln.CloseCode.ConnectionInitialisationTimeout,"Connection initialisation timeout")}),u):null;return e.onMessage((async function(u){var d,f,w,_,E;let S;try{S=(0,ln.parseMessage)(u,v)}catch(I){return e.close(ln.CloseCode.BadRequest,"Invalid message received")}switch(S.type){case ln.MessageType.ConnectionInit:{if(A.connectionInitReceived)return e.close(ln.CloseCode.TooManyInitialisationRequests,"Too many initialisation requests");A.connectionInitReceived=!0,(0,dn.Gv)(S.payload)&&(A.connectionParams=S.payload);const t=await(null===l||void 0===l?void 0:l(A));return!1===t?e.close(ln.CloseCode.Forbidden,"Forbidden"):(A.acknowledged=!0,void await e.send((0,ln.stringifyMessage)((0,dn.Gv)(t)?{type:ln.MessageType.ConnectionAck,payload:t}:{type:ln.MessageType.ConnectionAck},b)))}case ln.MessageType.Ping:return e.onPing?await e.onPing(S.payload):void await e.send((0,ln.stringifyMessage)(S.payload?{type:ln.MessageType.Pong,payload:S.payload}:{type:ln.MessageType.Pong}));case ln.MessageType.Pong:return await(null===(E=e.onPong)||void 0===E?void 0:E.call(e,S.payload));case ln.MessageType.Subscribe:{if(!A.acknowledged)return e.close(ln.CloseCode.Unauthorized,"Unauthorized");const{id:u,payload:l}=S;if(u in A.subscriptions)return e.close(ln.CloseCode.SubscriberAlreadyExists,`Subscriber for ${u} already exists`);A.subscriptions[u]=null;const v={next:async(t,r)=>{let n={id:u,type:ln.MessageType.Next,payload:t};const i=await(null===g||void 0===g?void 0:g(A,n,r,t));i&&(n=Object.assign(Object.assign({},n),{payload:i})),await e.send((0,ln.stringifyMessage)(n,b))},error:async t=>{let r={id:u,type:ln.MessageType.Error,payload:t};const n=await(null===m||void 0===m?void 0:m(A,r,t));n&&(r=Object.assign(Object.assign({},r),{payload:n})),await e.send((0,ln.stringifyMessage)(r,b))},complete:async t=>{const r={id:u,type:ln.MessageType.Complete};await(null===y||void 0===y?void 0:y(A,r)),t&&await e.send((0,ln.stringifyMessage)(r,b))}};try{let e;const g=await(null===h||void 0===h?void 0:h(A,S));if(g){if((0,dn.tY)(g))return u in A.subscriptions?await v.error(g):void 0;if(Array.isArray(g))throw new Error("Invalid return value from onSubscribe hook, expected an array of GraphQLError objects");e=g}else{if(!t)throw new Error("The GraphQL schema is not provided");const r={operationName:l.operationName,document:(0,n.qg)(l.query),variableValues:l.variables};e=Object.assign(Object.assign({},r),{schema:"function"===typeof t?await t(A,S,r):t});const i=(null!==a&&void 0!==a?a:br)(e.schema,e.document);if(i.length>0)return u in A.subscriptions?await v.error(i):void 0}const m=function(e,t){for(var r=null,n=0,i=e.definitions;n{_&&clearTimeout(_);const r=Object.assign({},A.subscriptions);A.subscriptions={},await Promise.all(Object.values(r).filter(dn.aU).map((e=>e.return(void 0)))),A.acknowledged&&await(null===d||void 0===d?void 0:d(A,e,t)),await(null===f||void 0===f?void 0:f(A,e,t))}}}}function pn(e){switch(!0){case e instanceof Set&&e.has(ln.GRAPHQL_TRANSPORT_WS_PROTOCOL):case Array.isArray(e)&&e.includes(ln.GRAPHQL_TRANSPORT_WS_PROTOCOL):case"string"===typeof e&&e.split(",").map((e=>e.trim())).includes(ln.GRAPHQL_TRANSPORT_WS_PROTOCOL):return ln.GRAPHQL_TRANSPORT_WS_PROTOCOL;default:return!1}}},77850:(e,t,r)=>{"use strict";function n(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function i(e){return"object"===n(e)}function o(e){return"function"===typeof Object(e)[Symbol.asyncIterator]}function a(e){return i(e)&&"function"===typeof Object(e)[Symbol.asyncIterator]&&"function"===typeof e.return}function s(e){return Array.isArray(e)&&e.length>0&&e.every((e=>"message"in e))}function c(e,t){return e.length<124?e:t}r.d(t,{Gv:()=>i,S4:()=>c,Td:()=>o,aU:()=>a,l:()=>n,tY:()=>s})},84836:(e,t,r)=>{"use strict";r.d(t,{e:()=>A});var n=r(5515),i=r(44838);function o(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,o=t+1;(r=n.exec(e.body))&&r.index120){for(var p=Math.floor(l/80),g=l%80,m=[],y=0;y0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!==s&&void 0!==s&&s.stack?(Object.defineProperty(g(v),"stack",{value:s.stack,writable:!0,configurable:!0}),p(v)):(Error.captureStackTrace?Error.captureStackTrace(g(v),l):Object.defineProperty(g(v),"stack",{value:Error().stack,writable:!0,configurable:!0}),v)}return t=l,(r=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r{"use strict";r.d(t,{A:()=>o});var n=r(24061),i=r(96149);function o(e){var t=e.prototype.toJSON;"function"===typeof t||(0,n.A)(0),e.prototype.inspect=t,i.A&&(e.prototype[i.A]=t)}},30398:(e,t,r)=>{"use strict";function n(e,t){if(!Boolean(e))throw new Error(t)}r.d(t,{A:()=>n})},25457:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(96149);function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o=10,a=2;function s(e){return c(e,[])}function c(e,t){switch(i(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),i=function(e){var t=e[String(n.A)];if("function"===typeof t)return t;if("function"===typeof e.inspect)return e.inspect}(e);if(void 0!==i){var s=i.call(e);if(s!==e)return"string"===typeof s?s:c(s,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>a)return"[Array]";for(var r=Math.min(o,e.length),n=e.length-r,i=[],s=0;s1&&i.push("... ".concat(n," more items"));return"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);if(0===r.length)return"{}";if(t.length>a)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"===typeof e.constructor){var r=e.constructor.name;if("string"===typeof r&&""!==r)return r}return t}(e)+"]";var n=r.map((function(r){return r+": "+c(e[r],t)}));return"{ "+n.join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}},99725:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e,t){return e instanceof t}},24061:(e,t,r)=>{"use strict";function n(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}r.d(t,{A:()=>n})},5515:(e,t,r)=>{"use strict";function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e){return"object"==n(e)&&null!==e}r.d(t,{A:()=>i})},96149:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0},98907:(e,t,r)=>{"use strict";r.d(t,{Ll:()=>a,aZ:()=>i,ou:()=>o});var n=r(89786),i=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();(0,n.A)(i);var o=function(){function e(e,t,r,n,i,o,a){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function a(e){return null!=e&&"string"===typeof e.kind}(0,n.A)(o)},30379:(e,t,r)=>{"use strict";function n(e){var t=e.split(/\r\n|[\n\r]/g),r=function(e){for(var t,r=!0,n=!0,i=0,o=null,a=0;ao&&i(t[a-1]);)--a;return t.slice(o,a).join("\n")}function i(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a="\\"===e[e.length-1],s=!n||o||a||r,c="";return!s||n&&i||(c+="\n"+t),c+=t?e.replace(/\n/g,"\n"+t):e,s&&(c+="\n"),'"""'+c.replace(/"""/g,'\\"""')+'"""'}r.d(t,{i$:()=>n,yo:()=>o})},55617:(e,t,r)=>{"use strict";r.d(t,{H:()=>n});var n=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"})},466:(e,t,r)=>{"use strict";r.d(t,{b:()=>n});var n=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"})},28882:(e,t,r)=>{"use strict";r.d(t,{qg:()=>C});var n=r(84836);function i(e,t,r){return new n.e("Syntax Error: ".concat(r),void 0,e,[t])}var o=r(466),a=r(98907),s=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),c=r(44838),u=r(25457),l=r(30398),d=r(99725);function f(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"===typeof e||(0,l.A)(0,"Body must be a string. Received: ".concat((0,u.A)(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||(0,l.A)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,l.A)(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r,n;return t=e,(r=[{key:c.Kp,get:function(){return"Source"}}])&&f(t.prototype,r),n&&f(t,n),e}();var p=r(55617),g=r(30379),m=function(){function e(e){var t=new a.ou(s.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==s.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=v(this,e)}while(e.kind===s.COMMENT);return e},e}();function y(e){return isNaN(e)?s.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function v(e,t){for(var r=e.source,n=r.body,o=n.length,c=t.end;c31||9===o));return new a.ou(s.COMMENT,t,u,r,n,i,c.slice(t+1,u))}function A(e,t,r,n,o,c){var u=e.body,l=r,d=t,f=!1;if(45===l&&(l=u.charCodeAt(++d)),48===l){if((l=u.charCodeAt(++d))>=48&&l<=57)throw i(e,d,"Invalid number, unexpected digit after 0: ".concat(y(l),"."))}else d=_(e,d,l),l=u.charCodeAt(d);if(46===l&&(f=!0,l=u.charCodeAt(++d),d=_(e,d,l),l=u.charCodeAt(d)),69!==l&&101!==l||(f=!0,43!==(l=u.charCodeAt(++d))&&45!==l||(l=u.charCodeAt(++d)),d=_(e,d,l),l=u.charCodeAt(d)),46===l||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(l))throw i(e,d,"Invalid number, expected digit but got: ".concat(y(l),"."));return new a.ou(f?s.FLOAT:s.INT,t,d,n,o,c,u.slice(t,d))}function _(e,t,r){var n=e.body,o=t,a=r;if(a>=48&&a<=57){do{a=n.charCodeAt(++o)}while(a>=48&&a<=57);return o}throw i(e,o,"Invalid number, expected digit but got: ".concat(y(a),"."))}function E(e,t,r,n,o){for(var c,u,l,d,f=e.body,h=t+1,p=h,g=0,m="";h=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function x(e,t,r,n,i){for(var o=e.body,c=o.length,u=t+1,l=0;u!==c&&!isNaN(l=o.charCodeAt(u))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++u;return new a.ou(s.NAME,t,u,r,n,i,o.slice(t,u))}function C(e,t){return new I(e,t).parseDocument()}var I=function(){function e(e,t){var r=function(e){return(0,d.A)(e,h)}(e)?e:new h(e);this._lexer=new m(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(s.NAME);return{kind:o.b.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:o.b.DOCUMENT,definitions:this.many(s.SOF,this.parseDefinition,s.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(s.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(s.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(s.BRACE_L))return{kind:o.b.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(s.NAME)&&(t=this.parseName()),{kind:o.b.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(s.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(s.PAREN_L,this.parseVariableDefinition,s.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:o.b.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(s.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(s.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(s.DOLLAR),{kind:o.b.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:o.b.SELECTION_SET,selections:this.many(s.BRACE_L,this.parseSelection,s.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(s.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(s.COLON)?(e=n,t=this.parseName()):t=n,{kind:o.b.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(s.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(s.PAREN_L,t,s.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(s.COLON),{kind:o.b.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:o.b.ARGUMENT,name:this.parseName(),value:(this.expectToken(s.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(s.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(s.NAME)?{kind:o.b.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:o.b.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:o.b.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:o.b.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case s.BRACKET_L:return this.parseList(e);case s.BRACE_L:return this.parseObject(e);case s.INT:return this._lexer.advance(),{kind:o.b.INT,value:t.value,loc:this.loc(t)};case s.FLOAT:return this._lexer.advance(),{kind:o.b.FLOAT,value:t.value,loc:this.loc(t)};case s.STRING:case s.BLOCK_STRING:return this.parseStringLiteral();case s.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:o.b.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:o.b.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:o.b.NULL,loc:this.loc(t)};default:return{kind:o.b.ENUM,value:t.value,loc:this.loc(t)}}case s.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:o.b.STRING,value:e.value,block:e.kind===s.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:o.b.LIST,values:this.any(s.BRACKET_L,(function(){return t.parseValueLiteral(e)}),s.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:o.b.OBJECT,fields:this.any(s.BRACE_L,(function(){return t.parseObjectField(e)}),s.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(s.COLON),{kind:o.b.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(s.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(s.AT),{kind:o.b.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(s.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(s.BRACKET_R),e={kind:o.b.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(s.BANG)?{kind:o.b.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:o.b.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===s.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(s.STRING)||this.peek(s.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(s.BRACE_L,this.parseOperationTypeDefinition,s.BRACE_R);return{kind:o.b.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(s.COLON);var r=this.parseNamedType();return{kind:o.b.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:o.b.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:o.b.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:a,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(s.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(s.AMP)||this.peek(s.NAME));return t}return this.delimitedMany(s.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(s.BRACE_L)&&this._lexer.lookahead().kind===s.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(s.BRACE_L,this.parseFieldDefinition,s.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(s.COLON);var i=this.parseTypeReference(),a=this.parseDirectives(!0);return{kind:o.b.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:a,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(s.PAREN_L,this.parseInputValueDef,s.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(s.COLON);var n,i=this.parseTypeReference();this.expectOptionalToken(s.EQUALS)&&(n=this.parseValueLiteral(!0));var a=this.parseDirectives(!0);return{kind:o.b.INPUT_VALUE_DEFINITION,description:t,name:r,type:i,defaultValue:n,directives:a,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:o.b.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:a,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:o.b.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(s.EQUALS)?this.delimitedMany(s.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:o.b.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(s.BRACE_L,this.parseEnumValueDefinition,s.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:o.b.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:o.b.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(s.BRACE_L,this.parseInputValueDef,s.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===s.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(s.BRACE_L,this.parseOperationTypeDefinition,s.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:o.b.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:o.b.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:o.b.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:o.b.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:o.b.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:o.b.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:o.b.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(s.AT);var r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var a=this.parseDirectiveLocations();return{kind:o.b.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:a,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(s.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==p.H[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new a.aZ(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw i(this._lexer.source,t.start,"Expected ".concat(O(e),", found ").concat(T(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==s.NAME||t.value!==e)throw i(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(T(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===s.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!==e&&void 0!==e?e:this._lexer.token;return i(this._lexer.source,t.start,"Unexpected ".concat(T(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r},e}();function T(e){var t=e.value;return O(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function O(e){return function(e){return e===s.BANG||e===s.DOLLAR||e===s.AMP||e===s.PAREN_L||e===s.PAREN_R||e===s.SPREAD||e===s.COLON||e===s.EQUALS||e===s.AT||e===s.BRACKET_L||e===s.BRACKET_R||e===s.BRACE_L||e===s.PIPE||e===s.BRACE_R}(e)?'"'.concat(e,'"'):e}},74815:(e,t,r)=>{"use strict";r.d(t,{VK:()=>o,_m:()=>i,a6:()=>s,fT:()=>c,i7:()=>u,xu:()=>a});var n=r(466);function i(e){return e.kind===n.b.OPERATION_DEFINITION||e.kind===n.b.FRAGMENT_DEFINITION}function o(e){return e.kind===n.b.FIELD||e.kind===n.b.FRAGMENT_SPREAD||e.kind===n.b.INLINE_FRAGMENT}function a(e){return e.kind===n.b.SCHEMA_DEFINITION||s(e)||e.kind===n.b.DIRECTIVE_DEFINITION}function s(e){return e.kind===n.b.SCALAR_TYPE_DEFINITION||e.kind===n.b.OBJECT_TYPE_DEFINITION||e.kind===n.b.INTERFACE_TYPE_DEFINITION||e.kind===n.b.UNION_TYPE_DEFINITION||e.kind===n.b.ENUM_TYPE_DEFINITION||e.kind===n.b.INPUT_OBJECT_TYPE_DEFINITION}function c(e){return e.kind===n.b.SCHEMA_EXTENSION||u(e)}function u(e){return e.kind===n.b.SCALAR_TYPE_EXTENSION||e.kind===n.b.OBJECT_TYPE_EXTENSION||e.kind===n.b.INTERFACE_TYPE_EXTENSION||e.kind===n.b.UNION_TYPE_EXTENSION||e.kind===n.b.ENUM_TYPE_EXTENSION||e.kind===n.b.INPUT_OBJECT_TYPE_EXTENSION}},70807:(e,t,r)=>{"use strict";r.d(t,{y:()=>o});var n=r(78449),i=r(30379);function o(e){return(0,n.YR)(e,{leave:a})}var a={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return c(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=l("(",c(e.variableDefinitions,", "),")"),i=c(e.directives," "),o=e.selectionSet;return r||i||n||"query"!==t?c([t,c([r,n]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+l(" = ",n)+l(" ",c(i," "))},SelectionSet:function(e){return u(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,o=e.selectionSet,a=l("",t,": ")+r,s=a+l("(",c(n,", "),")");return s.length>80&&(s=a+l("(\n",d(c(n,"\n")),"\n)")),c([s,c(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+l(" ",c(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return c(["...",l("on ",t),c(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(l("(",c(n,", "),")")," ")+"on ".concat(r," ").concat(l("",c(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?(0,i.yo)(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+c(e.values,", ")+"]"},ObjectValue:function(e){return"{"+c(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+l("(",c(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:s((function(e){var t=e.directives,r=e.operationTypes;return c(["schema",c(t," "),u(r)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:s((function(e){return c(["scalar",e.name,c(e.directives," ")]," ")})),ObjectTypeDefinition:s((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return c(["type",t,l("implements ",c(r," & ")),c(n," "),u(i)]," ")})),FieldDefinition:s((function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(h(r)?l("(\n",d(c(r,"\n")),"\n)"):l("(",c(r,", "),")"))+": "+n+l(" ",c(i," "))})),InputValueDefinition:s((function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return c([t+": "+r,l("= ",n),c(i," ")]," ")})),InterfaceTypeDefinition:s((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return c(["interface",t,l("implements ",c(r," & ")),c(n," "),u(i)]," ")})),UnionTypeDefinition:s((function(e){var t=e.name,r=e.directives,n=e.types;return c(["union",t,c(r," "),n&&0!==n.length?"= "+c(n," | "):""]," ")})),EnumTypeDefinition:s((function(e){var t=e.name,r=e.directives,n=e.values;return c(["enum",t,c(r," "),u(n)]," ")})),EnumValueDefinition:s((function(e){return c([e.name,c(e.directives," ")]," ")})),InputObjectTypeDefinition:s((function(e){var t=e.name,r=e.directives,n=e.fields;return c(["input",t,c(r," "),u(n)]," ")})),DirectiveDefinition:s((function(e){var t=e.name,r=e.arguments,n=e.repeatable,i=e.locations;return"directive @"+t+(h(r)?l("(\n",d(c(r,"\n")),"\n)"):l("(",c(r,", "),")"))+(n?" repeatable":"")+" on "+c(i," | ")})),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return c(["extend schema",c(t," "),u(r)]," ")},ScalarTypeExtension:function(e){return c(["extend scalar",e.name,c(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return c(["extend type",t,l("implements ",c(r," & ")),c(n," "),u(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return c(["extend interface",t,l("implements ",c(r," & ")),c(n," "),u(i)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return c(["extend union",t,c(r," "),n&&0!==n.length?"= "+c(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return c(["extend enum",t,c(r," "),u(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return c(["extend input",t,c(r," "),u(n)]," ")}};function s(e){return function(t){return c([t.description,e(t)],"\n")}}function c(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null===e||void 0===e?void 0:e.filter((function(e){return e})).join(r))&&void 0!==t?t:""}function u(e){return l("{\n",d(c(e,"\n")),"\n}")}function l(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function d(e){return l(" ",e.replace(/\n/g,"\n "))}function f(e){return-1!==e.indexOf("\n")}function h(e){return null!=e&&e.some(f)}},78449:(e,t,r)=>{"use strict";r.d(t,{UY:()=>u,YR:()=>s,oP:()=>c,sP:()=>a});var n=r(25457),i=r(98907),o={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},a=Object.freeze({});function s(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,s=void 0,c=Array.isArray(e),l=[e],d=-1,f=[],h=void 0,p=void 0,g=void 0,m=[],y=[],v=e;do{var b=++d===l.length,w=b&&0!==f.length;if(b){if(p=0===y.length?void 0:m[m.length-1],h=g,g=y.pop(),w){if(c)h=h.slice();else{for(var A={},_=0,E=Object.keys(h);_{"use strict";r.d(t,{$r:()=>i,Kp:()=>o,q4:()=>n});var n="function"===typeof Symbol&&null!=Symbol.iterator?Symbol.iterator:"@@iterator",i="function"===typeof Symbol&&null!=Symbol.asyncIterator?Symbol.asyncIterator:"@@asyncIterator",o="function"===typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag"},18684:(e,t,r)=>{"use strict";r.d(t,{DX:()=>m,yN:()=>q,LV:()=>K});const n=()=>Object.create(null),{forEach:i,slice:o}=Array.prototype,{hasOwnProperty:a}=Object.prototype;class s{constructor(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;this.weakness=e,this.makeData=t}lookup(){for(var e=arguments.length,t=new Array(e),r=0;rt=t.getChildTrie(e))),a.call(t,"data")?t.data:t.data=this.makeData(o.call(e))}peek(){for(var e=arguments.length,t=new Array(e),r=0;rglobalThis))||h((()=>global))||Object.create(null),m=g[p]||Array[p]||function(e){try{Object.defineProperty(g,p,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",f++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=l;e;e=e.parent)if(this.id in e.slots){const t=e.slots[this.id];if(t===d)break;return e!==l&&(l.slots[this.id]=t),!0}return l&&(l.slots[this.id]=d),!1}getValue(){if(this.hasValue())return l.slots[this.id]}withValue(e,t,r,n){const i={__proto__:null,[this.id]:e},o=l;l={parent:o,slots:i};try{return t.apply(n,r)}finally{l=o}}static bind(e){const t=l;return function(){const r=l;try{return l=t,e.apply(this,arguments)}finally{l=r}}}static noContext(e,t,r){if(!l)return e.apply(r,t);{const n=l;try{return l=null,e.apply(r,t)}finally{l=n}}}}),{bind:y,noContext:v}=m;const b=new m;const{hasOwnProperty:w}=Object.prototype,A=Array.from||function(e){const t=[];return e.forEach((e=>t.push(e))),t};function _(e){const{unsubscribe:t}=e;"function"===typeof t&&(e.unsubscribe=void 0,t())}const E=[],S=100;function k(e,t){if(!e)throw new Error(t||"assertion failure")}function x(e,t){const r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function C(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function I(e){return e.slice(0)}class T{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++T.count}peek(){if(1===this.value.length&&!M(this))return O(this),this.value[0]}recompute(e){return k(!this.recomputing,"already recomputing"),O(this),M(this)?function(e,t){j(e),b.withValue(e,P,[e,t]),function(e,t){if("function"===typeof e.subscribe)try{_(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(r){return e.setDirty(),!1}return!0}(e,t)&&function(e){if(e.dirty=!1,M(e))return;N(e)}(e);return C(e.value)}(this,e):C(this.value)}setDirty(){this.dirty||(this.dirty=!0,R(this),_(this))}dispose(){this.setDirty(),j(this),L(this,((e,t)=>{e.setDirty(),F(e,this)}))}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=E.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(A(this.deps).forEach((e=>e.delete(this))),this.deps.clear(),E.push(this.deps),this.deps=null)}}function O(e){const t=b.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),M(e)?B(t,e):D(t,e),t}function P(e,t){e.recomputing=!0;const{normalizeResult:r}=e;let n;r&&1===e.value.length&&(n=I(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),r&&n&&!x(n,e.value))try{e.value[0]=r(e.value[0],n[0])}catch(i){}}catch(o){e.value[1]=o}e.recomputing=!1}function M(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function R(e){L(e,B)}function N(e){L(e,D)}function L(e,t){const r=e.parents.size;if(r){const n=A(e.parents);for(let i=0;i0&&e.childValues.forEach(((t,r)=>{F(e,r)})),e.forgetDeps(),k(null===e.dirtyChildren)}function F(e,t){t.parents.delete(e),e.childValues.delete(t),U(e,t)}T.count=0;const z={setDirty:!0,dispose:!0,forget:!0};function q(e){const t=new Map,r=e&&e.subscribe;function n(e){const n=b.getValue();if(n){let i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"===typeof r&&(_(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){const n=t.get(e);if(n){const i=r&&w.call(z,r)?r:"setDirty";A(n).forEach((e=>e[i]())),t.delete(e),_(n)}},n}let H;function V(){const e=H||(H=new s("function"===typeof WeakMap));for(var t=arguments.length,r=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:Object.create(null);const s="function"===typeof a?new a(t,(e=>e.dispose())):a,c=function(){const t=n.apply(null,r?r.apply(null,arguments):arguments);if(void 0===t)return e.apply(null,arguments);let a=s.get(t);a||(s.set(t,a=new T(e)),a.normalizeResult=i,a.subscribe=o,a.forget=()=>s.delete(t));const c=a.recompute(Array.prototype.slice.call(arguments));return s.set(t,a),$.add(s),b.hasValue()||($.forEach((e=>e.clean())),$.clear()),c};function l(e){const t=e&&s.get(e);t&&t.setDirty()}function d(e){const t=e&&s.get(e);if(t)return t.peek()}function f(e){return!!e&&s.delete(e)}return Object.defineProperty(c,"size",{get:()=>s.size,configurable:!1,enumerable:!1}),Object.freeze(c.options={max:t,keyArgs:r,makeCacheKey:n,normalizeResult:i,subscribe:o,cache:s}),c.dirtyKey=l,c.dirty=function(){l(n.apply(null,arguments))},c.peekKey=d,c.peek=function(){return d(n.apply(null,arguments))},c.forgetKey=f,c.forget=function(){return f(n.apply(null,arguments))},c.makeCacheKey=n,c.getKey=r?function(){return n.apply(null,r.apply(null,arguments))}:n,Object.freeze(c)}},44696:(e,t,r)=>{"use strict";r.d(t,{Q9:()=>f,V1:()=>c,zU:()=>s});var n=r(37827),i="Invariant Violation",o=Object.setPrototypeOf,a=void 0===o?function(e,t){return e.__proto__=t,e}:o,s=function(e){function t(r){void 0===r&&(r=i);var n=e.call(this,"number"===typeof r?i+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=i,a(n,t.prototype),n}return(0,n.__extends)(t,e),t}(Error);function c(e,t){if(!e)throw new s(t)}var u=["debug","log","warn","error","silent"],l=u.indexOf("log");function d(e){return function(){if(u.indexOf(e)>=l)return(console[e]||console.log).apply(console,arguments)}}function f(e){var t=u[l];return l=Math.max(0,u.indexOf(e)),t}!function(e){e.debug=d("debug"),e.log=d("log"),e.warn=d("warn"),e.error=d("error")}(c||(c={}))},37827:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__addDisposableResource:()=>N,__assign:()=>o,__asyncDelegator:()=>k,__asyncGenerator:()=>S,__asyncValues:()=>x,__await:()=>E,__awaiter:()=>p,__classPrivateFieldGet:()=>P,__classPrivateFieldIn:()=>R,__classPrivateFieldSet:()=>M,__createBinding:()=>m,__decorate:()=>s,__disposeResources:()=>B,__esDecorate:()=>u,__exportStar:()=>y,__extends:()=>i,__generator:()=>g,__importDefault:()=>O,__importStar:()=>T,__makeTemplateObject:()=>C,__metadata:()=>h,__param:()=>c,__propKey:()=>d,__read:()=>b,__rest:()=>a,__rewriteRelativeImportExtension:()=>D,__runInitializers:()=>l,__setFunctionName:()=>f,__spread:()=>w,__spreadArray:()=>_,__spreadArrays:()=>A,__values:()=>v,default:()=>U});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t,r,n,i,o){function a(e){if(void 0!==e&&"function"!==typeof e)throw new TypeError("Function expected");return e}for(var s,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f=!1,h=r.length-1;h>=0;h--){var p={};for(var g in n)p[g]="access"===g?{}:n[g];for(var g in n.access)p.access[g]=n.access[g];p.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,r[h])("accessor"===c?{get:d.get,set:d.set}:d[u],p);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!==typeof m)throw new TypeError("Object expected");(s=a(m.get))&&(d.get=s),(s=a(m.set))&&(d.set=s),(s=a(m.init))&&i.unshift(s)}else(s=a(m))&&("field"===c?i.unshift(s):d[u]=s)}l&&Object.defineProperty(l,n.name,d),f=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >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 w(){for(var e=[],t=0;t1||s(e,t)}))},t&&(n[e]=t(n[e])))}function s(e,t){try{!function(e){e.value instanceof E?Promise.resolve(e.value.v).then(c,u):l(o[0][2],e)}(i[e](t))}catch(r){l(o[0][3],r)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function k(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:E(e[n](t)),done:!1}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=v(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return I(t,e),t}function O(e){return e&&e.__esModule?e:{default:e}}function P(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function M(e,t,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 t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function R(e,t){if(null===t||"object"!==typeof t&&"function"!==typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"===typeof e?t===e:e.has(t)}function N(e,t,r){if(null!==t&&void 0!==t){if("object"!==typeof t&&"function"!==typeof t)throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if("function"!==typeof n)throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var L="function"===typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function B(e){function t(t){e.error=e.hasError?new L(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function i(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(i,(function(e){return t(e),i()}))}else n|=1}catch(a){t(a)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function D(e,t){return"string"===typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,r,n,i,o){return r?t?".jsx":".js":!n||i&&o?n+i+"."+o.toLowerCase()+"js":e})):e}const U={__extends:i,__assign:o,__rest:a,__decorate:s,__param:c,__esDecorate:u,__runInitializers:l,__propKey:d,__setFunctionName:f,__metadata:h,__awaiter:p,__generator:g,__createBinding:m,__exportStar:y,__values:v,__read:b,__spread:w,__spreadArrays:A,__spreadArray:_,__await:E,__asyncGenerator:S,__asyncDelegator:k,__asyncValues:x,__makeTemplateObject:C,__importStar:T,__importDefault:O,__classPrivateFieldGet:P,__classPrivateFieldSet:M,__classPrivateFieldIn:R,__addDisposableResource:N,__disposeResources:B,__rewriteRelativeImportExtension:D}},48966:(e,t,r)=>{"use strict";function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}r.d(t,{K:()=>n})},79055:(e,t,r)=>{"use strict";r.d(t,{x:()=>i});var n=r(48966);function i(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const r=(0,n.K)(t);let i=0;for(const n of e)r.set(n,i),i+=n.length;return r}},69477:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(28598);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const r=n.A[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${e}`):globalThis.Buffer.from(e,"utf8")}},20019:(e,t,r)=>{"use strict";r.d(t,{dI:()=>o.d,sH:()=>i.s,xW:()=>n.x});var n=r(79055),i=r(69477),o=r(54262)},54262:(e,t,r)=>{"use strict";r.d(t,{d:()=>i});var n=r(28598);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const r=n.A[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}},28598:(e,t,r)=>{"use strict";r.d(t,{A:()=>Ve});var n={};r.r(n),r.d(n,{identity:()=>I});var i={};r.r(i),r.d(i,{base2:()=>T});var o={};r.r(o),r.d(o,{base8:()=>O});var a={};r.r(a),r.d(a,{base10:()=>P});var s={};r.r(s),r.d(s,{base16:()=>M,base16upper:()=>R});var c={};r.r(c),r.d(c,{base32:()=>N,base32hex:()=>U,base32hexpad:()=>F,base32hexpadupper:()=>z,base32hexupper:()=>j,base32pad:()=>B,base32padupper:()=>D,base32upper:()=>L,base32z:()=>q});var u={};r.r(u),r.d(u,{base36:()=>H,base36upper:()=>V});var l={};r.r(l),r.d(l,{base58btc:()=>$,base58flickr:()=>K});var d={};r.r(d),r.d(d,{base64:()=>W,base64pad:()=>G,base64url:()=>Q,base64urlpad:()=>Y});var f={};r.r(f),r.d(f,{base256emoji:()=>ee});var h={};r.r(h),r.d(h,{sha256:()=>ke,sha512:()=>xe});var p={};r.r(p),r.d(p,{identity:()=>Ie});var g={};r.r(g),r.d(g,{code:()=>Oe,decode:()=>Me,encode:()=>Pe,name:()=>Te});var m={};r.r(m),r.d(m,{code:()=>Be,decode:()=>Ue,encode:()=>De,name:()=>Le});var y=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,a=new Uint8Array(o);e[t];){var l=r[e.charCodeAt(t)];if(255===l)return;for(var d=0,f=o-1;(0!==l||d>>0,a[f]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var h=o-i;h!==o&&0===a[h];)h++;for(var p=new Uint8Array(n+(o-h)),g=n;h!==o;)p[g++]=a[h++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var a=(o-i)*l+1>>>0,u=new Uint8Array(a);i!==o;){for(var d=t[i],f=0,h=a-1;(0!==d||f>>0,u[h]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");n=f,i++}for(var p=a-n;p!==a&&0===u[p];)p++;for(var g=c.repeat(r);p{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")});class w{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class A{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"===typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return E(this,e)}}class _{constructor(e){this.decoders=e}or(e){return E(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const E=(e,t)=>new _({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class S{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new w(e,t,r),this.decoder=new A(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const k=e=>{let{name:t,prefix:r,encode:n,decode:i}=e;return new S(t,r,n,i)},x=e=>{let{prefix:t,name:r,alphabet:n}=e;const{encode:i,decode:o}=v(n,r);return k({prefix:t,name:r,encode:i,decode:e=>b(o(e))})},C=e=>{let{name:t,prefix:r,bitsPerChar:n,alphabet:i}=e;return k({prefix:r,name:t,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<r;)a-=r,o+=t[i&s>>a];if(a&&(o+=t[i&s<((e,t,r,n)=>{const i={};for(let l=0;l=8&&(s-=8,a[u++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a})(e,i,n,t)})},I=k({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),T=C({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),O=C({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),P=x({prefix:"9",name:"base10",alphabet:"0123456789"}),M=C({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),R=C({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),N=C({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),L=C({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),B=C({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),D=C({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),U=C({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),j=C({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),F=C({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),z=C({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),q=C({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),H=x({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),V=x({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),$=x({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),K=x({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),W=C({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),G=C({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Q=C({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Y=C({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Z=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),J=Z.reduce(((e,t,r)=>(e[r]=t,e)),[]),X=Z.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]);const ee=k({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=J[t]),"")},decode:function(e){const t=[];for(const r of e){const e=X[r.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}});var te=function e(t,r,n){r=r||[];var i=n=n||0;for(;t>=ie;)r[n++]=255&t|re,t/=128;for(;t≠)r[n++]=255&t|re,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},re=128,ne=-128,ie=Math.pow(2,31);var oe=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],i+=o<28?(n&se)<=ae);return e.bytes=a-r,i},ae=128,se=127;var ce=Math.pow(2,7),ue=Math.pow(2,14),le=Math.pow(2,21),de=Math.pow(2,28),fe=Math.pow(2,35),he=Math.pow(2,42),pe=Math.pow(2,49),ge=Math.pow(2,56),me=Math.pow(2,63);const ye={encode:te,decode:oe,encodingLength:function(e){return e2&&void 0!==arguments[2]?arguments[2]:0;return ye.encode(e,t,r),t},be=e=>ye.encodingLength(e),we=(e,t)=>{const r=t.byteLength,n=be(e),i=n+be(r),o=new Uint8Array(i+r);return ve(e,o,0),ve(r,o,n),o.set(t,i),new Ae(e,r,t,o)};class Ae{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const _e=e=>{let{name:t,code:r,encode:n}=e;return new Ee(t,r,n)};class Ee{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?we(this.code,t):t.then((e=>we(this.code,e)))}throw Error("Unknown type, must be binary type")}}const Se=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),ke=_e({name:"sha2-256",code:18,encode:Se("SHA-256")}),xe=_e({name:"sha2-512",code:19,encode:Se("SHA-512")}),Ce=b,Ie={code:0,name:"identity",encode:Ce,digest:e=>we(0,Ce(e))},Te="raw",Oe=85,Pe=e=>b(e),Me=e=>b(e),Re=new TextEncoder,Ne=new TextDecoder,Le="json",Be=512,De=e=>Re.encode(JSON.stringify(e)),Ue=e=>JSON.parse(Ne.decode(e));Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom");Symbol.for("@ipld/js-cid/CID");const je={...n,...i,...o,...a,...s,...c,...u,...l,...d,...f};var Fe=r(48966);function ze(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const qe=ze("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),He=ze("ascii","a",(e=>{let t="a";for(let r=0;r{e=e.substring(1);const t=(0,Fe.K)(e.length);for(let r=0;r{"use strict";r.d(t,{BX:()=>h,KR:()=>m,P9:()=>g,B1:()=>p});Symbol();const n=Symbol();const i=Object.getPrototypeOf,o=new WeakMap,a=e=>e&&(o.has(e)?o.get(e):i(e)===Object.prototype||i(e)===Array.prototype),s=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];o.set(e,t)},c=e=>"object"===typeof e&&null!==e,u=new WeakMap,l=new WeakSet,d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.is,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e,t)=>new Proxy(e,t),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>c(e)&&!l.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer),i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new WeakMap,d=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i;const n=o.get(e);if((null==n?void 0:n[0])===t)return n[1];const a=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return s(a,!0),o.set(e,[t,a]),Reflect.ownKeys(e).forEach((t=>{if(Object.getOwnPropertyDescriptor(a,t))return;const n=Reflect.get(e,t),i={value:n,enumerable:!0,configurable:!0};if(l.has(n))s(n,!1);else if(n instanceof Promise)delete i.value,i.get=()=>r(n);else if(u.has(n)){const[e,t]=u.get(n);i.value=d(e,t(),r)}Object.defineProperty(a,t,i)})),Object.preventExtensions(a)},f=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new WeakMap,h=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[1,1],p=arguments.length>8&&void 0!==arguments[8]?arguments[8]:i=>{if(!c(i))throw new Error("object required");const o=f.get(i);if(o)return o;let s=h[0];const g=new Set,m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:++h[0];s!==t&&(s=t,g.forEach((r=>r(e,t))))};let y=h[1];const v=e=>(t,r)=>{const n=[...t];n[1]=[e,...n[1]],m(n,r)},b=new Map,w=e=>{var t;const r=b.get(e);r&&(b.delete(e),null==(t=r[1])||t.call(r))},A=Array.isArray(i)?[]:Object.create(Object.getPrototypeOf(i)),_={deleteProperty(e,t){const r=Reflect.get(e,t);w(t);const n=Reflect.deleteProperty(e,t);return n&&m(["delete",[t],r]),n},set(t,i,o,s){const d=Reflect.has(t,i),h=Reflect.get(t,i,s);if(d&&(e(h,o)||f.has(o)&&e(h,f.get(o))))return!0;w(i),c(o)&&(o=(e=>a(e)&&e[n]||null)(o)||o);let y=o;if(o instanceof Promise)o.then((e=>{o.status="fulfilled",o.value=e,m(["resolve",[i],e])})).catch((e=>{o.status="rejected",o.reason=e,m(["reject",[i],e])}));else{!u.has(o)&&r(o)&&(y=p(o));const e=!l.has(y)&&u.get(y);e&&((e,t)=>{if(b.has(e))throw new Error("prop listener already exists");if(g.size){const r=t[3](v(e));b.set(e,[t,r])}else b.set(e,[t])})(i,e)}return Reflect.set(t,i,y,s),m(["set",[i],o,h]),!0}},E=t(A,_);f.set(i,E);const S=[A,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:++h[1];return y===e||g.size||(y=e,b.forEach((t=>{let[r]=t;const n=r[1](e);n>s&&(s=n)}))),s},d,e=>{g.add(e),1===g.size&&b.forEach(((e,t)=>{let[r,n]=e;if(n)throw new Error("remove already exists");const i=r[3](v(t));b.set(t,[r,i])}));return()=>{g.delete(e),0===g.size&&b.forEach(((e,t)=>{let[r,n]=e;n&&(n(),b.set(t,[r]))}))}}];return u.set(E,S),Reflect.ownKeys(i).forEach((e=>{const t=Object.getOwnPropertyDescriptor(i,e);"value"in t&&(E[e]=i[e],delete t.value,delete t.writable),Object.defineProperty(A,e,t)})),E};return[p,u,l,e,t,r,i,o,d,f,h]},[f]=d();function h(){return f(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function p(e,t,r){const n=u.get(e);let i;n||console.warn("Please use proxy object");const o=[],a=n[3];let s=!1;const c=a((e=>{o.push(e),r?t(o.splice(0)):i||(i=Promise.resolve().then((()=>{i=void 0,s&&t(o.splice(0))})))}));return s=!0,()=>{s=!1,c()}}function g(e,t){const r=u.get(e);r||console.warn("Please use proxy object");const[n,i,o]=r;return o(n,i(),t)}function m(e){return l.add(e),e}},6169:(e,t,r)=>{"use strict";function n(e){return"string"===typeof e?{address:e,type:"json-rpc"}:e}r.d(t,{J:()=>n})},47838:(e,t,r)=>{"use strict";r.d(t,{T:()=>b});var n=r(6169),i=r(59863);const o="0x82ad56cb";var a=r(54505),s=r(67935),c=r(78802),u=r(55628),l=r(51433),d=r(82430),f=r(97168),h=r(20288),p=r(59788);var g=r(11613),m=r(14807),y=r(5911),v=r(32278);async function b(e,t){const{account:b=e.account,batch:w=Boolean(e.batch?.multicall),blockNumber:A,blockTag:_="latest",accessList:E,data:S,gas:k,gasPrice:x,maxFeePerGas:C,maxPriorityFeePerGas:I,nonce:T,to:O,value:P,...M}=t,R=b?(0,n.J)(b):void 0;try{(0,v.c)(t);const r=(A?(0,f.cK)(A):void 0)||_,n=e.chain?.formatters?.transactionRequest?.format,a=(n||m.Bv)({...(0,g.o)(M,{format:n}),from:R?.address,accessList:E,data:S,gas:k,gasPrice:x,maxFeePerGas:C,maxPriorityFeePerGas:I,nonce:T,to:O,value:P});if(w&&function(e){let{request:t}=e;const{data:r,to:n,...i}=t;return!!r&&(!r.startsWith(o)&&(!!n&&!(Object.values(i).filter((e=>"undefined"!==typeof e)).length>0)))}({request:a}))try{return await async function(e,t){const{batchSize:r=1024,wait:n=0}="object"===typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:o,blockTag:a="latest",data:h,multicallAddress:p,to:g}=t;let m=p;if(!m){if(!e.chain)throw new s.YE;m=(0,d.M)({blockNumber:o,chain:e.chain,contract:"multicall3"})}const v=o?(0,f.cK)(o):void 0,b=v||a,{schedule:w}=(0,y.u)({id:`${e.uid}.${b}`,wait:n,shouldSplitBatch(e){const t=e.reduce(((e,t)=>{let{data:r}=t;return e+(r.length-2)}),0);return t>2*r},fn:async t=>{const r=t.map((e=>({allowFailure:!0,callData:e.data,target:e.to}))),n=(0,l.p)({abi:i.v2,args:[r],functionName:"aggregate3"}),o=await e.request({method:"eth_call",params:[{data:n,to:m},b]});return(0,u.e)({abi:i.v2,args:[r],functionName:"aggregate3",data:o||"0x"})}}),[{returnData:A,success:_}]=await w({data:h,to:g});if(!_)throw new c.$S({data:A});return"0x"===A?{data:void 0}:{data:A}}(e,{...a,blockNumber:A,blockTag:_})}catch(N){if(!(N instanceof s.YE)&&!(N instanceof s.rj))throw N}const h=await e.request({method:"eth_call",params:r?[a,r]:[a]});return"0x"===h?{data:void 0}:{data:h}}catch(N){const n=function(e){if(!(e instanceof a.C))return;const t=e.walk();return"object"===typeof t.data?t.data.data:t.data}(N),{offchainLookup:i,offchainLookupSignature:o}=await r.e(13).then(r.bind(r,98013));if(n?.slice(0,10)===o&&O)return{data:await i(e,{data:n,to:O})};throw function(e,t){let{docsPath:r,...n}=t;const i=(()=>{const t=(0,p.l)(e,n);return t instanceof h.RM?e:t})();return new c.zX(i,{docsPath:r,...n})}(N,{...t,account:R,chain:e.chain})}}},59863:(e,t,r)=>{"use strict";r.d(t,{Ag:()=>o,Rm:()=>c,SJ:()=>s,_:()=>u,oX:()=>a,v2:()=>n});const n=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],i=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],o=[...i,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],a=[...i,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],s=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],c=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],u=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},71125:(e,t,r)=>{"use strict";r.d(t,{J9:()=>o,Mc:()=>i,fD:()=>n});const n={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},o={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},91038:(e,t,r)=>{"use strict";r.d(t,{eL:()=>n,pj:()=>o,sz:()=>i});const n={gwei:9,wei:18},i={ether:-9,wei:9},o={ether:-18,gwei:-9}},89676:(e,t,r)=>{"use strict";r.d(t,{BI:()=>w,Iy:()=>c,Iz:()=>y,MR:()=>v,M_:()=>m,Nc:()=>l,O:()=>u,Wq:()=>h,YE:()=>f,YF:()=>s,YW:()=>a,_z:()=>p,d_:()=>x,dm:()=>k,fo:()=>A,gH:()=>d,j:()=>S,kE:()=>g,l3:()=>_,nK:()=>E,nM:()=>b});var n=r(69679),i=r(4846),o=r(54505);class a extends o.C{constructor(e){let{docsPath:t}=e;super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class s extends o.C{constructor(e){let{docsPath:t}=e;super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}o.C;class c extends o.C{constructor(e){let{data:t,params:r,size:i}=e;super([`Data size of ${i} bytes is too small for given parameters.`].join("\n"),{metaMessages:[`Params: (${(0,n.A)(r,{includeName:!0})})`,`Data: ${t} (${i} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=r,this.size=i}}class u extends o.C{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class l extends o.C{constructor(e){let{expectedLength:t,givenLength:r,type:n}=e;super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${t}`,`Given length: ${r}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class d extends o.C{constructor(e){let{expectedSize:t,value:r}=e;super(`Size of bytes "${r}" (bytes${(0,i.E)(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class f extends o.C{constructor(e){let{expectedLength:t,givenLength:r}=e;super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${r}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}o.C;o.C;class h extends o.C{constructor(e,t){let{docsPath:r}=t;super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class p extends o.C{constructor(e){let{docsPath:t}=e;super("Cannot extract event signature from empty topics.",{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class g extends o.C{constructor(e,t){let{docsPath:r}=t;super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class m extends o.C{constructor(e){let{docsPath:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class y extends o.C{constructor(e){let{docsPath:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class v extends o.C{constructor(e,t){let{docsPath:r}=t;super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}o.C;class b extends o.C{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,n.B)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,n.B)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItemAmbiguityError"})}}class w extends o.C{constructor(e){let{expectedSize:t,givenSize:r}=e;super(`Expected bytes${t}, got bytes${r}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class A extends o.C{constructor(e){let{abiItem:t,data:r,params:i,size:o}=e;super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join("\n"),{metaMessages:[`Params: (${(0,n.A)(i,{includeName:!0})})`,`Data: ${r} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t,this.data=r,this.params=i,this.size=o}}class _ extends o.C{constructor(e){let{abiItem:t,param:r}=e;super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${(0,n.B)(t,{includeName:!0})}".`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class E extends o.C{constructor(e,t){let{docsPath:r}=t;super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class S extends o.C{constructor(e,t){let{docsPath:r}=t;super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class k extends o.C{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class x extends o.C{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}o.C},58418:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var n=r(54505);class i extends n.C{constructor(e){let{address:t}=e;super(`Address "${t}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}},54505:(e,t,r)=>{"use strict";r.d(t,{C:()=>i});var n=r(81576);class i extends Error{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,n.HF)()});const r=t.cause instanceof i?t.cause.details:t.cause?.message?t.cause.message:t.details,o=t.cause instanceof i&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: https://viem.sh${o}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=o,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return o(this,e)}}function o(e,t){return t?.(e)?e:e&&"object"===typeof e&&"cause"in e?o(e.cause,t):t?null:e}},67935:(e,t,r)=>{"use strict";r.d(t,{EH:()=>o,YE:()=>s,jF:()=>a,rj:()=>i});var n=r(54505);class i extends n.C{constructor(e){let{blockNumber:t,chain:r,contract:n}=e;super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...t&&n.blockCreated&&n.blockCreated>t?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class o extends n.C{constructor(e){let{chain:t,currentChainId:r}=e;super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${t.id} \u2013 ${t.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${t.id} \u2013 ${t.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class a extends n.C{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class s extends n.C{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}n.C},78802:(e,t,r)=>{"use strict";r.d(t,{zX:()=>m,bG:()=>y,M:()=>v,rR:()=>b,$S:()=>w});var n=r(6169),i=r(71125),o=r(39510),a=r(69679),s=r(83855);function c(e){let{abiItem:t,args:r,includeFunctionName:n=!0,includeName:i=!1}=e;if("name"in t&&"inputs"in t&&t.inputs)return`${n?t.name:""}(${t.inputs.map(((e,t)=>`${i&&e.name?`${e.name}: `:""}${"object"===typeof r[t]?(0,s.A)(r[t]):r[t]}`)).join(", ")})`}var u=r(63898),l=r(7628),d=r(70246),f=r(89676),h=r(54505),p=r(85038),g=r(81576);class m extends h.C{constructor(e,t){let{account:r,docsPath:i,chain:o,data:a,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:h,to:g,value:m}=t;const y=r?(0,n.J)(r):void 0,v=(0,p.aO)({from:y?.address,to:g,value:"undefined"!==typeof m&&`${(0,l.c)(m)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:s,gasPrice:"undefined"!==typeof c&&`${(0,d.Q)(c)} gwei`,maxFeePerGas:"undefined"!==typeof u&&`${(0,d.Q)(u)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof f&&`${(0,d.Q)(f)} gwei`,nonce:h});super(e.shortMessage,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class y extends h.C{constructor(e,t){let{abi:r,args:n,contractAddress:i,docsPath:o,functionName:s,sender:l}=t;const d=(0,u.iY)({abi:r,args:n,name:s}),f=d?c({abiItem:d,args:n,includeFunctionName:!1,includeName:!1}):void 0,h=d?(0,a.B)(d,{includeName:!0}):void 0,m=(0,p.aO)({address:i&&(0,g.RZ)(i),function:h,args:f&&"()"!==f&&`${[...Array(s?.length??0).keys()].map((()=>" ")).join("")}${f}`,sender:l});super(e.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",m].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=i,this.functionName=s,this.sender=l}}class v extends h.C{constructor(e){let t,r,n,s,u,{abi:l,data:d,functionName:h,message:p}=e;if(d&&"0x"!==d)try{r=(0,o.W)({abi:l,data:d});const{abiItem:e,errorName:t,args:u}=r;if("Error"===t)s=u[0];else if("Panic"===t){const[e]=u;s=i.fD[e]}else{const r=e?(0,a.B)(e,{includeName:!0}):void 0,i=e&&u?c({abiItem:e,args:u,includeFunctionName:!1,includeName:!1}):void 0;n=[r?`Error: ${r}`:"",i&&"()"!==i?` ${[...Array(t?.length??0).keys()].map((()=>" ")).join("")}${i}`:""]}}catch(g){t=g}else p&&(s=p);t instanceof f.Wq&&(u=t.signature,n=[`Unable to decode signature "${u}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${u}.`]),super(s&&"execution reverted"!==s||u?[`The contract function "${h}" reverted with the following ${u?"signature":"reason"}:`,s||u].join("\n"):`The contract function "${h}" reverted.`,{cause:t,metaMessages:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r,this.reason=s,this.signature=u}}class b extends h.C{constructor(e){let{functionName:t}=e;super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class w extends h.C{constructor(e){let{data:t,message:r}=e;super(r||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}},36712:(e,t,r)=>{"use strict";r.d(t,{F:()=>o,i:()=>i});var n=r(54505);class i extends n.C{constructor(e){let{offset:t,position:r,size:n}=e;super(`Slice ${"start"===r?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class o extends n.C{constructor(e){let{size:t,targetSize:r,type:n}=e;super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}},36669:(e,t,r)=>{"use strict";r.d(t,{H2:()=>o,Ty:()=>i,u:()=>a});var n=r(54505);n.C;n.C;class i extends n.C{constructor(e){let{max:t,min:r,signed:n,size:i,value:o}=e;super(`Number "${o}" is not in safe ${i?`${8*i}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}n.C;class o extends n.C{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}n.C;n.C;class a extends n.C{constructor(e){let{givenSize:t,maxSize:r}=e;super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}},20288:(e,t,r)=>{"use strict";r.d(t,{A7:()=>o,BG:()=>a,Fo:()=>h,K0:()=>c,Oh:()=>u,RM:()=>m,jj:()=>s,k5:()=>d,lN:()=>g,lY:()=>f,uC:()=>p,vW:()=>l});var n=r(70246),i=r(54505);class o extends i.C{constructor(){let{cause:e,message:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class a extends i.C{constructor(){let{cause:e,maxFeePerGas:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.Q)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class s extends i.C{constructor(){let{cause:e,maxFeePerGas:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.Q)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class c extends i.C{constructor(){let{cause:e,nonce:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class u extends i.C{constructor(){let{cause:e,nonce:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class l extends i.C{constructor(){let{cause:e,nonce:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends i.C{constructor(){let{cause:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class f extends i.C{constructor(){let{cause:e,gas:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class h extends i.C{constructor(){let{cause:e,gas:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class p extends i.C{constructor(e){let{cause:t}=e;super("The transaction type is not supported for this chain.",{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class g extends i.C{constructor(){let{cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.Q)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.Q)(r)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(g,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class m extends i.C{constructor(e){let{cause:t}=e;super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}},79779:(e,t,r)=>{"use strict";r.d(t,{Ci:()=>a,J8:()=>c,MU:()=>u,Pr:()=>s});var n=r(83855),i=r(54505),o=r(81576);class a extends i.C{constructor(e){let{body:t,details:r,headers:i,status:a,url:s}=e;super("HTTP request failed.",{details:r,metaMessages:[a&&`Status: ${a}`,`URL: ${(0,o.ID)(s)}`,t&&`Request body: ${(0,n.A)(t)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=i,this.status=a,this.url=s}}class s extends i.C{constructor(e){let{body:t,details:r,url:i}=e;super("WebSocket request failed.",{details:r,metaMessages:[`URL: ${(0,o.ID)(i)}`,`Request body: ${(0,n.A)(t)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class c extends i.C{constructor(e){let{body:t,error:r,url:i}=e;super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${(0,o.ID)(i)}`,`Request body: ${(0,n.A)(t)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code}}class u extends i.C{constructor(e){let{body:t,url:r}=e;super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,o.ID)(r)}`,`Request body: ${(0,n.A)(t)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}},85038:(e,t,r)=>{"use strict";r.d(t,{$s:()=>u,Kc:()=>d,Kz:()=>l,Vg:()=>c,WA:()=>f,aO:()=>a,n3:()=>s});var n=r(7628),i=r(70246),o=r(54505);function a(e){const t=Object.entries(e).map((e=>{let[t,r]=e;return void 0===r||!1===r?null:[t,r]})).filter(Boolean),r=t.reduce(((e,t)=>{let[r]=t;return Math.max(e,r.length)}),0);return t.map((e=>{let[t,n]=e;return` ${`${t}:`.padEnd(r+1)} ${n}`})).join("\n")}class s extends o.C{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}o.C;class c extends o.C{constructor(e){let{transaction:t}=e;super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",a(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}o.C;o.C;o.C;class u extends o.C{constructor(e,t){let{account:r,docsPath:o,chain:s,data:c,gas:u,gasPrice:l,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:h,to:p,value:g}=t;const m=a({chain:s&&`${s?.name} (id: ${s?.id})`,from:r?.address,to:p,value:"undefined"!==typeof g&&`${(0,n.c)(g)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:c,gas:u,gasPrice:"undefined"!==typeof l&&`${(0,i.Q)(l)} gwei`,maxFeePerGas:"undefined"!==typeof d&&`${(0,i.Q)(d)} gwei`,maxPriorityFeePerGas:"undefined"!==typeof f&&`${(0,i.Q)(f)} gwei`,nonce:h});super(e.shortMessage,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class l extends o.C{constructor(e){let{blockHash:t,blockNumber:r,blockTag:n,hash:i,index:o}=e,a="Transaction";n&&void 0!==o&&(a=`Transaction at block time "${n}" at index "${o}"`),t&&void 0!==o&&(a=`Transaction at block hash "${t}" at index "${o}"`),r&&void 0!==o&&(a=`Transaction at block number "${r}" at index "${o}"`),i&&(a=`Transaction with hash "${i}"`),super(`${a} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class d extends o.C{constructor(e){let{hash:t}=e;super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class f extends o.C{constructor(e){let{hash:t}=e;super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}},81576:(e,t,r)=>{"use strict";r.d(t,{RZ:()=>n,ID:()=>i,HF:()=>o});const n=e=>e,i=e=>e,o=()=>"viem@1.21.3"},99403:(e,t,r)=>{"use strict";r.d(t,{n:()=>l});var n=r(89676),i=r(94441),o=r(4846),a=r(21273),s=r(53415),c=r(53187),u=r(10003);function l(e,t){if("0x"===t&&e.length>0)throw new n.O;if((0,o.E)(t)&&(0,o.E)(t)<32)throw new n.Iy({data:t,params:e,size:(0,o.E)(t)});return function(e){let{data:t,params:r}=e;const i=[];let a=0;for(let s=0;s=(0,o.E)(t))throw new n.Iy({data:t,params:r,size:(0,o.E)(t)});const e=r[s],{consumed:c,value:u}=d({data:t,param:e,position:a});i.push(u),a+=c}return i}({data:t,params:e})}function d(e){let{data:t,param:r,position:o}=e;const l=(0,u.k)(r.type);if(l){const[e,n]=l;return function(e,t){let{param:r,length:n,position:i}=t;if(!n){const t=(0,c.ME)((0,a.di)(e,i,i+32,{strict:!0})),n=(0,c.ME)((0,a.di)(e,t,t+32,{strict:!0}));let o=0;const s=[];for(let i=0;i{let{name:t}=e;return!t})),o=i?[]:{};let s=0;if(f(r)){const t=(0,c.ME)((0,a.di)(e,n,n+32,{strict:!0}));for(let n=0;n48?(0,c.uU)(e,{signed:n}):(0,c.ME)(e,{signed:n})}}(h,{param:r});if("address"===r.type)return function(e){return{consumed:32,value:(0,i.o)((0,a.di)(e,-20))}}(h);if("bool"===r.type)return function(e){return{consumed:32,value:(0,c.Nx)(e)}}(h);throw new n.j(r.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function f(e){const{type:t}=e;if("string"===t)return!0;if("bytes"===t)return!0;if(t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(f);const r=(0,u.k)(e.type);return!(!r||!f({...e,type:r[1]}))}},39510:(e,t,r)=>{"use strict";r.d(t,{W:()=>u});var n=r(71125),i=r(89676),o=r(21273),a=r(39718),s=r(99403),c=r(69679);function u(e){let{abi:t,data:r}=e;const u=(0,o.di)(r,0,4);if("0x"===u)throw new i.O;const l=[...t||[],n.Mc,n.J9].find((e=>"error"===e.type&&u===(0,a._)((0,c.B)(e))));if(!l)throw new i.Wq(u,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,s.n)(l.inputs,(0,o.di)(r,4)):void 0,errorName:l.name}}},55628:(e,t,r)=>{"use strict";r.d(t,{e:()=>s});var n=r(89676),i=r(99403),o=r(63898);const a="/docs/contract/decodeFunctionResult";function s(e){let{abi:t,args:r,functionName:s,data:c}=e,u=t[0];if(s&&(u=(0,o.iY)({abi:t,args:r,name:s}),!u))throw new n.Iz(s,{docsPath:a});if("function"!==u.type)throw new n.Iz(void 0,{docsPath:a});if(!u.outputs)throw new n.MR(u.name,{docsPath:a});const l=(0,i.n)(u.outputs,c);return l&&l.length>1?l:l&&1===l.length?l[0]:void 0}},10003:(e,t,r)=>{"use strict";r.d(t,{h:()=>d,k:()=>p});var n=r(89676),i=r(58418),o=r(78753),a=r(82651),s=r(93914),c=r(4846),u=r(21273),l=r(97168);function d(e,t){if(e.length!==t.length)throw new n.YE({expectedLength:e.length,givenLength:t.length});const r=function(e){let{params:t,values:r}=e;const n=[];for(let i=0;i0?(0,a.xW)([t,e]):t}}if(s)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,a.xW)(c.map((e=>{let{encoded:t}=e;return t})))}}(r,{length:e,param:{...t,type:i}})}if("tuple"===t.type)return function(e,t){let{param:r}=t,n=!1;const i=[];for(let o=0;o{let{encoded:t}=e;return t})))}}(r,{param:t});if("address"===t.type)return function(e){if(!(0,o.P)(e))throw new i.M({address:e});return{dynamic:!1,encoded:(0,s.db)(e.toLowerCase())}}(r);if("bool"===t.type)return function(e){return{dynamic:!1,encoded:(0,s.db)((0,l.$P)(e))}}(r);if(t.type.startsWith("uint")||t.type.startsWith("int")){return function(e,t){let{signed:r}=t;return{dynamic:!1,encoded:(0,l.cK)(e,{size:32,signed:r})}}(r,{signed:t.type.startsWith("int")})}if(t.type.startsWith("bytes"))return function(e,t){let{param:r}=t;const[,i]=r.type.split("bytes"),o=(0,c.E)(e);if(!i){let t=e;return o%32!==0&&(t=(0,s.db)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,a.xW)([(0,s.db)((0,l.cK)(o,{size:32})),t])}}if(o!==parseInt(i))throw new n.gH({expectedSize:parseInt(i),value:e});return{dynamic:!1,encoded:(0,s.db)(e,{dir:"right"})}}(r,{param:t});if("string"===t.type)return function(e){const t=(0,l.i3)(e),r=Math.ceil((0,c.E)(t)/32),n=[];for(let i=0;i{"use strict";r.d(t,{p:()=>u});var n=r(89676),i=r(82651),o=r(39718),a=r(10003),s=r(69679),c=r(63898);function u(e){let{abi:t,args:r,functionName:u}=e,l=t[0];if(u&&(l=(0,c.iY)({abi:t,args:r,name:u}),!l))throw new n.Iz(u,{docsPath:"/docs/contract/encodeFunctionData"});if("function"!==l.type)throw new n.Iz(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const d=(0,s.B)(l),f=(0,o._)(d),h="inputs"in l&&l.inputs?(0,a.h)(l.inputs,r??[]):void 0;return(0,i.aP)([f,h??"0x"])}},69679:(e,t,r)=>{"use strict";r.d(t,{A:()=>o,B:()=>i});var n=r(89676);function i(e){let{includeName:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new n.d_(e.type);return`${e.name}(${o(e.inputs,{includeName:t})})`}function o(e){let{includeName:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?e.map((e=>function(e,t){let{includeName:r}=t;if(e.type.startsWith("tuple"))return`(${o(e.components,{includeName:r})})${e.type.slice(5)}`;return e.type+(r&&e.name?` ${e.name}`:"")}(e,{includeName:t}))).join(t?", ":","):""}},63898:(e,t,r)=>{"use strict";r.d(t,{iY:()=>c});var n=r(89676),i=r(7466),o=r(56980),a=r(39718),s=r(78753);function c(e){let{abi:t,args:r=[],name:s}=e;const c=(0,i.q)(s,{strict:!1}),d=t.filter((e=>c?"function"===e.type?(0,a._)(e)===s:"event"===e.type&&(0,o.c)(e)===s:"name"in e&&e.name===s));if(0===d.length)return;if(1===d.length)return d[0];let f;for(const i of d){if(!("inputs"in i))continue;if(!r||0===r.length){if(!i.inputs||0===i.inputs.length)return i;continue}if(!i.inputs)continue;if(0===i.inputs.length)continue;if(i.inputs.length!==r.length)continue;if(r.every(((e,t)=>{const r="inputs"in i&&i.inputs[t];return!!r&&u(e,r)}))){if(f&&"inputs"in f&&f.inputs){const e=l(i.inputs,f.inputs,r);if(e)throw new n.nM({abiItem:i,type:e[0]},{abiItem:f,type:e[1]})}f=i}}return f||d[0]}function u(e,t){const r=typeof e,n=t.type;switch(n){case"address":return(0,s.P)(e);case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:return"tuple"===n&&"components"in t?Object.values(t.components).every(((t,r)=>u(Object.values(e)[r],t))):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?"number"===r||"bigint"===r:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?"string"===r||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)&&(Array.isArray(e)&&e.every((e=>u(e,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")}))))}}function l(e,t,r){for(const n in e){const i=e[n],o=t[n];if("tuple"===i.type&&"tuple"===o.type&&"components"in i&&"components"in o)return l(i.components,o.components,r[n]);const a=[i.type,o.type];if(!(!a.includes("address")||!a.includes("bytes20"))||(a.includes("address")&&a.includes("string")||!(!a.includes("address")||!a.includes("bytes")))&&(0,s.P)(r[n]))return a}}},94441:(e,t,r)=>{"use strict";r.d(t,{b:()=>c,o:()=>s});var n=r(58418),i=r(32146),o=r(81442),a=r(78753);function s(e,t){const r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,o.S)((0,i.Af)(r),"bytes"),a=(t?r.substring(`${t}0x`.length):r).split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&a[i]&&(a[i]=a[i].toUpperCase()),(15&n[i>>1])>=8&&a[i+1]&&(a[i+1]=a[i+1].toUpperCase());return`0x${a.join("")}`}function c(e,t){if(!(0,a.P)(e))throw new n.M({address:e});return s(e,t)}},78753:(e,t,r)=>{"use strict";r.d(t,{P:()=>i});const n=/^0x[a-fA-F0-9]{40}$/;function i(e){return n.test(e)}},82430:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var n=r(67935);function i(e){let{blockNumber:t,chain:r,contract:i}=e;const o=r?.contracts?.[i];if(!o)throw new n.rj({chain:r,contract:{name:i}});if(t&&o.blockCreated&&o.blockCreated>t)throw new n.rj({blockNumber:t,chain:r,contract:{name:i,blockCreated:o.blockCreated}});return o.address}},82651:(e,t,r)=>{"use strict";function n(e){return"string"===typeof e[0]?i(e):function(e){let t=0;for(const i of e)t+=i.length;const r=new Uint8Array(t);let n=0;for(const i of e)r.set(i,n),n+=i.length;return r}(e)}function i(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}r.d(t,{aP:()=>i,xW:()=>n})},7466:(e,t,r)=>{"use strict";function n(e){let{strict:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!e&&("string"===typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")))}r.d(t,{q:()=>n})},93914:(e,t,r)=>{"use strict";r.d(t,{db:()=>o,eV:()=>i});var n=r(36712);function i(e){let{dir:t,size:r=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof e?o(e,{dir:t,size:r}):function(e){let{dir:t,size:r=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===r)return e;if(e.length>r)throw new n.F({size:e.length,targetSize:r,type:"bytes"});const i=new Uint8Array(r);for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(null===r)return e;const i=e.replace("0x","");if(i.length>2*r)throw new n.F({size:Math.ceil(i.length/2),targetSize:r,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*r,"0")}`}},4846:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(7466);function i(e){return(0,n.q)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},21273:(e,t,r)=>{"use strict";r.d(t,{di:()=>a});var n=r(36712),i=r(7466),o=r(4846);function a(e,t,r){let{strict:n}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,i.q)(e,{strict:!1})?function(e,t,r){let{strict:n}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};s(e,t);const i=`0x${e.replace("0x","").slice(2*(t??0),2*(r??e.length))}`;n&&c(i,t,r);return i}(e,t,r,{strict:n}):function(e,t,r){let{strict:n}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};s(e,t);const i=e.slice(t,r);n&&c(i,t,r);return i}(e,t,r,{strict:n})}function s(e,t){if("number"===typeof t&&t>0&&t>(0,o.E)(e)-1)throw new n.i({offset:t,position:"start",size:(0,o.E)(e)})}function c(e,t,r){if("number"===typeof t&&"number"===typeof r&&(0,o.E)(e)!==r-t)throw new n.i({offset:r,position:"end",size:(0,o.E)(e)})}},53415:(e,t,r)=>{"use strict";function n(e){let{dir:t="left"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="string"===typeof e?e.replace("0x",""):e,n=0;for(let i=0;in})},53187:(e,t,r)=>{"use strict";r.d(t,{IQ:()=>d,ME:()=>l,Nx:()=>u,Sl:()=>s,uU:()=>c});var n=r(36669),i=r(4846),o=r(53415),a=r(32146);function s(e,t){let{size:r}=t;if((0,i.E)(e)>r)throw new n.u({givenSize:(0,i.E)(e),maxSize:r})}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{signed:r}=t;t.size&&s(e,{size:t.size});const n=BigInt(e);if(!r)return n;const i=(e.length-2)/2;return n<=(1n<<8n*BigInt(i)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e;if(t.size&&(s(r,{size:t.size}),r=(0,o.B)(r)),"0x00"===(0,o.B)(r))return!1;if("0x01"===(0,o.B)(r))return!0;throw new n.H2(r)}function l(e){return Number(c(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,a.aT)(e);return t.size&&(s(r,{size:t.size}),r=(0,o.B)(r,{dir:"right"})),(new TextDecoder).decode(r)}},32146:(e,t,r)=>{"use strict";r.d(t,{Af:()=>h,ZJ:()=>u,aT:()=>f});var n=r(54505),i=r(7466),o=r(93914),a=r(53187),s=r(97168);const c=new TextEncoder;function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"number"===typeof e||"bigint"===typeof e?function(e,t){const r=(0,s.cK)(e,t);return f(r)}(e,t):"boolean"===typeof e?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new Uint8Array(1);if(r[0]=Number(e),"number"===typeof t.size)return(0,a.Sl)(r,{size:t.size}),(0,o.eV)(r,{size:t.size});return r}(e,t):(0,i.q)(e)?f(e,t):h(e,t)}const l={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(e){return e>=l.zero&&e<=l.nine?e-l.zero:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e;t.size&&((0,a.Sl)(r,{size:t.size}),r=(0,o.eV)(r,{dir:"right",size:t.size}));let i=r.slice(2);i.length%2&&(i=`0${i}`);const s=i.length/2,c=new Uint8Array(s);for(let o=0,a=0;o1&&void 0!==arguments[1]?arguments[1]:{};const r=c.encode(e);return"number"===typeof t.size?((0,a.Sl)(r,{size:t.size}),(0,o.eV)(r,{dir:"right",size:t.size})):r}},97168:(e,t,r)=>{"use strict";r.d(t,{$P:()=>c,My:()=>u,cK:()=>l,i3:()=>f,nj:()=>s});var n=r(36669),i=r(93914),o=r(53187);const a=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"number"===typeof e||"bigint"===typeof e?l(e,t):"string"===typeof e?f(e,t):"boolean"===typeof e?c(e,t):u(e,t)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=`0x${Number(e)}`;return"number"===typeof t.size?((0,o.Sl)(r,{size:t.size}),(0,i.eV)(r,{size:t.size})):r}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="";for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:{};const{signed:r,size:o}=t,a=BigInt(e);let s;o?s=r?(1n<<8n*BigInt(o)-1n)-1n:2n**(8n*BigInt(o))-1n:"number"===typeof e&&(s=BigInt(Number.MAX_SAFE_INTEGER));const c="bigint"===typeof s&&r?-s-1n:0;if(s&&a>s||a1&&void 0!==arguments[1]?arguments[1]:{};return u(d.encode(e),t)}},59788:(e,t,r)=>{"use strict";r.d(t,{l:()=>o});var n=r(54505),i=r(20288);function o(e,t){const r=(e.details||"").toLowerCase(),o=e.walk((e=>e.code===i.A7.code));return o instanceof n.C?new i.A7({cause:e,message:o.details}):i.A7.nodeMessage.test(r)?new i.A7({cause:e,message:e.details}):i.BG.nodeMessage.test(r)?new i.BG({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.jj.nodeMessage.test(r)?new i.jj({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.K0.nodeMessage.test(r)?new i.K0({cause:e,nonce:t?.nonce}):i.Oh.nodeMessage.test(r)?new i.Oh({cause:e,nonce:t?.nonce}):i.vW.nodeMessage.test(r)?new i.vW({cause:e,nonce:t?.nonce}):i.k5.nodeMessage.test(r)?new i.k5({cause:e}):i.lY.nodeMessage.test(r)?new i.lY({cause:e,gas:t?.gas}):i.Fo.nodeMessage.test(r)?new i.Fo({cause:e,gas:t?.gas}):i.uC.nodeMessage.test(r)?new i.uC({cause:e}):i.lN.nodeMessage.test(r)?new i.lN({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new i.RM({cause:e})}},11613:(e,t,r)=>{"use strict";function n(e,t){let{format:r}=t;if(!r)return{};const n={};return function t(r){const i=Object.keys(r);for(const o of i)o in e&&(n[o]=e[o]),r[o]&&"object"===typeof r[o]&&!Array.isArray(r[o])&&t(r[o])}(r(e||{})),n}r.d(t,{o:()=>n})},14807:(e,t,r)=>{"use strict";r.d(t,{Bv:()=>o});var n=r(97168);const i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function o(e){return{...e,gas:"undefined"!==typeof e.gas?(0,n.cK)(e.gas):void 0,gasPrice:"undefined"!==typeof e.gasPrice?(0,n.cK)(e.gasPrice):void 0,maxFeePerGas:"undefined"!==typeof e.maxFeePerGas?(0,n.cK)(e.maxFeePerGas):void 0,maxPriorityFeePerGas:"undefined"!==typeof e.maxPriorityFeePerGas?(0,n.cK)(e.maxPriorityFeePerGas):void 0,nonce:"undefined"!==typeof e.nonce?(0,n.cK)(e.nonce):void 0,type:"undefined"!==typeof e.type?i[e.type]:void 0,value:"undefined"!==typeof e.value?(0,n.cK)(e.value):void 0}}},56980:(e,t,r)=>{"use strict";r.d(t,{c:()=>a});var n=r(32146),i=r(88128);var o=r(81442);const a=e=>{return t=(e=>(0,i.d)(e))(e),(0,o.S)((0,n.ZJ)(t));var t}},39718:(e,t,r)=>{"use strict";r.d(t,{_:()=>s});var n=r(21273),i=r(32146),o=r(88128),a=r(81442);const s=e=>{return(0,n.di)((t=(0,o.d)(e),(0,a.S)((0,i.ZJ)(t))),0,4);var t}},88128:(e,t,r)=>{"use strict";r.d(t,{d:()=>s});const n=/^tuple(?(\[(\d*)\])*)$/;function i(e){let t=e.type;if(n.test(e.type)&&"components"in e){t="(";const r=e.components.length;for(let n=0;nfunction(e){let t=!0,r="",n=0,i="",o=!1;for(let a=0;a{return"string"===typeof e?e:"function"===(t=e).type?`function ${t.name}(${o(t.inputs)})${t.stateMutability&&"nonpayable"!==t.stateMutability?` ${t.stateMutability}`:""}${t.outputs.length?` returns (${o(t.outputs)})`:""}`:"event"===t.type?`event ${t.name}(${o(t.inputs)})`:"error"===t.type?`error ${t.name}(${o(t.inputs)})`:"constructor"===t.type?`constructor(${o(t.inputs)})${"payable"===t.stateMutability?" payable":""}`:"fallback"===t.type?"fallback()":"receive() external payable";var t})())},81442:(e,t,r)=>{"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function i(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&!r.includes(e.length))throw new Error(`Expected Uint8Array of length ${r}, not of length=${e.length}`)}function o(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){i(e);const r=t.outputLen;if(e.lengthD});const s=BigInt(2**32-1),c=BigInt(32);function u(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&s),l:Number(e>>c&s)}:{h:0|Number(e>>c&s),l:0|Number(e&s)}}function l(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;ie<>>32-r,f=(e,t,r)=>t<>>32-r,h=(e,t,r)=>t<>>64-r,p=(e,t,r)=>e<>>64-r;const g=e=>e instanceof Uint8Array;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");function m(e){if("string"===typeof e&&(e=function(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!g(e))throw new Error("expected Uint8Array, got "+typeof e);return e}class y{clone(){return this._cloneInto()}}const[v,b,w]=[[],[],[]],A=BigInt(0),_=BigInt(1),E=BigInt(2),S=BigInt(7),k=BigInt(256),x=BigInt(113);for(let U=0,j=_,F=1,z=0;U<24;U++){[F,z]=[z,(2*F+3*z)%5],v.push(2*(5*z+F)),b.push((U+1)*(U+2)/2%64);let e=A;for(let t=0;t<7;t++)j=(j<<_^(j>>S)*x)%k,j&E&&(e^=_<<(_<r>32?h(e,t,r):d(e,t,r),O=(e,t,r)=>r>32?p(e,t,r):f(e,t,r);class P extends y{constructor(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,n(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var a;this.state=new Uint8Array(200),this.state32=(a=this.state,new Uint32Array(a.buffer,a.byteOffset,Math.floor(a.byteLength/4)))}keccak(){!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24;const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let n=0;n<10;n++)r[n]=e[n]^e[n+10]^e[n+20]^e[n+30]^e[n+40];for(let n=0;n<10;n+=2){const t=(n+8)%10,i=(n+2)%10,o=r[i],a=r[i+1],s=T(o,a,1)^r[t],c=O(o,a,1)^r[t+1];for(let r=0;r<50;r+=10)e[n+r]^=s,e[n+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=b[r],o=T(t,i,n),a=O(t,i,n),s=v[r];t=e[s],i=e[s+1],e[s]=o,e[s+1]=a}for(let n=0;n<50;n+=10){for(let t=0;t<10;t++)r[t]=e[n+t];for(let t=0;t<10;t++)e[n+t]^=~r[(t+2)%10]&r[(t+4)%10]}e[0]^=C[n],e[1]^=I[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){o(this);const{blockLen:t,state:r}=this,n=(e=m(e)).length;for(let i=0;i=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return n(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(a(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new P(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}const M=(e,t,r)=>function(e){const t=t=>e().update(m(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}((()=>new P(t,e,r))),R=M(1,136,32);var N=r(7466),L=r(32146),B=r(97168);function D(e,t){const r=t||"hex",n=R((0,N.q)(e,{strict:!1})?(0,L.ZJ)(e):e);return"bytes"===r?n:(0,B.nj)(n)}},5911:(e,t,r)=>{"use strict";r.d(t,{u:()=>i});const n=new Map;function i(e){let{fn:t,id:r,shouldSplitBatch:i,wait:o=0,sort:a}=e;const s=async()=>{const e=u();c();const r=e.map((e=>{let{args:t}=e;return t}));0!==r.length&&t(r).then((t=>{a&&Array.isArray(t)&&t.sort(a);for(let r=0;r{for(let r=0;rn.delete(r),u=()=>n.get(r)||[],l=e=>n.set(r,[...u(),e]);return{flush:c,async schedule(e){const t={},r=new Promise(((e,r)=>{t.resolve=e,t.reject=r})),n=i?.([...u().map((e=>{let{args:t}=e;return t})),e]);n&&s();return u().length>0?(l({args:e,pendingPromise:t}),r):(l({args:e,pendingPromise:t}),setTimeout(s,o),r)}}}},83855:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=(e,t,r)=>JSON.stringify(e,((e,r)=>{const n="bigint"===typeof r?r.toString():r;return"function"===typeof t?t(e,n):n}),r)},32278:(e,t,r)=>{"use strict";r.d(t,{c:()=>c});var n=r(6169),i=r(58418),o=r(20288),a=r(85038),s=r(78753);function c(e){const{account:t,gasPrice:r,maxFeePerGas:c,maxPriorityFeePerGas:u,to:l}=e,d=t?(0,n.J)(t):void 0;if(d&&!(0,s.P)(d.address))throw new i.M({address:d.address});if(l&&!(0,s.P)(l))throw new i.M({address:l});if("undefined"!==typeof r&&("undefined"!==typeof c||"undefined"!==typeof u))throw new a.n3;if(c&&c>2n**256n-1n)throw new o.BG({maxFeePerGas:c});if(u&&c&&u>c)throw new o.lN({maxFeePerGas:c,maxPriorityFeePerGas:u})}},7628:(e,t,r)=>{"use strict";r.d(t,{c:()=>o});var n=r(91038),i=r(6351);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wei";return(0,i.J)(e,n.eL[t])}},70246:(e,t,r)=>{"use strict";r.d(t,{Q:()=>o});var n=r(91038),i=r(6351);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wei";return(0,i.J)(e,n.sz[t])}},6351:(e,t,r)=>{"use strict";function n(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[i,o]=[r.slice(0,r.length-t),r.slice(r.length-t)];return o=o.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${o?`.${o}`:""}`}r.d(t,{J:()=>n})},81609:(e,t,r)=>{"use strict";function n(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"===typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rS});var s=function(){return"function"===typeof Symbol},c=function(e){return s()&&Boolean(Symbol[e])},u=function(e){return c(e)?Symbol[e]:"@@"+e};s()&&!c("observable")&&(Symbol.observable=Symbol("observable"));var l=u("iterator"),d=u("observable"),f=u("species");function h(e,t){var r=e[t];if(null!=r){if("function"!==typeof r)throw new TypeError(r+" is not a function");return r}}function p(e){var t=e.constructor;return void 0!==t&&null===(t=t[f])&&(t=void 0),void 0!==t?t:S}function g(e){return e instanceof S}function m(e){m.log?m.log(e):setTimeout((function(){throw e}))}function y(e){Promise.resolve().then((function(){try{e()}catch(t){m(t)}}))}function v(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"===typeof t)t();else{var r=h(t,"unsubscribe");r&&r.call(t)}}catch(n){m(n)}}function b(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function w(e,t,r){e._state="running";var n=e._observer;try{var i=h(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(b(e),!i)throw r;i.call(n,r);break;case"complete":b(e),i&&i.call(n)}}catch(o){m(o)}"closed"===e._state?v(e):"running"===e._state&&(e._state="ready")}function A(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void y((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r1,i=!1,o=arguments[1];return new r((function(r){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||n)try{o=e(o,t)}catch(s){return r.error(s)}else o=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(o),r.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[d]=function(){return this},e.from=function(t){var r="function"===typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var i=h(t,d);if(i){var o=i.call(t);if(Object(o)!==o)throw new TypeError(o+" is not an object");return g(o)&&o.constructor===r?o:new r((function(e){return o.subscribe(e)}))}if(c("iterator")&&(i=h(t,l)))return new r((function(e){y((function(){if(!e.closed){for(var r,o=n(i.call(t));!(r=o()).done;){var a=r.value;if(e.next(a),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){y((function(){if(!e.closed){for(var r=0;r{"use strict";r.d(t,{y:()=>i});const n=e=>{let t;const r=new Set,n=(e,n)=>{const i="function"===typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=n?n:"object"!==typeof i||null===i)?i:Object.assign({},t,i),r.forEach((r=>r(t,e)))}},i=()=>t,o={setState:n,getState:i,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},a=t=e(n,i,o);return o},i=e=>e?n(e):n},1636:e=>{"use strict";e.exports={rE:"6.5.7"}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;__webpack_require__.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"===typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"===typeof r.then)return r}var i=Object.create(null);__webpack_require__.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>o[e]=()=>r[e]));return o.default=()=>r,__webpack_require__.d(i,o),i}})(),__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,r)=>(__webpack_require__.f[r](e,t),t)),[])),__webpack_require__.u=e=>"static/js/"+e+"."+{4:"c22d11cb",13:"70cf6b8d",76:"712b8f03",130:"d9d56636",162:"28034ed9",224:"1baee2ba",248:"cf84edd5",267:"da99da53",348:"8da37c71",463:"6cb7cc74",541:"01f016f0",571:"225f4196",732:"76c365e7",818:"48d1aafb",961:"1ab53363",965:"bc3cddf0"}[e]+".chunk.js",__webpack_require__.miniCssF=e=>{},__webpack_require__.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="frontend-auth:";__webpack_require__.l=(r,n,i,o)=>{if(e[r])e[r].push(n);else{var a,s;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(f);var i=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(n))),t)return t(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),__webpack_require__.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.p="/",(()=>{var e={792:0};__webpack_require__.f.j=(t,r)=>{var n=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((r,i)=>n=e[t]=[r,i]));r.push(n[2]=i);var o=__webpack_require__.p+__webpack_require__.u(t),a=new Error;__webpack_require__.l(o,(r=>{if(__webpack_require__.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,n[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,i,o=r[0],a=r[1],s=r[2],c=0;if(o.some((t=>0!==e[t]))){for(n in a)__webpack_require__.o(a,n)&&(__webpack_require__.m[n]=a[n]);if(s)s(__webpack_require__)}for(t&&t(r);c{"use strict";var e={};__webpack_require__.r(e),__webpack_require__.d(e,{hasBrowserEnv:()=>Sv,hasStandardBrowserEnv:()=>xv,hasStandardBrowserWebWorkerEnv:()=>Cv,navigator:()=>kv,origin:()=>Iv});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{Address:()=>Ck,Array:()=>Pk,Bool:()=>xk,Character:()=>kk,Dictionary:()=>Mk,Enum:()=>Bk,Event:()=>Rk,Fix64:()=>Ek,Identity:()=>ek,InclusiveRange:()=>Uk,Int:()=>rk,Int128:()=>fk,Int16:()=>ak,Int256:()=>pk,Int32:()=>ck,Int64:()=>lk,Int8:()=>ik,Optional:()=>Tk,Path:()=>Dk,Reference:()=>Ok,Resource:()=>Nk,String:()=>Sk,Struct:()=>Lk,UFix64:()=>_k,UInt:()=>tk,UInt128:()=>dk,UInt16:()=>ok,UInt256:()=>hk,UInt32:()=>sk,UInt64:()=>uk,UInt8:()=>nk,Void:()=>Ik,Word128:()=>bk,Word16:()=>mk,Word256:()=>wk,Word32:()=>yk,Word64:()=>vk,Word8:()=>gk,_Array:()=>Pk});var r={};__webpack_require__.r(r),__webpack_require__.d(r,{Decoder:()=>n2,Encoder:()=>t2,PacketType:()=>e2,protocol:()=>X1});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{DO:()=>a3,OG:()=>b3,My:()=>c3,Ph:()=>h3,lX:()=>p3,Id:()=>v3,fg:()=>_3,qj:()=>y3,aT:()=>f3,aY:()=>o3,lq:()=>g3,z:()=>m3,Q5:()=>S3});var i=__webpack_require__(9950),o=__webpack_require__.t(i,2),a=__webpack_require__(1352),s=__webpack_require__(19335),c=__webpack_require__(56646);function u(){const{innerWidth:e,innerHeight:t}=window;return{windowWidth:e,windowHeight:t}}var l=__webpack_require__(52808),d=__webpack_require__(1658),f=__webpack_require__(49755),h=__webpack_require__(92982),p=__webpack_require__(44414);const g=s.default.header` display: flex; justify-content: space-between; align-items: center; z-index: 2; background: transparent; transition: transform 0.5s ease, top 0.5s ease; top: 0; left: 64px; position: fixed; box-sizing: border-box; padding-top: 40px; width: 116px; & > *:first-child { height: 28px; } * { user-select: none; } &.up { top: 0; transition: top 0.4s ease-out; @media (max-width: 767px) { top: 0; } } &.down { top: -92px; transition: top 0.4s ease-out; } .logo { a { height: 100%; display: block; } } @media (max-width: 840px) { left: 44px; } @media (max-width: 768px) { left: 20px; padding-top: 20px; width: 32px; margin: 0; right: 0; .logo { width: 32px; height: 32px; } } ${c.mediaQuery.minWidthFourK} { left: ${(0,f.adaptiveValueCalc)(64)}; padding-top: ${(0,f.adaptiveValueCalc)(40)}; width: ${(0,f.adaptiveValueCalc)(116)}; & > *:first-child { height: ${(0,f.adaptiveValueCalc)(28)}; } &.down { top: ${(0,f.adaptiveValueCalc)(-92)}; } img { width: ${(0,f.adaptiveValueCalc)(116)}; height: ${(0,f.adaptiveValueCalc)(28)}; } } `,m=()=>{const{deviceType:e}=function(){const e=u(),[t,r]=(0,i.useState)(e);return(0,i.useEffect)((()=>{function e(){r(u())}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),{windowDimensions:t,deviceType:t.windowWidth<=c.ScreenWidth.TABLET?"isMobile":t.windowWidth>=c.ScreenWidth.DESKTOP?"isDesktop":"isTablet"}}(),t="isMobile"===e,r=(0,l.useScrollDirection)();return(0,p.jsx)(g,{className:r,children:(0,p.jsx)("a",{href:`${h.ludoDomains.prod.app}/`,children:(0,p.jsx)("img",{width:t?31:116,height:t?32:28,src:t?`${(0,d.getStaticDomain)({ENV:"ludo.com"})}/logo/mobile/main_mobile.svg`:`${(0,d.getStaticDomain)({ENV:"ludo.com"})}/logo/main/main.svg`,loading:"eager",alt:"Ludo - a right place for NFT art"})})})};var y=__webpack_require__(70558),v=__webpack_require__.n(y),b=__webpack_require__(25776),w=__webpack_require__.n(b);const A=(0,i.createContext)(null),_=()=>(0,i.useContext)(A),E=A,S=()=>{const{closeAlert:e,getAlertType:t,isAlertOpen:r}=_(),n=t();return r()&&n?(0,p.jsx)(w(),{closeAlert:e,updateData:n}):null},k="#12183a",x="#696f90",C="#cfd5ea",I="#ffffff",T="transparent",O=s.default.div` position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); margin-left: auto; margin-right: auto; border-radius: 8px; max-width: 566px; background-color: ${I}; padding: 24px 24px 32px; display: flex; flex-direction: column; align-items: center; z-index: 10000; ${c.mediaQuery.bigPhone} { max-width: 320px; } .popupIcon { width: 48px; height: 48px; } .popupCloseBtn { position: absolute; right: 0; top: 0; cursor: pointer; padding: 16px; svg { width: 24px; height: 24px; } } .popupContent { display: flex; align-items: center; flex-direction: column; max-width: 350px; .caption { color: ${k}; margin: 8px 0 16px 0; font-size: 20px; font-weight: 600; line-height: 28px; } .text { text-align: center; margin: 0; font-size: 15px; font-weight: 500; line-height: 22px; color: ${x}; } } `,P=e=>{let{popupData:t,onClickClose:r,children:n}=e;return(0,p.jsxs)(O,{children:[(0,p.jsx)("div",{className:"popupCloseBtn",onClick:()=>r(!t.isNeedShowPopup),children:(0,p.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,p.jsx)("path",{d:"M8.13344 8.01429L16 15.8811M16 8L8 16",stroke:"#6048FF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,p.jsx)("div",{className:"popupIcon",children:(0,p.jsx)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("path",{d:"M8.75782 29.9002L10.0569 30.6502L8.75782 29.9002ZM18.4573 13.1002L17.1583 12.3502L18.4573 13.1002ZM29.543 13.1002L30.842 12.3502L29.543 13.1002ZM39.2425 29.9002L40.5415 29.1502L39.2425 29.9002ZM22.3727 7.84583L22.9828 9.21614V9.21614L22.3727 7.84583ZM25.627 7.84583L25.0169 9.21614L25.627 7.84583ZM7.79297 38.7362L6.91129 39.9497H6.91129L7.79297 38.7362ZM6.16563 35.9181L7.65741 35.7613L6.16563 35.9181ZM40.2073 38.7362L41.089 39.9497L40.2073 38.7362ZM41.8346 35.9181L43.3264 36.0749L41.8346 35.9181ZM24.0996 32.5001H25.5996C25.5996 31.6717 24.928 31.0001 24.0996 31.0001V32.5001ZM24.0996 32.7001L24.0992 34.2001C24.4971 34.2002 24.8788 34.0422 25.1601 33.7609C25.4415 33.4796 25.5996 33.098 25.5996 32.7001H24.0996ZM23.9004 32.7001H22.4004C22.4004 33.5284 23.0717 34.1999 23.9 34.2001L23.9004 32.7001ZM23.9004 32.5001V31.0001C23.072 31.0001 22.4004 31.6717 22.4004 32.5001H23.9004ZM25.5 18.5001C25.5 17.6717 24.8284 17.0001 24 17.0001C23.1716 17.0001 22.5 17.6717 22.5 18.5001H25.5ZM22.5 26.5001C22.5 27.3285 23.1716 28.0001 24 28.0001C24.8284 28.0001 25.5 27.3285 25.5 26.5001H22.5ZM33.6997 38.0001H14.3008V41.0001H33.6997V38.0001ZM10.0569 30.6502L19.7563 13.8502L17.1583 12.3502L7.45878 29.1502L10.0569 30.6502ZM28.2439 13.8502L37.9434 30.6502L40.5415 29.1502L30.842 12.3502L28.2439 13.8502ZM19.7563 13.8502C20.6806 12.2494 21.323 11.1395 21.877 10.3553C22.4354 9.5647 22.7667 9.31234 22.9828 9.21614L21.7625 6.47551C20.7913 6.90794 20.0743 7.70759 19.4267 8.62443C18.7745 9.54766 18.0529 10.8007 17.1583 12.3502L19.7563 13.8502ZM30.842 12.3502C29.9473 10.8006 29.2256 9.54757 28.5732 8.62427C27.9253 7.7074 27.2082 6.90788 26.2371 6.47551L25.0169 9.21614C25.233 9.3124 25.5645 9.5649 26.1231 10.3555C26.6772 11.1396 27.3197 12.2495 28.2439 13.8502L30.842 12.3502ZM22.9828 9.21614C23.63 8.92796 24.3696 8.92796 25.0169 9.21614L26.2371 6.47551C24.8131 5.84151 23.1865 5.84151 21.7625 6.47551L22.9828 9.21614ZM14.3008 38.0001C12.4523 38.0001 11.1701 37.9986 10.2141 37.9109C9.2503 37.8225 8.86609 37.6618 8.67465 37.5227L6.91129 39.9497C7.77132 40.5746 8.82214 40.7958 9.93999 40.8984C11.0656 41.0016 12.5115 41.0001 14.3008 41.0001V38.0001ZM7.45878 29.1502C6.56412 30.6998 5.8399 31.9513 5.36655 32.9777C4.89647 33.9971 4.56273 35.0178 4.67384 36.0749L7.65741 35.7613C7.63267 35.526 7.68559 35.1128 8.09085 34.234C8.49285 33.3622 9.13265 32.251 10.0569 30.6502L7.45878 29.1502ZM8.67465 37.5227C8.10121 37.1061 7.73144 36.4657 7.65741 35.7613L4.67384 36.0749C4.83681 37.6254 5.65047 39.0337 6.91129 39.9497L8.67465 37.5227ZM33.6997 41.0001C35.489 41.0001 36.9349 41.0016 38.0604 40.8984C39.1782 40.7958 40.229 40.5746 41.089 39.9497L39.3256 37.5227C39.1341 37.6618 38.75 37.8225 37.7863 37.9109C36.8304 37.9986 35.5482 38.0001 33.6997 38.0001V41.0001ZM37.9434 30.6502C38.8676 32.251 39.5074 33.3622 39.9094 34.234C40.3147 35.1128 40.3676 35.526 40.3429 35.7613L43.3264 36.0749C43.4375 35.0178 43.1038 33.9971 42.6337 32.9777C42.1604 31.9513 41.4362 30.6998 40.5415 29.1502L37.9434 30.6502ZM41.089 39.9497C42.3498 39.0337 43.1635 37.6254 43.3264 36.0749L40.3429 35.7613C40.2688 36.4657 39.899 37.1061 39.3256 37.5227L41.089 39.9497ZM22.5996 32.5001V32.7001H25.5996V32.5001H22.5996ZM24.1 31.2001L23.9008 31.2001L23.9 34.2001L24.0992 34.2001L24.1 31.2001ZM25.4004 32.7001V32.5001H22.4004V32.7001H25.4004ZM23.9004 34.0001H24.0996V31.0001H23.9004V34.0001ZM22.5 18.5001V26.5001H25.5V18.5001H22.5Z",fill:"#F94C66"})})}),(0,p.jsxs)("div",{className:"popupContent",children:[(0,p.jsx)("h3",{className:"caption",children:t.caption}),(0,p.jsx)("p",{className:"text",children:t.text}),n]})]})};var M=__webpack_require__(16011);const R=s.default.button` border: 1px solid transparent; border-radius: 30px; padding: 9px 24px; font-weight: 500; white-space: nowrap; text-decoration: none; font-size: 15px; line-height: 1.47; background: ${M.AccentColor}; color: white; filter: none; box-shadow: none; transition: all 0.2s ease-in 0s; user-select: none; width: 100%; cursor: pointer; &:hover { background: ${M.AccentColor}; color: white; border: 1px solid transparent; filter: none; box-shadow: rgba(0, 0, 0, 0.2) 0 6px 15px 0; transition: all 0.2s ease-in-out 0s; } .medium { font-size: 15px; padding: 9px 24px; } `,N=s.default.div` margin-top: 24px; `,L=()=>{const{isWalletsErrorPopupOpen:e,closeWalletsErrorPopup:t,getWalletsErrorPopupWalletAddress:r}=_(),n={caption:"Login error",text:(0,p.jsxs)(p.Fragment,{children:["Your account have been deleted. ",(0,p.jsx)("br",{})," Do you want to restore your account?"]}),isNeedShowPopup:!0};return e()?(0,p.jsx)(P,{popupData:n,onClickClose:e=>{t()},children:(0,p.jsx)(N,{children:(0,p.jsx)(R,{className:"medium",onClick:()=>{window.open("https://docs.google.com/forms/d/e/1FAIpQLSf27Yr-WpfZyAa8lQ-Z3VFjpO72rkpwi-4Iz5rVyceIYt9URw/viewform?usp=pp_url&entry.718669868="+r(),"_self")},type:"button",children:"Restore my account"})})}):null};var B=__webpack_require__(15507),D=__webpack_require__(53044);const{useDebugValue:U}=i,{useSyncExternalStoreWithSelector:j}=D;let F=!1;const z=e=>e;const q=e=>{"function"!==typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"===typeof e?(0,B.y)(e):e,r=(e,r)=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z,r=arguments.length>2?arguments[2]:void 0;r&&!F&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),F=!0);const n=j(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return U(n),n}(t,e,r);return Object.assign(r,t),r},H=e=>e?q(e):q;const V=H()((e=>({dataPopup:{title:"",isOpen:!1,node:null},setData:t=>{e({dataPopup:t})}}))),$=s.default.div` position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 8px; max-width: 400px; background-color: ${I}; padding: 32px 40px 16px; display: flex; flex-direction: column; align-items: center; z-index: 10000; ${c.mediaQuery.bigPhone} { max-width: 320px; } .popupCloseBtn { position: absolute; right: 0; top: 0; cursor: pointer; padding: 16px; svg { width: 24px; height: 24px; } } .popupContent { display: flex; gap: 24px; align-items: center; flex-direction: column; max-width: 350px; .caption { margin: 0; color: ${k}; font-weight: 600; text-align: center; font-size: 18px; line-height: 24px; } } `,K=()=>{const{isOpen:e,onClose:t,node:r,onClick:n,title:i}=V((e=>e.dataPopup));return e&&(0,p.jsxs)($,{children:[(0,p.jsx)("div",{className:"popupCloseBtn",onClick:t,children:(0,p.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,p.jsx)("path",{d:"M8.13344 8.01429L16 15.8811M16 8L8 16",stroke:"#6048FF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,p.jsxs)("form",{className:"popupContent",onSubmit:e=>{e.preventDefault(),null===n||void 0===n||n()},children:[(0,p.jsx)("h3",{className:"caption",children:i}),r,(0,p.jsx)("div",{children:(0,p.jsx)(R,{className:"medium",type:"submit",children:"Continue"})})]})]})},W=s.default.div` position: fixed; top: 0; left: 0; z-index: 9999; backdrop-filter: blur(10px); height: 100vh; width: 100%; visibility: ${e=>e.isActive?"visible":"hidden"}; .blur { height: 100%; width: 100%; background-color: ${k}; opacity: ${e=>e.isActive?.6:0}; visibility: ${e=>e.isActive?"visible":"hidden"}; transition: all 0.3s ease-in-out; } `,G=()=>{const{closeOverlay:e,isOverlayActive:t}=_(),r=V((e=>e.setData));return(0,p.jsx)(W,{isActive:t(),onClick:()=>{e(),r({isOpen:!1,title:"",node:null})},children:(0,p.jsx)("div",{className:"blur"})})},Q=s.default.main` width: 1080px; margin: 0 auto; box-sizing: border-box; padding: 108px 0 60px; ${c.mediaQuery.maxWidthTablet} { max-width: 800px; padding: 148px 0 32px; } @media (max-width: 800px) { max-width: 760px; } ${c.mediaQuery.mobile} { box-sizing: border-box; max-width: calc(466px + 40px); width: 100%; padding: 80px 30px 30px; } ${c.mediaQuery.minWidthFourK} { width: ${(0,f.adaptiveValueCalc)(1080)}; padding: ${(0,f.adaptiveValueCalc)(108)} 0 ${(0,f.adaptiveValueCalc)(60)}; } `,Y=e=>{let{children:t}=e;return(0,p.jsxs)(i.Fragment,{children:[(0,p.jsx)(S,{}),(0,p.jsx)(L,{}),(0,p.jsx)(G,{}),(0,p.jsx)(K,{}),(0,p.jsx)(v(),{isNeedToShow:null}),(0,p.jsx)(m,{}),(0,p.jsx)(Q,{children:t})]})};function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function ae(e,t,r,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s=J.Pop,c=null,u=l();function l(){return(a.state||{idx:null}).idx}function d(){s=J.Pop;let e=l(),t=null==e?null:e-u;u=e,c&&c({action:s,location:h.location,delta:t})}function f(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,r="string"===typeof e?e:ie(e);return r=r.replace(/ $/,"%20"),ee(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==u&&(u=0,a.replaceState(Z({},a.state,{idx:u}),""));let h={get action(){return s},get location(){return e(i,a)},listen(e){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(X,d),c=e,()=>{i.removeEventListener(X,d),c=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=J.Push;let n=ne(h.location,e,t);r&&r(n,e),u=l()+1;let d=re(n,u),f=h.createHref(n);try{a.pushState(d,"",f)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;i.location.assign(f)}o&&c&&c({action:s,location:h.location,delta:1})},replace:function(e,t){s=J.Replace;let n=ne(h.location,e,t);r&&r(n,e),u=l();let i=re(n,u),d=h.createHref(n);a.replaceState(i,"",d),o&&c&&c({action:s,location:h.location,delta:0})},go:e=>a.go(e)};return h}var se;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(se||(se={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function ce(e,t,r){return void 0===r&&(r="/"),ue(e,t,r,!1)}function ue(e,t,r,n){let i=Ee(("string"===typeof t?oe(t):t).pathname||"/",r);if(null==i)return null;let o=le(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let a=null;for(let s=0;null==a&&s{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(ee(a.relativePath.startsWith(n),'Absolute route path "'+a.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(n.length));let s=Ie([n,a.relativePath]),c=r.concat(a);e.children&&e.children.length>0&&(ee(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),le(e.children,t,c,s)),(null!=e.path||e.index)&&t.push({path:s,score:be(s,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let n of de(e.path))i(e,t,n);else i(e,t)})),t}function de(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return i?[o,""]:[o];let a=de(n.join("/")),s=[];return s.push(...a.map((e=>""===e?o:[o,e].join("/")))),i&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const fe=/^:[\w-]+$/,he=3,pe=2,ge=1,me=10,ye=-2,ve=e=>"*"===e;function be(e,t){let r=e.split("/"),n=r.length;return r.some(ve)&&(n+=ye),t&&(n+=pe),r.filter((e=>!ve(e))).reduce(((e,t)=>e+(fe.test(t)?he:""===t?ge:me)),n)}function we(e,t,r){void 0===r&&(r=!1);let{routesMeta:n}=e,i={},o="/",a=[];for(let s=0;s(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,n]}(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1),c=n.reduce(((e,t,r)=>{let{paramName:n,isOptional:i}=t;if("*"===n){let e=s[r]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const c=s[r];return e[n]=i&&!c?void 0:(c||"").replace(/%2F/g,"/"),e}),{});return{params:c,pathname:o,pathnameBase:a,pattern:e}}function _e(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return te(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function Ee(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function Se(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function ke(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function xe(e,t){let r=ke(e);return t?r.map(((e,t)=>t===r.length-1?e.pathname:e.pathnameBase)):r.map((e=>e.pathnameBase))}function Ce(e,t,r,n){let i;void 0===n&&(n=!1),"string"===typeof e?i=oe(e):(i=Z({},e),ee(!i.pathname||!i.pathname.includes("?"),Se("?","pathname","search",i)),ee(!i.pathname||!i.pathname.includes("#"),Se("#","pathname","hash",i)),ee(!i.search||!i.search.includes("#"),Se("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let c=function(e,t){void 0===t&&(t="/");let{pathname:r,search:n="",hash:i=""}="string"===typeof e?oe(e):e,o=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:o,search:Oe(n),hash:Pe(i)}}(i,o),u=s&&"/"!==s&&s.endsWith("/"),l=(a||"."===s)&&r.endsWith("/");return c.pathname.endsWith("/")||!u&&!l||(c.pathname+="/"),c}const Ie=e=>e.join("/").replace(/\/\/+/g,"/"),Te=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Oe=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Pe=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Me(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const Re=["post","put","patch","delete"],Ne=(new Set(Re),["get",...Re]);new Set(Ne),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current=!0}));let n=i.useCallback((function(n,i){void 0===i&&(i={}),r.current&&("number"===typeof n?e.navigate(n):e.navigate(n,Le({fromRouteId:t},i)))}),[e,t]);return n}():function(){qe()||ee(!1);let e=i.useContext(Be),{basename:t,future:r,navigator:n}=i.useContext(Ue),{matches:o}=i.useContext(Fe),{pathname:a}=He(),s=JSON.stringify(xe(o,r.v7_relativeSplatPath)),c=i.useRef(!1);return Ve((()=>{c.current=!0})),i.useCallback((function(r,i){if(void 0===i&&(i={}),!c.current)return;if("number"===typeof r)return void n.go(r);let o=Ce(r,JSON.parse(s),a,"path"===i.relative);null==e&&"/"!==t&&(o.pathname="/"===o.pathname?t:Ie([t,o.pathname])),(i.replace?n.replace:n.push)(o,i.state,i)}),[t,n,s,a,e])}()}function Ke(e,t,r,n){qe()||ee(!1);let{navigator:o}=i.useContext(Ue),{matches:a}=i.useContext(Fe),s=a[a.length-1],c=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let l,d=He();if(t){var f;let e="string"===typeof t?oe(t):t;"/"===u||(null==(f=e.pathname)?void 0:f.startsWith(u))||ee(!1),l=e}else l=d;let h=l.pathname||"/",p=h;if("/"!==u){let e=u.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=ce(e,{pathname:p});let m=Ze(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:Ie([u,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:Ie([u,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),a,r,n);return t&&m?i.createElement(je.Provider,{value:{location:Le({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:J.Pop}},m):m}function We(){let e=function(){var e;let t=i.useContext(ze),r=tt(Xe.UseRouteError),n=rt(Xe.UseRouteError);if(void 0!==t)return t;return null==(e=r.errors)?void 0:e[n]}(),t=Me(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n};return i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:o},r):null,null)}const Ge=i.createElement(We,null);class Qe extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?i.createElement(Fe.Provider,{value:this.props.routeContext},i.createElement(ze.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ye(e){let{routeContext:t,match:r,children:n}=e,o=i.useContext(Be);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),i.createElement(Fe.Provider,{value:t},n)}function Ze(e,t,r,n){var o;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===n&&(n=null),null==e){var a;if(!r)return null;if(r.errors)e=r.matches;else{if(!(null!=(a=n)&&a.v7_partialHydration&&0===t.length&&!r.initialized&&r.matches.length>0))return null;e=r.matches}}let s=e,c=null==(o=r)?void 0:o.errors;if(null!=c){let e=s.findIndex((e=>e.route.id&&void 0!==(null==c?void 0:c[e.route.id])));e>=0||ee(!1),s=s.slice(0,Math.min(s.length,e+1))}let u=!1,l=-1;if(r&&n&&n.v7_partialHydration)for(let i=0;i=0?s.slice(0,l+1):[s[0]];break}}}return s.reduceRight(((e,n,o)=>{let a,d=!1,f=null,h=null;var p;r&&(a=c&&n.route.id?c[n.route.id]:void 0,f=n.route.errorElement||Ge,u&&(l<0&&0===o?(p="route-fallback",!1||nt[p]||(nt[p]=!0),d=!0,h=null):l===o&&(d=!0,h=n.route.hydrateFallbackElement||null)));let g=t.concat(s.slice(0,o+1)),m=()=>{let t;return t=a?f:d?h:n.route.Component?i.createElement(n.route.Component,null):n.route.element?n.route.element:e,i.createElement(Ye,{match:n,routeContext:{outlet:e,matches:g,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===o)?i.createElement(Qe,{location:r.location,revalidation:r.revalidation,component:f,error:a,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()}),null)}var Je=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Je||{}),Xe=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Xe||{});function et(e){let t=i.useContext(Be);return t||ee(!1),t}function tt(e){let t=i.useContext(De);return t||ee(!1),t}function rt(e){let t=function(){let e=i.useContext(Fe);return e||ee(!1),e}(),r=t.matches[t.matches.length-1];return r.route.id||ee(!1),r.route.id}const nt={};o.startTransition;function it(e){let{to:t,replace:r,state:n,relative:o}=e;qe()||ee(!1);let{future:a,static:s}=i.useContext(Ue),{matches:c}=i.useContext(Fe),{pathname:u}=He(),l=$e(),d=Ce(t,xe(c,a.v7_relativeSplatPath),u,"path"===o),f=JSON.stringify(d);return i.useEffect((()=>l(JSON.parse(f),{replace:r,state:n,relative:o})),[l,f,o,r,n]),null}function ot(e){ee(!1)}function at(e){let{basename:t="/",children:r=null,location:n,navigationType:o=J.Pop,navigator:a,static:s=!1,future:c}=e;qe()&&ee(!1);let u=t.replace(/^\/*/,"/"),l=i.useMemo((()=>({basename:u,navigator:a,static:s,future:Le({v7_relativeSplatPath:!1},c)})),[u,c,a,s]);"string"===typeof n&&(n=oe(n));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:g="default"}=n,m=i.useMemo((()=>{let e=Ee(d,u);return null==e?null:{location:{pathname:e,search:f,hash:h,state:p,key:g},navigationType:o}}),[u,d,f,h,p,g,o]);return null==m?null:i.createElement(Ue.Provider,{value:l},i.createElement(je.Provider,{children:r,value:m}))}function st(e){let{children:t,location:r}=e;return function(e,t){return Ke(e,t)}(ct(t),r)}new Promise((()=>{}));i.Component;function ct(e,t){void 0===t&&(t=[]);let r=[];return i.Children.forEach(e,((e,n)=>{if(!i.isValidElement(e))return;let o=[...t,n];if(e.type===i.Fragment)return void r.push.apply(r,ct(e.props.children,o));e.type!==ot&&ee(!1),e.props.index&&e.props.children&&ee(!1);let a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=ct(e.props.children,o)),r.push(a)})),r}var ut=__webpack_require__(64868);const lt=ut.basicTabs;var dt=__webpack_require__(72001),ft=__webpack_require__(17119),ht=__webpack_require__.t(ft,2);function pt(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map((e=>[r,e])):[[r,n]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(Nee){}new Map;const gt=o.startTransition;ht.flushSync,o.useId;function mt(e){let{basename:t,children:r,future:n,window:o}=e,a=i.useRef();var s;null==a.current&&(a.current=(void 0===(s={window:o,v5Compat:!0})&&(s={}),ae((function(e,t){let{pathname:r,search:n,hash:i}=e.location;return ne("",{pathname:r,search:n,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:ie(t)}),null,s)));let c=a.current,[u,l]=i.useState({action:c.action,location:c.location}),{v7_startTransition:d}=n||{},f=i.useCallback((e=>{d&>?gt((()=>l(e))):l(e)}),[l,d]);return i.useLayoutEffect((()=>c.listen(f)),[c,f]),i.createElement(at,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:c,future:n})}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var yt,vt;function bt(e){let t=i.useRef(pt(e)),r=i.useRef(!1),n=He(),o=i.useMemo((()=>function(e,t){let r=pt(e);return t&&t.forEach(((e,n)=>{r.has(n)||t.getAll(n).forEach((e=>{r.append(n,e)}))})),r}(n.search,r.current?null:t.current)),[n.search]),a=$e(),s=i.useCallback(((e,t)=>{const n=pt("function"===typeof e?e(o):e);r.current=!0,a("?"+n,t)}),[a,o]);return[o,s]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(yt||(yt={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(vt||(vt={}));const wt=(e,t)=>e.get(t),At=s.default.div` box-sizing: border-box; display: flex; align-items: center; color: ${k}; cursor: pointer; padding: 8px 12px 8px 8px; border-radius: 8px; user-select: none; margin-bottom: 8px; position: relative; ${e=>e.isDisabled?s.css` pointer-events: none; opacity: 0.4; `:""} &:before { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 1px solid ${e=>e.isActive?C:T}; transition: 0.3s border ease-in-out; border-radius: 8px; } &:last-child { margin-bottom: 0; } .img { border-radius: 50%; margin-right: 8px; } .text { color: ${k}; font-size: 15px; font-weight: 500; text-align: center; } &:hover:before { border: 1px solid ${C}; transition: 0.3s border ease-in; } ${c.mediaQuery.bigPhone} { flex-direction: column; margin-bottom: 0; width: 68px; max-width: 68px; padding: 8px 4px; .text { font-size: 12px; font-weight: 400; } .img { margin-right: 0; margin-bottom: 8px; width: 28px; height: 28px; } } ${c.mediaQuery.minWidthFourK} { //margin-right: ${(0,f.adaptiveValueCalc)(43)}; padding: ${(0,f.adaptiveValueCalc)(8)} ${(0,f.adaptiveValueCalc)(12)} ${(0,f.adaptiveValueCalc)(8)} ${(0,f.adaptiveValueCalc)(8)}; border-radius: ${(0,f.adaptiveValueCalc)(8)}; margin-bottom: ${(0,f.adaptiveValueCalc)(8)}; &:before { border: ${(0,f.adaptiveValueCalc)(1)} solid ${e=>e.isActive?C:T}; border-radius: ${(0,f.adaptiveValueCalc)(8)}; } .img { width: ${(0,f.adaptiveValueCalc)(24)}; height: ${(0,f.adaptiveValueCalc)(24)}; margin-right: ${(0,f.adaptiveValueCalc)(8)}; } .text { font-size: ${(0,f.adaptiveValueCalc)(15)}; } &:hover:before { border: ${(0,f.adaptiveValueCalc)(1)} solid ${C}; } } `,_t=e=>{let{tabNavLink:t,activeNavLink:r,setActiveTab:n,isDisabled:i}=e;return(0,p.jsxs)(At,{isActive:r,isDisabled:i,onClick:()=>n?n(t):null,children:[(0,p.jsx)("img",{src:t.icon,width:"24px",height:"24px",alt:t.icon,className:"img"}),(0,p.jsx)("span",{className:"text",children:t.label})]})};var Et=__webpack_require__(79477);const St=(0,s.default)(Et.Flex)` flex-direction: column; position: relative; @media (max-width: 500px) { gap: 8px; flex-wrap: wrap; @media (min-width: 430px) { box-sizing: border-box; padding-left: 20px; padding-right: 20px; justify-content: center; @media (min-width: 470px) { padding-left: 36px; padding-right: 36px; } } } `,kt=e=>{let{tabsData:t,activeTab:r,setActiveTab:n,isNeedDisable:i,signIn:o}=e;const a=["Web2 Login","web2_Login",new d.BlockChainEntity(d.BlockChainKeys.elrond).getBlockChainPrivateLabel(),new d.BlockChainEntity(d.BlockChainKeys.ethereum).getBlockChainPrivateLabel(),new d.BlockChainEntity(d.BlockChainKeys.polygon).getBlockChainPrivateLabel(),new d.BlockChainEntity(d.BlockChainKeys.ton).getBlockChainPrivateLabel()];return(0,p.jsx)(St,{children:t.map((e=>(0,p.jsx)(_t,{activeNavLink:r.privateLabel===e.privateLabel,tabNavLink:e,setActiveTab:n,isDisabled:!a.includes(e.privateLabel)&&i},e.privateLabel)))})},xt=s.default.div` display: ${e=>e.isActive?"block":"none"}; padding-top: 8px; @media(max-width: 500px){ padding-top: 24px; } ${c.mediaQuery.minWidthFourK} { padding-top: ${(0,f.adaptiveValueCalc)(8)}; } `,Ct=e=>{let{isActive:t,children:r}=e;return(0,p.jsx)(xt,{isActive:t,children:t&&r})},It=s.default.div` margin-bottom: 32px; text-align: center; user-select: none; @media (max-width: 767px ) { margin-bottom: 24px; } ${c.mediaQuery.minWidthFourK} { margin-bottom: ${(0,f.adaptiveValueCalc)(32)}; } `,Tt=s.default.h1` font-size: 24px; font-weight: 600; color: ${k}; line-height: 36px; margin: 0 0 16px 0; @media (max-width: 767px ) { font-size: 22px; line-height: 28px; margin-bottom: 8px; } ${c.mediaQuery.minWidthFourK} { font-size: ${(0,f.adaptiveValueCalc)(24)}; line-height: ${(0,f.adaptiveValueCalc)(36)}; margin: 0 0 ${(0,f.adaptiveValueCalc)(16)} 0; } `,Ot=s.default.p` font-size: 18px; font-weight: 600; color: ${x}; line-height: 26px; margin: 0; @media (max-width: 767px ) { font-size: 16px; line-height: 22px; } @media (max-width: 500px ) { max-width: 270px; margin: 0 auto; } ${c.mediaQuery.minWidthFourK} { font-size: ${(0,f.adaptiveValueCalc)(18)}; line-height: ${(0,f.adaptiveValueCalc)(26)}; } `,Pt=e=>{let{mainText:t,subText:r}=e;return(0,p.jsxs)(It,{children:[(0,p.jsx)(Tt,{children:t}),(0,p.jsx)(Ot,{children:r})]})},Mt=s.default.div` display: flex; justify-content: center; ${c.mediaQuery.bigPhone} { flex-direction: column; } ${St} { flex-direction: column; margin-right: 43px; ${c.mediaQuery.bigPhone} { flex-flow: wrap; flex-direction: row; margin-right: 0; justify-content: space-around; margin-bottom: 8px; } ${c.mediaQuery.minWidthFourK} { margin-right: ${(0,f.adaptiveValueCalc)(43)}; } } .wallets { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; position: sticky; top: 10px; ${c.mediaQuery.minWidthFourK} { gap: ${(0,f.adaptiveValueCalc)(16)}; top: ${(0,f.adaptiveValueCalc)(10)}; } ${c.mediaQuery.tablets} { grid-template-columns: 1fr 1fr; margin: 0; } ${c.mediaQuery.mobile} { gap: 12px; } ${c.mediaQuery.bigPhone} { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; } `,Rt=e=>{let{tabsData:t,children:r,activeTab:n,setActiveTab:i,mainText:o,isNeedDisable:a,signIn:s}=e;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Pt,{mainText:o,subText:"Choose blockchain and wallet you want to connect"}),(0,p.jsxs)(Mt,{children:[(0,p.jsx)(kt,{isNeedDisable:a,activeTab:n,setActiveTab:i,tabsData:t,signIn:s}),t.map(((e,t)=>(0,p.jsx)(Ct,{isActive:n.privateLabel===e.privateLabel,children:(0,p.jsx)("div",{className:"wallets",children:r})},e.privateLabel)))]})]})};var Nt=__webpack_require__(1964),Lt=__webpack_require__.n(Nt);const Bt=async e=>{const t=Lt().utils.toHex(e);await window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:t,chainName:"Binance Smart Chain",nativeCurrency:{name:"Binance Coin",symbol:"BNB",decimals:18},rpcUrls:["https://bsc-dataseed.binance.org/"],blockExplorerUrls:["https://bscscan.com"]}]}).catch((e=>{console.log(e)}))},Dt=async e=>{const t=Lt().utils.toHex(e);await window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:t,chainName:"Matic(Polygon) Mainnet",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:["https://polygon-rpc.com"],blockExplorerUrls:["https://www.polygonscan.com"]}]}).catch((e=>{console.log(e)}))},Ut=e=>/Profile .* was deleted/.test(e),jt=()=>{const{openWalletsErrorPopup:e}=_(),[t]=dt.identitySchema.useSignInElrondMutation({context:{uri:dt.hosts.identityHost},onError:(t,r)=>{var n;Ut(t.message)&&e(null===r||void 0===r||null===(n=r.variables)||void 0===n?void 0:n.address)}});return{signInElrond:async function(e){let{signature:r,address:n}=e;const{data:i}=await t({variables:{signature:r,address:n}});if(i){const{userId:e,wallets:t,tokens:r,newUser:n,inviteCode:o,role:a}=i.signInElrond;return{userId:e,wallets:t,tokens:r,newUser:n,inviteCode:o,role:a}}}}};var Ft=__webpack_require__(37740),zt=__webpack_require__(34206);const qt=()=>{const[e,{error:t}]=(0,Ft.n)(dt.identitySchema.CreateNonceDocument,{context:{uri:dt.hosts.identityHost},onError:e=>{console.error(e)}}),{openAlert:r}=_();return{createNonce:async function(t,n,i){let o;o="ethereum"===n?t.toLowerCase():t;try{const{data:{createNonce:t}}=await e({variables:{address:o,blockchain:n,chainId:i}});return t}catch(a){console.log(a),r({type:zt.alertVariants.error,caption:"Oops, something went wrong."})}},error:t}},Ht=e=>{let{name:t,imgName:r,src:n}=e;return(0,p.jsxs)("div",{className:"wallet-btn_content",children:[(0,p.jsx)("img",{className:"wallet-btn_content--img",src:n||`${(0,d.getStaticDomain)({ENV:"ludo.com"})}/wallets/regular/${r}.svg`,alt:"wallet"}),(0,p.jsx)("p",{className:"wallet-btn_content--name",children:t})]})},Vt=s.default.div` .wallet-btn { background-color: transparent; outline: none; border-radius: 8px; border: 1px solid ${C}; transition: 0.2s ease-in; cursor: pointer; padding: 0; margin: 0; box-sizing: border-box; width: 138px; &:hover { background-color: ${I}; border-color: ${C}; } &:focus { background-color: ${I}; border-color: ${C}; box-shadow: none; } &_content { display: flex; align-items: center; justify-content: space-between; flex-direction: column; padding: 16px 24px; width: 86px; height: 76px; &--img { width: 44px; height: 44px; } &--name { color: ${k}; font-size: 15px; font-weight: 500; line-height: 22px; margin: 0; } } } ${c.mediaQuery.minWidthFourK} { //padding-top: ${(0,f.adaptiveValueCalc)(8)}; .wallet-btn { border-radius: ${(0,f.adaptiveValueCalc)(8)}; border: ${(0,f.adaptiveValueCalc)(1)} solid ${C}; width: ${(0,f.adaptiveValueCalc)(138)}; &_content { padding: ${(0,f.adaptiveValueCalc)(16)} ${(0,f.adaptiveValueCalc)(24)}; width: ${(0,f.adaptiveValueCalc)(86)}; height: ${(0,f.adaptiveValueCalc)(76)}; &--img { width: ${(0,f.adaptiveValueCalc)(44)}; height: ${(0,f.adaptiveValueCalc)(44)}; } &--name { font-size: ${(0,f.adaptiveValueCalc)(15)}; line-height: ${(0,f.adaptiveValueCalc)(22)}; } } } } `,$t=e=>{let{imgName:t,name:r,onSignIn:n,src:i}=e;return(0,p.jsx)(Vt,{children:(0,p.jsx)("button",{className:"wallet-btn",onClick:e=>{e.preventDefault(),e.stopPropagation(),n()},children:(0,p.jsx)(Ht,{name:r,imgName:t,src:i})})})};var Kt=__webpack_require__(73701),Wt=__webpack_require__(72430),Gt=__webpack_require__(88021),Qt=__webpack_require__(34101),Yt=__webpack_require__.n(Qt);const Zt=s.default.a` display: flex; padding: 10px; border-radius: 30px; margin-top: 16px; background: linear-gradient(36deg, #4f44e9 25.54%, #28c9f5 84.93%) !important; border: none !important; font-weight: 700; color: ${M.WhiteColor}; text-decoration: none; gap: 8px; align-items: center; justify-content: center; width: 240px; height: 40px; font-size: 20px; svg { width: 20px; height: 20px; } `,Jt=s.default.div` position: fixed; top: 0; left: 0; z-index: 10000; height: 100vh; width: 100%; `,Xt=s.default.div` display: flex; flex-direction: column; align-items: center; z-index: 10001; padding: 40px; background-color: ${M.WhiteColor}; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 30px; text-align: center; @media (max-width: 767px) { padding: 32px 0; border-radius: 0; max-width: none; width: 100%; height: 100%; top: 0; left: 0; right: 0; bottom: 0; transform: none; } .modalCloseIcon { position: absolute; top: 16px; right: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; background: unset; border: unset; padding: 0; svg { width: 32px; height: 32px; } } .codeWrapper { display: flex; align-items: center; justify-content: center; width: 290px; height: 290px; margin-top: 24px; } .qrcode { display: flex; width: inherit; height: inherit; svg { width: inherit; height: inherit; } } `,er=s.keyframes` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,tr=s.default.div` display: flex; width: 50%; height: 50%; animation: ${er} 1s ease-in-out infinite; svg { width: 100%; height: 100%; } `,rr=e=>{let{signIn:t,setAuthMultiversXWallet:r}=e;const[n]=bt(),{createNonce:o}=qt(),{signInElrond:a}=jt(),{openAlert:s,closeOverlay:c,openOverLay:u}=_(),[d,f]=(0,i.useState)(""),[g,m]=(0,i.useState)(!1),[y,v]=(0,i.useState)(!1),[b,w]=(0,i.useState)(""),A=()=>{v(!1),f(""),w(""),c(),(0,l.rootRemoveOverflow)()},E=(0,i.useCallback)((async()=>{v(!0),m(!0),u(),(0,l.rootAddOverflow)();const e=new Kt.WalletConnectV2Provider({onClientLogin:async function(){A();const i=await e.getAddress();console.log("Address:",i),o(i,"elrond","").then((async o=>{const c=new Wt.SignableMessage({message:Buffer.from(o)}),u=(await e.signMessage(c)).signature.toString();if(u)if(t)a({signature:u,address:i}).then((e=>{r(i),t(e)})).catch((e=>{console.error("signInElrond",e),s({type:zt.alertVariants.error,caption:"Oops, something went wrong."})}));else{const e=wt(n,"fallback_url");window.open(`${h.ludoDomains.prod.app}/redirect/addWallet/multiversX?fallBackUrl=${e}&signature=${u}&address=${i}&walletType=elrond`,"_self")}})).catch((e=>{console.error(e),s({type:zt.alertVariants.error,caption:"Oops, something went wrong."})})).finally((()=>{e.logout()}))},onClientLogout:async function(){console.log("onClientLogout()")},onClientEvent:async function(e){console.log("onClientEvent()",e)}},"1","wss://relay.walletconnect.com","8f84ac4e29f22de3f8e1163a89e4ea9a",{metadata:{name:"auth.ludo.com",description:"",url:"https://auth.ludo.com",icons:[]}});try{await e.init();const{uri:t,approval:r}=await e.connect(),n=await Gt.toString(t,{type:"svg"});if(!n)return A(),void s({type:zt.alertVariants.error,caption:"Oops, something went wrong."});f(n),w(`\n https://maiar.page.link/?apn=com.multiversx.maiar.wallet&isi=1519405832&ibi=com.multiversx.maiar.wallet&link=https://maiar.com/?wallet-connect=${encodeURIComponent(t)}\n `),m(!1),await e.login({approval:r})}catch(Nee){A(),s({type:zt.alertVariants.error,caption:"Oops, something went wrong."})}}),[]),S=function(){var e,t;return"iOS"===(null===Yt()||void 0===Yt()||null===(e=Yt().os)||void 0===e?void 0:e.family)||"Android"===(null===Yt()||void 0===Yt()||null===(t=Yt().os)||void 0===t?void 0:t.family)}();return(0,p.jsxs)(p.Fragment,{children:[y&&(0,p.jsxs)(l.PortalCreator,{children:[(0,p.jsx)(Jt,{onClick:A}),(0,p.jsxs)(Xt,{children:[(0,p.jsx)("button",{type:"button",onClick:A,className:"modalCloseIcon",children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("path",{d:"M8.13344 8.01429L16 15.8811M16 8L8 16",stroke:"#6048FF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})})}),(0,p.jsx)(Tt,{children:"Login with the xPortal App"}),(0,p.jsx)(Ot,{children:"Scan the QR code using the xPortal App"}),(0,p.jsxs)("div",{className:"codeWrapper",children:[!g&&d&&(0,p.jsx)("div",{className:"qrcode",dangerouslySetInnerHTML:{__html:d}}),g&&(0,p.jsx)(tr,{children:(0,p.jsx)("svg",{width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("path",{d:"M18 29C24.0751 29 29 24.0751 29 18H32C32 25.732 25.732 32 18 32C10.268 32 4 25.732 4 18C4 10.268 10.268 4 18 4V7C11.9249 7 7 11.9249 7 18C7 24.0751 11.9249 29 18 29Z",fill:"#6048FF"})})})]}),S&&b&&(0,p.jsxs)(Zt,{id:"accessWalletBtn",href:b,rel:"noopener noreferrer nofollow",target:"_blank",children:[(0,p.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 31.114 44.981",width:"16",height:"16",children:(0,p.jsx)("g",{transform:"translate(-47.168 -21.519)",children:(0,p.jsxs)("g",{transform:"translate(-247.872 -130.693)",children:[(0,p.jsx)("path",{d:"M355.676,152.213l-3.832,17.8h-9.661Z",transform:"translate(-40.089 1)","fill-rule":"evenodd",fill:"#fff"}),(0,p.jsx)("path",{d:"M326.45,271.184l-7.053,9.379H295.04l7.054-9.379Z",transform:"translate(0 -101.17)","fill-rule":"evenodd",fill:"#fff"}),(0,p.jsx)("path",{d:"M381.139,333.864l-13.493,17.8,3.832-17.8Z",transform:"translate(-61.742 -155.472)","fill-rule":"evenodd",fill:"#fff"})]})})}),"xPortal App"]})]})]}),(0,p.jsx)($t,{imgName:"elrond",name:"xPortal",onSignIn:E})]})};var nr=__webpack_require__(96968);const ir=e=>{let{signIn:t,setAuthMultiversXWallet:r}=e;const{createNonce:n}=qt(),{signInElrond:o}=jt(),[a]=bt(),{openAlert:s}=_(),c=(0,i.useCallback)((async()=>{if(!(()=>{var e;return Boolean(null===(e=window)||void 0===e?void 0:e.elrondWallet)})())return void window.open((0,l.isFirefox)()?"https://addons.mozilla.org/en-US/firefox/addon/multiversx-defi-wallet":"https://chrome.google.com/webstore/detail/multiversx-defi-wallet/dngmlblcodfobpdpecaadgfbcggfjfnm","_blank");const e=nr.ExtensionProvider.getInstance();await e.init();const{address:i}=await e.login();n(i,"elrond","").then((async n=>{const c=(await e.signMessage({data:n})).signature.toString();if(c)if(t)o({signature:c,address:i}).then((e=>{r(i),t(e)})).catch((e=>{console.error("signInElrond",e),s({type:zt.alertVariants.error,caption:"Oops, something went wrong."})}));else{const e=wt(a,"fallback_url");window.open(`${h.ludoDomains.prod.app}/redirect/addWallet/multiversX?fallBackUrl=${e}&signature=${c}&address=${i}&walletType=elrond`,"_self")}})).catch((e=>{console.error(e),s({type:zt.alertVariants.error,caption:"Oops, something went wrong."})})).finally((()=>{e.logout()}))}),[]);return(0,p.jsx)($t,{imgName:"elrond",name:"MultiversX",onSignIn:c})},or=e=>{let{signIn:t,setAuthMultiversXWallet:r}=e;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(rr,{signIn:t,setAuthMultiversXWallet:r}),(0,p.jsx)(ir,{signIn:t,setAuthMultiversXWallet:r})]})};var ar=__webpack_require__(41377),sr=__webpack_require__(49757),cr=__webpack_require__.n(sr),ur="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{},lr={exports:{}};!function(e){var t=void 0!==ur?ur:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==ur?ur:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var o={exports:{}};!function(e,t){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,n="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,o="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in r,s="ArrayBuffer"in r;if(s)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function m(e){var t=new FileReader,r=g(t);return t.readAsArrayBuffer(e),r}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(m)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=g(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var n=/([?&])_=[^&]*/;n.test(this.url)?this.url=this.url.replace(n,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function A(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function _(e,t){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},v.call(w.prototype),v.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];_.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,n){return new Promise((function(i,a){var c=new w(e,n);if(c.signal&&c.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var e,t,r={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout((function(){i(new _(n,r))}),0)},u.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){a(new t.DOMException("Aborted","AbortError"))}),0)},u.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?u.withCredentials=!0:"omit"===c.credentials&&(u.withCredentials=!1),"responseType"in u&&(o?u.responseType="blob":s&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof h?c.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){u.setRequestHeader(e,d(n.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&c.signal.removeEventListener("abort",l)}),u.send(void 0===c._bodyInit?null:c._bodyInit)}))}S.polyfill=!0,r.fetch||(r.fetch=S,r.Headers=h,r.Request=w,r.Response=_),t.Headers=h,t.Request=w,t.Response=_,t.fetch=S}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(o,o.exports);var a=n(o.exports),s=[],c=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,l=!1;function d(){l=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)s[t]=e[t],c[e.charCodeAt(t)]=t;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63}function f(e,t,r){for(var n,i,o=[],a=t;a>18&63]+s[i>>12&63]+s[i>>6&63]+s[63&i]);return o.join("")}function h(e){var t;l||d();for(var r=e.length,n=r%3,i="",o=[],a=16383,c=0,u=r-n;cu?u:c+a));return 1===n?(t=e[r-1],i+=s[t>>2],i+=s[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=s[t>>10],i+=s[t>>4&63],i+=s[t<<2&63],i+="="),o.push(i),o.join("")}function p(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<>1,l=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+d],d+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=u}return(h?-1:1)*a*Math.pow(2,o-n)}function g(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,u-=8);e[r+h-p]|=128*g}var m={}.toString,y=Array.isArray||function(e){return"[object Array]"==m.call(e)};A.TYPED_ARRAY_SUPPORT=void 0===t.TYPED_ARRAY_SUPPORT||t.TYPED_ARRAY_SUPPORT;var v=b();function b(){return A.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function w(e,t){if(b()=b())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+b().toString(16)+" bytes");return 0|e}function C(e){return!(null==e||!e._isBuffer)}function I(e,t){if(C(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return te(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return re(e).length;default:if(n)return te(e).length;t=(""+t).toLowerCase(),n=!0}}function T(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return V(this,t,r);case"utf8":case"utf-8":return F(this,t,r);case"ascii":return q(this,t,r);case"latin1":case"binary":return H(this,t,r);case"base64":return j(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function O(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function P(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=A.from(t,n)),C(t))return 0===t.length?-1:M(e,t,r,n,i);if("number"==typeof t)return t&=255,A.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):M(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function M(e,t,r,n,i){var o,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;os&&(r=s-c),o=r;o>=0;o--){for(var d=!0,f=0;fi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function j(e,t,r){return 0===t&&r===e.length?h(e):h(e.slice(t,r))}function F(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=r)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=d}return function(e){var t=e.length;if(t<=z)return String.fromCharCode.apply(String,e);for(var r="",n=0;n0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},A.prototype.compare=function(e,t,r,n,i){if(!C(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return R(this,e,t,r);case"utf8":case"utf-8":return N(this,e,t,r);case"ascii":return L(this,e,t,r);case"latin1":case"binary":return B(this,e,t,r);case"base64":return D(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var z=4096;function q(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function W(e,t,r,n,i,o){if(!C(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function G(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function Q(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function Y(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Z(e,t,r,n,i){return i||Y(e,0,r,4),g(e,t,r,n,23,4),r+4}function J(e,t,r,n,i){return i||Y(e,0,r,8),g(e,t,r,n,52,8),r+8}A.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},A.prototype.readUInt8=function(e,t){return t||K(e,1,this.length),this[e]},A.prototype.readUInt16LE=function(e,t){return t||K(e,2,this.length),this[e]|this[e+1]<<8},A.prototype.readUInt16BE=function(e,t){return t||K(e,2,this.length),this[e]<<8|this[e+1]},A.prototype.readUInt32LE=function(e,t){return t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},A.prototype.readUInt32BE=function(e,t){return t||K(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},A.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||K(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},A.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||K(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},A.prototype.readInt8=function(e,t){return t||K(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},A.prototype.readInt16LE=function(e,t){t||K(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},A.prototype.readInt16BE=function(e,t){t||K(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},A.prototype.readInt32LE=function(e,t){return t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},A.prototype.readInt32BE=function(e,t){return t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},A.prototype.readFloatLE=function(e,t){return t||K(e,4,this.length),p(this,e,!0,23,4)},A.prototype.readFloatBE=function(e,t){return t||K(e,4,this.length),p(this,e,!1,23,4)},A.prototype.readDoubleLE=function(e,t){return t||K(e,8,this.length),p(this,e,!0,52,8)},A.prototype.readDoubleBE=function(e,t){return t||K(e,8,this.length),p(this,e,!1,52,8)},A.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||W(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},A.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||W(this,e,t,1,255,0),A.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||W(this,e,t,2,65535,0),A.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):G(this,e,t,!0),t+2},A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||W(this,e,t,2,65535,0),A.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):G(this,e,t,!1),t+2},A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||W(this,e,t,4,4294967295,0),A.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Q(this,e,t,!0),t+4},A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||W(this,e,t,4,4294967295,0),A.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Q(this,e,t,!1),t+4},A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);W(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},A.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||W(this,e,t,1,127,-128),A.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},A.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||W(this,e,t,2,32767,-32768),A.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):G(this,e,t,!0),t+2},A.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||W(this,e,t,2,32767,-32768),A.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):G(this,e,t,!1),t+2},A.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||W(this,e,t,4,2147483647,-2147483648),A.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Q(this,e,t,!0),t+4},A.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||W(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),A.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Q(this,e,t,!1),t+4},A.prototype.writeFloatLE=function(e,t,r){return Z(this,e,t,!0,r)},A.prototype.writeFloatBE=function(e,t,r){return Z(this,e,t,!1,r)},A.prototype.writeDoubleLE=function(e,t,r){return J(this,e,t,!0,r)},A.prototype.writeDoubleBE=function(e,t,r){return J(this,e,t,!1,r)},A.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!A.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function re(e){return function(e){var t,r,n,i,o,a;l||d();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new u(3*s/4-o),n=o>0?s-4:s;var f=0;for(t=0,r=0;t>16&255,a[f++]=i>>8&255,a[f++]=255&i;return 2===o?(i=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,a[f++]=255&i):1===o&&(i=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,a[f++]=i>>8&255,a[f++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(X,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function ne(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ie(e){return null!=e&&(!!e._isBuffer||oe(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&oe(e.slice(0,0))}(e))}function oe(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var ae=Object.freeze({__proto__:null,Buffer:A,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),A.alloc(+e)},isBuffer:ie,kMaxLength:v}),se={},ce={},ue={},le=i(ae),de={};function fe(){throw new Error("setTimeout has not been defined")}function he(){throw new Error("clearTimeout has not been defined")}var pe=fe,ge=he;function me(e){if(pe===setTimeout)return setTimeout(e,0);if((pe===fe||!pe)&&setTimeout)return pe=setTimeout,setTimeout(e,0);try{return pe(e,0)}catch(t){try{return pe.call(null,e,0)}catch(t){return pe.call(this,e,0)}}}"function"==typeof t.setTimeout&&(pe=setTimeout),"function"==typeof t.clearTimeout&&(ge=clearTimeout);var ye,ve=[],be=!1,we=-1;function Ae(){be&&ye&&(be=!1,ye.length?ve=ye.concat(ve):we=-1,ve.length&&_e())}function _e(){if(!be){var e=me(Ae);be=!0;for(var t=ve.length;t;){for(ye=ve,ve=[];++we1)for(var r=1;r4294967295)throw new RangeError("requested too many random bytes");var r=qe.allocUnsafe(e);if(e>0)if(e>ze)for(var n=0;n0&&a.length>i){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(s)}}else a=o[t]=r,++e._eventsCount;return e}function Je(e,t,r){var n=!1;function i(){e.removeListener(t,i),n||(n=!0,r.apply(e,arguments))}return i.listener=r,i}function Xe(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function et(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}Ge.prototype=Object.create(null),Qe.EventEmitter=Qe,Qe.usingDomains=!1,Qe.prototype.domain=void 0,Qe.prototype._events=void 0,Qe.prototype._maxListeners=void 0,Qe.defaultMaxListeners=10,Qe.init=function(){this.domain=null,Qe.usingDomains&&(void 0).active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Ge,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Qe.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},Qe.prototype.getMaxListeners=function(){return Ye(this)},Qe.prototype.emit=function(e){var t,r,n,i,o,a,s,c="error"===e;if(a=this._events)c=c&&null==a.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(r=a[e]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=et(e,n),o=0;o0;)if(r[o]===t||r[o].listener&&r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new Ge,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,i=e.length;n0?Reflect.ownKeys(this._events):[]};var tt=i(Object.freeze({__proto__:null,EventEmitter:Qe,default:Qe})),rt=tt.EventEmitter,nt="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e},it=/%[sdj%]/g;function ot(e){if(!At(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),a=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),yt(t)?r.showHidden=t:t&&Lt(r,t),Et(r.showHidden)&&(r.showHidden=!1),Et(r.depth)&&(r.depth=2),Et(r.colors)&&(r.colors=!1),Et(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=dt),ht(r,e,r.depth)}function dt(e,t){var r=lt.styles[t];return r?"\x1b["+lt.colors[r][0]+"m"+e+"\x1b["+lt.colors[r][1]+"m":e}function ft(e,t){return e}function ht(e,t,r){if(e.customInspect&&t&&It(t.inspect)&&t.inspect!==lt&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(r,e);return At(n)||(n=ht(e,n,r)),n}var i=function(e,t){if(Et(t))return e.stylize("undefined","undefined");if(At(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return wt(t)?e.stylize(""+t,"number"):yt(t)?e.stylize(""+t,"boolean"):vt(t)?e.stylize("null","null"):void 0}(e,t);if(i)return i;var o=Object.keys(t),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),Ct(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return pt(t);if(0===o.length){if(It(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(St(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(xt(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Ct(t))return pt(t)}var c,u="",l=!1,d=["{","}"];return mt(t)&&(l=!0,d=["[","]"]),It(t)&&(u=" [Function"+(t.name?": "+t.name:"")+"]"),St(t)&&(u=" "+RegExp.prototype.toString.call(t)),xt(t)&&(u=" "+Date.prototype.toUTCString.call(t)),Ct(t)&&(u=" "+pt(t)),0!==o.length||l&&0!=t.length?r<0?St(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=l?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,u,d)):d[0]+u+d[1]}function pt(e){return"["+Error.prototype.toString.call(e)+"]"}function gt(e,t,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),Bt(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=vt(r)?ht(e,c.value,null):ht(e,c.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),Et(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=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function mt(e){return Array.isArray(e)}function yt(e){return"boolean"==typeof e}function vt(e){return null===e}function bt(e){return null==e}function wt(e){return"number"==typeof e}function At(e){return"string"==typeof e}function _t(e){return"symbol"==typeof e}function Et(e){return void 0===e}function St(e){return kt(e)&&"[object RegExp]"===Pt(e)}function kt(e){return"object"==typeof e&&null!==e}function xt(e){return kt(e)&&"[object Date]"===Pt(e)}function Ct(e){return kt(e)&&("[object Error]"===Pt(e)||e instanceof Error)}function It(e){return"function"==typeof e}function Tt(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function Ot(e){return ie(e)}function Pt(e){return Object.prototype.toString.call(e)}function Mt(e){return e<10?"0"+e.toString(10):e.toString(10)}lt.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]},lt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var Rt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Nt(){console.log("%s - %s",function(){var e=new Date,t=[Mt(e.getHours()),Mt(e.getMinutes()),Mt(e.getSeconds())].join(":");return[e.getDate(),Rt[e.getMonth()],t].join(" ")}(),ot.apply(null,arguments))}function Lt(e,t){if(!t||!kt(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}function Bt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Dt,Ut,jt={inherits:nt,_extend:Lt,log:Nt,isBuffer:Ot,isPrimitive:Tt,isFunction:It,isError:Ct,isDate:xt,isObject:kt,isRegExp:St,isUndefined:Et,isSymbol:_t,isString:At,isNumber:wt,isNullOrUndefined:bt,isNull:vt,isBoolean:yt,isArray:mt,inspect:lt,deprecate:at,format:ot,debuglog:ut},Ft=i(Object.freeze({__proto__:null,_extend:Lt,debuglog:ut,default:jt,deprecate:at,format:ot,inherits:nt,inspect:lt,isArray:mt,isBoolean:yt,isBuffer:Ot,isDate:xt,isError:Ct,isFunction:It,isNull:vt,isNullOrUndefined:bt,isNumber:wt,isObject:kt,isPrimitive:Tt,isRegExp:St,isString:At,isSymbol:_t,isUndefined:Et,log:Nt}));function zt(e,t){Ht(e,t),qt(e)}function qt(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Ht(e,t){e.emit("error",t)}var Vt={destroy:function(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Ee(Ht,this,e)):Ee(Ht,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?Ee(qt,r):(r._writableState.errorEmitted=!0,Ee(zt,r,e)):Ee(zt,r,e):t?(Ee(qt,r),t(e)):Ee(qt,r)})),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(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}},$t={},Kt={};function Wt(e,t,r){r||(r=Error);var n=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);n.prototype.name=r.name,n.prototype.code=e,Kt[e]=n}function Gt(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}Wt("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),Wt("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,o;if("string"==typeof t&&(i="not ",t.substr(0,4)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))o="The ".concat(e," ").concat(n," ").concat(Gt(t,"type"));else{var a=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+1>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";o='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(Gt(t,"type"))}return o+". Received type ".concat(typeof r)}),TypeError),Wt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Wt("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),Wt("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Wt("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),Wt("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Wt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Wt("ERR_STREAM_WRITE_AFTER_END","write after end"),Wt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Wt("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),Wt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$t.codes=Kt;var Qt,Yt,Zt,Jt,Xt=$t.codes.ERR_INVALID_OPT_VALUE,er={getHighWaterMark:function(e,t,r,n){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,n,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new Xt(n?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}},tr=function(e,t){if(rr("noDeprecation"))return e;var r=!1;return function(){if(!r){if(rr("throwDeprecation"))throw new Error(t);rr("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}};function rr(e){try{if(!r.localStorage)return!1}catch(e){return!1}var t=r.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}function nr(){if(Yt)return Qt;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var t;Yt=1,Qt=_,_.WritableState=A;var n,i=tr,o=rt,a=le.Buffer,s=(void 0!==r?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=Vt,u=er.getHighWaterMark,l=$t.codes,d=l.ERR_INVALID_ARG_TYPE,f=l.ERR_METHOD_NOT_IMPLEMENTED,h=l.ERR_MULTIPLE_CALLBACK,p=l.ERR_STREAM_CANNOT_PIPE,g=l.ERR_STREAM_DESTROYED,m=l.ERR_STREAM_NULL_VALUES,y=l.ERR_STREAM_WRITE_AFTER_END,v=l.ERR_UNKNOWN_ENCODING,b=c.errorOrDestroy;function w(){}function A(r,n,i){t=t||ir(),r=r||{},"boolean"!=typeof i&&(i=n instanceof t),this.objectMode=!!r.objectMode,i&&(this.objectMode=this.objectMode||!!r.writableObjectMode),this.highWaterMark=u(this,r,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===r.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new h;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(Ee(i,n),Ee(I,e,t),e._writableState.errorEmitted=!0,b(e,n)):(i(n),e._writableState.errorEmitted=!0,b(e,n),I(e,t))}(e,r,n,t,i);else{var o=x(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||k(e,r),n?Ee(S,e,r,o,i):S(e,r,o,i)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==r.emitClose,this.autoDestroy=!!r.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function _(e){var r=this instanceof(t=t||ir());if(!r&&!n.call(_,this))return new _(e);this._writableState=new A(e,this,r),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function E(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new g("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function S(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),I(e,t)}function k(t,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(t._writev&&n&&n.next){var i=r.bufferedRequestCount,o=new Array(i),a=r.corkedRequestsFree;a.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,E(t,r,!0,r.length,o,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,d=n.callback;if(E(t,r,!1,r.objectMode?1:u.length,u,l,d),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),I(e,t)}))}function I(e,t){var r=x(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,Ee(C,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}return Ke(_,o),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:i((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(e){return!!n.call(this,e)||this===_&&e&&e._writableState instanceof A}})):n=function(e){return e instanceof this},_.prototype.pipe=function(){b(this,new p)},_.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,c=!i.objectMode&&(n=e,a.isBuffer(n)||n instanceof s);return c&&!a.isBuffer(e)&&(e=function(e){return a.from(e)}(e)),"function"==typeof t&&(r=t,t=null),c?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=w),i.ending?function(e,t){var r=new y;b(e,r),Ee(t,r)}(this,r):(c||function(e,t,r,n){var i;return null===r?i=new m:"string"==typeof r||t.objectMode||(i=new d("chunk",["string","Buffer"],r)),!i||(b(e,i),Ee(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,r)),t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var c=t.objectMode?1:n.length;t.length+=c;var u=t.length-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(_.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(e,t,r){r(new f("_write()"))},_.prototype._writev=null,_.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,I(e,t),r&&(t.finished?Ee(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(_.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),_.prototype.destroy=c.destroy,_.prototype._undestroy=c.undestroy,_.prototype._destroy=function(e,t){t(e)},Qt}function ir(){if(Jt)return Zt;Jt=1;var e=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Zt=a;var t=vr(),r=nr();Ke(a,t);for(var n=e(r.prototype),i=0;i>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function a(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function s(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function l(e){return e&&e.length?this.write(e):""}return ar.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(o>0&&(e.lastNeed=o-1),o):--i=0?(o>0&&(e.lastNeed=o-2),o):--i=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},ar}var cr=$t.codes.ERR_STREAM_PREMATURE_CLOSE;function lr(){}var dr,fr,hr,pr,gr,mr,yr=function e(t,r,n){if("function"==typeof r)return e(t,null,r);r||(r={}),n=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,r,n,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=i,n=s,o.prototype.copy.call(t,r,n),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:s,value:function(e,r){return a(this,t(t({},r),{},{depth:0,customInspect:!1}))}}],i&&n(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),e}(),Dt}(),f=Vt,h=er.getHighWaterMark,p=$t.codes,g=p.ERR_INVALID_ARG_TYPE,m=p.ERR_STREAM_PUSH_AFTER_EOF,y=p.ERR_METHOD_NOT_IMPLEMENTED,v=p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;Ke(_,i);var b=f.errorOrDestroy,w=["error","close","destroy","pause","resume"];function A(t,r,n){e=e||ir(),t=t||{},"boolean"!=typeof n&&(n=r instanceof e),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=h(this,t,"readableHighWaterMark",n),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&&(c||(c=sr().StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function _(t){if(e=e||ir(),!(this instanceof _))return new _(t);var r=this instanceof e;this._readableState=new A(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),i.call(this)}function E(e,r,n,i,s){t("readableAddChunk",r);var c,u=e._readableState;if(null===r)u.reading=!1,function(e,r){if(t("onEofChunk"),!r.ended){if(r.decoder){var n=r.decoder.end();n&&n.length&&(r.buffer.push(n),r.length+=r.objectMode?1:n.length)}r.ended=!0,r.sync?C(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,I(e)))}}(e,u);else if(s||(c=function(e,t){var r,n;return n=t,o.isBuffer(n)||n instanceof a||"string"==typeof t||void 0===t||e.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],t)),r}(u,r)),c)b(e,c);else if(u.objectMode||r&&r.length>0)if("string"==typeof r||u.objectMode||Object.getPrototypeOf(r)===o.prototype||(r=function(e){return o.from(e)}(r)),i)u.endEmitted?b(e,new v):S(e,u,r,!0);else if(u.ended)b(e,new m);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!n?(r=u.decoder.write(r),u.objectMode||0!==r.length?S(e,u,r,!1):T(e,u)):S(e,u,r,!1)}else i||(u.reading=!1,T(e,u));return!u.ended&&(u.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=k?e=k:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var r=e._readableState;t("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(t("emitReadable",r.flowing),r.emittedReadable=!0,Ee(I,e))}function I(e){var r=e._readableState;t("emitReadable_",r.destroyed,r.length,r.ended),r.destroyed||!r.length&&!r.ended||(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,N(e)}function T(e,t){t.readingMore||(t.readingMore=!0,Ee(O,e,t))}function O(e,r){for(;!r.reading&&!r.ended&&(r.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){t("readable nexttick read 0"),e.read(0)}function R(e,r){t("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),N(e),r.flowing&&!r.reading&&e.read(0)}function N(e){var r=e._readableState;for(t("flow",r.flowing);r.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var r=e._readableState;t("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,Ee(D,r,e))}function D(e,r){if(t("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var n=r._writableState;(!n||n.autoDestroy&&n.finished)&&r.destroy()}}function U(e,t){for(var r=0,n=e.length;r=r.highWaterMark:r.length>0)||r.ended))return t("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?B(this):C(this),null;if(0===(e=x(e,r))&&r.ended)return 0===r.length&&B(this),null;var i,o=r.needReadable;return t("need readable",o),(0===r.length||r.length-e0?L(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&B(this)),null!==i&&this.emit("data",i),i},_.prototype._read=function(e){b(this,new y("_read()"))},_.prototype.pipe=function(e,r){var i=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,t("pipe count=%d opts=%j",o.pipesCount,r);var a=r&&!1===r.end||e===De.stdout||e===De.stderr?p:s;function s(){t("onend"),e.end()}o.endEmitted?Ee(a):i.once("end",a),e.on("unpipe",(function r(n,a){t("onunpipe"),n===i&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,t("cleanup"),e.removeListener("close",f),e.removeListener("finish",h),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",r),i.removeListener("end",s),i.removeListener("end",p),i.removeListener("data",l),u=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var r=e._readableState;t("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,0===r.awaitDrain&&n(e,"data")&&(r.flowing=!0,N(e))}}(i);e.on("drain",c);var u=!1;function l(r){t("ondata");var n=e.write(r);t("dest.write",n),!1===n&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==U(o.pipes,e))&&!u&&(t("false write response, pause",o.awaitDrain),o.awaitDrain++),i.pause())}function d(r){t("onerror",r),p(),e.removeListener("error",d),0===n(e,"error")&&b(e,r)}function f(){e.removeListener("finish",h),p()}function h(){t("onfinish"),e.removeListener("close",f),p()}function p(){t("unpipe"),i.unpipe(e)}return i.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",f),e.once("finish",h),e.emit("pipe",i),o.flowing||(t("pipe resume"),i.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,t("on readable",o.length,o.reading),o.length?C(this):o.reading||Ee(M,this))),n},_.prototype.addListener=_.prototype.on,_.prototype.removeListener=function(e,t){var r=i.prototype.removeListener.call(this,e,t);return"readable"===e&&Ee(P,this),r},_.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||Ee(P,this),t},_.prototype.resume=function(){var e=this._readableState;return e.flowing||(t("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Ee(R,e,t))}(this,e)),e.paused=!1,this},_.prototype.pause=function(){return t("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(t("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},_.prototype.wrap=function(e){var r=this,n=this._readableState,i=!1;for(var o in e.on("end",(function(){if(t("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(o){t("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(r.push(o)||(i=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a0,(function(e){n||(n=e),e&&o.forEach(Ur),a||(o.forEach(Ur),i(n))}))}));return t.reduce(jr)};!function(e,t){(t=e.exports=vr()).Stream=t,t.Readable=t,t.Writable=nr(),t.Duplex=ir(),t.Transform=br,t.PassThrough=Pr,t.finished=yr,t.pipeline=Fr}(We,We.exports);var zr=We.exports,qr=Fe().Buffer,Hr=zr.Transform;function Vr(e){Hr.call(this),this._block=qr.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Ke(Vr,Hr),Vr.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},Vr.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},Vr.prototype.update=function(e,t){if(function(e){if(!qr.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");qr.isBuffer(e)||(e=qr.from(e,t));for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var i=this._blockOffset;i0;++o)this._length[o]+=a,(a=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*a);return this},Vr.prototype._update=function(){throw new Error("_update is not implemented")},Vr.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},Vr.prototype._digest=function(){throw new Error("_digest is not implemented")};var $r=Vr,Kr=Ke,Wr=$r,Gr=Fe().Buffer,Qr=new Array(16);function Yr(){Wr.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function Zr(e,t){return e<>>32-t}function Jr(e,t,r,n,i,o,a){return Zr(e+(t&r|~t&n)+i+o|0,a)+t|0}function Xr(e,t,r,n,i,o,a){return Zr(e+(t&n|r&~n)+i+o|0,a)+t|0}function en(e,t,r,n,i,o,a){return Zr(e+(t^r^n)+i+o|0,a)+t|0}function tn(e,t,r,n,i,o,a){return Zr(e+(r^(t|~n))+i+o|0,a)+t|0}Kr(Yr,Wr),Yr.prototype._update=function(){for(var e=Qr,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=Jr(r,n,i,o,e[0],3614090360,7),o=Jr(o,r,n,i,e[1],3905402710,12),i=Jr(i,o,r,n,e[2],606105819,17),n=Jr(n,i,o,r,e[3],3250441966,22),r=Jr(r,n,i,o,e[4],4118548399,7),o=Jr(o,r,n,i,e[5],1200080426,12),i=Jr(i,o,r,n,e[6],2821735955,17),n=Jr(n,i,o,r,e[7],4249261313,22),r=Jr(r,n,i,o,e[8],1770035416,7),o=Jr(o,r,n,i,e[9],2336552879,12),i=Jr(i,o,r,n,e[10],4294925233,17),n=Jr(n,i,o,r,e[11],2304563134,22),r=Jr(r,n,i,o,e[12],1804603682,7),o=Jr(o,r,n,i,e[13],4254626195,12),i=Jr(i,o,r,n,e[14],2792965006,17),r=Xr(r,n=Jr(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=Xr(o,r,n,i,e[6],3225465664,9),i=Xr(i,o,r,n,e[11],643717713,14),n=Xr(n,i,o,r,e[0],3921069994,20),r=Xr(r,n,i,o,e[5],3593408605,5),o=Xr(o,r,n,i,e[10],38016083,9),i=Xr(i,o,r,n,e[15],3634488961,14),n=Xr(n,i,o,r,e[4],3889429448,20),r=Xr(r,n,i,o,e[9],568446438,5),o=Xr(o,r,n,i,e[14],3275163606,9),i=Xr(i,o,r,n,e[3],4107603335,14),n=Xr(n,i,o,r,e[8],1163531501,20),r=Xr(r,n,i,o,e[13],2850285829,5),o=Xr(o,r,n,i,e[2],4243563512,9),i=Xr(i,o,r,n,e[7],1735328473,14),r=en(r,n=Xr(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=en(o,r,n,i,e[8],2272392833,11),i=en(i,o,r,n,e[11],1839030562,16),n=en(n,i,o,r,e[14],4259657740,23),r=en(r,n,i,o,e[1],2763975236,4),o=en(o,r,n,i,e[4],1272893353,11),i=en(i,o,r,n,e[7],4139469664,16),n=en(n,i,o,r,e[10],3200236656,23),r=en(r,n,i,o,e[13],681279174,4),o=en(o,r,n,i,e[0],3936430074,11),i=en(i,o,r,n,e[3],3572445317,16),n=en(n,i,o,r,e[6],76029189,23),r=en(r,n,i,o,e[9],3654602809,4),o=en(o,r,n,i,e[12],3873151461,11),i=en(i,o,r,n,e[15],530742520,16),r=tn(r,n=en(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=tn(o,r,n,i,e[7],1126891415,10),i=tn(i,o,r,n,e[14],2878612391,15),n=tn(n,i,o,r,e[5],4237533241,21),r=tn(r,n,i,o,e[12],1700485571,6),o=tn(o,r,n,i,e[3],2399980690,10),i=tn(i,o,r,n,e[10],4293915773,15),n=tn(n,i,o,r,e[1],2240044497,21),r=tn(r,n,i,o,e[8],1873313359,6),o=tn(o,r,n,i,e[15],4264355552,10),i=tn(i,o,r,n,e[6],2734768916,15),n=tn(n,i,o,r,e[13],1309151649,21),r=tn(r,n,i,o,e[4],4149444226,6),o=tn(o,r,n,i,e[11],3174756917,10),i=tn(i,o,r,n,e[2],718787259,15),n=tn(n,i,o,r,e[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},Yr.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Gr.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};var rn=Yr,nn=le.Buffer,on=Ke,an=$r,sn=new Array(16),cn=[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],un=[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],ln=[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],dn=[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],fn=[0,1518500249,1859775393,2400959708,2840853838],hn=[1352829926,1548603684,1836072691,2053994217,0];function pn(){an.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function gn(e,t){return e<>>32-t}function mn(e,t,r,n,i,o,a,s){return gn(e+(t^r^n)+o+a|0,s)+i|0}function yn(e,t,r,n,i,o,a,s){return gn(e+(t&r|~t&n)+o+a|0,s)+i|0}function vn(e,t,r,n,i,o,a,s){return gn(e+((t|~r)^n)+o+a|0,s)+i|0}function bn(e,t,r,n,i,o,a,s){return gn(e+(t&n|r&~n)+o+a|0,s)+i|0}function wn(e,t,r,n,i,o,a,s){return gn(e+(t^(r|~n))+o+a|0,s)+i|0}on(pn,an),pn.prototype._update=function(){for(var e=sn,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0|this._a,c=0|this._b,u=0|this._c,l=0|this._d,d=0|this._e,f=0;f<80;f+=1){var h,p;f<16?(h=mn(r,n,i,o,a,e[cn[f]],fn[0],ln[f]),p=wn(s,c,u,l,d,e[un[f]],hn[0],dn[f])):f<32?(h=yn(r,n,i,o,a,e[cn[f]],fn[1],ln[f]),p=bn(s,c,u,l,d,e[un[f]],hn[1],dn[f])):f<48?(h=vn(r,n,i,o,a,e[cn[f]],fn[2],ln[f]),p=vn(s,c,u,l,d,e[un[f]],hn[2],dn[f])):f<64?(h=bn(r,n,i,o,a,e[cn[f]],fn[3],ln[f]),p=yn(s,c,u,l,d,e[un[f]],hn[3],dn[f])):(h=wn(r,n,i,o,a,e[cn[f]],fn[4],ln[f]),p=mn(s,c,u,l,d,e[un[f]],hn[4],dn[f])),r=a,a=o,o=gn(i,10),i=n,n=h,s=d,d=l,l=gn(u,10),u=c,c=p}var g=this._b+i+l|0;this._b=this._c+o+d|0,this._c=this._d+a+s|0,this._d=this._e+r+c|0,this._e=this._a+n+u|0,this._a=g},pn.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=nn.alloc?nn.alloc(20):new nn(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};var An=pn,_n={exports:{}},En=Fe().Buffer;function Sn(e,t){this._block=En.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Sn.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=En.from(e,t));for(var r=this._block,n=this._blockSize,i=e.length,o=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},Sn.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var kn=Sn,xn=Ke,Cn=kn,In=Fe().Buffer,Tn=[1518500249,1859775393,-1894007588,-899497514],On=new Array(80);function Pn(){this.init(),this._w=On,Cn.call(this,64,56)}function Mn(e){return e<<30|e>>>2}function Rn(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}xn(Pn,Cn),Pn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Pn.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,c=0;c<16;++c)r[c]=e.readInt32BE(4*c);for(;c<80;++c)r[c]=r[c-3]^r[c-8]^r[c-14]^r[c-16];for(var u=0;u<80;++u){var l=~~(u/20),d=0|((t=n)<<5|t>>>27)+Rn(l,i,o,a)+s+r[u]+Tn[l];s=a,a=o,o=Mn(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},Pn.prototype._hash=function(){var e=In.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e};var Nn=Pn,Ln=Ke,Bn=kn,Dn=Fe().Buffer,Un=[1518500249,1859775393,-1894007588,-899497514],jn=new Array(80);function Fn(){this.init(),this._w=jn,Bn.call(this,64,56)}function zn(e){return e<<5|e>>>27}function qn(e){return e<<30|e>>>2}function Hn(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}Ln(Fn,Bn),Fn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Fn.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,c=0;c<16;++c)r[c]=e.readInt32BE(4*c);for(;c<80;++c)r[c]=(t=r[c-3]^r[c-8]^r[c-14]^r[c-16])<<1|t>>>31;for(var u=0;u<80;++u){var l=~~(u/20),d=zn(n)+Hn(l,i,o,a)+s+r[u]+Un[l]|0;s=a,a=o,o=qn(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},Fn.prototype._hash=function(){var e=Dn.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e};var Vn=Fn,$n=Ke,Kn=kn,Wn=Fe().Buffer,Gn=[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],Qn=new Array(64);function Yn(){this.init(),this._w=Qn,Kn.call(this,64,56)}function Zn(e,t,r){return r^e&(t^r)}function Jn(e,t,r){return e&t|r&(e|t)}function Xn(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function ei(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function ti(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function ri(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}$n(Yn,Kn),Yn.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},Yn.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0|this._f,c=0|this._g,u=0|this._h,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<64;++l)t[l]=ri(t[l-2])+t[l-7]+ti(t[l-15])+t[l-16]|0;for(var d=0;d<64;++d){var f=u+ei(a)+Zn(a,s,c)+Gn[d]+t[d]|0,h=Xn(r)+Jn(r,n,i)|0;u=c,c=s,s=a,a=o+f|0,o=i,i=n,n=r,r=f+h|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=s+this._f|0,this._g=c+this._g|0,this._h=u+this._h|0},Yn.prototype._hash=function(){var e=Wn.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var ni=Yn,ii=Ke,oi=ni,ai=kn,si=Fe().Buffer,ci=new Array(64);function ui(){this.init(),this._w=ci,ai.call(this,64,56)}ii(ui,oi),ui.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},ui.prototype._hash=function(){var e=si.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var li=ui,di=Ke,fi=kn,hi=Fe().Buffer,pi=[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],gi=new Array(160);function mi(){this.init(),this._w=gi,fi.call(this,128,112)}function yi(e,t,r){return r^e&(t^r)}function vi(e,t,r){return e&t|r&(e|t)}function bi(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function wi(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function Ai(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function _i(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function Ei(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function Si(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function ki(e,t){return e>>>0>>0?1:0}di(mi,fi),mi.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},mi.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,s=0|this._fh,c=0|this._gh,u=0|this._hh,l=0|this._al,d=0|this._bl,f=0|this._cl,h=0|this._dl,p=0|this._el,g=0|this._fl,m=0|this._gl,y=0|this._hl,v=0;v<32;v+=2)t[v]=e.readInt32BE(4*v),t[v+1]=e.readInt32BE(4*v+4);for(;v<160;v+=2){var b=t[v-30],w=t[v-30+1],A=Ai(b,w),_=_i(w,b),E=Ei(b=t[v-4],w=t[v-4+1]),S=Si(w,b),k=t[v-14],x=t[v-14+1],C=t[v-32],I=t[v-32+1],T=_+x|0,O=A+k+ki(T,_)|0;O=(O=O+E+ki(T=T+S|0,S)|0)+C+ki(T=T+I|0,I)|0,t[v]=O,t[v+1]=T}for(var P=0;P<160;P+=2){O=t[P],T=t[P+1];var M=vi(r,n,i),R=vi(l,d,f),N=bi(r,l),L=bi(l,r),B=wi(a,p),D=wi(p,a),U=pi[P],j=pi[P+1],F=yi(a,s,c),z=yi(p,g,m),q=y+D|0,H=u+B+ki(q,y)|0;H=(H=(H=H+F+ki(q=q+z|0,z)|0)+U+ki(q=q+j|0,j)|0)+O+ki(q=q+T|0,T)|0;var V=L+R|0,$=N+M+ki(V,L)|0;u=c,y=m,c=s,m=g,s=a,g=p,a=o+H+ki(p=h+q|0,h)|0,o=i,h=f,i=n,f=d,n=r,d=l,r=H+$+ki(l=q+V|0,q)|0}this._al=this._al+l|0,this._bl=this._bl+d|0,this._cl=this._cl+f|0,this._dl=this._dl+h|0,this._el=this._el+p|0,this._fl=this._fl+g|0,this._gl=this._gl+m|0,this._hl=this._hl+y|0,this._ah=this._ah+r+ki(this._al,l)|0,this._bh=this._bh+n+ki(this._bl,d)|0,this._ch=this._ch+i+ki(this._cl,f)|0,this._dh=this._dh+o+ki(this._dl,h)|0,this._eh=this._eh+a+ki(this._el,p)|0,this._fh=this._fh+s+ki(this._fl,g)|0,this._gh=this._gh+c+ki(this._gl,m)|0,this._hh=this._hh+u+ki(this._hl,y)|0},mi.prototype._hash=function(){var e=hi.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var xi=mi,Ci=Ke,Ii=xi,Ti=kn,Oi=Fe().Buffer,Pi=new Array(160);function Mi(){this.init(),this._w=Pi,Ti.call(this,128,112)}Ci(Mi,Ii),Mi.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},Mi.prototype._hash=function(){var e=Oi.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var Ri=Mi,Ni=_n.exports=function(e){e=e.toLowerCase();var t=Ni[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};Ni.sha=Nn,Ni.sha1=Vn,Ni.sha224=li,Ni.sha256=ni,Ni.sha384=Ri,Ni.sha512=xi;var Li=_n.exports;function Bi(){this.head=null,this.tail=null,this.length=0}Bi.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},Bi.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},Bi.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},Bi.prototype.clear=function(){this.head=this.tail=null,this.length=0},Bi.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},Bi.prototype.concat=function(e){if(0===this.length)return A.alloc(0);if(1===this.length)return this.head.data;for(var t=A.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t};var Di=A.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Ui(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!Di(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Fi;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=zi;break;default:return void(this.write=ji)}this.charBuffer=new A(6),this.charReceived=0,this.charLength=0}function ji(e){return e.toString(this.encoding)}function Fi(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function zi(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}Ui.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(n=t.charCodeAt(i))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},Ui.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},Ui.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t};var qi=Object.freeze({__proto__:null,StringDecoder:Ui});$i.ReadableState=Vi;var Hi=ut("stream");function Vi(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof wo&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new Bi,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.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new Ui(e.encoding),this.encoding=e.encoding)}function $i(e){if(!(this instanceof $i))return new $i(e);this._readableState=new Vi(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),Qe.call(this)}function Ki(e,t,r,n,i){var o=function(e,t){var r=null;return ie(t)||"string"==typeof t||null==t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(t,r);if(o)e.emit("error",o);else if(null===r)t.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,Qi(e)}}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var c;!t.decoder||i||n||(r=t.decoder.write(r),c=!t.objectMode&&0===r.length),i||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Qi(e))),function(e,t){t.readingMore||(t.readingMore=!0,Ee(Zi,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=Wi?e=Wi:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function Qi(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Hi("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Ee(Yi,e):Yi(e))}function Yi(e){Hi("emit readable"),e.emit("readable"),eo(e)}function Zi(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;return eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0==(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=A.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0==(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t),n}(e,t.buffer,t.decoder),r);var r}function ro(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Ee(no,t,e))}function no(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function io(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return Hi("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ro(this):Qi(this),null;if(0===(e=Gi(e,t))&&t.ended)return 0===t.length&&ro(this),null;var n,i=t.needReadable;return Hi("need readable",i),(0===t.length||t.length-e0?to(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ro(this)),null!==n&&this.emit("data",n),n},$i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},$i.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,Hi("pipe count=%d opts=%j",n.pipesCount,t);var i=t&&!1===t.end?u:a;function o(e){Hi("onunpipe"),e===r&&u()}function a(){Hi("onend"),e.end()}n.endEmitted?Ee(i):r.once("end",i),e.on("unpipe",o);var s=function(e){return function(){var t=e._readableState;Hi("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,eo(e))}}(r);e.on("drain",s);var c=!1;function u(){Hi("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",f),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",u),r.removeListener("data",d),c=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var l=!1;function d(t){Hi("ondata"),l=!1,!1!==e.write(t)||l||((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==io(n.pipes,e))&&!c&&(Hi("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,l=!0),r.pause())}function f(t){Hi("onerror",t),g(),e.removeListener("error",f),0===e.listeners("error").length&&e.emit("error",t)}function h(){e.removeListener("finish",p),g()}function p(){Hi("onfinish"),e.removeListener("close",h),g()}function g(){Hi("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",h),e.once("finish",p),e.emit("pipe",r),n.flowing||(Hi("pipe resume"),r.resume()),e},$i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},co.prototype._write=function(e,t,r){r(new Error("not implemented"))},co.prototype._writev=null,co.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,go(e,t),r&&(t.finished?Ee(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r)},nt(wo,$i);for(var yo=Object.keys(co.prototype),vo=0;vo$o?t=e(t):t.length<$o&&(t=qo.concat([t,Vo],$o));for(var r=this._ipad=qo.allocUnsafe($o),n=this._opad=qo.allocUnsafe($o),i=0;i<$o;i++)r[i]=54^t[i],n[i]=92^t[i];this._hash=[r]}zo(Ko,Ho),Ko.prototype._update=function(e){this._hash.push(e)},Ko.prototype._final=function(){var e=this._alg(qo.concat(this._hash));return this._alg(qo.concat([this._opad,e]))};var Wo=rn,Go=function(e){return(new Wo).update(e).digest()},Qo=Ke,Yo=Ko,Zo=No,Jo=Fe().Buffer,Xo=Go,ea=An,ta=Li,ra=Jo.alloc(128);function na(e,t){Zo.call(this,"digest"),"string"==typeof t&&(t=Jo.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new ea:ta(e)).update(t).digest():t.lengthca||t!=t)throw new TypeError("Bad key length")},la=r.process&&r.process.browser?"utf-8":r.process&&r.process.version?parseInt(De.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",da=Fe().Buffer,fa=function(e,t,r){if(da.isBuffer(e))return e;if("string"==typeof e)return da.from(e,t);if(ArrayBuffer.isView(e))return da.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")},ha=Go,pa=An,ga=Li,ma=Fe().Buffer,ya=ua,va=la,ba=fa,wa=ma.alloc(128),Aa={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function _a(e,t,r){var n=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new pa).update(e).digest()}:"md5"===e?ha:function(t){return ga(e).update(t).digest()}}(e),i="sha512"===e||"sha384"===e?128:64;t.length>i?t=n(t):t.length>>0},writeUInt32BE:function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},ip:function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},rip:function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},pc1:function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r28shl:function(e,t){return e<>>28-t}},ja=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Ua.pc2=function(e,t,r,n){for(var i=0,o=0,a=ja.length>>>1,s=0;s>>ja[s]&1;for(s=a;s>>ja[s]&1;r[n+0]=i>>>0,r[n+1]=o>>>0},Ua.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var Fa=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Ua.substitute=function(e,t){for(var r=0,n=0;n<4;n++)r<<=4,r|=Fa[64*n+(e>>>18-6*n&63)];for(n=0;n<4;n++)r<<=4,r|=Fa[256+64*n+(t>>>18-6*n&63)];return r>>>0};var za=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];Ua.permute=function(e){for(var t=0,r=0;r>>za[r]&1;return t>>>0},Ua.padSplit=function(e,t,r){for(var n=e.toString(2);n.length0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},$a.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},$a.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=Ga.r28shl(r,o),n=Ga.r28shl(n,o),Ga.pc2(r,n,e.keys,i)}},Za.prototype._update=function(e,t,r,n){var i=this._desState,o=Ga.readUInt32BE(e,t),a=Ga.readUInt32BE(e,t+4);Ga.ip(o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,a,i.tmp,0):this._decrypt(i,o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],Ga.writeUInt32BE(r,o,n),Ga.writeUInt32BE(r,a,n+4)},Za.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var r=e.length-t,n=t;n>>0,o=d}Ga.rip(a,o,n,i)},Za.prototype._decrypt=function(e,t,r,n,i){for(var o=r,a=t,s=e.keys.length-2;s>=0;s-=2){var c=e.keys[s],u=e.keys[s+1];Ga.expand(o,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var l=Ga.substitute(c,u),d=o;o=(a^Ga.permute(l))>>>0,a=d}Ga.rip(o,a,n,i)};var es={},ts=qa,rs=Ke,ns={};function is(e){ts.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t>o%8,e._prev=Rs(e._prev,r?n:i);return a}function Rs(e,t){var r=e.length,n=-1,i=Ps.allocUnsafe(e.length);for(e=Ps.concat([e,Ps.from([t])]);++n>7;return i}Os.encrypt=function(e,t,r){for(var n=t.length,i=Ps.allocUnsafe(n),o=-1;++o>>24]^l[p>>>16&255]^d[g>>>8&255]^f[255&m]^t[y++],a=u[p>>>24]^l[g>>>16&255]^d[m>>>8&255]^f[255&h]^t[y++],s=u[g>>>24]^l[m>>>16&255]^d[h>>>8&255]^f[255&p]^t[y++],c=u[m>>>24]^l[h>>>16&255]^d[p>>>8&255]^f[255&g]^t[y++],h=o,p=a,g=s,m=c;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[g>>>8&255]<<8|n[255&m])^t[y++],a=(n[p>>>24]<<24|n[g>>>16&255]<<16|n[m>>>8&255]<<8|n[255&h])^t[y++],s=(n[g>>>24]<<24|n[m>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[y++],c=(n[m>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&g])^t[y++],[o>>>=0,a>>>=0,s>>>=0,c>>>=0]}var Xs=[0,1,2,4,8,16,32,64,128,27,54],ec=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,r[a]=u,n[u]=a;var l=e[a],d=e[l],f=e[d],h=257*e[u]^16843008*u;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*f^65537*d^257*l^16843008*a,o[0][u]=h<<24|h>>>8,o[1][u]=h<<16|h>>>16,o[2][u]=h<<8|h>>>24,o[3][u]=h,0===a?a=s=1:(a=l^e[e[e[f^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function tc(e){this._key=Ys(e),this._reset()}tc.blockSize=16,tc.keySize=32,tc.prototype.blockSize=tc.blockSize,tc.prototype.keySize=tc.keySize,tc.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=ec.SBOX[a>>>24]<<24|ec.SBOX[a>>>16&255]<<16|ec.SBOX[a>>>8&255]<<8|ec.SBOX[255&a],a^=Xs[o/t|0]<<24):t>6&&o%t==4&&(a=ec.SBOX[a>>>24]<<24|ec.SBOX[a>>>16&255]<<16|ec.SBOX[a>>>8&255]<<8|ec.SBOX[255&a]),i[o]=i[o-t]^a}for(var s=[],c=0;c>>24]]^ec.INV_SUB_MIX[1][ec.SBOX[l>>>16&255]]^ec.INV_SUB_MIX[2][ec.SBOX[l>>>8&255]]^ec.INV_SUB_MIX[3][ec.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=s},tc.prototype.encryptBlockRaw=function(e){return Js(e=Ys(e),this._keySchedule,ec.SUB_MIX,ec.SBOX,this._nRounds)},tc.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=Qs.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},tc.prototype.decryptBlock=function(e){var t=(e=Ys(e))[1];e[1]=e[3],e[3]=t;var r=Js(e,this._invKeySchedule,ec.INV_SUB_MIX,ec.INV_SBOX,this._nRounds),n=Qs.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[3],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[1],12),n},tc.prototype.scrub=function(){Zs(this._keySchedule),Zs(this._invKeySchedule),Zs(this._key)},Gs.AES=tc;var rc=Fe().Buffer,nc=rc.alloc(16,0);function ic(e){var t=rc.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function oc(e){this.h=e,this.state=rc.alloc(16,0),this.cache=rc.allocUnsafe(0)}oc.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=ic(i)},oc.prototype.update=function(e){var t;for(this.cache=rc.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},oc.prototype.final=function(e,t){return this.cache.length&&this.ghash(rc.concat([this.cache,nc],16)),this.ghash(ic([0,e,0,t])),this.state};var ac=oc,sc=Gs,cc=Fe().Buffer,uc=No,lc=ac,dc=As,fc=Us;function hc(e,t,r,n){uc.call(this);var i=cc.alloc(4,0);this._cipher=new sc.AES(t);var o=this._cipher.encryptBlock(i);this._ghash=new lc(o),r=function(e,t,r){if(12===t.length)return e._finID=cc.concat([t,cc.from([0,0,0,1])]),cc.concat([t,cc.from([0,0,0,2])]);var n=new lc(r),i=t.length,o=i%16;n.update(t),o&&(o=16-o,n.update(cc.alloc(o,0))),n.update(cc.alloc(8,0));var a=8*i,s=cc.alloc(8);s.writeUIntBE(a,0,8),n.update(s),e._finID=n.state;var c=cc.from(e._finID);return fc(c),c}(this,r,o),this._prev=cc.from(r),this._cache=cc.allocUnsafe(0),this._secCache=cc.allocUnsafe(0),this._decrypt=n,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}Ke(hc,uc),hc.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=cc.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},hc.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=dc(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i0||n>0;){var c=new Ac;c.update(s),c.update(e),t&&c.update(t),s=c.digest();var u=0;if(i>0){var l=o.length-i;u=Math.min(i,s.length),s.copy(o,l,0,u),i-=u}if(u0){var d=a.length-n,f=Math.min(n,s.length-u);s.copy(a,d,u,u+f),n-=f}}return s.fill(0),{key:o,iv:a}},Ec=Ws,Sc=pc,kc=Fe().Buffer,xc=bc,Cc=No,Ic=Gs,Tc=_c;function Oc(e,t,r){Cc.call(this),this._cache=new Mc,this._cipher=new Ic.AES(t),this._prev=kc.from(r),this._mode=e,this._autopadding=!0}Ke(Oc,Cc),Oc.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return kc.concat(n)};var Pc=kc.alloc(16,16);function Mc(){this.cache=kc.allocUnsafe(0)}function Rc(e,t,r){var n=Ec[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=kc.from(t)),t.length!==n.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=kc.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===n.type?new xc(n.module,t,r):"auth"===n.type?new Sc(n.module,t,r):new Oc(n.module,t,r)}Oc.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(Pc))throw this._cipher.scrub(),new Error("data not multiple of block length")},Oc.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},Mc.prototype.add=function(e){this.cache=kc.concat([this.cache,e])},Mc.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},Mc.prototype.flush=function(){for(var e=16-this.cache.length,t=kc.allocUnsafe(e),r=-1;++r16)throw new Error("unable to decrypt data");for(var r=-1;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},Hc.prototype.flush=function(){if(this.cache.length)return this.cache},Nc.createDecipher=function(e,t){var r=Dc[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=zc(t,!1,r.key,r.iv);return Vc(e,n.key,n.iv)},Nc.createDecipheriv=Vc;var $c=bs,Kc=Nc,Wc=Hs;vs.createCipher=vs.Cipher=$c.createCipher,vs.createCipheriv=vs.Cipheriv=$c.createCipheriv,vs.createDecipher=vs.Decipher=Kc.createDecipher,vs.createDecipheriv=vs.Decipheriv=Kc.createDecipheriv,vs.listCiphers=vs.getCiphers=function(){return Object.keys(Wc)};var Gc={};!function(e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}}(Gc);var Qc=ms,Yc=vs,Zc=Ws,Jc=Gc,Xc=_c;function eu(e,t,r){if(e=e.toLowerCase(),Zc[e])return Yc.createCipheriv(e,t,r);if(Jc[e])return new Qc({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function tu(e,t,r){if(e=e.toLowerCase(),Zc[e])return Yc.createDecipheriv(e,t,r);if(Jc[e])return new Qc({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}Ba.createCipher=Ba.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),Zc[e])r=Zc[e].key,n=Zc[e].iv;else{if(!Jc[e])throw new TypeError("invalid suite type");r=8*Jc[e].key,n=Jc[e].iv}var i=Xc(t,!1,r,n);return eu(e,i.key,i.iv)},Ba.createCipheriv=Ba.Cipheriv=eu,Ba.createDecipher=Ba.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),Zc[e])r=Zc[e].key,n=Zc[e].iv;else{if(!Jc[e])throw new TypeError("invalid suite type");r=8*Jc[e].key,n=Jc[e].iv}var i=Xc(t,!1,r,n);return tu(e,i.key,i.iv)},Ba.createDecipheriv=Ba.Decipheriv=tu,Ba.listCiphers=Ba.getCiphers=function(){return Object.keys(Jc).concat(Yc.getCiphers())};var ru={},nu={exports:{}};!function(e){!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:le.Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=s(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[u]=0|d,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+n:c+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var f=l[e],h=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?g+n:u[f-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,u=new e(o),l=this.clone();if(c){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],w=8191&b,A=b>>>13,_=0|a[4],E=8191&_,S=_>>>13,k=0|a[5],x=8191&k,C=k>>>13,I=0|a[6],T=8191&I,O=I>>>13,P=0|a[7],M=8191&P,R=P>>>13,N=0|a[8],L=8191&N,B=N>>>13,D=0|a[9],U=8191&D,j=D>>>13,F=0|s[0],z=8191&F,q=F>>>13,H=0|s[1],V=8191&H,$=H>>>13,K=0|s[2],W=8191&K,G=K>>>13,Q=0|s[3],Y=8191&Q,Z=Q>>>13,J=0|s[4],X=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],de=8191&le,fe=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(f,z)|0))<<13)|0;u=((o=Math.imul(f,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(g,z)|0,o=Math.imul(g,q);var ye=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(f,V)|0))<<13)|0;u=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(v,z)|0,o=Math.imul(v,q),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,$)|0;var ve=(u+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,W)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,G)|0;var be=(u+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,Y)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var we=(u+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var Ae=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;u=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(u+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;u=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,q))+Math.imul(R,z)|0,o=Math.imul(R,q),n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((o=o+Math.imul(f,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0;var Se=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,q))+Math.imul(j,z)|0,o=Math.imul(j,q),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,$)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,fe)|0;var ke=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ge)|0)+Math.imul(f,pe)|0))<<13)|0;u=((o=o+Math.imul(f,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,$))+Math.imul(j,V)|0,o=Math.imul(j,$),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(v,de)|0,o=o+Math.imul(v,fe)|0;var xe=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;u=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,G))+Math.imul(j,W)|0,o=Math.imul(j,G),n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,ue)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,fe)|0;var Ce=(u+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(v,pe)|0))<<13)|0;u=((o=o+Math.imul(v,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,Y),i=(i=Math.imul(U,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,ue)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,fe)|0;var Ie=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,X),i=(i=Math.imul(U,ee))+Math.imul(j,X)|0,o=Math.imul(j,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Te=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(S,pe)|0))<<13)|0;u=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(j,re)|0,o=Math.imul(j,ne),n=n+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(O,de)|0,o=o+Math.imul(O,fe)|0;var Oe=(u+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(C,pe)|0))<<13)|0;u=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,ae))+Math.imul(j,oe)|0,o=Math.imul(j,ae),n=n+Math.imul(L,ce)|0,i=(i=i+Math.imul(L,ue)|0)+Math.imul(B,ce)|0,o=o+Math.imul(B,ue)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(j,ce)|0,o=Math.imul(j,ue),n=n+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,fe)|0;var Me=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,de),i=(i=Math.imul(U,fe))+Math.imul(j,de)|0,o=Math.imul(j,fe);var Re=(u+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ge)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(u+(n=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul(j,pe)|0))<<13)|0;return u=((o=Math.imul(j,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=me,c[1]=ye,c[2]=ve,c[3]=be,c[4]=we,c[5]=Ae,c[6]=_e,c[7]=Ee,c[8]=Se,c[9]=ke,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Te,c[14]=Oe,c[15]=Pe,c[16]=Me,c[17]=Re,c[18]=Ne,0!==u&&(c[19]=u,r.length++),r};function p(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(h=f),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?h(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>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,e,t):p(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,a=0|o.words[o.length-1];0!=(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,c=n.length-o.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var f=67108864*(0|n.words[o.length+d])+(0|n.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(o,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(o,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},i.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(l),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,g=1;0==(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),a.isub(c)):(n.isub(t),s.isub(o),c.isub(a))}return{a:s,b:c,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,l=1;0==(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){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 A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},n(v,y),v.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return m[e]=t,t},_.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var g=h,m=0;0!==g.cmp(s);m++)g=g.redSqr();r(m=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var d=u>>l&1;o!==r[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4==++s||0===n&&0===l)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}c=26}return o},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},n(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),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(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,r)}(nu);var iu,ou,au,su,cu,uu=nu.exports,lu={exports:{}};function du(){if(iu)return lu.exports;var e;function t(e){this.rand=e}if(iu=1,lu.exports=function(r){return e||(e=new t(null)),e.generate(r)},lu.exports.Rand=t,t.prototype.generate=function(e){return this._rand(e)},t.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r=0);return i},r.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},r.prototype.test=function(t,r,n){var i=t.bitLength(),o=e.mont(t),a=new e(1).toRed(o);r||(r=Math.max(1,i/48|0));for(var s=t.subn(1),c=0;!s.testn(c);c++);for(var u=t.shrn(c),l=s.toRed(o);r>0;r--){var d=this._randrange(new e(2),s);n&&n(d);var f=d.toRed(o).redPow(u);if(0!==f.cmp(a)&&0!==f.cmp(l)){for(var h=1;h0;r--){var l=this._randrange(new e(2),a),d=t.gcd(l);if(0!==d.cmpn(1))return d;var f=l.toRed(i).redPow(c);if(0!==f.cmp(o)&&0!==f.cmp(u)){for(var h=1;hd;)g.ishrn(1);if(g.isEven()&&g.iadd(i),g.testn(1)||g.iadd(o),p.cmp(o)){if(!p.cmp(a))for(;g.mod(s).cmp(c);)g.iadd(l)}else for(;g.mod(r).cmp(u);)g.iadd(l);if(f(m=g.shrn(1))&&f(g)&&h(m)&&h(g)&&n.test(m)&&n.test(g))return g}}return su}var pu,gu,mu,yu={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};var vu={exports:{}},bu={exports:{}};!function(e){!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:le.Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,n,i){for(var o=0,a=0,s=Math.min(e.length,n),c=t;c=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&a0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=s(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],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],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 p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[u]=0|d,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?d[6-c.length]+c+n:c+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],l=h[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modrn(l).toString(e);n=(p=p.idivn(l)).isZero()?g+n:d[u-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],w=8191&b,A=b>>>13,_=0|a[4],E=8191&_,S=_>>>13,k=0|a[5],x=8191&k,C=k>>>13,I=0|a[6],T=8191&I,O=I>>>13,P=0|a[7],M=8191&P,R=P>>>13,N=0|a[8],L=8191&N,B=N>>>13,D=0|a[9],U=8191&D,j=D>>>13,F=0|s[0],z=8191&F,q=F>>>13,H=0|s[1],V=8191&H,$=H>>>13,K=0|s[2],W=8191&K,G=K>>>13,Q=0|s[3],Y=8191&Q,Z=Q>>>13,J=0|s[4],X=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],de=8191&le,fe=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(f,z)|0))<<13)|0;u=((o=Math.imul(f,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(g,z)|0,o=Math.imul(g,q);var ye=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(f,V)|0))<<13)|0;u=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(v,z)|0,o=Math.imul(v,q),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,$)|0;var ve=(u+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,W)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,G)|0;var be=(u+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,Y)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var we=(u+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var Ae=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;u=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(u+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;u=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,q))+Math.imul(R,z)|0,o=Math.imul(R,q),n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((o=o+Math.imul(f,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0;var Se=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,q))+Math.imul(j,z)|0,o=Math.imul(j,q),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,$)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,fe)|0;var ke=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ge)|0)+Math.imul(f,pe)|0))<<13)|0;u=((o=o+Math.imul(f,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,$))+Math.imul(j,V)|0,o=Math.imul(j,$),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(v,de)|0,o=o+Math.imul(v,fe)|0;var xe=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;u=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,G))+Math.imul(j,W)|0,o=Math.imul(j,G),n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,ue)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,fe)|0;var Ce=(u+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(v,pe)|0))<<13)|0;u=((o=o+Math.imul(v,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,Y),i=(i=Math.imul(U,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,ue)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,fe)|0;var Ie=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,X),i=(i=Math.imul(U,ee))+Math.imul(j,X)|0,o=Math.imul(j,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Te=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(S,pe)|0))<<13)|0;u=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(j,re)|0,o=Math.imul(j,ne),n=n+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(O,de)|0,o=o+Math.imul(O,fe)|0;var Oe=(u+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(C,pe)|0))<<13)|0;u=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,ae))+Math.imul(j,oe)|0,o=Math.imul(j,ae),n=n+Math.imul(L,ce)|0,i=(i=i+Math.imul(L,ue)|0)+Math.imul(B,ce)|0,o=o+Math.imul(B,ue)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(j,ce)|0,o=Math.imul(j,ue),n=n+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,fe)|0;var Me=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,de),i=(i=Math.imul(U,fe))+Math.imul(j,de)|0,o=Math.imul(j,fe);var Re=(u+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ge)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(u+(n=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul(j,pe)|0))<<13)|0;return u=((o=Math.imul(j,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=me,c[1]=ye,c[2]=ve,c[3]=be,c[4]=we,c[5]=Ae,c[6]=_e,c[7]=Ee,c[8]=Se,c[9]=ke,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Te,c[14]=Oe,c[15]=Pe,c[16]=Me,c[17]=Re,c[18]=Ne,0!==u&&(c[19]=u,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>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 y(e,t,r){return m(e,t,r)}Math.imul||(g=p),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?p(this,e,t):r<1024?m(this,e,t):y(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),y(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,a=0|o.words[o.length-1];0!=(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,c=n.length-o.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var f=67108864*(0|n.words[o.length+d])+(0|n.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(o,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(o,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(l),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,g=1;0==(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),a.isub(c)):(n.isub(t),s.isub(o),c.isub(a))}return{a:s,b:c,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,l=1;0==(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new S(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},n(w,b),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new A;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return v[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var g=h,m=0;0!==g.cmp(s);m++)g=g.redSqr();r(m=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var d=u>>l&1;o!==r[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4==++s||0===n&&0===l)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}c=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new k(e)},n(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,r)}(bu);var wu=bu.exports,Au=Ve;function _u(e){var t,r=e.modulus.byteLength();do{t=new wu(Au(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function Eu(e,t){var r=function(e){var t=_u(e);return{blinder:t.toRed(wu.mont(e.modulus)).redPow(new wu(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),n=t.modulus.byteLength(),i=new wu(e).mul(r.blinder).umod(t.modulus),o=i.toRed(wu.mont(t.prime1)),a=i.toRed(wu.mont(t.prime2)),s=t.coefficient,c=t.prime1,u=t.prime2,l=o.redPow(t.exponent1).fromRed(),d=a.redPow(t.exponent2).fromRed(),f=l.isub(d).imul(s).umod(c).imul(u);return d.iadd(f).imul(r.unblinder).umod(t.modulus).toArrayLike(A,"be",n)}Eu.getr=_u;var Su=Eu,ku={},xu={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}},Cu={},Iu={};!function(e){var t=e;function r(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",n=0;n>8,a=255&i;o?r.push(o,a):r.push(a)}return r},t.zero2=r,t.toHex=n,t.encode=function(e,t){return"hex"===t?n(e):e}}(Iu),function(e){var t=e,r=uu,n=qa,i=Iu;t.assert=n,t.toArray=i.toArray,t.zero2=i.zero2,t.toHex=i.toHex,t.encode=i.encode,t.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},t.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,c=e.andln(3)+i&3,u=t.andln(3)+o&3;3===c&&(c=-1),3===u&&(u=-1),a=0==(1&c)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==u?c:-c,r[0].push(a),s=0==(1&u)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==c?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},t.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},t.parseBytes=function(e){return"string"==typeof e?t.toArray(e,"hex"):e},t.intFromLE=function(e){return new r(e,"hex","le")}}(Cu);var Tu={},Ou=uu,Pu=Cu,Mu=Pu.getNAF,Ru=Pu.getJSF,Nu=Pu.assert;function Lu(e,t){this.type=e,this.p=new Ou(t.p,16),this.red=t.prime?Ou.red(t.prime):Ou.mont(this.p),this.zero=new Ou(0).toRed(this.red),this.one=new Ou(1).toRed(this.red),this.two=new Ou(2).toRed(this.red),this.n=t.n&&new Ou(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Bu=Lu;function Du(e,t){this.curve=e,this.type=t,this.precomputed=null}Lu.prototype.point=function(){throw new Error("Not implemented")},Lu.prototype.validate=function(){throw new Error("Not implemented")},Lu.prototype._fixedNafMul=function(e,t){Nu(e.precomputed);var r=e._getDoubles(),n=Mu(t,1,this._bitLength),i=(1<=o;c--)a=(a<<1)+n[c];s.push(a)}for(var u=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(o=0;o=0;s--){for(var c=0;s>=0&&0===o[s];s--)c++;if(s>=0&&c++,a=a.dblp(c),s<0)break;var u=o[s];Nu(0!==u),a="affine"===e.type?u>0?a.mixedAdd(i[u-1>>1]):a.mixedAdd(i[-u-1>>1].neg()):u>0?a.add(i[u-1>>1]):a.add(i[-u-1>>1].neg())}return"affine"===e.type?a.toP():a},Lu.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,c=this._wnafT1,u=this._wnafT2,l=this._wnafT3,d=0;for(o=0;o=1;o-=2){var h=o-1,p=o;if(1===c[h]&&1===c[p]){var g=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(g[1]=t[h].add(t[p]),g[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(g[1]=t[h].toJ().mixedAdd(t[p]),g[2]=t[h].add(t[p].neg())):(g[1]=t[h].toJ().mixedAdd(t[p]),g[2]=t[h].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],y=Ru(r[h],r[p]);for(d=Math.max(y[0].length,d),l[h]=new Array(d),l[p]=new Array(d),a=0;a=0;o--){for(var _=0;o>=0;){var E=!0;for(a=0;a=0&&_++,w=w.dblp(_),o<0)break;for(a=0;a0?s=u[a][S-1>>1]:S<0&&(s=u[a][-S-1>>1].neg()),w="affine"===s.type?w.mixedAdd(s):w.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},Du.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(o=t,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}]},qu.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:c.add(u).neg()}},qu.prototype.pointFromX=function(e,t){(e=new Uu(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},qu.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},qu.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},Vu.prototype.isInfinity=function(){return this.inf},Vu.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},Vu.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},Vu.prototype.getX=function(){return this.x.fromRed()},Vu.prototype.getY=function(){return this.y.fromRed()},Vu.prototype.mul=function(e){return e=new Uu(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Vu.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},Vu.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},Vu.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Vu.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},Vu.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},ju($u,Fu.BasePoint),qu.prototype.jpoint=function(e,t,r){return new $u(this,e,t,r)},$u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},$u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},$u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),d=n.redMul(u),f=c.redSqr().redIAdd(l).redISub(d).redISub(d),h=c.redMul(d.redISub(f)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},$u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=r.redMul(c),d=s.redSqr().redIAdd(u).redISub(l).redISub(l),f=s.redMul(l.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},$u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},$u.prototype.inspect=function(){return this.isInfinity()?"":""},$u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Ku=uu,Wu=Ke,Gu=Bu,Qu=Cu;function Yu(e){Gu.call(this,"mont",e),this.a=new Ku(e.a,16).toRed(this.red),this.b=new Ku(e.b,16).toRed(this.red),this.i4=new Ku(4).toRed(this.red).redInvm(),this.two=new Ku(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Wu(Yu,Gu);var Zu=Yu;function Ju(e,t,r){Gu.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Ku(t,16),this.z=new Ku(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Yu.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},Wu(Ju,Gu.BasePoint),Yu.prototype.decodePoint=function(e,t){return this.point(Qu.toArray(e,t),1)},Yu.prototype.point=function(e,t){return new Ju(this,e,t)},Yu.prototype.pointFromJSON=function(e){return Ju.fromJSON(this,e)},Ju.prototype.precompute=function(){},Ju.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},Ju.fromJSON=function(e,t){return new Ju(e,t[0],t[1]||e.one)},Ju.prototype.inspect=function(){return this.isInfinity()?"":""},Ju.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Ju.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},Ju.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},Ju.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),c=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},Ju.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},Ju.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},Ju.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},Ju.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},Ju.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},Ju.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var Xu=uu,el=Ke,tl=Bu,rl=Cu.assert;function nl(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,tl.call(this,"edwards",e),this.a=new Xu(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Xu(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Xu(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),rl(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}el(nl,tl);var il=nl;function ol(e,t,r,n,i){tl.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Xu(t,16),this.y=new Xu(r,16),this.z=n?new Xu(n,16):this.curve.one,this.t=i&&new Xu(i,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()))))}nl.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},nl.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},nl.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},nl.prototype.pointFromX=function(e,t){(e=new Xu(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=n.redMul(i.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)},nl.prototype.pointFromY=function(e,t){(e=new Xu(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),o=n.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},nl.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},el(ol,tl.BasePoint),nl.prototype.pointFromJSON=function(e){return ol.fromJSON(this,e)},nl.prototype.point=function(e,t,r,n){return new ol(this,e,t,r,n)},ol.fromJSON=function(e,t){return new ol(e,t[0],t[1],t[2])},ol.prototype.inspect=function(){return this.isInfinity()?"":""},ol.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},ol.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),c=i.redMul(a),u=o.redMul(s),l=i.redMul(s),d=a.redMul(o);return this.curve.point(c,u,d,l)},ol.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(c);this.zOne?(e=a.redSub(s).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(c)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=a.redSub(s).redISub(c).redMul(o),t=u.redMul(n.redSub(c)),r=u.redMul(o))}else n=s.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(c)),r=n.redMul(o);return this.curve.point(e,t,r)},ol.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},ol.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),c=r.redAdd(t),u=o.redMul(a),l=s.redMul(c),d=o.redMul(c),f=a.redMul(s);return this.curve.point(u,l,f,d)},ol.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),c=i.redSub(s),u=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(c).redMul(l);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=c.redMul(u)):(t=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(c).redMul(u)),this.curve.point(d,t,r)},ol.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},ol.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},ol.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},ol.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},ol.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},ol.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},ol.prototype.getX=function(){return this.normalize(),this.x.fromRed()},ol.prototype.getY=function(){return this.normalize(),this.y.fromRed()},ol.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},ol.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},ol.prototype.toP=ol.prototype.normalize,ol.prototype.mixedAdd=ol.prototype.add,function(e){var t=e;t.base=Bu,t.short=Hu,t.mont=Zu,t.edwards=il}(Tu);var al={},sl={},cl={},ul=qa,ll=Ke;function dl(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function fl(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function hl(e){return 1===e.length?"0"+e:e}function pl(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}cl.inherits=ll,cl.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&o|128):dl(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i>>0}return o},cl.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},cl.rotr32=function(e,t){return e>>>t|e<<32-t},cl.rotl32=function(e,t){return e<>>32-t},cl.sum32=function(e,t){return e+t>>>0},cl.sum32_3=function(e,t,r){return e+t+r>>>0},cl.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},cl.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},cl.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},cl.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},cl.sum64_lo=function(e,t,r,n){return t+n>>>0},cl.sum64_4_hi=function(e,t,r,n,i,o,a,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},cl.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},cl.sum64_5_hi=function(e,t,r,n,i,o,a,s,c,u){var l=0,d=t;return l+=(d=d+n>>>0)>>0)>>0)>>0)>>0},cl.sum64_5_lo=function(e,t,r,n,i,o,a,s,c,u){return t+n+o+s+u>>>0},cl.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},cl.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},cl.shr64_hi=function(e,t,r){return e>>>r},cl.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0};var gl={},ml=cl,yl=qa;function vl(){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}gl.BlockHash=vl,vl.prototype.update=function(e,t){if(e=ml.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=ml.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o>>3},wl.g1_256=function(e){return Al(e,17)^Al(e,19)^e>>>10};var kl=cl,xl=gl,Cl=wl,Il=kl.rotl32,Tl=kl.sum32,Ol=kl.sum32_5,Pl=Cl.ft_1,Ml=xl.BlockHash,Rl=[1518500249,1859775393,2400959708,3395469782];function Nl(){if(!(this instanceof Nl))return new Nl;Ml.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}kl.inherits(Nl,Ml);var Ll=Nl;Nl.blockSize=512,Nl.outSize=160,Nl.hmacStrength=80,Nl.padLength=64,Nl.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),ef(e.length<=this.blockSize);for(var t=e.length;t=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var lf=uf;uf.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},uf.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=sf.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var gf=uu,mf=Cu,yf=mf.assert;function vf(e,t){if(e instanceof vf)return e;this._importDER(e,t)||(yf(e.r&&e.s,"Signature without r or s"),this.r=new gf(e.r,16),this.s=new gf(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var bf,wf,Af=vf;function _f(){this.place=0}function Ef(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function Sf(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}vf.prototype._importDER=function(e,t){e=mf.toArray(e,t);var r=new _f;if(48!==e[r.place++])return!1;var n=Ef(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=Ef(e,r);if(!1===i)return!1;var o=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var a=Ef(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;var s=e.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 gf(o),this.s=new gf(s),this.recoveryParam=null,!0},vf.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=Sf(t),r=Sf(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];kf(n,t.length),(n=n.concat(t)).push(2),kf(n,r.length);var i=n.concat(r),o=[48];return kf(o,i.length),o=o.concat(i),mf.encode(o,e)};var xf=Cu,Cf=xf.assert,If=xf.parseBytes,Tf=xf.cachedProperty;function Of(e,t){this.eddsa=e,this._secret=If(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=If(t.pub)}Of.fromPublic=function(e,t){return t instanceof Of?t:new Of(e,{pub:t})},Of.fromSecret=function(e,t){return t instanceof Of?t:new Of(e,{secret:t})},Of.prototype.secret=function(){return this._secret},Tf(Of,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Tf(Of,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Tf(Of,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),Tf(Of,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Tf(Of,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Tf(Of,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Of.prototype.sign=function(e){return Cf(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},Of.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},Of.prototype.getSecret=function(e){return Cf(this._secret,"KeyPair is public only"),xf.encode(this.secret(),e)},Of.prototype.getPublic=function(e){return xf.encode(this.pubBytes(),e)};var Pf=Of,Mf=uu,Rf=Cu,Nf=Rf.assert,Lf=Rf.cachedProperty,Bf=Rf.parseBytes;function Df(e,t){this.eddsa=e,"object"!=typeof t&&(t=Bf(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),Nf(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof Mf&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}Lf(Df,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Lf(Df,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Lf(Df,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Lf(Df,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Df.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Df.prototype.toHex=function(){return Rf.encode(this.toBytes(),"hex").toUpperCase()};var Uf=Df,jf=sl,Ff=al,zf=Cu,qf=zf.assert,Hf=zf.parseBytes,Vf=Pf,$f=Uf;function Kf(e){if(qf("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof Kf))return new Kf(e);e=Ff[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=jf.sha512}var Wf,Gf=Kf;function Qf(){return Wf||(Wf=1,function(e){var t=e;t.version=xu.version,t.utils=Cu,t.rand=du(),t.curve=Tu,t.curves=al,t.ec=function(){if(wf)return bf;wf=1;var e=uu,t=lf,r=Cu,n=al,i=du(),o=r.assert,a=pf,s=Af;function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(o(Object.prototype.hasOwnProperty.call(n,e),"Unknown curve "+e),e=n[e]),e instanceof n.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}return bf=c,c.prototype.keyPair=function(e){return new a(this,e)},c.prototype.keyFromPrivate=function(e,t){return a.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return a.fromPublic(this,e,t)},c.prototype.genKeyPair=function(r){r||(r={});for(var n=new t({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||i(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),a=this.n.sub(new e(2));;){var s=new e(n.generate(o));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},c.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},c.prototype.sign=function(r,n,i,o){"object"==typeof i&&(o=i,i=null),o||(o={}),n=this.keyFromPrivate(n,i),r=this._truncateToN(new e(r,16));for(var a=this.n.byteLength(),c=n.getPrivate().toArray("be",a),u=r.toArray("be",a),l=new t({hash:this.hash,entropy:c,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new e(1)),f=0;;f++){var h=o.k?o.k(f):new e(l.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var g=p.getX(),m=g.umod(this.n);if(0!==m.cmpn(0)){var y=h.invm(this.n).mul(m.mul(n.getPrivate()).iadd(r));if(0!==(y=y.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==g.cmp(m)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),v^=1),new s({r:m,s:y,recoveryParam:v})}}}}}},c.prototype.verify=function(t,r,n,i){t=this._truncateToN(new e(t,16)),n=this.keyFromPublic(n,i);var o=(r=new s(r,"hex")).r,a=r.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 c,u=a.invm(this.n),l=u.mul(t).umod(this.n),d=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(c=this.g.jmulAdd(l,n.getPublic(),d)).isInfinity()&&c.eqXToP(o):!(c=this.g.mulAdd(l,n.getPublic(),d)).isInfinity()&&0===c.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(t,r,n,i){o((3&n)===n,"The recovery param is more than two bits"),r=new s(r,i);var a=this.n,c=new e(t),u=r.r,l=r.s,d=1&n,f=n>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");u=f?this.curve.pointFromX(u.add(this.curve.n),d):this.curve.pointFromX(u,d);var h=r.r.invm(a),p=a.sub(c).mul(h).umod(a),g=l.mul(h).umod(a);return this.g.mulAdd(p,u,g)},c.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new s(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")},bf}(),t.eddsa=Gf}(ku)),ku}Kf.prototype.sign=function(e,t){e=Hf(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),s=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},Kf.prototype.verify=function(e,t,r){e=Hf(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},Kf.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,n,i){for(var o=0,a=0,s=Math.min(e.length,n),c=t;c=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&a0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=s(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],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],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 p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[u]=0|d,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?d[6-c.length]+c+n:c+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],l=h[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modrn(l).toString(e);n=(p=p.idivn(l)).isZero()?g+n:d[u-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],w=8191&b,A=b>>>13,_=0|a[4],E=8191&_,S=_>>>13,k=0|a[5],x=8191&k,C=k>>>13,I=0|a[6],T=8191&I,O=I>>>13,P=0|a[7],M=8191&P,R=P>>>13,N=0|a[8],L=8191&N,B=N>>>13,D=0|a[9],U=8191&D,j=D>>>13,F=0|s[0],z=8191&F,q=F>>>13,H=0|s[1],V=8191&H,$=H>>>13,K=0|s[2],W=8191&K,G=K>>>13,Q=0|s[3],Y=8191&Q,Z=Q>>>13,J=0|s[4],X=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],de=8191&le,fe=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(f,z)|0))<<13)|0;u=((o=Math.imul(f,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(g,z)|0,o=Math.imul(g,q);var ye=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(f,V)|0))<<13)|0;u=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(v,z)|0,o=Math.imul(v,q),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,$)|0;var ve=(u+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,W)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,G)|0;var be=(u+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,Y)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var we=(u+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var Ae=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;u=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(u+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;u=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,q))+Math.imul(R,z)|0,o=Math.imul(R,q),n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((o=o+Math.imul(f,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0;var Se=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,q))+Math.imul(j,z)|0,o=Math.imul(j,q),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,$)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,fe)|0;var ke=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ge)|0)+Math.imul(f,pe)|0))<<13)|0;u=((o=o+Math.imul(f,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,$))+Math.imul(j,V)|0,o=Math.imul(j,$),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(v,de)|0,o=o+Math.imul(v,fe)|0;var xe=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;u=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,G))+Math.imul(j,W)|0,o=Math.imul(j,G),n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,ue)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,fe)|0;var Ce=(u+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(v,pe)|0))<<13)|0;u=((o=o+Math.imul(v,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,Y),i=(i=Math.imul(U,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,ue)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,fe)|0;var Ie=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,X),i=(i=Math.imul(U,ee))+Math.imul(j,X)|0,o=Math.imul(j,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Te=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(S,pe)|0))<<13)|0;u=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(j,re)|0,o=Math.imul(j,ne),n=n+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(O,de)|0,o=o+Math.imul(O,fe)|0;var Oe=(u+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(C,pe)|0))<<13)|0;u=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,ae))+Math.imul(j,oe)|0,o=Math.imul(j,ae),n=n+Math.imul(L,ce)|0,i=(i=i+Math.imul(L,ue)|0)+Math.imul(B,ce)|0,o=o+Math.imul(B,ue)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(j,ce)|0,o=Math.imul(j,ue),n=n+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,fe)|0;var Me=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,de),i=(i=Math.imul(U,fe))+Math.imul(j,de)|0,o=Math.imul(j,fe);var Re=(u+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ge)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(u+(n=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul(j,pe)|0))<<13)|0;return u=((o=Math.imul(j,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=me,c[1]=ye,c[2]=ve,c[3]=be,c[4]=we,c[5]=Ae,c[6]=_e,c[7]=Ee,c[8]=Se,c[9]=ke,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Te,c[14]=Oe,c[15]=Pe,c[16]=Me,c[17]=Re,c[18]=Ne,0!==u&&(c[19]=u,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>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 y(e,t,r){return m(e,t,r)}Math.imul||(g=p),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?p(this,e,t):r<1024?m(this,e,t):y(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),y(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,a=0|o.words[o.length-1];0!=(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,c=n.length-o.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var f=67108864*(0|n.words[o.length+d])+(0|n.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(o,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(o,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(l),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,g=1;0==(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),a.isub(c)):(n.isub(t),s.isub(o),c.isub(a))}return{a:s,b:c,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,l=1;0==(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new S(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},n(w,b),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new A;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return v[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var g=h,m=0;0!==g.cmp(s);m++)g=g.redSqr();r(m=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var d=u>>l&1;o!==r[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4==++s||0===n&&0===l)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}c=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new k(e)},n(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,r)}(Yf);var Zf,Jf=Yf.exports,Xf={},eh={},th={},rh={},nh=le,ih=nh.Buffer,oh={};for(Zf in nh)nh.hasOwnProperty(Zf)&&"SlowBuffer"!==Zf&&"Buffer"!==Zf&&(oh[Zf]=nh[Zf]);var ah=oh.Buffer={};for(Zf in ih)ih.hasOwnProperty(Zf)&&"allocUnsafe"!==Zf&&"allocUnsafeSlow"!==Zf&&(ah[Zf]=ih[Zf]);if(oh.Buffer.prototype=ih.prototype,ah.from&&ah.from!==Uint8Array.from||(ah.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return ih(e,t,r)}),ah.alloc||(ah.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=ih(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!oh.kStringMaxLength)try{oh.kStringMaxLength=De.binding("buffer").kStringMaxLength}catch(a){}oh.constants||(oh.constants={MAX_LENGTH:oh.kMaxLength},oh.kStringMaxLength&&(oh.constants.MAX_STRING_LENGTH=oh.kStringMaxLength));var sh=oh,ch={};const uh=Ke;function lh(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function dh(e,t){this.path=e,this.rethrow(t)}ch.Reporter=lh,lh.prototype.isError=function(e){return e instanceof dh},lh.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},lh.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},lh.prototype.enterKey=function(e){return this._reporterState.path.push(e)},lh.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},lh.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},lh.prototype.path=function(){return this._reporterState.path.join("/")},lh.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},lh.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},lh.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof dh;if(t=n?e:new dh(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},lh.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},uh(dh,Error),dh.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,dh),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this};var fh={};const hh=Ke,ph=ch.Reporter,gh=sh.Buffer;function mh(e,t){ph.call(this,t),gh.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function yh(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return yh.isEncoderBuffer(e)||(e=new yh(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=gh.byteLength(e);else{if(!gh.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}hh(mh,ph),fh.DecoderBuffer=mh,mh.isDecoderBuffer=function(e){return e instanceof mh||"object"==typeof e&&gh.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},mh.prototype.save=function(){return{offset:this.offset,reporter:ph.prototype.save.call(this)}},mh.prototype.restore=function(e){const t=new mh(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,ph.prototype.restore.call(this,e.reporter),t},mh.prototype.isEmpty=function(){return this.offset===this.length},mh.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},mh.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new mh(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},mh.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},fh.EncoderBuffer=yh,yh.isEncoderBuffer=function(e){return e instanceof yh||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},yh.prototype.join=function(e,t){return e||(e=gh.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):gh.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e};const vh=ch.Reporter,bh=fh.EncoderBuffer,wh=fh.DecoderBuffer,Ah=qa,_h=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],Eh=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(_h);function Sh(e,t,r){const n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}var kh=Sh;const xh=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Sh.prototype.clone=function(){const e=this._baseState,t={};xh.forEach((function(r){t[r]=e[r]}));const r=new this.constructor(t.parent);return r._baseState=t,r},Sh.prototype._wrap=function(){const e=this._baseState;Eh.forEach((function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},Sh.prototype._init=function(e){const t=this._baseState;Ah(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),Ah.equal(t.children.length,1,"Root node can have only one child")},Sh.prototype._useArgs=function(e){const t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(Ah(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(Ah(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);const n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){Sh.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),_h.forEach((function(e){Sh.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return Ah(null===t.tag),t.tag=e,this._useArgs(r),this}})),Sh.prototype.use=function(e){Ah(e);const t=this._baseState;return Ah(null===t.use),t.use=e,this},Sh.prototype.optional=function(){return this._baseState.optional=!0,this},Sh.prototype.def=function(e){const t=this._baseState;return Ah(null===t.default),t.default=e,t.optional=!0,this},Sh.prototype.explicit=function(e){const t=this._baseState;return Ah(null===t.explicit&&null===t.implicit),t.explicit=e,this},Sh.prototype.implicit=function(e){const t=this._baseState;return Ah(null===t.explicit&&null===t.implicit),t.implicit=e,this},Sh.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},Sh.prototype.key=function(e){const t=this._baseState;return Ah(null===t.key),t.key=e,this},Sh.prototype.any=function(){return this._baseState.any=!0,this},Sh.prototype.choice=function(e){const t=this._baseState;return Ah(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},Sh.prototype.contains=function(e){const t=this._baseState;return Ah(null===t.use),t.contains=e,this},Sh.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let n,i=r.default,o=!0,a=null;if(null!==r.key&&(a=e.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(o=this._peekTag(e,n,r.any),e.isError(o))return o}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(n)}}if(r.obj&&o&&(n=e.enterObject()),o){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?i=e.raw(t):e=n}if(t&&t.track&&null!==r.tag&&t.track(e.path(),n,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new wh(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(n,t)}}return r.obj&&o&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==a&&e.exitKey(a):e.leaveKey(a,r.key,i),i},Sh.prototype._decodeGeneric=function(e,t,r){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},Sh.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),Ah(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},Sh.prototype._decodeChoice=function(e,t){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(o){const a=e.save(),s=r.choice[o];try{const r=s._decode(e,t);if(e.isError(r))return!1;n={type:o,value:r},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},Sh.prototype._createEncoderBuffer=function(e){return new bh(e,this.reporter)},Sh.prototype._encode=function(e,t,r){const n=this._baseState;if(null!==n.default&&n.default===e)return;const i=this._encodeValue(e,t,r);return void 0===i||this._skipDefault(i,t,r)?void 0:i},Sh.prototype._encodeValue=function(e,t,r){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new vh);let i=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}let o=null,a=!1;if(n.any)i=this._createEncoderBuffer(e);else if(n.choice)i=this._encodeChoice(e,t);else if(n.contains)o=this._getUse(n.contains,r)._encode(e,t),a=!0;else if(n.children)o=n.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");const n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(r){const n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),r))}else null!==n.use?i=this._getUse(n.use,r)._encode(e,t):(o=this._encodePrimitive(n.tag,e),a=!0);if(!n.any&&null===n.choice){const e=null!==n.implicit?n.implicit:n.tag,r=null===n.implicit?"universal":"context";null===e?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(i=this._encodeComposite(e,a,r,o))}return null!==n.explicit&&(i=this._encodeComposite(n.explicit,!1,"context",i)),i},Sh.prototype._encodeChoice=function(e,t){const r=this._baseState,n=r.choice[e.type];return n||Ah(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},Sh.prototype._encodePrimitive=function(e,t){const r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},Sh.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},Sh.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)};var Ch={};!function(e){function t(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=t(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=t(e.tag)}(Ch);const Ih=Ke,Th=sh.Buffer,Oh=kh,Ph=Ch;function Mh(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new Nh,this.tree._init(e.body)}var Rh=Mh;function Nh(e){Oh.call(this,"der",e)}function Lh(e){return e<10?"0"+e:e}Mh.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},Ih(Nh,Oh),Nh.prototype._encodeComposite=function(e,t,r,n){const i=function(e,t,r,n){let i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),Ph.tagByName.hasOwnProperty(e))i=Ph.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=Ph.tagClassByName[r||"universal"]<<6,i)}(e,t,r,this.reporter);if(n.length<128){const e=Th.alloc(2);return e[0]=i,e[1]=n.length,this._createEncoderBuffer([e,n])}let o=1;for(let s=n.length;s>=256;s>>=8)o++;const a=Th.alloc(2+o);a[0]=i,a[1]=128|o;for(let s=1+o,c=n.length;c>0;s--,c>>=8)a[s]=255&c;return this._createEncoderBuffer([a,n])},Nh.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=Th.alloc(2*e.length);for(let r=0;r=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let a=0;a=128;t>>=7)n++}const i=Th.alloc(n);let o=i.length-1;for(let a=e.length-1;a>=0;a--){let t=e[a];for(i[o--]=127&t;(t>>=7)>0;)i[o--]=128|127&t}return this._createEncoderBuffer(i)},Nh.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[Lh(n.getUTCFullYear()),Lh(n.getUTCMonth()+1),Lh(n.getUTCDate()),Lh(n.getUTCHours()),Lh(n.getUTCMinutes()),Lh(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[Lh(n.getUTCFullYear()%100),Lh(n.getUTCMonth()+1),Lh(n.getUTCDate()),Lh(n.getUTCHours()),Lh(n.getUTCMinutes()),Lh(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},Nh.prototype._encodeNull=function(){return this._createEncoderBuffer("")},Nh.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!Th.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=Th.from(t)}if(Th.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=Th.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let i=e;i>=256;i>>=8)r++;const n=new Array(r);for(let i=n.length-1;i>=0;i--)n[i]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(Th.from(n))},Nh.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},Nh.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},Nh.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:Vh.tag[r]}}function Qh(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let o=0;or-a-2)throw new Error("message too long");var s=ug.alloc(r-n-a-2),c=r-o-1,u=rg(o),l=og(ug.concat([i,s,ug.alloc(1,1),t],c),ig(u,c)),d=og(u,ig(l,o));return new ag(ug.concat([ug.alloc(1),d,l],r))}(o,t);else if(1===n)i=function(e,t,r){var n,i=t.length,o=e.modulus.byteLength();if(i>o-11)throw new Error("message too long");return n=r?ug.alloc(o-i-3,255):function(e){for(var t,r=ug.allocUnsafe(e),n=0,i=rg(2*e),o=0;n=0)throw new Error("data too long for modulus")}return r?cg(i,o):sg(i,o)},dg=Bp,fg=Qp,hg=Zp,pg=uu,gg=Su,mg=Fo,yg=eg,vg=Fe().Buffer,bg=function(e,t,r){var n;n=e.padding?e.padding:r?1:4;var i,o=dg(e),a=o.modulus.byteLength();if(t.length>a||new pg(t).cmp(o.modulus)>=0)throw new Error("decryption error");i=r?yg(new pg(t),o):gg(t,o);var s=vg.alloc(a-i.length);if(i=vg.concat([s,i],a),4===n)return function(e,t){var r=e.modulus.byteLength(),n=mg("sha1").update(vg.alloc(0)).digest(),i=n.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,i+1),a=t.slice(i+1),s=hg(o,fg(a,i)),c=hg(a,fg(s,r-i-1));if(function(e,t){e=vg.from(e),t=vg.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++i=t.length){o++;break}var a=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,i,r);if(3===n)return i;throw new Error("unknown padding")};!function(e){e.publicEncrypt=lg,e.privateDecrypt=bg,e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}}(Kp);var wg={};function Ag(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var _g,Eg=Fe(),Sg=Eg.Buffer,kg=Eg.kMaxLength,xg=r.crypto||r.msCrypto,Cg=Math.pow(2,32)-1;function Ig(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>Cg||e<0)throw new TypeError("offset must be a uint32");if(e>kg||e>t)throw new RangeError("offset out of range")}function Tg(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>Cg||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>kg)throw new RangeError("buffer too small")}function Og(e,t,r,n){var i=e.buffer,o=new Uint8Array(i,t,r);return xg.getRandomValues(o),n?void Ee((function(){n(null,e)})):e}function Pg(){if(_g)return de;_g=1,de.randomBytes=de.rng=de.pseudoRandomBytes=de.prng=Ve,de.createHash=de.Hash=Fo,de.createHmac=de.Hmac=ia;var e=aa,t=Object.keys(e),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(t);de.getHashes=function(){return r};var n=sa;de.pbkdf2=n.pbkdf2,de.pbkdf2Sync=n.pbkdf2Sync;var i=Ba;de.Cipher=i.Cipher,de.createCipher=i.createCipher,de.Cipheriv=i.Cipheriv,de.createCipheriv=i.createCipheriv,de.Decipher=i.Decipher,de.createDecipher=i.createDecipher,de.Decipheriv=i.Decipheriv,de.createDecipheriv=i.createDecipheriv,de.getCiphers=i.getCiphers,de.listCiphers=i.listCiphers;var o=function(){if(mu)return ru;mu=1;var e=hu(),t=yu,r=function(){if(gu)return pu;gu=1;var e=uu,t=new(fu()),r=new e(24),n=new e(11),i=new e(10),o=new e(3),a=new e(7),s=hu(),c=Ve;function u(t,r){return r=r||"utf8",ie(t)||(t=new A(t,r)),this._pub=new e(t),this}function l(t,r){return r=r||"utf8",ie(t)||(t=new A(t,r)),this._priv=new e(t),this}pu=f;var d={};function f(t,r,n){this.setGenerator(r),this.__prime=new e(t),this._prime=e.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=u,this.setPrivateKey=l):this._primeCode=8}function h(e,t){var r=new A(e.toArray());return t?r.toString(t):r}return Object.defineProperty(f.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,c){var u=c.toString("hex"),l=[u,e.toString(16)].join("_");if(l in d)return d[l];var f,h=0;if(e.isEven()||!s.simpleSieve||!s.fermatTest(e)||!t.test(e))return h+=1,h+="02"===u||"05"===u?8:4,d[l]=h,h;switch(t.test(e.shrn(1))||(h+=2),u){case"02":e.mod(r).cmp(n)&&(h+=8);break;case"05":(f=e.mod(i)).cmp(o)&&f.cmp(a)&&(h+=8);break;default:h+=4}return d[l]=h,h}(this.__prime,this.__gen)),this._primeCode}}),f.prototype.generateKeys=function(){return this._priv||(this._priv=new e(c(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},f.prototype.computeSecret=function(t){var r=new A((t=(t=new e(t)).toRed(this._prime)).redPow(this._priv).fromRed().toArray()),n=this.getPrime();if(r.length0&&r.ishrn(n),r}function u(r,n,i){var o,a;do{for(o=e.alloc(0);8*o.length=t)throw new Error("invalid sig")}return jp=function(a,s,c,u,l){var d=n(c);if("ec"===d.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,n){var o=i[n.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var a=new r(o),s=n.data.subjectPrivateKey.data;return a.verify(t,e,s)}(a,s,d)}if("dsa"===d.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,r,i){var a=i.data.p,s=i.data.q,c=i.data.g,u=i.data.pub_key,l=n.signature.decode(e,"der"),d=l.s,f=l.r;o(d,s),o(f,s);var h=t.mont(a),p=d.invm(s);return 0===c.toRed(h).redPow(new t(r).mul(p).mod(s)).fromRed().mul(u.toRed(h).redPow(f.mul(p).mod(s)).fromRed()).mod(a).mod(s).cmp(f)}(a,s,d)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");s=e.concat([l,s]);for(var f=d.modulus.byteLength(),h=[1],p=0;s.length+h.length+2{switch(e){case"sha256":case"sha3-256":case"blake2s256":return 32;case"sha512":case"sha3-512":case"blake2b512":return 64;case"sha224":case"sha3-224":return 28;case"sha384":case"sha3-384":return 48;case"sha1":return 20;case"md5":return 16;default:{let t=Lg[e];return void 0===t&&(t=Rg(e).digest().length,Lg[e]=t),t}}},Dg=(e,t,r,n)=>{const i=Mg.isBuffer(r)?r:Mg.from(r),o=n&&n.length?Mg.from(n):Mg.alloc(t,0);return Ng(e,o).update(i).digest()},Ug=(e,t,r,n,i)=>{const o=Mg.isBuffer(i)?i:Mg.from(i||""),a=o.length,s=Math.ceil(n/t);if(s>255)throw new Error(`OKM length ${n} is too long for ${e} hash`);const c=Mg.alloc(t*s+a+1);for(let u=1,l=0,d=0;u<=s;++u)o.copy(c,d),c[d+a]=u,Ng(e,r).update(c.slice(l,d+a+1)).digest().copy(c,d),l=d,d+=t;return c.slice(0,n)};function jg(e,t){let{salt:r="",info:n="",hash:i="SHA-256"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i=i.toLowerCase().replace("-","");const o=Bg(i),a=Dg(i,o,e,r);return Ug(i,o,a,t,n)}Object.defineProperties(jg,{hash_length:{configurable:!1,enumerable:!1,writable:!1,value:Bg},extract:{configurable:!1,enumerable:!1,writable:!1,value:Dg},expand:{configurable:!1,enumerable:!1,writable:!1,value:Ug}});var Fg=jg;const zg="Impossible case. Please create issue.",qg="The tweak was out of range or the resulted private key is invalid",Hg="The tweak was out of range or equal to zero",Vg="Public Key could not be parsed",$g="Public Key serialization error",Kg="Signature could not be parsed";function Wg(e,t){if(!e)throw new Error(t)}function Gg(e,t,r){if(Wg(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==r)if(Array.isArray(r)){const n=`Expected ${e} to be an Uint8Array with length [${r.join(", ")}]`;Wg(r.includes(t.length),n)}else{const n=`Expected ${e} to be an Uint8Array with length ${r}`;Wg(t.length===r,n)}}function Qg(e){Wg("Boolean"===Zg(e),"Expected compressed to be a Boolean")}function Yg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>new Uint8Array(e),t=arguments.length>1?arguments[1]:void 0;return"function"==typeof e&&(e=e(t)),Gg("output",e,t),e}function Zg(e){return Object.prototype.toString.call(e).slice(8,-1)}var Jg={},Xg={},em={exports:{}};!function(e){!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:le.Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=s(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[u]=0|d,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+n:c+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var f=l[e],h=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?g+n:u[f-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,u=new e(o),l=this.clone();if(c){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],w=8191&b,A=b>>>13,_=0|a[4],E=8191&_,S=_>>>13,k=0|a[5],x=8191&k,C=k>>>13,I=0|a[6],T=8191&I,O=I>>>13,P=0|a[7],M=8191&P,R=P>>>13,N=0|a[8],L=8191&N,B=N>>>13,D=0|a[9],U=8191&D,j=D>>>13,F=0|s[0],z=8191&F,q=F>>>13,H=0|s[1],V=8191&H,$=H>>>13,K=0|s[2],W=8191&K,G=K>>>13,Q=0|s[3],Y=8191&Q,Z=Q>>>13,J=0|s[4],X=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],de=8191&le,fe=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(u+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(f,z)|0))<<13)|0;u=((o=Math.imul(f,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(g,z)|0,o=Math.imul(g,q);var ye=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(f,V)|0))<<13)|0;u=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(v,z)|0,o=Math.imul(v,q),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,$)|0;var ve=(u+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,W)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,G)|0;var be=(u+(n=n+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,Y)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var we=(u+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(C,z)|0,o=Math.imul(C,q),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var Ae=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;u=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var _e=(u+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;u=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,q))+Math.imul(R,z)|0,o=Math.imul(R,q),n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((o=o+Math.imul(f,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,q))+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0;var Se=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,q))+Math.imul(j,z)|0,o=Math.imul(j,q),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,$)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,fe)|0;var ke=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ge)|0)+Math.imul(f,pe)|0))<<13)|0;u=((o=o+Math.imul(f,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,$))+Math.imul(j,V)|0,o=Math.imul(j,$),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(v,de)|0,o=o+Math.imul(v,fe)|0;var xe=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;u=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,G))+Math.imul(j,W)|0,o=Math.imul(j,G),n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,ue)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,fe)|0;var Ce=(u+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(v,pe)|0))<<13)|0;u=((o=o+Math.imul(v,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,Y),i=(i=Math.imul(U,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,ue)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,fe)|0;var Ie=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,X),i=(i=Math.imul(U,ee))+Math.imul(j,X)|0,o=Math.imul(j,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Te=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(S,pe)|0))<<13)|0;u=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(j,re)|0,o=Math.imul(j,ne),n=n+Math.imul(L,oe)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(T,de)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(O,de)|0,o=o+Math.imul(O,fe)|0;var Oe=(u+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ge)|0)+Math.imul(C,pe)|0))<<13)|0;u=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,ae))+Math.imul(j,oe)|0,o=Math.imul(j,ae),n=n+Math.imul(L,ce)|0,i=(i=i+Math.imul(L,ue)|0)+Math.imul(B,ce)|0,o=o+Math.imul(B,ue)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Pe=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(j,ce)|0,o=Math.imul(j,ue),n=n+Math.imul(L,de)|0,i=(i=i+Math.imul(L,fe)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,fe)|0;var Me=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,de),i=(i=Math.imul(U,fe))+Math.imul(j,de)|0,o=Math.imul(j,fe);var Re=(u+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ge)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(u+(n=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul(j,pe)|0))<<13)|0;return u=((o=Math.imul(j,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c[0]=me,c[1]=ye,c[2]=ve,c[3]=be,c[4]=we,c[5]=Ae,c[6]=_e,c[7]=Ee,c[8]=Se,c[9]=ke,c[10]=xe,c[11]=Ce,c[12]=Ie,c[13]=Te,c[14]=Oe,c[15]=Pe,c[16]=Me,c[17]=Re,c[18]=Ne,0!==u&&(c[19]=u,r.length++),r};function p(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(h=f),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?h(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>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,e,t):p(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,a=0|o.words[o.length-1];0!=(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,c=n.length-o.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var f=67108864*(0|n.words[o.length+d])+(0|n.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(o,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(o,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},i.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(l),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,g=1;0==(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),a.isub(c)):(n.isub(t),s.isub(o),c.isub(a))}return{a:s,b:c,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,l=1;0==(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){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 A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},n(v,y),v.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return m[e]=t,t},_.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var g=h,m=0;0!==g.cmp(s);m++)g=g.redSqr();r(m=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var d=u>>l&1;o!==r[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4==++s||0===n&&0===l)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}c=26}return o},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},n(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),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(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,r)}(em);var tm=em.exports,rm=nm;function nm(e,t){if(!e)throw new Error(t||"Assertion failed")}nm.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var im={};!function(e){var t=e;function r(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",n=0;n>8,a=255&i;o?r.push(o,a):r.push(a)}return r},t.zero2=r,t.toHex=n,t.encode=function(e,t){return"hex"===t?n(e):e}}(im),function(e){var t=e,r=tm,n=rm,i=im;t.assert=n,t.toArray=i.toArray,t.zero2=i.zero2,t.toHex=i.toHex,t.encode=i.encode,t.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},t.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,c=e.andln(3)+i&3,u=t.andln(3)+o&3;3===c&&(c=-1),3===u&&(u=-1),a=0==(1&c)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==u?c:-c,r[0].push(a),s=0==(1&u)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==c?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},t.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},t.parseBytes=function(e){return"string"==typeof e?t.toArray(e,"hex"):e},t.intFromLE=function(e){return new r(e,"hex","le")}}(Xg);var om,am={exports:{}};function sm(e){this.rand=e}if(am.exports=function(e){return om||(om=new sm(null)),om.generate(e)},am.exports.Rand=sm,sm.prototype.generate=function(e){return this._rand(e)},sm.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var ym=mm;function vm(e,t){this.curve=e,this.type=t,this.precomputed=null}mm.prototype.point=function(){throw new Error("Not implemented")},mm.prototype.validate=function(){throw new Error("Not implemented")},mm.prototype._fixedNafMul=function(e,t){gm(e.precomputed);var r=e._getDoubles(),n=hm(t,1,this._bitLength),i=(1<=o;c--)a=(a<<1)+n[c];s.push(a)}for(var u=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(o=0;o=0;s--){for(var c=0;s>=0&&0===o[s];s--)c++;if(s>=0&&c++,a=a.dblp(c),s<0)break;var u=o[s];gm(0!==u),a="affine"===e.type?u>0?a.mixedAdd(i[u-1>>1]):a.mixedAdd(i[-u-1>>1].neg()):u>0?a.add(i[u-1>>1]):a.add(i[-u-1>>1].neg())}return"affine"===e.type?a.toP():a},mm.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,c=this._wnafT1,u=this._wnafT2,l=this._wnafT3,d=0;for(o=0;o=1;o-=2){var h=o-1,p=o;if(1===c[h]&&1===c[p]){var g=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(g[1]=t[h].add(t[p]),g[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(g[1]=t[h].toJ().mixedAdd(t[p]),g[2]=t[h].add(t[p].neg())):(g[1]=t[h].toJ().mixedAdd(t[p]),g[2]=t[h].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],y=pm(r[h],r[p]);for(d=Math.max(y[0].length,d),l[h]=new Array(d),l[p]=new Array(d),a=0;a=0;o--){for(var _=0;o>=0;){var E=!0;for(a=0;a=0&&_++,w=w.dblp(_),o<0)break;for(a=0;a0?s=u[a][S-1>>1]:S<0&&(s=u[a][-S-1>>1].neg()),w="affine"===s.type?w.mixedAdd(s):w.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},vm.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(o=t,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}]},km.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:c.add(u).neg()}},km.prototype.pointFromX=function(e,t){(e=new Am(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},km.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},km.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},Cm.prototype.isInfinity=function(){return this.inf},Cm.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},Cm.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},Cm.prototype.getX=function(){return this.x.fromRed()},Cm.prototype.getY=function(){return this.y.fromRed()},Cm.prototype.mul=function(e){return e=new Am(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Cm.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},Cm.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},Cm.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Cm.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},Cm.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},_m(Im,Em.BasePoint),km.prototype.jpoint=function(e,t,r){return new Im(this,e,t,r)},Im.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},Im.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Im.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),d=n.redMul(u),f=c.redSqr().redIAdd(l).redISub(d).redISub(d),h=c.redMul(d.redISub(f)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},Im.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=r.redMul(c),d=s.redSqr().redIAdd(u).redISub(l).redISub(l),f=s.redMul(l.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},Im.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},Im.prototype.inspect=function(){return this.isInfinity()?"":""},Im.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Tm=tm,Om=wm,Pm=ym,Mm=Xg;function Rm(e){Pm.call(this,"mont",e),this.a=new Tm(e.a,16).toRed(this.red),this.b=new Tm(e.b,16).toRed(this.red),this.i4=new Tm(4).toRed(this.red).redInvm(),this.two=new Tm(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Om(Rm,Pm);var Nm=Rm;function Lm(e,t,r){Pm.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Tm(t,16),this.z=new Tm(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Rm.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},Om(Lm,Pm.BasePoint),Rm.prototype.decodePoint=function(e,t){return this.point(Mm.toArray(e,t),1)},Rm.prototype.point=function(e,t){return new Lm(this,e,t)},Rm.prototype.pointFromJSON=function(e){return Lm.fromJSON(this,e)},Lm.prototype.precompute=function(){},Lm.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},Lm.fromJSON=function(e,t){return new Lm(e,t[0],t[1]||e.one)},Lm.prototype.inspect=function(){return this.isInfinity()?"":""},Lm.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Lm.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},Lm.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},Lm.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),c=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},Lm.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},Lm.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},Lm.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},Lm.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},Lm.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},Lm.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var Bm=tm,Dm=wm,Um=ym,jm=Xg.assert;function Fm(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,Um.call(this,"edwards",e),this.a=new Bm(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Bm(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Bm(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),jm(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}Dm(Fm,Um);var zm=Fm;function qm(e,t,r,n,i){Um.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Bm(t,16),this.y=new Bm(r,16),this.z=n?new Bm(n,16):this.curve.one,this.t=i&&new Bm(i,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()))))}Fm.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},Fm.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},Fm.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},Fm.prototype.pointFromX=function(e,t){(e=new Bm(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=n.redMul(i.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)},Fm.prototype.pointFromY=function(e,t){(e=new Bm(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),o=n.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},Fm.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},Dm(qm,Um.BasePoint),Fm.prototype.pointFromJSON=function(e){return qm.fromJSON(this,e)},Fm.prototype.point=function(e,t,r,n){return new qm(this,e,t,r,n)},qm.fromJSON=function(e,t){return new qm(e,t[0],t[1],t[2])},qm.prototype.inspect=function(){return this.isInfinity()?"":""},qm.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},qm.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),c=i.redMul(a),u=o.redMul(s),l=i.redMul(s),d=a.redMul(o);return this.curve.point(c,u,d,l)},qm.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(c);this.zOne?(e=a.redSub(s).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(c)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=a.redSub(s).redISub(c).redMul(o),t=u.redMul(n.redSub(c)),r=u.redMul(o))}else n=s.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(c)),r=n.redMul(o);return this.curve.point(e,t,r)},qm.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},qm.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),c=r.redAdd(t),u=o.redMul(a),l=s.redMul(c),d=o.redMul(c),f=a.redMul(s);return this.curve.point(u,l,f,d)},qm.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),c=i.redSub(s),u=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(c).redMul(l);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=c.redMul(u)):(t=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(c).redMul(u)),this.curve.point(d,t,r)},qm.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},qm.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},qm.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},qm.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},qm.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},qm.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},qm.prototype.getX=function(){return this.normalize(),this.x.fromRed()},qm.prototype.getY=function(){return this.normalize(),this.y.fromRed()},qm.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},qm.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},qm.prototype.toP=qm.prototype.normalize,qm.prototype.mixedAdd=qm.prototype.add,function(e){var t=e;t.base=ym,t.short=xm,t.mont=Nm,t.edwards=zm}(lm);var Hm={},Vm={},$m={},Km=rm,Wm=wm;function Gm(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function Qm(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function Ym(e){return 1===e.length?"0"+e:e}function Zm(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}$m.inherits=Wm,$m.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&o|128):Gm(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i>>0}return o},$m.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},$m.rotr32=function(e,t){return e>>>t|e<<32-t},$m.rotl32=function(e,t){return e<>>32-t},$m.sum32=function(e,t){return e+t>>>0},$m.sum32_3=function(e,t,r){return e+t+r>>>0},$m.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},$m.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},$m.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},$m.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},$m.sum64_lo=function(e,t,r,n){return t+n>>>0},$m.sum64_4_hi=function(e,t,r,n,i,o,a,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},$m.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},$m.sum64_5_hi=function(e,t,r,n,i,o,a,s,c,u){var l=0,d=t;return l+=(d=d+n>>>0)>>0)>>0)>>0)>>0},$m.sum64_5_lo=function(e,t,r,n,i,o,a,s,c,u){return t+n+o+s+u>>>0},$m.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},$m.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},$m.shr64_hi=function(e,t,r){return e>>>r},$m.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0};var Jm={},Xm=$m,ey=rm;function ty(){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}Jm.BlockHash=ty,ty.prototype.update=function(e,t){if(e=Xm.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=Xm.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o>>3},ny.g1_256=function(e){return iy(e,17)^iy(e,19)^e>>>10};var cy=$m,uy=Jm,ly=ny,dy=cy.rotl32,fy=cy.sum32,hy=cy.sum32_5,py=ly.ft_1,gy=uy.BlockHash,my=[1518500249,1859775393,2400959708,3395469782];function yy(){if(!(this instanceof yy))return new yy;gy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}cy.inherits(yy,gy);var vy=yy;yy.blockSize=512,yy.outSize=160,yy.hmacStrength=80,yy.padLength=64,yy.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),Dv(e.length<=this.blockSize);for(var t=e.length;t=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var Kv=$v;$v.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},$v.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=Hv.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var Zv=tm,Jv=Xg,Xv=Jv.assert;function eb(e,t){if(e instanceof eb)return e;this._importDER(e,t)||(Xv(e.r&&e.s,"Signature without r or s"),this.r=new Zv(e.r,16),this.s=new Zv(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var tb=eb;function rb(){this.place=0}function nb(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function ib(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}eb.prototype._importDER=function(e,t){e=Jv.toArray(e,t);var r=new rb;if(48!==e[r.place++])return!1;var n=nb(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=nb(e,r);if(!1===i)return!1;var o=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var a=nb(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;var s=e.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 Zv(o),this.s=new Zv(s),this.recoveryParam=null,!0},eb.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=ib(t),r=ib(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];ob(n,t.length),(n=n.concat(t)).push(2),ob(n,r.length);var i=n.concat(r),o=[48];return ob(o,i.length),o=o.concat(i),Jv.encode(o,e)};var ab=tm,sb=Kv,cb=Hm,ub=um,lb=Xg.assert,db=Yv,fb=tb;function hb(e){if(!(this instanceof hb))return new hb(e);"string"==typeof e&&(lb(Object.prototype.hasOwnProperty.call(cb,e),"Unknown curve "+e),e=cb[e]),e instanceof cb.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var pb=hb;hb.prototype.keyPair=function(e){return new db(this,e)},hb.prototype.keyFromPrivate=function(e,t){return db.fromPrivate(this,e,t)},hb.prototype.keyFromPublic=function(e,t){return db.fromPublic(this,e,t)},hb.prototype.genKeyPair=function(e){e||(e={});for(var t=new sb({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||ub(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new ab(2));;){var i=new ab(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},hb.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},hb.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new ab(e,16));for(var i=this.n.byteLength(),o=t.getPrivate().toArray("be",i),a=e.toArray("be",i),s=new sb({hash:this.hash,entropy:o,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new ab(1)),u=0;;u++){var l=n.k?n.k(u):new ab(s.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(c)>=0)){var d=this.g.mul(l);if(!d.isInfinity()){var f=d.getX(),h=f.umod(this.n);if(0!==h.cmpn(0)){var p=l.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var g=(d.getY().isOdd()?1:0)|(0!==f.cmp(h)?2:0);return n.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),g^=1),new fb({r:h,s:p,recoveryParam:g})}}}}}},hb.prototype.verify=function(e,t,r,n){e=this._truncateToN(new ab(e,16)),r=this.keyFromPublic(r,n);var i=(t=new fb(t,"hex")).r,o=t.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),c=s.mul(e).umod(this.n),u=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),u)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(c,r.getPublic(),u)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)},hb.prototype.recoverPubKey=function(e,t,r,n){lb((3&r)===r,"The recovery param is more than two bits"),t=new fb(t,n);var i=this.n,o=new ab(e),a=t.r,s=t.s,c=1&r,u=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");a=u?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var l=t.r.invm(i),d=i.sub(o).mul(l).umod(i),f=s.mul(l).umod(i);return this.g.mulAdd(d,a,f)},hb.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new fb(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var gb=Xg,mb=gb.assert,yb=gb.parseBytes,vb=gb.cachedProperty;function bb(e,t){this.eddsa=e,this._secret=yb(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=yb(t.pub)}bb.fromPublic=function(e,t){return t instanceof bb?t:new bb(e,{pub:t})},bb.fromSecret=function(e,t){return t instanceof bb?t:new bb(e,{secret:t})},bb.prototype.secret=function(){return this._secret},vb(bb,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),vb(bb,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),vb(bb,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),vb(bb,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),vb(bb,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),vb(bb,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),bb.prototype.sign=function(e){return mb(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},bb.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},bb.prototype.getSecret=function(e){return mb(this._secret,"KeyPair is public only"),gb.encode(this.secret(),e)},bb.prototype.getPublic=function(e){return gb.encode(this.pubBytes(),e)};var wb=bb,Ab=tm,_b=Xg,Eb=_b.assert,Sb=_b.cachedProperty,kb=_b.parseBytes;function xb(e,t){this.eddsa=e,"object"!=typeof t&&(t=kb(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),Eb(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof Ab&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}Sb(xb,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Sb(xb,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Sb(xb,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Sb(xb,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),xb.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},xb.prototype.toHex=function(){return _b.encode(this.toBytes(),"hex").toUpperCase()};var Cb=xb,Ib=Vm,Tb=Hm,Ob=Xg,Pb=Ob.assert,Mb=Ob.parseBytes,Rb=wb,Nb=Cb;function Lb(e){if(Pb("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof Lb))return new Lb(e);e=Tb[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=Ib.sha512}var Bb=Lb;Lb.prototype.sign=function(e,t){e=Mb(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),s=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},Lb.prototype.verify=function(e,t,r){e=Mb(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},Lb.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=0)return null;r=r.toRed(Ub.red);let n=r.redSqr().redIMul(r).redIAdd(Ub.b).redSqrt();return 3===e!==n.isOdd()&&(n=n.redNeg()),Db.keyPair({pub:{x:r,y:n}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){let n=new jb(t),i=new jb(r);if(n.cmp(Ub.p)>=0||i.cmp(Ub.p)>=0)return null;if(n=n.toRed(Ub.red),i=i.toRed(Ub.red),(6===e||7===e)&&i.isOdd()!==(7===e))return null;const o=n.redSqr().redIMul(n);return i.redSqr().redISub(o.redIAdd(Ub.b)).isZero()?Db.keyPair({pub:{x:n,y:i}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function zb(e,t){const r=t.encode(null,33===e.length);for(let n=0;n0,privateKeyVerify(e){const t=new jb(e);return t.cmp(Ub.n)<0&&!t.isZero()?0:1},privateKeyNegate(e){const t=new jb(e),r=Ub.n.sub(t).umod(Ub.n).toArrayLike(Uint8Array,"be",32);return e.set(r),0},privateKeyTweakAdd(e,t){const r=new jb(t);if(r.cmp(Ub.n)>=0)return 1;if(r.iadd(new jb(e)),r.cmp(Ub.n)>=0&&r.isub(Ub.n),r.isZero())return 1;const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul(e,t){let r=new jb(t);if(r.cmp(Ub.n)>=0||r.isZero())return 1;r.imul(new jb(e)),r.cmp(Ub.n)>=0&&(r=r.umod(Ub.n));const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:e=>null===Fb(e)?1:0,publicKeyCreate(e,t){const r=new jb(t);return r.cmp(Ub.n)>=0||r.isZero()?1:(zb(e,Db.keyFromPrivate(t).getPublic()),0)},publicKeyConvert(e,t){const r=Fb(t);return null===r?1:(zb(e,r.getPublic()),0)},publicKeyNegate(e,t){const r=Fb(t);if(null===r)return 1;const n=r.getPublic();return n.y=n.y.redNeg(),zb(e,n),0},publicKeyCombine(e,t){const r=new Array(t.length);for(let i=0;i=0)return 2;const i=n.getPublic().add(Ub.g.mul(r));return i.isInfinity()?2:(zb(e,i),0)},publicKeyTweakMul(e,t,r){const n=Fb(t);return null===n?1:(r=new jb(r)).cmp(Ub.n)>=0||r.isZero()?2:(zb(e,n.getPublic().mul(r)),0)},signatureNormalize(e){const t=new jb(e.subarray(0,32)),r=new jb(e.subarray(32,64));return t.cmp(Ub.n)>=0||r.cmp(Ub.n)>=0?1:(1===r.cmp(Db.nh)&&e.set(Ub.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,t){const r=t.subarray(0,32),n=t.subarray(32,64);if(new jb(r).cmp(Ub.n)>=0)return 1;if(new jb(n).cmp(Ub.n)>=0)return 1;const{output:i}=e;let o=i.subarray(4,37);o[0]=0,o.set(r,1);let a=33,s=0;for(;a>1&&0===o[s]&&!(128&o[s+1]);--a,++s);if(o=o.subarray(s),128&o[0])return 1;if(a>1&&0===o[0]&&!(128&o[1]))return 1;let c=i.subarray(39,72);c[0]=0,c.set(n,1);let u=33,l=0;for(;u>1&&0===c[l]&&!(128&c[l+1]);--u,++l);return c=c.subarray(l),128&c[0]||u>1&&0===c[0]&&!(128&c[1])?1:(e.outputlen=6+a+u,i[0]=48,i[1]=e.outputlen-2,i[2]=2,i[3]=o.length,i.set(o,4),i[4+a]=2,i[5+a]=c.length,i.set(c,6+a),0)},signatureImport(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;const r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;const n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;let i=t.subarray(4,4+r);if(33===i.length&&0===i[0]&&(i=i.subarray(1)),i.length>32)return 1;let o=t.subarray(6+r);if(33===o.length&&0===o[0]&&(o=o.slice(1)),o.length>32)throw new Error("S length is too long");let a=new jb(i);a.cmp(Ub.n)>=0&&(a=new jb(0));let s=new jb(t.subarray(6+r));return s.cmp(Ub.n)>=0&&(s=new jb(0)),e.set(a.toArrayLike(Uint8Array,"be",32),0),e.set(s.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(e,t,r,n,i){if(i){const e=i;i=i=>{const o=e(t,r,null,n,i);if(!(o instanceof Uint8Array&&32===o.length))throw new Error("This is the way");return new jb(o)}}const o=new jb(r);if(o.cmp(Ub.n)>=0||o.isZero())return 1;let a;try{a=Db.sign(t,r,{canonical:!0,k:i,pers:n})}catch(e){return 1}return e.signature.set(a.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(a.s.toArrayLike(Uint8Array,"be",32),32),e.recid=a.recoveryParam,0},ecdsaVerify(e,t,r){const n={r:e.subarray(0,32),s:e.subarray(32,64)},i=new jb(n.r),o=new jb(n.s);if(i.cmp(Ub.n)>=0||o.cmp(Ub.n)>=0)return 1;if(1===o.cmp(Db.nh)||i.isZero()||o.isZero())return 3;const a=Fb(r);if(null===a)return 2;const s=a.getPublic();return Db.verify(t,n,s)?0:3},ecdsaRecover(e,t,r,n){const i={r:t.slice(0,32),s:t.slice(32,64)},o=new jb(i.r),a=new jb(i.s);if(o.cmp(Ub.n)>=0||a.cmp(Ub.n)>=0)return 1;if(o.isZero()||a.isZero())return 2;let s;try{s=Db.recoverPubKey(n,i,r)}catch(e){return 2}return zb(e,s),0},ecdh(e,t,r,n,i,o,a){const s=Fb(t);if(null===s)return 1;const c=new jb(r);if(c.cmp(Ub.n)>=0||c.isZero())return 2;const u=s.getPublic().mul(c);if(void 0===i){const t=u.encode(null,!0),r=Db.hash().update(t).digest();for(let n=0;n<32;++n)e[n]=r[n]}else{o||(o=new Uint8Array(32));const t=u.getX().toArray("be",32);for(let e=0;e<32;++e)o[e]=t[e];a||(a=new Uint8Array(32));const r=u.getY().toArray("be",32);for(let e=0;e<32;++e)a[e]=r[e];const s=i(o,a,n);if(!(s instanceof Uint8Array&&s.length===e.length))return 2;e.set(s)}return 0}},Hb=(e=>({contextRandomize(t){if(Wg(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&Gg("seed",t,32),1===e.contextRandomize(t))throw new Error("Unknow error on context randomization")},privateKeyVerify:t=>(Gg("private key",t,32),0===e.privateKeyVerify(t)),privateKeyNegate(t){switch(Gg("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(zg)}},privateKeyTweakAdd(t,r){switch(Gg("private key",t,32),Gg("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(qg)}},privateKeyTweakMul(t,r){switch(Gg("private key",t,32),Gg("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(Hg)}},publicKeyVerify:t=>(Gg("public key",t,[33,65]),0===e.publicKeyVerify(t)),publicKeyCreate(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(Gg("private key",t,32),Qg(r),n=Yg(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error("Private Key is invalid");case 2:throw new Error($g)}},publicKeyConvert(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(Gg("public key",t,[33,65]),Qg(r),n=Yg(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(Vg);case 2:throw new Error($g)}},publicKeyNegate(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(Gg("public key",t,[33,65]),Qg(r),n=Yg(n,r?33:65),e.publicKeyNegate(n,t)){case 0:return n;case 1:throw new Error(Vg);case 2:throw new Error(zg);case 3:throw new Error($g)}},publicKeyCombine(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;Wg(Array.isArray(t),"Expected public keys to be an Array"),Wg(t.length>0,"Expected public keys array will have more than zero items");for(const e of t)Gg("public key",e,[33,65]);switch(Qg(r),n=Yg(n,r?33:65),e.publicKeyCombine(n,t)){case 0:return n;case 1:throw new Error(Vg);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error($g)}},publicKeyTweakAdd(t,r){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(Gg("public key",t,[33,65]),Gg("tweak",r,32),Qg(n),i=Yg(i,n?33:65),e.publicKeyTweakAdd(i,t,r)){case 0:return i;case 1:throw new Error(Vg);case 2:throw new Error(qg)}},publicKeyTweakMul(t,r){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(Gg("public key",t,[33,65]),Gg("tweak",r,32),Qg(n),i=Yg(i,n?33:65),e.publicKeyTweakMul(i,t,r)){case 0:return i;case 1:throw new Error(Vg);case 2:throw new Error(Hg)}},signatureNormalize(t){switch(Gg("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(Kg)}},signatureExport(t,r){Gg("signature",t,64);const n={output:r=Yg(r,72),outputlen:72};switch(e.signatureExport(n,t)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(Kg);case 2:throw new Error(zg)}},signatureImport(t,r){switch(Gg("signature",t),r=Yg(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(Kg);case 2:throw new Error(zg)}},ecdsaSign(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;Gg("message",t,32),Gg("private key",r,32),Wg("Object"===Zg(n),"Expected options to be an Object"),void 0!==n.data&&Gg("options.data",n.data),void 0!==n.noncefn&&Wg("Function"===Zg(n.noncefn),"Expected options.noncefn to be a Function");const o={signature:i=Yg(i,64),recid:null};switch(e.ecdsaSign(o,t,r,n.data,n.noncefn)){case 0:return o;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(zg)}},ecdsaVerify(t,r,n){switch(Gg("signature",t,64),Gg("message",r,32),Gg("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(Kg);case 2:throw new Error(Vg)}},ecdsaRecover(t,r,n){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4?arguments[4]:void 0;switch(Gg("signature",t,64),Wg("Number"===Zg(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),Gg("message",n,32),Qg(i),o=Yg(o,i?33:65),e.ecdsaRecover(o,t,r,n)){case 0:return o;case 1:throw new Error(Kg);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(zg)}},ecdh(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(Gg("public key",t,[33,65]),Gg("private key",r,32),Wg("Object"===Zg(n),"Expected options to be an Object"),void 0!==n.data&&Gg("options.data",n.data),void 0!==n.hashfn?(Wg("Function"===Zg(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&Gg("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&Gg("options.ybuf",n.ybuf,32),Gg("output",i)):i=Yg(i,32),e.ecdh(i,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(Vg);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}}))(qb),Vb={},$b={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SECRET_KEY_LENGTH=e.AES_IV_PLUS_TAG_LENGTH=e.AES_TAG_LENGTH=e.AES_IV_LENGTH=e.UNCOMPRESSED_PUBLIC_KEY_SIZE=void 0,e.UNCOMPRESSED_PUBLIC_KEY_SIZE=65,e.AES_IV_LENGTH=16,e.AES_TAG_LENGTH=16,e.AES_IV_PLUS_TAG_LENGTH=e.AES_IV_LENGTH+e.AES_TAG_LENGTH,e.SECRET_KEY_LENGTH=32}($b);var Kb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vb,"__esModule",{value:!0}),Vb.aesDecrypt=Vb.aesEncrypt=Vb.getValidSecret=Vb.decodeHex=Vb.remove0x=void 0;var Wb=Pg(),Gb=Kb(Hb),Qb=$b;function Yb(e){return e.startsWith("0x")||e.startsWith("0X")?e.slice(2):e}Vb.remove0x=Yb,Vb.decodeHex=function(e){return A.from(Yb(e),"hex")},Vb.getValidSecret=function(){var e;do{e=(0,Wb.randomBytes)(Qb.SECRET_KEY_LENGTH)}while(!Gb.default.privateKeyVerify(e));return e},Vb.aesEncrypt=function(e,t){var r=(0,Wb.randomBytes)(Qb.AES_IV_LENGTH),n=(0,Wb.createCipheriv)("aes-256-gcm",e,r),i=A.concat([n.update(t),n.final()]),o=n.getAuthTag();return A.concat([r,o,i])},Vb.aesDecrypt=function(e,t){var r=t.slice(0,Qb.AES_IV_LENGTH),n=t.slice(Qb.AES_IV_LENGTH,Qb.AES_IV_PLUS_TAG_LENGTH),i=t.slice(Qb.AES_IV_PLUS_TAG_LENGTH),o=(0,Wb.createDecipheriv)("aes-256-gcm",e,r);return o.setAuthTag(n),A.concat([o.update(i),o.final()])};var Zb={},Jb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zb,"__esModule",{value:!0});var Xb=Jb(Fg),ew=Jb(Hb),tw=Vb,rw=$b,nw=function(){function e(e){this.uncompressed=A.from(ew.default.publicKeyConvert(e,!1)),this.compressed=A.from(ew.default.publicKeyConvert(e,!0))}return e.fromHex=function(t){var r=(0,tw.decodeHex)(t);if(r.length===rw.UNCOMPRESSED_PUBLIC_KEY_SIZE-1){var n=A.from([4]);return new e(A.concat([n,r]))}return new e(r)},e.prototype.toHex=function(e){return void 0===e&&(e=!0),e?this.compressed.toString("hex"):this.uncompressed.toString("hex")},e.prototype.decapsulate=function(e){var t=A.concat([this.uncompressed,e.multiply(this)]);return(0,Xb.default)(t,32,{hash:"SHA-256"})},e.prototype.equals=function(e){return this.uncompressed.equals(e.uncompressed)},e}();Zb.default=nw;var iw=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ue,"__esModule",{value:!0});var ow=iw(Fg),aw=iw(Hb),sw=Vb,cw=iw(Zb),uw=function(){function e(e){if(this.secret=e||(0,sw.getValidSecret)(),!aw.default.privateKeyVerify(this.secret))throw new Error("Invalid private key");this.publicKey=new cw.default(A.from(aw.default.publicKeyCreate(this.secret)))}return e.fromHex=function(t){return new e((0,sw.decodeHex)(t))},e.prototype.toHex=function(){return"0x".concat(this.secret.toString("hex"))},e.prototype.encapsulate=function(e){var t=A.concat([this.publicKey.uncompressed,this.multiply(e)]);return(0,ow.default)(t,32,{hash:"SHA-256"})},e.prototype.multiply=function(e){return A.from(aw.default.publicKeyTweakMul(e.compressed,this.secret,!1))},e.prototype.equals=function(e){return this.secret.equals(e.secret)},e}();ue.default=uw,function(e){var t=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.PublicKey=e.PrivateKey=void 0;var n=ue;Object.defineProperty(e,"PrivateKey",{enumerable:!0,get:function(){return t(n).default}});var i=Zb;Object.defineProperty(e,"PublicKey",{enumerable:!0,get:function(){return t(i).default}})}(ce),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.PublicKey=e.PrivateKey=e.decrypt=e.encrypt=void 0;var t=ce,r=Vb,n=$b;e.encrypt=function(e,n){var i=new t.PrivateKey,o=e instanceof A?new t.PublicKey(e):t.PublicKey.fromHex(e),a=i.encapsulate(o),s=(0,r.aesEncrypt)(a,n);return A.concat([i.publicKey.uncompressed,s])},e.decrypt=function(e,i){var o=e instanceof A?new t.PrivateKey(e):t.PrivateKey.fromHex(e),a=new t.PublicKey(i.slice(0,n.UNCOMPRESSED_PUBLIC_KEY_SIZE)),s=i.slice(n.UNCOMPRESSED_PUBLIC_KEY_SIZE),c=a.decapsulate(o);return(0,r.aesDecrypt)(c,s)};var i=ce;Object.defineProperty(e,"PrivateKey",{enumerable:!0,get:function(){return i.PrivateKey}}),Object.defineProperty(e,"PublicKey",{enumerable:!0,get:function(){return i.PublicKey}}),e.utils={aesDecrypt:r.aesDecrypt,aesEncrypt:r.aesEncrypt,decodeHex:r.decodeHex,getValidSecret:r.getValidSecret,remove0x:r.remove0x}}(se);var lw={exports:{}};!function(e){!function(t){var r=Object.hasOwnProperty,n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i="object"==typeof De&&!0,o="function"==typeof Symbol,a="object"==typeof Reflect,s="function"==typeof setImmediate?setImmediate:setTimeout,c=o?a&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function u(){this._events={},this._conf&&l.call(this,this._conf)}function l(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==t&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function d(e,t){var r="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(r+=" Event name: "+t+"."),void 0!==De&&De.emitWarning){var n=new Error(r);n.name="MaxListenersExceededWarning",n.emitter=this,n.count=e,De.emitWarning(n)}else console.error(r),console.trace&&console.trace()}var f=function(e,t,r){var n=arguments.length;switch(n){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,r];default:for(var i=new Array(n);n--;)i[n]=arguments[n];return i}};function h(e,r){for(var n={},i=e.length,o=r?r.length:0,a=0;a0;)if(o===e[a])return n;i(t)}}Object.assign(p.prototype,{subscribe:function(e,t,r){var n=this,i=this._target,o=this._emitter,a=this._listeners,s=function(){var n=f.apply(null,arguments),a={data:n,name:t,original:e};r?!1!==r.call(i,a)&&o.emit.apply(o,[a.name].concat(n)):o.emit.apply(o,[t].concat(n))};if(a[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,o._newListener&&o._removeListener&&!n._onNewListener?(this._onNewListener=function(r){r===t&&null===a[e]&&(a[e]=s,n._on.call(i,e,s))},o.on("newListener",this._onNewListener),this._onRemoveListener=function(r){r===t&&!o.hasListeners(r)&&a[e]&&(a[e]=null,n._off.call(i,e,s))},a[e]=null,o.on("removeListener",this._onRemoveListener)):(a[e]=s,n._on.call(i,e,s))},unsubscribe:function(e){var t,r,n,i=this,o=this._listeners,a=this._emitter,s=this._off,u=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function l(){i._onNewListener&&(a.off("newListener",i._onNewListener),a.off("removeListener",i._onRemoveListener),i._onNewListener=null,i._onRemoveListener=null);var e=A.call(a,i);a._observers.splice(e,1)}if(e){if(!(t=o[e]))return;s.call(u,e,t),delete o[e],--this._listenersCount||l()}else{for(n=(r=c(o)).length;n-- >0;)e=r[n],s.call(u,e,o[e]);this._listeners={},this._listenersCount=0,l()}}});var v=y(["function"]),b=y(["object","function"]);function w(e,t,r){var n,i,o,a=0,s=new e((function(c,u,l){function d(){i&&(i=null),a&&(clearTimeout(a),a=0)}r=g(r,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),n=!r.overload&&"function"==typeof e.prototype.cancel&&"function"==typeof l;var f=function(e){d(),c(e)},h=function(e){d(),u(e)};n?t(f,h,l):(i=[function(e){h(e||Error("canceled"))}],t(f,h,(function(e){if(o)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");i.push(e)})),o=!0),r.timeout>0&&(a=setTimeout((function(){var e=Error("timeout");e.code="ETIMEDOUT",a=0,s.cancel(e),u(e)}),r.timeout))}));return n||(s.cancel=function(e){if(i){for(var t=i.length,r=1;r0;)"_listeners"!==(h=v[s])&&(b=_(e,t,r[h],n+1,i))&&(w?w.push.apply(w,b):w=b);return w}if("**"===A){for((y=n+1===i||n+2===i&&"*"===E)&&r._listeners&&(w=_(e,t,r,i,i)),s=(v=c(r)).length;s-- >0;)"_listeners"!==(h=v[s])&&("*"===h||"**"===h?(r[h]._listeners&&!y&&(b=_(e,t,r[h],i,i))&&(w?w.push.apply(w,b):w=b),b=_(e,t,r[h],n,i)):b=_(e,t,r[h],h===E?n+2:n,i),b&&(w?w.push.apply(w,b):w=b));return w}r[A]&&(w=_(e,t,r[A],n+1,i))}if((p=r["*"])&&_(e,t,p,n+1,i),g=r["**"])if(n0;)"_listeners"!==(h=v[s])&&(h===E?_(e,t,g[h],n+2,i):h===A?_(e,t,g[h],n+1,i):((m={})[h]=g[h],_(e,t,{"**":m},n+1,i)));else g._listeners?_(e,t,g,i,i):g["*"]&&g["*"]._listeners&&_(e,t,g["*"],i,i);return w}function E(e,t,r){var n,i,o=0,a=0,s=this.delimiter,c=s.length;if("string"==typeof e)if(-1!==(n=e.indexOf(s))){i=new Array(5);do{i[o++]=e.slice(a,n),a=n+c}while(-1!==(n=e.indexOf(s,a)));i[o++]=e.slice(a)}else i=[e],o=1;else i=e,o=e.length;if(o>1)for(n=0;n+10&&l._listeners.length>this._maxListeners&&(l._listeners.warned=!0,d.call(this,l._listeners.length,u))):l._listeners=t,!0;return!0}function S(e,t,r,n){for(var i,o,a,s,u=c(e),l=u.length,d=e._listeners;l-- >0;)i=e[o=u[l]],a="_listeners"===o?r:r?r.concat(o):[o],s=n||"symbol"==typeof o,d&&t.push(s?a:a.join(this.delimiter)),"object"==typeof i&&S.call(this,i,t,a,s);return t}function k(e){for(var t,r,n,i=c(e),o=i.length;o-- >0;)(t=e[r=i[o]])&&(n=!0,"_listeners"===r||k(t)||delete e[r]);return n}function x(e,t,r){this.emitter=e,this.event=t,this.listener=r}function C(e,r,n){if(!0===n)a=!0;else if(!1===n)o=!0;else{if(!n||"object"!=typeof n)throw TypeError("options should be an object or true");var o=n.async,a=n.promisify,c=n.nextTick,u=n.objectify}if(o||c||a){var l=r,d=r._origin||r;if(c&&!i)throw Error("process.nextTick is not supported");a===t&&(a="AsyncFunction"===r.constructor.name),r=function(){var e=arguments,t=this,r=this.event;return a?c?Promise.resolve():new Promise((function(e){s(e)})).then((function(){return t.event=r,l.apply(t,e)})):(c?Ee:s)((function(){t.event=r,l.apply(t,e)}))},r._async=!0,r._origin=d}return[r,u?new x(this,e,r):this]}function I(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,l.call(this,e)}x.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},I.EventEmitter2=I,I.prototype.listenTo=function(e,r,i){if("object"!=typeof e)throw TypeError("target musts be an object");var o=this;function a(t){if("object"!=typeof t)throw TypeError("events must be an object");var r,n=i.reducers,a=A.call(o,e);r=-1===a?new p(o,e,i):o._observers[a];for(var s,u=c(t),l=u.length,d="function"==typeof n,f=0;f0;)n=r[i],e&&n._target!==e||(n.unsubscribe(t),o=!0);return o},I.prototype.delimiter=".",I.prototype.setMaxListeners=function(e){e!==t&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},I.prototype.getMaxListeners=function(){return this._maxListeners},I.prototype.event="",I.prototype.once=function(e,t,r){return this._once(e,t,!1,r)},I.prototype.prependOnceListener=function(e,t,r){return this._once(e,t,!0,r)},I.prototype._once=function(e,t,r,n){return this._many(e,1,t,r,n)},I.prototype.many=function(e,t,r,n){return this._many(e,t,r,!1,n)},I.prototype.prependMany=function(e,t,r,n){return this._many(e,t,r,!0,n)},I.prototype._many=function(e,t,r,n,i){var o=this;if("function"!=typeof r)throw new Error("many only accepts instances of Function");function a(){return 0==--t&&o.off(e,a),r.apply(this,arguments)}return a._origin=r,this._on(e,a,n,i)},I.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||u.call(this);var e,t,r,n,i,a,s=arguments[0],c=this.wildcard;if("newListener"===s&&!this._newListener&&!this._events.newListener)return!1;if(c&&(e=s,"newListener"!==s&&"removeListener"!==s&&"object"==typeof s)){if(r=s.length,o)for(n=0;n3)for(t=new Array(d-1),i=1;i3)for(r=new Array(f-1),a=1;a0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,d.call(this,this._events[e].length,e))):this._events[e]=r,a)},I.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var r,i=[];if(this.wildcard){var o="string"==typeof e?e.split(this.delimiter):e.slice();if(!(i=_.call(this,null,o,this.listenerTree,0)))return this}else{if(!this._events[e])return this;r=this._events[e],i.push({_listeners:r})}for(var a=0;a0){for(r=0,n=(t=this._all).length;r0;)"function"==typeof(n=s[r[o]])?i.push(n):i.push.apply(i,n);return i}if(this.wildcard){if(!(a=this.listenerTree))return[];var u=[],l="string"==typeof e?e.split(this.delimiter):e.slice();return _.call(this,u,l,a,0),u}return s&&(n=s[e])?"function"==typeof n?[n]:n:[]},I.prototype.eventNames=function(e){var t=this._events;return this.wildcard?S.call(this,this.listenerTree,[],null,e):t?c(t):[]},I.prototype.listenerCount=function(e){return this.listeners(e).length},I.prototype.hasListeners=function(e){if(this.wildcard){var r=[],n="string"==typeof e?e.split(this.delimiter):e.slice();return _.call(this,r,n,this.listenerTree,0),r.length>0}var i=this._events,o=this._all;return!!(o&&o.length||i&&(e===t?c(i).length:i[e]))},I.prototype.listenersAny=function(){return this._all?this._all:[]},I.prototype.waitFor=function(e,r){var n=this,i=typeof r;return"number"===i?r={timeout:r}:"function"===i&&(r={filter:r}),w((r=g(r,{timeout:0,filter:t,handleError:!1,Promise:Promise,overload:!1},{filter:v,Promise:m})).Promise,(function(t,i,o){function a(){var o=r.filter;if(!o||o.apply(n,arguments))if(n.off(e,a),r.handleError){var s=arguments[0];s?i(s):t(f.apply(null,arguments).slice(1))}else t(f.apply(null,arguments))}o((function(){n.off(e,a)})),n._on(e,a,!1)}),{timeout:r.timeout,overload:r.overload})};var T=I.prototype;Object.defineProperties(I,{defaultMaxListeners:{get:function(){return T._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");T._maxListeners=e},enumerable:!0},once:{value:function(e,t,r){return w((r=g(r,{Promise:Promise,timeout:0,overload:!1},{Promise:m})).Promise,(function(r,n,i){var o;if("function"==typeof e.addEventListener)return o=function(){r(f.apply(null,arguments))},i((function(){e.removeEventListener(t,o)})),void e.addEventListener(t,o,{once:!0});var a,s=function(){a&&e.removeListener("error",a),r(f.apply(null,arguments))};"error"!==t&&(a=function(r){e.removeListener(t,s),n(r)},e.once("error",a)),i((function(){a&&e.removeListener("error",a),e.removeListener(t,s)})),e.once(t,s)}),{timeout:r.timeout,overload:r.overload})},writable:!0,configurable:!0}}),Object.defineProperties(T,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),"function"==typeof t&&t.amd?t((function(){return I})):e.exports=I}()}(lw);var dw,fw=lw.exports,hw=new Uint8Array(16);function pw(){if(!dw&&!(dw="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dw(hw)}var gw=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function mw(e){return"string"==typeof e&&gw.test(e)}for(var yw=[],vw=0;vw<256;++vw)yw.push((vw+256).toString(16).substr(1));function bw(e,t,r){var n=(e=e||{}).random||(e.rng||pw)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(yw[e[t+0]]+yw[e[t+1]]+yw[e[t+2]]+yw[e[t+3]]+"-"+yw[e[t+4]]+yw[e[t+5]]+"-"+yw[e[t+6]]+yw[e[t+7]]+"-"+yw[e[t+8]]+yw[e[t+9]]+"-"+yw[e[t+10]]+yw[e[t+11]]+yw[e[t+12]]+yw[e[t+13]]+yw[e[t+14]]+yw[e[t+15]]).toLowerCase();if(!mw(r))throw TypeError("Stringified UUID is invalid");return r}(n)}const ww=Object.create(null);ww.open="0",ww.close="1",ww.ping="2",ww.pong="3",ww.message="4",ww.upgrade="5",ww.noop="6";const Aw=Object.create(null);Object.keys(ww).forEach((e=>{Aw[ww[e]]=e}));const _w={type:"error",data:"parser error"},Ew="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Sw="function"==typeof ArrayBuffer,kw=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,xw=(e,t,r)=>{let{type:n,data:i}=e;return Ew&&i instanceof Blob?t?r(i):Cw(i,r):Sw&&(i instanceof ArrayBuffer||kw(i))?t?r(i):Cw(new Blob([i]),r):r(ww[n]+(i||""))},Cw=(e,t)=>{const r=new FileReader;return r.onload=function(){const e=r.result.split(",")[1];t("b"+(e||""))},r.readAsDataURL(e)};function Iw(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Tw;function Ow(e,t){return Ew&&e.data instanceof Blob?e.data.arrayBuffer().then(Iw).then(t):Sw&&(e.data instanceof ArrayBuffer||kw(e.data))?t(Iw(e.data)):void xw(e,!1,(e=>{Tw||(Tw=new TextEncoder),t(Tw.encode(e))}))}const Pw="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let ur=0;ur<64;ur++)Pw["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(ur)]=ur;const Mw="function"==typeof ArrayBuffer,Rw=(e,t)=>{if("string"!=typeof e)return{type:"message",data:Lw(e,t)};const r=e.charAt(0);return"b"===r?{type:"message",data:Nw(e.substring(1),t)}:Aw[r]?e.length>1?{type:Aw[r],data:e.substring(1)}:{type:Aw[r]}:_w},Nw=(e,t)=>{if(Mw){const r=(e=>{let t,r,n,i,o,a=.75*e.length,s=e.length,c=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);const u=new ArrayBuffer(a),l=new Uint8Array(u);for(t=0;t>4,l[c++]=(15&n)<<4|i>>2,l[c++]=(3&i)<<6|63&o;return u})(e);return Lw(r,t)}return{base64:!0,data:e}},Lw=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Bw=String.fromCharCode(30);let Dw;function Uw(e){if(e)return function(e){for(var t in Uw.prototype)e[t]=Uw.prototype[t];return e}(e)}Uw.prototype.on=Uw.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Uw.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},Uw.prototype.off=Uw.prototype.removeListener=Uw.prototype.removeAllListeners=Uw.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i1?t-1:0),n=1;n(e.hasOwnProperty(r)&&(t[r]=e[r]),t)),{})}const zw=jw.setTimeout,qw=jw.clearTimeout;function Hw(e,t){t.useNativeTimers?(e.setTimeoutFn=zw.bind(jw),e.clearTimeoutFn=qw.bind(jw)):(e.setTimeoutFn=jw.setTimeout.bind(jw),e.clearTimeoutFn=jw.clearTimeout.bind(jw))}class Vw extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}}class $w extends Uw{constructor(e){super(),this.writable=!1,Hw(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,r){return super.emitReserved("error",new Vw(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Rw(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}(e);return t.length?"?"+t:""}}const Kw="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Ww=64,Gw={};let Qw,Yw=0,Zw=0;function Jw(e){let t="";do{t=Kw[e%Ww]+t,e=Math.floor(e/Ww)}while(e>0);return t}function Xw(){const e=Jw(+new Date);return e!==Qw?(Yw=0,Qw=e):e+"."+Jw(Yw++)}for(;Zw{var e;3===r.readyState&&(null===(e=this.opts.cookieJar)||void 0===e||e.parseCookies(r)),4===r.readyState&&(200===r.status||1223===r.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=oA.requestsCount++,oA.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=nA,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete oA.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}function aA(){for(let e in oA.requests)oA.requests.hasOwnProperty(e)&&oA.requests[e].abort()}oA.requestsCount=0,oA.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",aA):"function"==typeof addEventListener&&addEventListener("onpagehide"in jw?"pagehide":"unload",aA,!1));const sA="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),cA=jw.WebSocket||jw.MozWebSocket,uA="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();function lA(e,t){return"message"===e.type&&"string"!=typeof e.data&&t[0]>=48&&t[0]<=54}const dA={websocket:class extends $w{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,r=uA?{}:Fw(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=uA?new cA(e,t,r):t?new cA(e,t):new cA(e)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t{try{this.ws.send(e)}catch(e){}n&&sA((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Xw()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!cA}},webtransport:class extends $w{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((e=>{this.onError("webtransport error",e)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((e=>{const t=e.readable.getReader();let r;this.writer=e.writable.getWriter();const n=()=>{t.read().then((e=>{let{done:t,value:i}=e;t||(r||1!==i.byteLength||54!==i[0]?(this.onPacket(function(e,t){Dw||(Dw=new TextDecoder);const r=t||e[0]<48||e[0]>54;return Rw(r?e:Dw.decode(e),"arraybuffer")}(i,r)),r=!1):r=!0,n())})).catch((e=>{}))};n();const i=this.query.sid?`0{"sid":"${this.query.sid}"}`:"0";this.writer.write((new TextEncoder).encode(i)).then((()=>this.onOpen()))}))})))}write(e){this.writable=!1;for(let t=0;t{lA(r,e)&&this.writer.write(Uint8Array.of(54)),this.writer.write(e).then((()=>{n&&sA((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}))}}doClose(){var e;null===(e=this.transport)||void 0===e||e.close()}},polling:class extends $w{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let r=location.port;r||(r=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||r!==e.port}const t=e&&e.forceBase64;this.supportsBinary=iA&&!t,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const r=e.split(Bw),n=[];for(let i=0;i{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const r=e.length,n=new Array(r);let i=0;e.forEach(((e,o)=>{xw(e,!1,(e=>{n[o]=e,++i===r&&t(n.join(Bw))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Xw()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}request(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new oA(this.uri(),e)}doWrite(e,t){const r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}},fA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,hA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function pA(e){const t=e,r=e.indexOf("["),n=e.indexOf("]");-1!=r&&-1!=n&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let i=fA.exec(e||""),o={},a=14;for(;a--;)o[hA[a]]=i[a]||"";return-1!=r&&-1!=n&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(e,t){const r=t.replace(/\/{2,9}/g,"/").split("/");return"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1),"/"==t.slice(-1)&&r.splice(r.length-1,1),r}(0,o.path),o.queryKey=function(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(r[t]=n)})),r}(0,o.query),o}let gA=class e extends Uw{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=pA(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=pA(t.host).host),Hw(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},r=e.split("&");for(let n=0,i=r.length;n{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const r=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new dA[e](r)}open(){let t;if(this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(e){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(t){let r=this.createTransport(t),n=!1;e.priorWebsocketSuccess=!1;const i=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",(t=>{if(!n)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;e.priorWebsocketSuccess="websocket"===r.name,this.transport.pause((()=>{n||"closed"!==this.readyState&&(l(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=r.name,this.emitReserved("upgradeError",e)}})))};function o(){n||(n=!0,l(),r.close(),r=null)}const a=e=>{const t=new Error("probe error: "+e);t.transport=r.name,o(),this.emitReserved("upgradeError",t)};function s(){a("transport closed")}function c(){a("socket closed")}function u(e){r&&e.name!==r.name&&o()}const l=()=>{r.removeListener("open",i),r.removeListener("error",a),r.removeListener("close",s),this.off("close",c),this.off("upgrading",u)};r.once("open",i),r.once("error",a),r.once("close",s),this.once("close",c),this.once("upgrading",u),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((()=>{n||r.open()}),200):r.open()}onOpen(){if(this.readyState="open",e.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let r=0;r=57344?r+=3:(n++,r+=4);return r}(t):Math.ceil(1.33*(t.byteLength||t.size))),r>0&&e>this.maxPayload)return this.writeBuffer.slice(0,r);e+=2}var t;return this.writeBuffer}write(e,t,r){return this.sendPacket("message",e,t,r),this}send(e,t,r){return this.sendPacket("message",e,t,r),this}sendPacket(e,t,r,n){if("function"==typeof t&&(n=t,t=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const i={type:e,data:t,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),n&&this.once("flush",n),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},r=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?r():e()})):this.upgrading?r():e()),this}onError(t){e.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let r=0;const n=e.length;for(;r"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,vA=Object.prototype.toString,bA="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===vA.call(Blob),wA="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===vA.call(File);function AA(e){return mA&&(e instanceof ArrayBuffer||yA(e))||bA&&e instanceof Blob||wA&&e instanceof File}function _A(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,r=e.length;t=0&&e.num1?t-1:0),n=1;n{delete this.acks[e];for(let t=0;t1?t-1:0),n=1;n{r.push(((e,r)=>i?e?n(e):t(r):t(e))),this.emit(e,...r)}))}_addToQueue(e){var t=this;let r;"function"==typeof e[e.length-1]&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((function(e){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;at._opts.retries&&(t._queue.shift(),r&&r(e)):(t._queue.shift(),r&&r(null,...o)),n.pending=!1,t._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:IA.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case IA.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case IA.EVENT:case IA.BINARY_EVENT:this.onevent(e);break;case IA.ACK:case IA.BINARY_ACK:this.onack(e);break;case IA.DISCONNECT:this.ondisconnect();break;case IA.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const r of t)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let r=!1;return function(){for(var n=arguments.length,i=new Array(n),o=0;othis.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:IA.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}BA.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-r:e+r}return 0|Math.min(e,this.max)},BA.prototype.reset=function(){this.attempts=0},BA.prototype.setMin=function(e){this.ms=e},BA.prototype.setMax=function(e){this.max=e},BA.prototype.setJitter=function(e){this.jitter=e};class DA extends Uw{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,Hw(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(r=t.randomizationFactor)&&void 0!==r?r:.5),this.backoff=new BA({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const n=t.parser||MA;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new gA(this.uri,this.opts);const t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const n=RA(t,"open",(function(){r.onopen(),e&&e()})),i=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},o=RA(t,"error",i);if(!1!==this._timeout){const e=this._timeout,r=this.setTimeoutFn((()=>{n(),i(new Error("timeout")),t.close()}),e);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}return this.subs.push(n),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(RA(e,"ping",this.onping.bind(this)),RA(e,"data",this.ondata.bind(this)),RA(e,"error",this.onerror.bind(this)),RA(e,"close",this.onclose.bind(this)),RA(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){sA((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new LA(this,e,t),this.nsps[e]=r),r}_destroy(e){const t=Object.keys(this.nsps);for(const r of t)if(this.nsps[r].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let r=0;re())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const UA={};function jA(e,t){"object"==typeof e&&(t=e,e=void 0);const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,n=e;r=r||"undefined"!=typeof location&&location,null==e&&(e=r.protocol+"//"+r.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?r.protocol+e:r.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==r?r.protocol+"//"+e:"https://"+e),n=pA(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+t,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}(e,(t=t||{}).path||"/socket.io"),n=r.source,i=r.id,o=r.path,a=UA[i]&&o in UA[i].nsps;let s;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?s=new DA(n,t):(UA[i]||(UA[i]=new DA(n,t)),s=UA[i]),r.query&&!t.query&&(t.query=r.queryKey),s.socket(r.path,t)}function FA(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}Object.assign(jA,{Manager:DA,Socket:LA,io:jA,connect:jA}),"function"==typeof SuppressedError&&SuppressedError;var zA=void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function qA(){throw new Error("setTimeout has not been defined")}function HA(){throw new Error("clearTimeout has not been defined")}var VA=qA,$A=HA;function KA(e){if(VA===setTimeout)return setTimeout(e,0);if((VA===qA||!VA)&&setTimeout)return VA=setTimeout,setTimeout(e,0);try{return VA(e,0)}catch(t){try{return VA.call(null,e,0)}catch(t){return VA.call(this,e,0)}}}"function"==typeof zA.setTimeout&&(VA=setTimeout),"function"==typeof zA.clearTimeout&&($A=clearTimeout);var WA,GA=[],QA=!1,YA=-1;function ZA(){QA&&WA&&(QA=!1,WA.length?GA=WA.concat(GA):YA=-1,GA.length&&JA())}function JA(){if(!QA){var e=KA(ZA);QA=!0;for(var t=GA.length;t;){for(WA=GA,GA=[];++YA1)for(var r=1;r{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==h_&&"env"in h_&&(e=h_.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=function(e){function t(e){let n,i,o,a=null;function s(){for(var e=arguments.length,r=new Array(e),i=0;i{if("%%"===e)return"%";u++;const i=t.formatters[n];if("function"==typeof i){const t=r[u];e=i.call(o,t),r.splice(u,1),u--}return e})),t.formatArgs.call(o,r),(o.log||t.log).apply(o,r)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}return t_=function(o,a){a=a||{};var s=typeof o;if("string"===s&&o.length>0)return function(i){if(!((i=String(i)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(o){var a=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*n;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(o);if("number"===s&&isFinite(o))return a.long?function(o){var a=Math.abs(o);return a>=n?i(o,a,n,"day"):a>=r?i(o,a,r,"hour"):a>=t?i(o,a,t,"minute"):a>=e?i(o,a,e,"second"):o+" ms"}(o):function(i){var o=Math.abs(i);return o>=n?Math.round(i/n)+"d":o>=r?Math.round(i/r)+"h":o>=t?Math.round(i/t)+"m":o>=e?Math.round(i/e)+"s":i+"ms"}(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))}}(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;tFA(void 0,void 0,void 0,(function*(){var r;A_=t,r=e,E_.push(r),function(e){return FA(this,void 0,void 0,(function*(){if(!A_||!e)return;!function(){const e=E_;E_=__,__=e}();const t=A_.endsWith("/")?`${A_}debug`:`${A_}/debug`,r=Object.assign({},e);if(delete r.params,e.params)for(const[i,o]of Object.entries(e.params))r[i]=o;const n=JSON.stringify(r);w_.RemoteCommunication(`[sendBufferedEvents] Sending ${__.length} analytics events to ${t}`);try{const e=yield a(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:n}),r=yield e.text();w_.RemoteCommunication(`[sendBufferedEvents] Response: ${r}`),__.length=0}catch(e){console.warn("Error sending analytics",e)}}))}(e).catch((()=>{}))}));var k_=[],x_=[],C_="undefined"!=typeof Uint8Array?Uint8Array:Array,I_=!1;function T_(){I_=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)k_[t]=e[t],x_[e.charCodeAt(t)]=t;x_["-".charCodeAt(0)]=62,x_["_".charCodeAt(0)]=63}function O_(e,t,r){for(var n,i,o=[],a=t;a>18&63]+k_[i>>12&63]+k_[i>>6&63]+k_[63&i]);return o.join("")}function P_(e){var t;I_||T_();for(var r=e.length,n=r%3,i="",o=[],a=16383,s=0,c=r-n;sc?c:s+a));return 1===n?(t=e[r-1],i+=k_[t>>2],i+=k_[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=k_[t>>10],i+=k_[t>>4&63],i+=k_[t<<2&63],i+="="),o.push(i),o.join("")}function M_(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<>1,l=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+d],d+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=u}return(h?-1:1)*a*Math.pow(2,o-n)}function R_(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,u-=8);e[r+h-p]|=128*g}var N_={}.toString,L_=Array.isArray||function(e){return"[object Array]"==N_.call(e)};function B_(){return U_.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function D_(e,t){if(B_()=B_())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B_().toString(16)+" bytes");return 0|e}function V_(e){return!(null==e||!e._isBuffer)}function $_(e,t){if(V_(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return vE(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return bE(e).length;default:if(n)return vE(e).length;t=(""+t).toLowerCase(),n=!0}}function K_(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return sE(this,t,r);case"utf8":case"utf-8":return nE(this,t,r);case"ascii":return oE(this,t,r);case"latin1":case"binary":return aE(this,t,r);case"base64":return rE(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cE(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function W_(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function G_(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=U_.from(t,n)),V_(t))return 0===t.length?-1:Q_(e,t,r,n,i);if("number"==typeof t)return t&=255,U_.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Q_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Q_(e,t,r,n,i){var o,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;os&&(r=s-c),o=r;o>=0;o--){for(var d=!0,f=0;fi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function rE(e,t,r){return 0===t&&r===e.length?P_(e):P_(e.slice(t,r))}function nE(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=r)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=d}return function(e){var t=e.length;if(t<=iE)return String.fromCharCode.apply(String,e);for(var r="",n=0;n0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},U_.prototype.compare=function(e,t,r,n,i){if(!V_(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return Y_(this,e,t,r);case"utf8":case"utf-8":return Z_(this,e,t,r);case"ascii":return J_(this,e,t,r);case"latin1":case"binary":return X_(this,e,t,r);case"base64":return eE(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tE(this,e,t,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 iE=4096;function oE(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function lE(e,t,r,n,i,o){if(!V_(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function dE(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function fE(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function hE(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function pE(e,t,r,n,i){return i||hE(e,0,r,4),R_(e,t,r,n,23,4),r+4}function gE(e,t,r,n,i){return i||hE(e,0,r,8),R_(e,t,r,n,52,8),r+8}U_.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},U_.prototype.readUInt8=function(e,t){return t||uE(e,1,this.length),this[e]},U_.prototype.readUInt16LE=function(e,t){return t||uE(e,2,this.length),this[e]|this[e+1]<<8},U_.prototype.readUInt16BE=function(e,t){return t||uE(e,2,this.length),this[e]<<8|this[e+1]},U_.prototype.readUInt32LE=function(e,t){return t||uE(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},U_.prototype.readUInt32BE=function(e,t){return t||uE(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},U_.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||uE(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},U_.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||uE(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},U_.prototype.readInt8=function(e,t){return t||uE(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},U_.prototype.readInt16LE=function(e,t){t||uE(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},U_.prototype.readInt16BE=function(e,t){t||uE(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},U_.prototype.readInt32LE=function(e,t){return t||uE(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},U_.prototype.readInt32BE=function(e,t){return t||uE(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},U_.prototype.readFloatLE=function(e,t){return t||uE(e,4,this.length),M_(this,e,!0,23,4)},U_.prototype.readFloatBE=function(e,t){return t||uE(e,4,this.length),M_(this,e,!1,23,4)},U_.prototype.readDoubleLE=function(e,t){return t||uE(e,8,this.length),M_(this,e,!0,52,8)},U_.prototype.readDoubleBE=function(e,t){return t||uE(e,8,this.length),M_(this,e,!1,52,8)},U_.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||lE(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},U_.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||lE(this,e,t,1,255,0),U_.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},U_.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||lE(this,e,t,2,65535,0),U_.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):dE(this,e,t,!0),t+2},U_.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||lE(this,e,t,2,65535,0),U_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):dE(this,e,t,!1),t+2},U_.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||lE(this,e,t,4,4294967295,0),U_.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):fE(this,e,t,!0),t+4},U_.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||lE(this,e,t,4,4294967295,0),U_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):fE(this,e,t,!1),t+4},U_.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);lE(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},U_.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||lE(this,e,t,1,127,-128),U_.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},U_.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||lE(this,e,t,2,32767,-32768),U_.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):dE(this,e,t,!0),t+2},U_.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||lE(this,e,t,2,32767,-32768),U_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):dE(this,e,t,!1),t+2},U_.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||lE(this,e,t,4,2147483647,-2147483648),U_.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):fE(this,e,t,!0),t+4},U_.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||lE(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),U_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):fE(this,e,t,!1),t+4},U_.prototype.writeFloatLE=function(e,t,r){return pE(this,e,t,!0,r)},U_.prototype.writeFloatBE=function(e,t,r){return pE(this,e,t,!1,r)},U_.prototype.writeDoubleLE=function(e,t,r){return gE(this,e,t,!0,r)},U_.prototype.writeDoubleBE=function(e,t,r){return gE(this,e,t,!1,r)},U_.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!U_.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function bE(e){return function(e){var t,r,n,i,o,a;I_||T_();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new C_(3*s/4-o),n=o>0?s-4:s;var c=0;for(t=0,r=0;t>16&255,a[c++]=i>>8&255,a[c++]=255&i;return 2===o?(i=x_[e.charCodeAt(t)]<<2|x_[e.charCodeAt(t+1)]>>4,a[c++]=255&i):1===o&&(i=x_[e.charCodeAt(t)]<<10|x_[e.charCodeAt(t+1)]<<4|x_[e.charCodeAt(t+2)]>>2,a[c++]=i>>8&255,a[c++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(mE,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function wE(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function AE(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}class _E{constructor(e){this.enabled=!0,(null==e?void 0:e.debug)&&g_.enable("Ecies:Layer"),(null==e?void 0:e.privateKey)?this.ecies=se.PrivateKey.fromHex(e.privateKey):this.ecies=new se.PrivateKey,w_.Ecies("[ECIES constructor()] initialized secret: ",this.ecies.toHex()),w_.Ecies("[ECIES constructor()] initialized public: ",this.ecies.publicKey.toHex()),w_.Ecies("[ECIES constructor()] init with",this)}generateECIES(){this.ecies=new se.PrivateKey}getPublicKey(){return this.ecies.publicKey.toHex()}encrypt(e,t){let r=e;if(this.enabled)try{w_.Ecies("[ECIES: encrypt()] using otherPublicKey",t);const n=U_.from(e),i=se.encrypt(t,n);r=U_.from(i).toString("base64")}catch(r){throw w_.Ecies("[ECIES: encrypt()] error encrypt:",r),w_.Ecies("[ECIES: encrypt()] private: ",this.ecies.toHex()),w_.Ecies("[ECIES: encrypt()] data: ",e),w_.Ecies("[ECIES: encrypt()] otherkey: ",t),r}return r}decrypt(e){let t=e;if(this.enabled)try{w_.Ecies("[ECIES: decrypt()] using privateKey",this.ecies.toHex());const r=U_.from(e.toString(),"base64");t=se.decrypt(this.ecies.toHex(),r).toString()}catch(t){throw w_.Ecies("[ECIES: decrypt()] error decrypt",t),w_.Ecies("[ECIES: decrypt()] private: ",this.ecies.toHex()),w_.Ecies("[ECIES: decrypt()] encryptedData: ",e),t}return t}getKeyInfo(){return{private:this.ecies.toHex(),public:this.ecies.publicKey.toHex()}}toString(){w_.Ecies("[ECIES: toString()]",this.getKeyInfo())}}var EE="0.27.0";const SE="https://metamask-sdk.api.cx.metamask.io/",kE=["websocket"],xE=6048e5,CE="eth_requestAccounts";function IE(e){const{context:t}=e;w_.RemoteCommunication(`[RemoteCommunication: clean()] context=${t}`),e.channelConfig=void 0,e.ready=!1,e.originatorConnectStarted=!1}var TE,OE;e.ConnectionStatus=void 0,e.EventType=void 0,e.MessageType=void 0,function(e){e.DISCONNECTED="disconnected",e.WAITING="waiting",e.TIMEOUT="timeout",e.LINKED="linked",e.PAUSED="paused",e.TERMINATED="terminated"}(e.ConnectionStatus||(e.ConnectionStatus={})),function(e){e.KEY_INFO="key_info",e.SERVICE_STATUS="service_status",e.PROVIDER_UPDATE="provider_update",e.RPC_UPDATE="rpc_update",e.KEYS_EXCHANGED="keys_exchanged",e.JOIN_CHANNEL="join_channel",e.CHANNEL_CREATED="channel_created",e.CLIENTS_CONNECTED="clients_connected",e.CLIENTS_DISCONNECTED="clients_disconnected",e.CLIENTS_WAITING="clients_waiting",e.CLIENTS_READY="clients_ready",e.CHANNEL_PERSISTENCE="channel_persistence",e.MESSAGE_ACK="ack",e.SOCKET_DISCONNECTED="socket_disconnected",e.SOCKET_RECONNECT="socket_reconnect",e.OTP="otp",e.SDK_RPC_CALL="sdk_rpc_call",e.AUTHORIZED="authorized",e.CONNECTION_STATUS="connection_status",e.MESSAGE="message",e.TERMINATE="terminate"}(e.EventType||(e.EventType={})),function(e){e.KEY_EXCHANGE="key_exchange"}(TE||(TE={})),function(e){e.KEY_HANDSHAKE_START="key_handshake_start",e.KEY_HANDSHAKE_CHECK="key_handshake_check",e.KEY_HANDSHAKE_SYN="key_handshake_SYN",e.KEY_HANDSHAKE_SYNACK="key_handshake_SYNACK",e.KEY_HANDSHAKE_ACK="key_handshake_ACK",e.KEY_HANDSHAKE_NONE="none"}(OE||(OE={}));class PE extends fw.EventEmitter2{constructor(e){let{communicationLayer:t,otherPublicKey:r,context:n,ecies:i,logging:o}=e;super(),this.keysExchanged=!1,this.step=OE.KEY_HANDSHAKE_NONE,this.debug=!1,this.context=n,this.communicationLayer=t,(null==i?void 0:i.privateKey)&&r&&(w_.KeyExchange(`[KeyExchange: constructor()] otherPubKey=${r} set keysExchanged to true!`,i),this.keysExchanged=!0),this.myECIES=new _E(Object.assign(Object.assign({},i),{debug:null==o?void 0:o.eciesLayer})),this.myPublicKey=this.myECIES.getPublicKey(),this.debug=!0===(null==o?void 0:o.keyExchangeLayer),r&&this.setOtherPublicKey(r),this.communicationLayer.on(TE.KEY_EXCHANGE,this.onKeyExchangeMessage.bind(this))}onKeyExchangeMessage(t){const{relayPersistence:r}=this.communicationLayer.remote.state;if(w_.KeyExchange(`[KeyExchange: onKeyExchangeMessage()] context=${this.context} keysExchanged=${this.keysExchanged} relayPersistence=${r}`,t),r)return void w_.KeyExchange("[KeyExchange: onKeyExchangeMessage()] Ignoring key exchange message because relay persistence is activated");const{message:n}=t;this.keysExchanged&&w_.KeyExchange(`[KeyExchange: onKeyExchangeMessage()] context=${this.context} received handshake while already exchanged. step=${this.step} otherPubKey=${this.otherPublicKey}`),this.emit(e.EventType.KEY_INFO,n.type),n.type===OE.KEY_HANDSHAKE_SYN?(this.checkStep([OE.KEY_HANDSHAKE_NONE,OE.KEY_HANDSHAKE_ACK]),w_.KeyExchange("[KeyExchange: onKeyExchangeMessage()] KEY_HANDSHAKE_SYN",n),n.pubkey&&this.setOtherPublicKey(n.pubkey),this.communicationLayer.sendMessage({type:OE.KEY_HANDSHAKE_SYNACK,pubkey:this.myPublicKey}),this.setStep(OE.KEY_HANDSHAKE_ACK)):n.type===OE.KEY_HANDSHAKE_SYNACK?(this.checkStep([OE.KEY_HANDSHAKE_SYNACK,OE.KEY_HANDSHAKE_ACK,OE.KEY_HANDSHAKE_NONE]),w_.KeyExchange("[KeyExchange: onKeyExchangeMessage()] KEY_HANDSHAKE_SYNACK"),n.pubkey&&this.setOtherPublicKey(n.pubkey),this.communicationLayer.sendMessage({type:OE.KEY_HANDSHAKE_ACK}),this.keysExchanged=!0,this.setStep(OE.KEY_HANDSHAKE_ACK),this.emit(e.EventType.KEYS_EXCHANGED)):n.type===OE.KEY_HANDSHAKE_ACK&&(w_.KeyExchange("[KeyExchange: onKeyExchangeMessage()] KEY_HANDSHAKE_ACK set keysExchanged to true!"),this.checkStep([OE.KEY_HANDSHAKE_ACK,OE.KEY_HANDSHAKE_NONE]),this.keysExchanged=!0,this.setStep(OE.KEY_HANDSHAKE_ACK),this.emit(e.EventType.KEYS_EXCHANGED))}resetKeys(e){this.clean(),this.myECIES=new _E(e)}clean(){w_.KeyExchange(`[KeyExchange: clean()] context=${this.context} reset handshake state`),this.setStep(OE.KEY_HANDSHAKE_NONE),this.emit(e.EventType.KEY_INFO,this.step),this.keysExchanged=!1}start(e){let{isOriginator:t,force:r}=e;const{relayPersistence:n,protocolVersion:i}=this.communicationLayer.remote.state,o=i>=2;if(n)return w_.KeyExchange("[KeyExchange: start()] Ignoring key exchange message because relay persistence is activated"),void console.log(`[KeyExchange: start()] relayPersistence=${n}`);w_.KeyExchange(`[KeyExchange: start()] context=${this.context} protocolVersion=${i} isOriginator=${t} step=${this.step} force=${r} relayPersistence=${n} keysExchanged=${this.keysExchanged}`),t?!(this.keysExchanged||this.step!==OE.KEY_HANDSHAKE_NONE&&this.step!==OE.KEY_HANDSHAKE_SYNACK)||r?(w_.KeyExchange(`[KeyExchange: start()] context=${this.context} -- start key exchange (force=${r}) -- step=${this.step}`,this.step),this.clean(),this.setStep(OE.KEY_HANDSHAKE_SYNACK),this.communicationLayer.sendMessage({type:OE.KEY_HANDSHAKE_SYN,pubkey:this.myPublicKey,v:2})):w_.KeyExchange(`[KeyExchange: start()] context=${this.context} -- key exchange already ${this.keysExchanged?"done":"in progress"} -- aborted.`,this.step):this.keysExchanged&&!0!==r?w_.KeyExchange("[KeyExchange: start()] don't send KEY_HANDSHAKE_START -- exchange already done."):o?this.communicationLayer.sendMessage({type:OE.KEY_HANDSHAKE_SYNACK,pubkey:this.myPublicKey,v:2}):(this.communicationLayer.sendMessage({type:OE.KEY_HANDSHAKE_START}),this.clean())}setStep(t){this.step=t,this.emit(e.EventType.KEY_INFO,t)}checkStep(e){e.length>0&&-1===e.indexOf(this.step.toString())&&console.warn(`[KeyExchange: checkStep()] Wrong Step "${this.step}" not within ${e}`)}setRelayPersistence(e){let{localKey:t,otherKey:r}=e;this.otherPublicKey=r,this.myECIES=new _E({privateKey:t,debug:this.debug}),this.keysExchanged=!0}setKeysExchanged(e){this.keysExchanged=e}areKeysExchanged(){return this.keysExchanged}getMyPublicKey(){return this.myPublicKey}getOtherPublicKey(){return this.otherPublicKey}setOtherPublicKey(e){w_.KeyExchange("[KeyExchange: setOtherPubKey()]",e),this.otherPublicKey=e}encryptMessage(e){if(!this.otherPublicKey)throw new Error("encryptMessage: Keys not exchanged - missing otherPubKey");return this.myECIES.encrypt(e,this.otherPublicKey)}decryptMessage(e){if(!this.otherPublicKey)throw new Error("decryptMessage: Keys not exchanged - missing otherPubKey");return this.myECIES.decrypt(e)}getKeyInfo(){return{ecies:Object.assign(Object.assign({},this.myECIES.getKeyInfo()),{otherPubKey:this.otherPublicKey}),step:this.step,keysExchanged:this.areKeysExchanged()}}toString(){const e={keyInfo:this.getKeyInfo(),keysExchanged:this.keysExchanged,step:this.step};return JSON.stringify(e)}}!function(e){e.TERMINATE="terminate",e.ANSWER="answer",e.OFFER="offer",e.CANDIDATE="candidate",e.JSONRPC="jsonrpc",e.WALLET_INFO="wallet_info",e.ORIGINATOR_INFO="originator_info",e.PAUSE="pause",e.OTP="otp",e.AUTHORIZED="authorized",e.PING="ping",e.READY="ready"}(e.MessageType||(e.MessageType={}));const ME=e=>new Promise((t=>{setTimeout(t,e)})),RE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;return FA(void 0,void 0,void 0,(function*(){let n;const i=Date.now();let o=!1;for(;!o;){if(o=Date.now()-i>3e5,n=t[e],void 0!==n.elapsedTime)return n;yield ME(r)}throw new Error(`RPC ${e} timed out`)}))},NE=t=>FA(void 0,void 0,void 0,(function*(){var r,n,i,o,a;return t.remote.state.terminated?(w_.SocketService(`[SocketService: reconnectSocket()] instance.remote.state.terminated=${t.remote.state.terminated} socket already terminated`,t),!1):(w_.SocketService(`[SocketService: reconnectSocket()] instance.state.socket?.connected=${null===(r=t.state.socket)||void 0===r?void 0:r.connected} trying to reconnect after socketio disconnection`,t),yield ME(200),(null===(n=t.state.socket)||void 0===n?void 0:n.connected)||(t.state.resumed=!0,null===(i=t.state.socket)||void 0===i||i.connect(),t.emit(e.EventType.SOCKET_RECONNECT),null===(o=t.state.socket)||void 0===o||o.emit(e.EventType.JOIN_CHANNEL,{channelId:t.state.channelId,context:`${t.state.context}connect_again`,clientType:t.state.isOriginator?"dapp":"wallet"})),yield ME(100),null===(a=t.state.socket)||void 0===a?void 0:a.connected)}));var LE,BE;!function(e){e.REQUEST="sdk_connect_request_started",e.REQUEST_MOBILE="sdk_connect_request_started_mobile",e.RECONNECT="sdk_reconnect_request_started",e.CONNECTED="sdk_connection_established",e.CONNECTED_MOBILE="sdk_connection_established_mobile",e.AUTHORIZED="sdk_connection_authorized",e.REJECTED="sdk_connection_rejected",e.TERMINATED="sdk_connection_terminated",e.DISCONNECTED="sdk_disconnected",e.SDK_USE_EXTENSION="sdk_use_extension",e.SDK_RPC_REQUEST="sdk_rpc_request",e.SDK_RPC_REQUEST_RECEIVED="sdk_rpc_request_received",e.SDK_RPC_REQUEST_DONE="sdk_rpc_request_done",e.SDK_EXTENSION_UTILIZED="sdk_extension_utilized",e.SDK_USE_INAPP_BROWSER="sdk_use_inapp_browser"}(LE||(LE={})),function(e){e.RPC_CHECK="rpcCheck",e.SKIPPED_RPC="skippedRpc"}(BE||(BE={}));const DE=["eth_sendTransaction","eth_signTypedData","eth_signTransaction","personal_sign","wallet_requestPermissions","wallet_switchEthereumChain","eth_signTypedData_v3","eth_signTypedData_v4","metamask_connectSign","metamask_connectWith","metamask_batch"].map((e=>e.toLowerCase()));function UE(t,r){var n,i,o,a;if(!t.state.channelId)throw new Error("Create a channel first");w_.SocketService(`[SocketService: handleSendMessage()] context=${t.state.context} areKeysExchanged=${null===(n=t.state.keyExchange)||void 0===n?void 0:n.areKeysExchanged()}`,r),(null===(i=null==r?void 0:r.type)||void 0===i?void 0:i.startsWith("key_handshake"))?function(t,r){var n;w_.SocketService(`[SocketService: handleKeyHandshake()] context=${t.state.context}`,r),null===(n=t.state.socket)||void 0===n||n.emit(e.EventType.MESSAGE,{id:t.state.channelId,context:t.state.context,clientType:t.state.isOriginator?"dapp":"wallet",message:r})}(t,r):(function(e,t){var r;if(!(null===(r=e.state.keyExchange)||void 0===r?void 0:r.areKeysExchanged())&&!e.remote.state.relayPersistence)throw w_.SocketService(`[SocketService: validateKeyExchange()] context=${e.state.context} ERROR keys not exchanged`,t),console.error("[SocketService: validateKeyExchange()] ERROR keys not exchanged",t),new Error("Keys not exchanged BBB")}(t,r),function(t,r){var n;const i=null!==(n=null==r?void 0:r.method)&&void 0!==n?n:"",o=null==r?void 0:r.id;t.state.isOriginator&&o&&(t.state.rpcMethodTracker[o]={id:o,timestamp:Date.now(),method:i},t.emit(e.EventType.RPC_UPDATE,t.state.rpcMethodTracker[o]))}(t,r),function(t,r){var n,i;const o=null===(n=t.state.keyExchange)||void 0===n?void 0:n.encryptMessage(JSON.stringify(r)),a={id:t.state.channelId,context:t.state.context,clientType:t.state.isOriginator?"dapp":"wallet",message:o,plaintext:t.state.hasPlaintext?JSON.stringify(r):void 0};w_.SocketService(`[SocketService: encryptAndSendMessage()] context=${t.state.context}`,a),r.type===e.MessageType.TERMINATE&&(t.state.manualDisconnect=!0),null===(i=t.state.socket)||void 0===i||i.emit(e.EventType.MESSAGE,a)}(t,r),t.remote.state.analytics&&t.remote.state.isOriginator&&r.method&&DE.includes(r.method.toLowerCase())&&S_({id:null!==(o=t.remote.state.channelId)&&void 0!==o?o:"",event:LE.SDK_RPC_REQUEST,sdkVersion:t.remote.state.sdkVersion,commLayerVersion:EE,walletVersion:null===(a=t.remote.state.walletInfo)||void 0===a?void 0:a.version,params:{method:r.method,from:"mobile"}},t.remote.state.communicationServerUrl).catch((e=>{console.error("Cannot send analytics",e)})),function(t,r){var n;return FA(this,void 0,void 0,(function*(){const i=null==r?void 0:r.id,o=null!==(n=null==r?void 0:r.method)&&void 0!==n?n:"";if(t.state.isOriginator&&i)try{const n=RE(i,t.state.rpcMethodTracker,200).then((e=>({type:BE.RPC_CHECK,result:e}))),a=(()=>FA(this,void 0,void 0,(function*(){const e=yield(e=>{let{rpcId:t,instance:r}=e;return FA(void 0,void 0,void 0,(function*(){for(;r.state.lastRpcId===t||void 0===r.state.lastRpcId;)yield ME(200);return r.state.lastRpcId}))})({instance:t,rpcId:i}),r=yield RE(e,t.state.rpcMethodTracker,200);return{type:BE.SKIPPED_RPC,result:r}})))(),s=yield Promise.race([n,a]);if(s.type===BE.RPC_CHECK){const e=s.result;w_.SocketService(`[SocketService:handleRpcReplies()] id=${r.id} ${o} ( ${e.elapsedTime} ms)`,e.result)}else{if(s.type!==BE.SKIPPED_RPC)throw new Error(`Error handling RPC replies for ${i}`);{const{result:r}=s;console.warn(`[SocketService handleRpcReplies()] RPC METHOD HAS BEEN SKIPPED rpcid=${i} method=${o}`,r);const n=Object.assign(Object.assign({},t.state.rpcMethodTracker[i]),{error:new Error("SDK_CONNECTION_ISSUE")});t.emit(e.EventType.RPC_UPDATE,n);const a={data:Object.assign(Object.assign({},n),{jsonrpc:"2.0"}),name:"metamask-provider"};t.emit(e.EventType.MESSAGE,{message:a})}}}catch(e){throw console.warn(`[SocketService handleRpcReplies()] Error rpcId=${r.id} ${o}`,e),e}}))}(t,r).catch((e=>{console.warn("Error handleRpcReplies",e)})))}const jE=[{event:"clients_connected",handler:function(t,r){return n=>FA(this,void 0,void 0,(function*(){var n,i,o,a,s,c,u,l,d,f,h;const p=null!==(i=null===(n=t.remote.state.channelConfig)||void 0===n?void 0:n.relayPersistence)&&void 0!==i&&i;if(w_.SocketService(`[SocketService: handleClientsConnected()] context=${t.state.context} on 'clients_connected-${r}' relayPersistence=${p} resumed=${t.state.resumed} clientsPaused=${t.state.clientsPaused} keysExchanged=${null===(o=t.state.keyExchange)||void 0===o?void 0:o.areKeysExchanged()} isOriginator=${t.state.isOriginator}`),t.emit(e.EventType.CLIENTS_CONNECTED,{isOriginator:t.state.isOriginator,keysExchanged:null===(a=t.state.keyExchange)||void 0===a?void 0:a.areKeysExchanged(),context:t.state.context}),t.state.resumed)t.state.isOriginator||(w_.SocketService(`[SocketService: handleClientsConnected()] context=${t.state.context} 'clients_connected' / keysExchanged=${null===(s=t.state.keyExchange)||void 0===s?void 0:s.areKeysExchanged()} -- backward compatibility`),null===(c=t.state.keyExchange)||void 0===c||c.start({isOriginator:null!==(u=t.state.isOriginator)&&void 0!==u&&u})),t.state.resumed=!1;else if(t.state.clientsPaused)w_.SocketService("[SocketService: handleClientsConnected()] 'clients_connected' skip sending originatorInfo on pause");else if(!t.state.isOriginator){const e=!p;console.log(`[SocketService: handleClientsConnected()] context=${t.state.context} on 'clients_connected' / keysExchanged=${null===(l=t.state.keyExchange)||void 0===l?void 0:l.areKeysExchanged()} -- force=${e} -- backward compatibility`),w_.SocketService(`[SocketService: handleClientsConnected()] context=${t.state.context} on 'clients_connected' / keysExchanged=${null===(d=t.state.keyExchange)||void 0===d?void 0:d.areKeysExchanged()} -- force=${e} -- backward compatibility`),null===(f=t.state.keyExchange)||void 0===f||f.start({isOriginator:null!==(h=t.state.isOriginator)&&void 0!==h&&h,force:e})}t.state.clientsConnected=!0,t.state.clientsPaused=!1}))}},{event:"channel_created",handler:function(t,r){return n=>{w_.SocketService(`[SocketService: handleChannelCreated()] context=${t.state.context} on 'channel_created-${r}'`,n),t.emit(e.EventType.CHANNEL_CREATED,n)}}},{event:"clients_disconnected",handler:function(t,r){return()=>{var n;t.state.clientsConnected=!1,w_.SocketService(`[SocketService: handlesClientsDisconnected()] context=${t.state.context} on 'clients_disconnected-${r}'`),t.remote.state.relayPersistence?w_.SocketService(`[SocketService: handlesClientsDisconnected()] context=${t.state.context} on 'clients_disconnected-${r}' - relayPersistence enabled, skipping key exchange cleanup.`):(t.state.isOriginator&&!t.state.clientsPaused&&(null===(n=t.state.keyExchange)||void 0===n||n.clean()),t.emit(e.EventType.CLIENTS_DISCONNECTED,r))}}},{event:"config",handler:function(t,r){return n=>FA(this,void 0,void 0,(function*(){var i,o;w_.SocketService(`[SocketService: handleChannelConfig()] update relayPersistence on 'config-${r}'`,n),t.remote.state.relayPersistence=!0,t.remote.emit(e.EventType.CHANNEL_PERSISTENCE),null===(i=t.state.keyExchange)||void 0===i||i.setKeysExchanged(!0),t.state.isOriginator&&t.remote.state.channelConfig&&!t.remote.state.channelConfig.relayPersistence&&(t.remote.state.channelConfig.relayPersistence=!0,null===(o=t.remote.state.storageManager)||void 0===o||o.persistChannelConfig(t.remote.state.channelConfig))}))}},{event:"message",handler:function(t,r){return n=>{var i,o,a,s,c,u,l,d,f,h,p,g,m,y,v,b,w,A;const{id:_,ackId:E,message:S,error:k}=n,x=null!==(i=t.remote.state.relayPersistence)&&void 0!==i&&i;if(w_.SocketService(`[SocketService handleMessage()] relayPersistence=${x} context=${t.state.context} on 'message' ${r} keysExchanged=${null===(o=t.state.keyExchange)||void 0===o?void 0:o.areKeysExchanged()}`,n),k)throw w_.SocketService(`\n [SocketService handleMessage()] context=${t.state.context}::on 'message' error=${k}`),new Error(k);try{!function(e,t){if(t!==e.channelId)throw e.debug&&console.error(`Wrong id ${t} - should be ${e.channelId}`),new Error("Wrong id")}(t.state,_)}catch(e){return void console.error("ignore message --- wrong id ",S)}const C="string"==typeof S;if(!C&&(null==S?void 0:S.type)===OE.KEY_HANDSHAKE_START)return x?void console.warn("[SocketService handleMessage()] Ignoring key exchange message because relay persistence is activated",S):(w_.SocketService(`[SocketService handleMessage()] context=${t.state.context}::on 'message' received HANDSHAKE_START isOriginator=${t.state.isOriginator}`,S),void(null===(a=t.state.keyExchange)||void 0===a||a.start({isOriginator:null!==(s=t.state.isOriginator)&&void 0!==s&&s,force:!0})));if(!C&&(null===(c=null==S?void 0:S.type)||void 0===c?void 0:c.startsWith("key_handshake")))return x?void console.warn("[SocketService handleMessage()] Ignoring key exchange message because relay persistence is activated",S):(w_.SocketService(`[SocketService handleMessage()] context=${t.state.context}::on 'message' emit KEY_EXCHANGE`,S),void t.emit(TE.KEY_EXCHANGE,{message:S,context:t.state.context}));if(C&&!(null===(u=t.state.keyExchange)||void 0===u?void 0:u.areKeysExchanged())){let r=!1;try{w_.SocketService(`[SocketService handleMessage()] context=${t.state.context}::on 'message' trying to decrypt message`),null===(l=t.state.keyExchange)||void 0===l||l.decryptMessage(S),r=!0}catch(e){w_.SocketService(`[SocketService handleMessage()] context=${t.state.context}::on 'message' error`,e)}if(!r)return t.state.isOriginator?null===(f=t.state.keyExchange)||void 0===f||f.start({isOriginator:null!==(h=t.state.isOriginator)&&void 0!==h&&h}):t.sendMessage({type:OE.KEY_HANDSHAKE_START}),void w_.SocketService(`Message ignored because invalid key exchange status. step=${null===(p=t.state.keyExchange)||void 0===p?void 0:p.getKeyInfo().step}`,null===(g=t.state.keyExchange)||void 0===g?void 0:g.getKeyInfo(),S);w_.SocketService("Invalid key exchange status detected --- updating it."),null===(d=t.state.keyExchange)||void 0===d||d.setKeysExchanged(!0)}else if(!C&&(null==S?void 0:S.type))return console.warn("[SocketService handleMessage() ::on 'message' received non encrypted unkwown message"),void t.emit(e.EventType.MESSAGE,S);if(!C)return console.warn("[SocketService handleMessage() ::on 'message' received unkwown message",S),void t.emit(e.EventType.MESSAGE,S);const I=null===(m=t.state.keyExchange)||void 0===m?void 0:m.decryptMessage(S),T=JSON.parse(null!=I?I:"{}");if(E&&(null==E?void 0:E.length)>0&&(w_.SocketService(`[SocketService handleMessage()] context=${t.state.context}::on 'message' ackid=${E} channelId=${_}`),null===(y=t.state.socket)||void 0===y||y.emit(e.EventType.MESSAGE_ACK,{ackId:E,channelId:_,clientType:t.state.isOriginator?"dapp":"wallet"})),(null==T?void 0:T.type)===e.MessageType.PAUSE?t.state.clientsPaused=!0:t.state.clientsPaused=!1,t.state.isOriginator&&T.data){const r=T.data,n=t.state.rpcMethodTracker[r.id];if(n){const i=Date.now()-n.timestamp;w_.SocketService(`[SocketService handleMessage()] context=${t.state.context}::on 'message' received answer for id=${r.id} method=${n.method} responseTime=${i}`,T),t.remote.state.analytics&&DE.includes(n.method.toLowerCase())&&S_({id:null!==(v=t.remote.state.channelId)&&void 0!==v?v:"",event:LE.SDK_RPC_REQUEST_DONE,sdkVersion:t.remote.state.sdkVersion,commLayerVersion:EE,walletVersion:null===(b=t.remote.state.walletInfo)||void 0===b?void 0:b.version,params:{method:n.method,from:"mobile"}},t.remote.state.communicationServerUrl).catch((e=>{console.error("Cannot send analytics",e)}));const o=Object.assign(Object.assign({},n),{result:r.result,error:r.error?{code:null===(w=r.error)||void 0===w?void 0:w.code,message:null===(A=r.error)||void 0===A?void 0:A.message}:void 0,elapsedTime:i});t.state.rpcMethodTracker[r.id]=o,t.emit(e.EventType.RPC_UPDATE,o)}}t.emit(e.EventType.MESSAGE,{message:T})}}},{event:"clients_waiting_to_join",handler:function(t,r){return n=>{w_.SocketService(`[SocketService: handleClientsWaitingToJoin()] context=${t.state.context} on 'clients_waiting_to_join-${r}'`,n),t.emit(e.EventType.CLIENTS_WAITING,n)}}}],FE=[{event:e.EventType.KEY_INFO,handler:function(t){return r=>{w_.SocketService("[SocketService: handleKeyInfo()] on 'KEY_INFO'",r),t.emit(e.EventType.KEY_INFO,r)}}},{event:e.EventType.KEYS_EXCHANGED,handler:function(t){return()=>{var r,n,i;w_.SocketService(`[SocketService: handleKeysExchanged()] on 'keys_exchanged' keyschanged=${null===(r=t.state.keyExchange)||void 0===r?void 0:r.areKeysExchanged()}`);const{channelConfig:o}=t.remote.state;if(o){const e=t.getKeyExchange().getKeyInfo().ecies;o.localKey=e.private,o.otherKey=e.otherPubKey,t.remote.state.channelConfig=o,null===(n=t.remote.state.storageManager)||void 0===n||n.persistChannelConfig(o).catch((e=>{console.error("Error persisting channel config",e)}))}t.emit(e.EventType.KEYS_EXCHANGED,{keysExchanged:null===(i=t.state.keyExchange)||void 0===i?void 0:i.areKeysExchanged(),isOriginator:t.state.isOriginator});const a={keyInfo:t.getKeyInfo()};t.emit(e.EventType.SERVICE_STATUS,a)}}}];function zE(t,r){w_.SocketService(`[SocketService: setupChannelListener()] context=${t.state.context} setting socket listeners for channel ${r}...`);const{socket:n}=t.state,{keyExchange:i}=t.state;t.state.setupChannelListeners&&console.warn(`[SocketService: setupChannelListener()] context=${t.state.context} socket listeners already set up for channel ${r}`),n&&t.state.isOriginator&&(t.state.debug&&(null==n||n.io.on("error",(e=>{w_.SocketService(`[SocketService: setupChannelListener()] context=${t.state.context} socket event=error`,e)})),null==n||n.io.on("reconnect",(e=>{w_.SocketService(`[SocketService: setupChannelListener()] context=${t.state.context} socket event=reconnect`,e)})),null==n||n.io.on("reconnect_error",(e=>{w_.SocketService(`[SocketService: setupChannelListener()] context=${t.state.context} socket event=reconnect_error`,e)})),null==n||n.io.on("reconnect_failed",(()=>{w_.SocketService(`[SocketService: setupChannelListener()] context=${t.state.context} socket event=reconnect_failed`)})),null==n||n.io.on("ping",(()=>{w_.SocketService(`[SocketService: setupChannelListener()] context=${t.state.context} socket`)}))),null==n||n.on("disconnect",(r=>(w_.SocketService(`[SocketService: setupChannelListener()] on 'disconnect' -- MetaMaskSDK socket disconnected '${r}' begin recovery...`),function(t){return r=>{w_.SocketService(`[SocketService: handleDisconnect()] on 'disconnect' manualDisconnect=${t.state.manualDisconnect}`,r),t.state.manualDisconnect||(t.emit(e.EventType.SOCKET_DISCONNECTED),function(e){"undefined"!=typeof window&&"undefined"!=typeof document&&(w_.SocketService(`[SocketService: checkFocusAndReconnect()] hasFocus=${document.hasFocus()}`,e),document.hasFocus()?NE(e).then((t=>{w_.SocketService(`SocketService::checkFocus reconnectSocket success=${t}`,e)})).catch((e=>{console.error("SocketService::checkFocus Error reconnecting socket",e)})):window.addEventListener("focus",(()=>{NE(e).catch((e=>{console.error("SocketService::checkFocus Error reconnecting socket",e)}))}),{once:!0}))}(t))}}(t)(r))))),jE.forEach((e=>{let{event:i,handler:o}=e;const a=`${i}-${r}`;null==n||n.on(a,o(t,r))})),FE.forEach((e=>{let{event:r,handler:n}=e;null==i||i.on(r,n(t))})),t.state.setupChannelListeners=!0}class qE extends fw.EventEmitter2{constructor(e){let{otherPublicKey:t,reconnect:r,communicationLayerPreference:n,transports:i,communicationServerUrl:o,context:a,ecies:s,remote:c,logging:u}=e;super(),this.state={clientsConnected:!1,clientsPaused:!1,manualDisconnect:!1,lastRpcId:void 0,rpcMethodTracker:{},hasPlaintext:!1,communicationServerUrl:""},this.state.resumed=r,this.state.context=a,this.state.isOriginator=c.state.isOriginator,this.state.communicationLayerPreference=n,this.state.debug=!0===(null==u?void 0:u.serviceLayer),this.remote=c,!0===(null==u?void 0:u.serviceLayer)&&g_.enable("SocketService:Layer"),this.state.communicationServerUrl=o,this.state.hasPlaintext=this.state.communicationServerUrl!==SE&&!0===(null==u?void 0:u.plaintext);const l={autoConnect:!1,transports:kE,withCredentials:!0};i&&(l.transports=i),w_.SocketService(`[SocketService: constructor()] Socket IO url: ${this.state.communicationServerUrl}`),this.state.socket=jA(o,l);const d={communicationLayer:this,otherPublicKey:t,sendPublicKey:!1,context:this.state.context,ecies:s,logging:u};this.state.keyExchange=new PE(d)}resetKeys(){return w_.SocketService("[SocketService: resetKeys()] Resetting keys."),void(null===(e=this.state.keyExchange)||void 0===e||e.resetKeys());var e}createChannel(){return function(t){var r,n,i,o;if(w_.SocketService(`[SocketService: createChannel()] context=${t.state.context}`),null===(r=t.state.socket)||void 0===r?void 0:r.connected)throw console.error("[SocketService: createChannel()] socket already connected"),new Error("socket already connected");null===(n=t.state.socket)||void 0===n||n.connect(),t.state.manualDisconnect=!1,t.state.isOriginator=!0;const a=bw();return t.state.channelId=a,zE(t,a),null===(i=t.state.socket)||void 0===i||i.emit(e.EventType.JOIN_CHANNEL,{channelId:a,context:`${t.state.context}createChannel`,clientType:"dapp"}),{channelId:a,pubKey:(null===(o=t.state.keyExchange)||void 0===o?void 0:o.getMyPublicKey())||""}}(this)}connectToChannel(t){let{channelId:r,withKeyExchange:n=!1}=t;return function(t){let{options:r,instance:n}=t;var i,o,a,s,c,u,l,d;const{channelId:f,withKeyExchange:h}=r,p=null!==(i=n.state.isOriginator)&&void 0!==i&&i;if(w_.SocketService(`[SocketService: connectToChannel()] context=${n.state.context} channelId=${f} isOriginator=${p}`,null===(o=n.state.keyExchange)||void 0===o?void 0:o.toString()),null===(a=n.state.socket)||void 0===a?void 0:a.connected)throw console.error("[SocketService: connectToChannel()] socket already connected"),new Error("socket already connected");const{channelConfig:g}=n.remote.state;p&&(null==g?void 0:g.relayPersistence)&&(g.localKey&&(null===(s=null==g?void 0:g.localKey)||void 0===s?void 0:s.length)>0&&g.otherKey&&(null===(c=null==g?void 0:g.otherKey)||void 0===c?void 0:c.length)>0?null===(u=n.state.keyExchange)||void 0===u||u.setRelayPersistence({localKey:g.localKey,otherKey:g.otherKey}):console.warn("Missing keys in relay persistence",g)),n.state.manualDisconnect=!1,null===(l=n.state.socket)||void 0===l||l.connect(),n.state.withKeyExchange=h,n.state.isOriginator=p,n.state.channelId=f,zE(n,f),null===(d=n.state.socket)||void 0===d||d.emit(e.EventType.JOIN_CHANNEL,{channelId:f,context:`${n.state.context}_connectToChannel`,clientType:p?"dapp":"wallet"},((t,r)=>{"error_terminated"===t?n.emit(e.EventType.TERMINATE):"object"==typeof r&&r.persistence&&n.emit(e.EventType.CHANNEL_PERSISTENCE)}))}({options:{channelId:r,withKeyExchange:n},instance:this})}getKeyInfo(){return this.state.keyExchange.getKeyInfo()}keyCheck(){var t,r;null===(r=(t=this).state.socket)||void 0===r||r.emit(e.EventType.MESSAGE,{id:t.state.channelId,context:t.state.context,message:{type:OE.KEY_HANDSHAKE_CHECK,pubkey:t.getKeyInfo().ecies.otherPubKey}})}getKeyExchange(){return this.state.keyExchange}sendMessage(e){return UE(this,e)}ping(){return t=this,w_.SocketService(`[SocketService: ping()] context=${t.state.context} originator=${t.state.isOriginator} keysExchanged=${null===(r=t.state.keyExchange)||void 0===r?void 0:r.areKeysExchanged()}`),t.state.isOriginator&&((null===(n=t.state.keyExchange)||void 0===n?void 0:n.areKeysExchanged())?(console.warn(`[SocketService:ping()] context=${t.state.context} sending READY message`),t.sendMessage({type:e.MessageType.READY})):(console.warn(`[SocketService: ping()] context=${t.state.context} starting key exchange`),null===(i=t.state.keyExchange)||void 0===i||i.start({isOriginator:null!==(o=t.state.isOriginator)&&void 0!==o&&o}))),void(null===(a=t.state.socket)||void 0===a||a.emit(e.EventType.MESSAGE,{id:t.state.channelId,context:t.state.context,clientType:t.remote.state.isOriginator?"dapp":"wallet",message:{type:e.MessageType.PING}}));var t,r,n,i,o,a}pause(){return t=this,w_.SocketService(`[SocketService: pause()] context=${t.state.context}`),t.state.manualDisconnect=!0,(null===(r=t.state.keyExchange)||void 0===r?void 0:r.areKeysExchanged())&&t.sendMessage({type:e.MessageType.PAUSE}),void(null===(n=t.state.socket)||void 0===n||n.disconnect());var t,r,n}isConnected(){var e;return null===(e=this.state.socket)||void 0===e?void 0:e.connected}resume(){return t=this,w_.SocketService(`[SocketService: resume()] context=${t.state.context} connected=${null===(r=t.state.socket)||void 0===r?void 0:r.connected} manualDisconnect=${t.state.manualDisconnect} resumed=${t.state.resumed} keysExchanged=${null===(n=t.state.keyExchange)||void 0===n?void 0:n.areKeysExchanged()}`),(null===(i=t.state.socket)||void 0===i?void 0:i.connected)?w_.SocketService("[SocketService: resume()] already connected."):(null===(o=t.state.socket)||void 0===o||o.connect(),w_.SocketService(`[SocketService: resume()] after connecting socket --\x3e connected=${null===(a=t.state.socket)||void 0===a?void 0:a.connected}`),null===(s=t.state.socket)||void 0===s||s.emit(e.EventType.JOIN_CHANNEL,{channelId:t.state.channelId,context:`${t.state.context}_resume`,clientType:t.remote.state.isOriginator?"dapp":"wallet"})),(null===(c=t.state.keyExchange)||void 0===c?void 0:c.areKeysExchanged())?t.state.isOriginator||t.sendMessage({type:e.MessageType.READY}):t.state.isOriginator||null===(u=t.state.keyExchange)||void 0===u||u.start({isOriginator:null!==(l=t.state.isOriginator)&&void 0!==l&&l}),t.state.manualDisconnect=!1,void(t.state.resumed=!0);var t,r,n,i,o,a,s,c,u,l}getRPCMethodTracker(){return this.state.rpcMethodTracker}disconnect(e){return function(e,t){var r,n;w_.SocketService(`[SocketService: disconnect()] context=${e.state.context}`,t),(null==t?void 0:t.terminate)&&(e.state.channelId=t.channelId,null===(r=e.state.keyExchange)||void 0===r||r.clean(),e.state.rpcMethodTracker={}),e.state.manualDisconnect=!0,null===(n=e.state.socket)||void 0===n||n.disconnect()}(this,e)}}var HE;function VE(t){return()=>FA(this,void 0,void 0,(function*(){var r,n,i;const{state:o}=t;if(o.authorized)return;yield(()=>FA(this,void 0,void 0,(function*(){for(;!o.walletInfo;)yield ME(500)})))();const a="7.3".localeCompare((null===(r=o.walletInfo)||void 0===r?void 0:r.version)||"");if(w_.RemoteCommunication(`[RemoteCommunication: handleAuthorizedEvent()] HACK 'authorized' version=${null===(n=o.walletInfo)||void 0===n?void 0:n.version} compareValue=${a}`),1!==a)return;const s=o.platformType===e.PlatformType.MobileWeb||o.platformType===e.PlatformType.ReactNative||o.platformType===e.PlatformType.MetaMaskMobileWebview;w_.RemoteCommunication(`[RemoteCommunication: handleAuthorizedEvent()] HACK 'authorized' platform=${o.platformType} secure=${s} channel=${o.channelId} walletVersion=${null===(i=o.walletInfo)||void 0===i?void 0:i.version}`),s&&(o.authorized=!0,t.emit(e.EventType.AUTHORIZED))}))}function $E(t){return r=>{const{state:n}=t;w_.RemoteCommunication(`[RemoteCommunication: handleChannelCreatedEvent()] context=${n.context} on 'channel_created' channelId=${r}`),t.emit(e.EventType.CHANNEL_CREATED,r)}}function KE(t,r){return()=>{var n,i,o,a;const{state:s}=t;if(w_.RemoteCommunication(`[RemoteCommunication: handleClientsConnectedEvent()] on 'clients_connected' channel=${s.channelId} keysExchanged=${null===(i=null===(n=s.communicationLayer)||void 0===n?void 0:n.getKeyInfo())||void 0===i?void 0:i.keysExchanged}`),s.analytics){const e=s.isOriginator?LE.REQUEST:LE.REQUEST_MOBILE;S_(Object.assign(Object.assign({id:null!==(o=s.channelId)&&void 0!==o?o:"",event:s.reconnection?LE.RECONNECT:e},s.originatorInfo),{commLayer:r,sdkVersion:s.sdkVersion,walletVersion:null===(a=s.walletInfo)||void 0===a?void 0:a.version,commLayerVersion:EE}),s.communicationServerUrl).catch((e=>{console.error("Cannot send analytics",e)}))}s.clientsConnected=!0,s.originatorInfoSent=!1,t.emit(e.EventType.CLIENTS_CONNECTED)}}function WE(t,r){return n=>{var i;const{state:o}=t;w_.RemoteCommunication(`[RemoteCommunication: handleClientsDisconnectedEvent()] context=${o.context} on 'clients_disconnected' channelId=${n}`),o.relayPersistence||(o.clientsConnected=!1,o.ready=!1,o.authorized=!1),t.emit(e.EventType.CLIENTS_DISCONNECTED,o.channelId),t.setConnectionStatus(e.ConnectionStatus.DISCONNECTED),o.analytics&&o.channelId&&S_({id:o.channelId,event:LE.DISCONNECTED,sdkVersion:o.sdkVersion,commLayer:r,commLayerVersion:EE,walletVersion:null===(i=o.walletInfo)||void 0===i?void 0:i.version},o.communicationServerUrl).catch((e=>{console.error("Cannot send analytics",e)}))}}function GE(t){return r=>{var n;const{state:i}=t;if(w_.RemoteCommunication(`[RemoteCommunication: handleClientsWaitingEvent()] context=${i.context} on 'clients_waiting' numberUsers=${r} ready=${i.ready} autoStarted=${i.originatorConnectStarted}`),t.setConnectionStatus(e.ConnectionStatus.WAITING),t.emit(e.EventType.CLIENTS_WAITING,r),i.originatorConnectStarted){w_.RemoteCommunication(`[RemoteCommunication: handleClientsWaitingEvent()] on 'clients_waiting' watch autoStarted=${i.originatorConnectStarted} timeout`,i.autoConnectOptions);const r=(null===(n=i.autoConnectOptions)||void 0===n?void 0:n.timeout)||3e3,o=setTimeout((()=>{w_.RemoteCommunication(`[RemoteCommunication: handleClientsWaitingEvent()] setTimeout(${r}) terminate channelConfig`,i.autoConnectOptions),i.originatorConnectStarted=!1,i.ready||t.setConnectionStatus(e.ConnectionStatus.TIMEOUT),clearTimeout(o)}),r)}}}function QE(t,r){return n=>{var i,o,a,s,c,u,l,d;const{state:f}=t;if(w_.RemoteCommunication(`[RemoteCommunication: handleKeysExchangedEvent()] context=${f.context} on commLayer.'keys_exchanged' channel=${f.channelId}`,n),null===(o=null===(i=f.communicationLayer)||void 0===i?void 0:i.getKeyInfo())||void 0===o?void 0:o.keysExchanged){const r=Object.assign(Object.assign({},f.channelConfig),{channelId:null!==(a=f.channelId)&&void 0!==a?a:"",validUntil:(null===(s=f.channelConfig)||void 0===s?void 0:s.validUntil)||xE,localKey:f.communicationLayer.getKeyInfo().ecies.private,otherKey:f.communicationLayer.getKeyInfo().ecies.otherPubKey});null===(c=f.storageManager)||void 0===c||c.persistChannelConfig(r).catch((e=>{console.error("Error persisting channel config",e)})),t.setConnectionStatus(e.ConnectionStatus.LINKED)}!function(e,t){var r,n,i,o,a,s,c,u;const{state:l}=e;w_.RemoteCommunication(`[RemoteCommunication: setLastActiveDate()] channel=${l.channelId}`,t);const d=Object.assign(Object.assign({},l.channelConfig),{channelId:null!==(r=l.channelId)&&void 0!==r?r:"",validUntil:null!==(i=null===(n=l.channelConfig)||void 0===n?void 0:n.validUntil)&&void 0!==i?i:0,relayPersistence:l.relayPersistence,localKey:null===(a=null===(o=l.communicationLayer)||void 0===o?void 0:o.state.keyExchange)||void 0===a?void 0:a.getKeyInfo().ecies.private,otherKey:null===(c=null===(s=l.communicationLayer)||void 0===s?void 0:s.state.keyExchange)||void 0===c?void 0:c.getKeyInfo().ecies.otherPubKey,lastActive:t.getTime()});null===(u=l.storageManager)||void 0===u||u.persistChannelConfig(d)}(t,new Date),f.analytics&&f.channelId&&S_({id:f.channelId,event:n.isOriginator?LE.CONNECTED:LE.CONNECTED_MOBILE,sdkVersion:f.sdkVersion,commLayer:r,commLayerVersion:EE,walletVersion:null===(u=f.walletInfo)||void 0===u?void 0:u.version},f.communicationServerUrl).catch((e=>{console.error("Cannot send analytics",e)})),f.isOriginator=n.isOriginator,n.isOriginator||(null===(l=f.communicationLayer)||void 0===l||l.sendMessage({type:e.MessageType.READY}),f.ready=!0,f.paused=!1),n.isOriginator&&!f.originatorInfoSent&&(null===(d=f.communicationLayer)||void 0===d||d.sendMessage({type:e.MessageType.ORIGINATOR_INFO,originatorInfo:f.originatorInfo,originator:f.originatorInfo}),f.originatorInfoSent=!0)}}function YE(t){return r=>{let n=r;r.message&&(n=n.message),function(t,r){const{state:n}=r;if(w_.RemoteCommunication(`[RemoteCommunication: onCommunicationLayerMessage()] context=${n.context} on 'message' typeof=${typeof t}`,t),r.state.ready=!0,n.isOriginator||t.type!==e.MessageType.ORIGINATOR_INFO)if(n.isOriginator&&t.type===e.MessageType.WALLET_INFO)!function(e,t){const{state:r}=e;r.walletInfo=t.walletInfo,r.paused=!1}(r,t);else{if(t.type===e.MessageType.TERMINATE)!function(t){const{state:r}=t;r.isOriginator&&(eS({options:{terminate:!0,sendMessage:!1},instance:t}),console.debug(),t.emit(e.EventType.TERMINATE))}(r);else if(t.type===e.MessageType.PAUSE)!function(t){const{state:r}=t;r.paused=!0,t.setConnectionStatus(e.ConnectionStatus.PAUSED)}(r);else if(t.type===e.MessageType.READY&&n.isOriginator)!function(t){const{state:r}=t;t.setConnectionStatus(e.ConnectionStatus.LINKED);const n=r.paused;r.paused=!1,t.emit(e.EventType.CLIENTS_READY,{isOriginator:r.isOriginator,walletInfo:r.walletInfo}),n&&(r.authorized=!0,t.emit(e.EventType.AUTHORIZED))}(r);else{if(t.type===e.MessageType.OTP&&n.isOriginator)return void function(t,r){var n;const{state:i}=t;t.emit(e.EventType.OTP,r.otpAnswer),1==="6.6".localeCompare((null===(n=i.walletInfo)||void 0===n?void 0:n.version)||"")&&(console.warn("RemoteCommunication::on 'otp' -- backward compatibility <6.6 -- triger eth_requestAccounts"),t.emit(e.EventType.SDK_RPC_CALL,{method:CE,params:[]}))}(r,t);t.type===e.MessageType.AUTHORIZED&&n.isOriginator&&function(t){const{state:r}=t;r.authorized=!0,t.emit(e.EventType.AUTHORIZED)}(r)}r.emit(e.EventType.MESSAGE,t)}else!function(t,r){var n;const{state:i}=t;null===(n=i.communicationLayer)||void 0===n||n.sendMessage({type:e.MessageType.WALLET_INFO,walletInfo:i.walletInfo}),i.originatorInfo=r.originatorInfo||r.originator,t.emit(e.EventType.CLIENTS_READY,{isOriginator:i.isOriginator,originatorInfo:i.originatorInfo}),i.paused=!1}(r,t)}(n,t)}}function ZE(e){return()=>{const{state:t}=e;w_.RemoteCommunication("[RemoteCommunication: handleSocketReconnectEvent()] on 'socket_reconnect' -- reset key exchange status / set ready to false"),t.ready=!1,t.authorized=!1,IE(t),e.emitServiceStatusEvent({context:"socket_reconnect"})}}function JE(e){return()=>{const{state:t}=e;w_.RemoteCommunication("[RemoteCommunication: handleSocketDisconnectedEvent()] on 'socket_Disconnected' set ready to false"),t.ready=!1}}function XE(t){return()=>FA(this,void 0,void 0,(function*(){var r,n,i,o,a,s,c;const{state:u}=t;w_.RemoteCommunication(`[RemoteCommunication: handleFullPersistenceEvent()] context=${u.context}`),t.state.ready=!0,t.state.clientsConnected=!0,t.state.authorized=!0,t.state.relayPersistence=!0,null===(r=t.state.communicationLayer)||void 0===r||r.getKeyExchange().setKeysExchanged(!0),t.emit(e.EventType.KEYS_EXCHANGED,{keysExchanged:!0,isOriginator:!0}),t.emit(e.EventType.AUTHORIZED),t.emit(e.EventType.CLIENTS_READY),t.emit(e.EventType.CHANNEL_PERSISTENCE);try{u.channelConfig=Object.assign(Object.assign({},u.channelConfig),{localKey:null===(n=u.communicationLayer)||void 0===n?void 0:n.getKeyExchange().getKeyInfo().ecies.private,otherKey:null===(i=u.communicationLayer)||void 0===i?void 0:i.getKeyExchange().getOtherPublicKey(),channelId:null!==(o=u.channelId)&&void 0!==o?o:"",validUntil:null!==(s=null===(a=u.channelConfig)||void 0===a?void 0:a.validUntil)&&void 0!==s?s:xE,relayPersistence:!0}),yield null===(c=u.storageManager)||void 0===c?void 0:c.persistChannelConfig(u.channelConfig)}catch(e){console.error("Error persisting channel config",e)}}))}function eS(t){let{options:r,instance:n}=t;var i,o,a,s,c,u;const{state:l}=n;w_.RemoteCommunication(`[RemoteCommunication: disconnect()] channel=${l.channelId}`,r),l.ready=!1,l.paused=!1,(null==r?void 0:r.terminate)?(null===(i=l.storageManager)||void 0===i||i.terminate(null!==(o=l.channelId)&&void 0!==o?o:""),n.state.terminated=!0,r.sendMessage&&(null===(a=l.communicationLayer)||void 0===a?void 0:a.getKeyInfo().keysExchanged)&&(null===(s=l.communicationLayer)||void 0===s||s.sendMessage({type:e.MessageType.TERMINATE})),l.relayPersistence=!1,l.channelId=bw(),r.channelId=l.channelId,l.channelConfig=void 0,l.originatorConnectStarted=!1,null===(c=l.communicationLayer)||void 0===c||c.disconnect(r),n.setConnectionStatus(e.ConnectionStatus.TERMINATED)):(null===(u=l.communicationLayer)||void 0===u||u.disconnect(r),n.setConnectionStatus(e.ConnectionStatus.DISCONNECTED))}e.CommunicationLayerPreference=void 0,e.PlatformType=void 0,function(e){e.SOCKET="socket"}(e.CommunicationLayerPreference||(e.CommunicationLayerPreference={})),function(e){e.NonBrowser="nodejs",e.MetaMaskMobileWebview="in-app-browser",e.DesktopWeb="web-desktop",e.MobileWeb="web-mobile",e.ReactNative="react-native"}(e.PlatformType||(e.PlatformType={}));class tS extends fw.EventEmitter2{constructor(t){let{platformType:r,communicationLayerPreference:n,otherPublicKey:i,reconnect:o,walletInfo:a,dappMetadata:s,protocolVersion:c,transports:u,context:l,relayPersistence:d,ecies:f,analytics:h=!1,storage:p,sdkVersion:g,communicationServerUrl:m=SE,logging:y,autoConnect:v={timeout:3e3}}=t;super(),this.state={ready:!1,authorized:!1,isOriginator:!1,terminated:!1,protocolVersion:1,paused:!1,platformType:"metamask-mobile",analytics:!1,reconnection:!1,originatorInfoSent:!1,communicationServerUrl:SE,context:"",persist:!1,clientsConnected:!1,sessionDuration:xE,originatorConnectStarted:!1,debug:!1,_connectionStatus:e.ConnectionStatus.DISCONNECTED},this.state.otherPublicKey=i,this.state.dappMetadata=s,this.state.walletInfo=a,this.state.transports=u,this.state.platformType=r,this.state.analytics=h,this.state.protocolVersion=null!=c?c:1,this.state.isOriginator=!i,this.state.relayPersistence=d,this.state.communicationServerUrl=m,this.state.context=l,this.state.terminated=!1,this.state.sdkVersion=g,this.setMaxListeners(50),this.setConnectionStatus(e.ConnectionStatus.DISCONNECTED),(null==p?void 0:p.duration)&&(this.state.sessionDuration=xE),this.state.storageOptions=p,this.state.autoConnectOptions=v,this.state.debug=!0===(null==y?void 0:y.remoteLayer),!0===(null==y?void 0:y.remoteLayer)&&g_.enable("RemoteCommunication:Layer"),!0===(null==y?void 0:y.serviceLayer)&&g_.enable("SocketService:Layer"),!0===(null==y?void 0:y.eciesLayer)&&g_.enable("ECIES:Layer"),!0===(null==y?void 0:y.keyExchangeLayer)&&g_.enable("KeyExchange:Layer"),this.state.logging=y,(null==p?void 0:p.storageManager)&&(this.state.storageManager=p.storageManager),w_.RemoteCommunication(`[RemoteCommunication: constructor()] protocolVersion=${c} relayPersistence=${d} isOriginator=${this.state.isOriginator} communicationLayerPreference=${n} otherPublicKey=${i} reconnect=${o}`),this.initCommunicationLayer({communicationLayerPreference:n,otherPublicKey:i,reconnect:o,ecies:f,communicationServerUrl:m}),this.emitServiceStatusEvent({context:"constructor"})}initCommunicationLayer(t){let{communicationLayerPreference:r,otherPublicKey:n,reconnect:i,ecies:o,communicationServerUrl:a=SE}=t;return function(t){let{communicationLayerPreference:r,otherPublicKey:n,reconnect:i,ecies:o,communicationServerUrl:a=SE,instance:s}=t;var c,u,l,d,f,h,p,g,m,y,v;const{state:b}=s;if(w_.RemoteCommunication("[initCommunicationLayer()] ",JSON.stringify(b,null,2)),r!==e.CommunicationLayerPreference.SOCKET)throw new Error("Invalid communication protocol");b.communicationLayer=new qE({communicationLayerPreference:r,otherPublicKey:n,reconnect:i,transports:b.transports,communicationServerUrl:a,context:b.context,ecies:o,logging:b.logging,remote:s});let w="undefined"!=typeof document&&document.URL||"",A="undefined"!=typeof document&&document.title||"";(null===(c=b.dappMetadata)||void 0===c?void 0:c.url)&&(w=b.dappMetadata.url),(null===(u=b.dappMetadata)||void 0===u?void 0:u.name)&&(A=b.dappMetadata.name);const _=null!==(h=null!==(d=null===(l=b.dappMetadata)||void 0===l?void 0:l.name)&&void 0!==d?d:null===(f=b.dappMetadata)||void 0===f?void 0:f.url)&&void 0!==h?h:"n/a",E="undefined"!=typeof window&&void 0!==window.location&&null!==(p=window.location.hostname)&&void 0!==p?p:_,S={url:w,title:A,source:null===(g=b.dappMetadata)||void 0===g?void 0:g.source,dappId:E,icon:(null===(m=b.dappMetadata)||void 0===m?void 0:m.iconUrl)||(null===(y=b.dappMetadata)||void 0===y?void 0:y.base64Icon),platform:b.platformType,apiVersion:EE,connector:null===(v=b.dappMetadata)||void 0===v?void 0:v.connector};b.originatorInfo=S;const k={[e.EventType.AUTHORIZED]:VE(s),[e.EventType.MESSAGE]:YE(s),[e.EventType.CHANNEL_PERSISTENCE]:XE(s),[e.EventType.CLIENTS_CONNECTED]:KE(s,r),[e.EventType.KEYS_EXCHANGED]:QE(s,r),[e.EventType.SOCKET_DISCONNECTED]:JE(s),[e.EventType.SOCKET_RECONNECT]:ZE(s),[e.EventType.CLIENTS_DISCONNECTED]:WE(s,r),[e.EventType.KEY_INFO]:()=>{},[e.EventType.CHANNEL_CREATED]:$E(s),[e.EventType.CLIENTS_WAITING]:GE(s),[e.EventType.RPC_UPDATE]:t=>{s.emit(e.EventType.RPC_UPDATE,t)}};for(const[e,x]of Object.entries(k))try{b.communicationLayer.on(e,x)}catch(n){console.error(`Error registering handler for ${e}:`,n)}}({communicationLayerPreference:r,otherPublicKey:n,reconnect:i,ecies:o,communicationServerUrl:a,instance:this})}originatorSessionConnect(){return FA(this,void 0,void 0,(function*(){return yield function(e){var t;return FA(this,void 0,void 0,(function*(){const{state:r}=e;if(!r.storageManager)return void w_.RemoteCommunication("[RemoteCommunication: originatorSessionConnect()] no storage manager defined - skip");const n=yield r.storageManager.getPersistedChannelConfig();if(w_.RemoteCommunication(`[RemoteCommunication: originatorSessionConnect()] autoStarted=${r.originatorConnectStarted} channelConfig`,n),null===(t=r.communicationLayer)||void 0===t?void 0:t.isConnected())return w_.RemoteCommunication("[RemoteCommunication: originatorSessionConnect()] socket already connected - skip"),n;if(n){if(n.validUntil>Date.now())return r.channelConfig=n,r.originatorConnectStarted=!0,r.channelId=null==n?void 0:n.channelId,r.reconnection=!0,n;w_.RemoteCommunication("[RemoteCommunication: autoConnect()] Session has expired")}r.originatorConnectStarted=!1}))}(this)}))}generateChannelIdConnect(){return FA(this,void 0,void 0,(function*(){return function(e){var t,r,n,i;if(!e.communicationLayer)throw new Error("communication layer not initialized");if(e.ready)throw new Error("Channel already connected");if(e.channelId&&(null===(t=e.communicationLayer)||void 0===t?void 0:t.isConnected()))return console.warn("Channel already exists -- interrupt generateChannelId",e.channelConfig),e.channelConfig=Object.assign(Object.assign({},e.channelConfig),{channelId:e.channelId,validUntil:Date.now()+e.sessionDuration}),null===(r=e.storageManager)||void 0===r||r.persistChannelConfig(e.channelConfig),{channelId:e.channelId,pubKey:null===(i=null===(n=e.communicationLayer)||void 0===n?void 0:n.getKeyInfo())||void 0===i?void 0:i.ecies.public};w_.RemoteCommunication("[RemoteCommunication: generateChannelId()]");const o=e.communicationLayer.createChannel();w_.RemoteCommunication("[RemoteCommunication: generateChannelId()] channel created",o);const a=Object.assign(Object.assign({},e.channelConfig),{channelId:o.channelId,validUntil:Date.now()+e.sessionDuration});return e.channelId=o.channelId,e.channelConfig=a,{channelId:e.channelId,pubKey:o.pubKey}}(this.state)}))}clean(){return IE(this.state)}connectToChannel(e){let{channelId:t,withKeyExchange:r}=e;return function(e){let{channelId:t,withKeyExchange:r,state:n}=e;var i,o,a;if(!mw(t))throw w_.RemoteCommunication(`[RemoteCommunication: connectToChannel()] context=${n.context} invalid channel channelId=${t}`),new Error(`Invalid channel ${t}`);if(w_.RemoteCommunication(`[RemoteCommunication: connectToChannel()] context=${n.context} channelId=${t} withKeyExchange=${r}`),null===(i=n.communicationLayer)||void 0===i?void 0:i.isConnected())return void w_.RemoteCommunication(`[RemoteCommunication: connectToChannel()] context=${n.context} already connected - interrupt connection.`);n.channelId=t,null===(o=n.communicationLayer)||void 0===o||o.connectToChannel({channelId:t,withKeyExchange:r});const s=Object.assign(Object.assign({},n.channelConfig),{channelId:t,validUntil:Date.now()+n.sessionDuration});n.channelConfig=s,null===(a=n.storageManager)||void 0===a||a.persistChannelConfig(s)}({channelId:t,withKeyExchange:r,state:this.state})}sendMessage(t){return function(t,r){var n,i;return FA(this,void 0,void 0,(function*(){const{state:o}=t;w_.RemoteCommunication(`[RemoteCommunication: sendMessage()] context=${o.context} paused=${o.paused} ready=${o.ready} relayPersistence=${o.relayPersistence} authorized=${o.authorized} socket=${null===(n=o.communicationLayer)||void 0===n?void 0:n.isConnected()} clientsConnected=${o.clientsConnected} status=${o._connectionStatus}`,r),o.relayPersistence||o.ready&&(null===(i=o.communicationLayer)||void 0===i?void 0:i.isConnected())&&o.clientsConnected||(w_.RemoteCommunication(`[RemoteCommunication: sendMessage()] context=${o.context} SKIP message waiting for MM mobile readiness.`),yield new Promise((r=>{t.once(e.EventType.CLIENTS_READY,r)})),w_.RemoteCommunication(`[RemoteCommunication: sendMessage()] context=${o.context} AFTER SKIP / READY -- sending pending message`));try{yield function(t,r){return FA(this,void 0,void 0,(function*(){return new Promise((n=>{var i,o,a,s;const{state:c}=t;if(w_.RemoteCommunication(`[RemoteCommunication: handleAuthorization()] context=${c.context} ready=${c.ready} authorized=${c.authorized} method=${r.method}`),1==="7.3".localeCompare((null===(i=c.walletInfo)||void 0===i?void 0:i.version)||""))return w_.RemoteCommunication(`[RemoteCommunication: handleAuthorization()] compatibility hack wallet version > ${null===(o=c.walletInfo)||void 0===o?void 0:o.version}`),null===(a=c.communicationLayer)||void 0===a||a.sendMessage(r),void n();!c.isOriginator||c.authorized||c.relayPersistence?(null===(s=c.communicationLayer)||void 0===s||s.sendMessage(r),n()):t.once(e.EventType.AUTHORIZED,(()=>{var e;w_.RemoteCommunication(`[RemoteCommunication: handleAuthorization()] context=${c.context} AFTER SKIP / AUTHORIZED -- sending pending message`),null===(e=c.communicationLayer)||void 0===e||e.sendMessage(r),n()}))}))}))}(t,r)}catch(e){throw console.error(`[RemoteCommunication: sendMessage()] context=${o.context} ERROR`,e),e}}))}(this,t)}testStorage(){return FA(this,void 0,void 0,(function*(){return function(e){var t;return FA(this,void 0,void 0,(function*(){const r=yield null===(t=e.storageManager)||void 0===t?void 0:t.getPersistedChannelConfig();w_.RemoteCommunication("[RemoteCommunication: testStorage()] res",r)}))}(this.state)}))}getChannelConfig(){return this.state.channelConfig}isReady(){return this.state.ready}isConnected(){var e;return null===(e=this.state.communicationLayer)||void 0===e?void 0:e.isConnected()}isAuthorized(){return this.state.authorized}isPaused(){return this.state.paused}getCommunicationLayer(){return this.state.communicationLayer}ping(){var e;w_.RemoteCommunication(`[RemoteCommunication: ping()] channel=${this.state.channelId}`),null===(e=this.state.communicationLayer)||void 0===e||e.ping()}testLogger(){w_.RemoteCommunication(`testLogger() channel=${this.state.channelId}`),w_.SocketService(`testLogger() channel=${this.state.channelId}`),w_.Ecies(`testLogger() channel=${this.state.channelId}`),w_.KeyExchange(`testLogger() channel=${this.state.channelId}`)}keyCheck(){var e;w_.RemoteCommunication(`[RemoteCommunication: keyCheck()] channel=${this.state.channelId}`),null===(e=this.state.communicationLayer)||void 0===e||e.keyCheck()}setConnectionStatus(t){this.state._connectionStatus!==t&&(this.state._connectionStatus=t,this.emit(e.EventType.CONNECTION_STATUS,t),this.emitServiceStatusEvent({context:"setConnectionStatus"}))}emitServiceStatusEvent(){this.emit(e.EventType.SERVICE_STATUS,this.getServiceStatus())}getConnectionStatus(){return this.state._connectionStatus}getServiceStatus(){return{originatorInfo:this.state.originatorInfo,keyInfo:this.getKeyInfo(),connectionStatus:this.state._connectionStatus,channelConfig:this.state.channelConfig,channelId:this.state.channelId}}getKeyInfo(){var e;return null===(e=this.state.communicationLayer)||void 0===e?void 0:e.getKeyInfo()}resetKeys(){var e;null===(e=this.state.communicationLayer)||void 0===e||e.resetKeys()}setOtherPublicKey(e){var t;const r=null===(t=this.state.communicationLayer)||void 0===t?void 0:t.getKeyExchange();if(!r)throw new Error("KeyExchange is not initialized.");r.getOtherPublicKey()!==e&&r.setOtherPublicKey(e)}pause(){var t;w_.RemoteCommunication(`[RemoteCommunication: pause()] channel=${this.state.channelId}`),null===(t=this.state.communicationLayer)||void 0===t||t.pause(),this.setConnectionStatus(e.ConnectionStatus.PAUSED)}getVersion(){return EE}hasRelayPersistence(){var e;return null!==(e=this.state.relayPersistence)&&void 0!==e&&e}resume(){return function(t){var r;const{state:n}=t;w_.RemoteCommunication(`[RemoteCommunication: resume()] channel=${n.channelId}`),null===(r=n.communicationLayer)||void 0===r||r.resume(),t.setConnectionStatus(e.ConnectionStatus.LINKED)}(this)}getChannelId(){return this.state.channelId}getRPCMethodTracker(){var e;return null===(e=this.state.communicationLayer)||void 0===e?void 0:e.getRPCMethodTracker()}disconnect(e){return eS({options:e,instance:this})}}function rS(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function nS(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function iS(e,t,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 t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}!function(e){e.RENEW="renew",e.LINK="link"}(HE||(HE={})),"function"==typeof SuppressedError&&SuppressedError;var oS="ERC721",aS="ERC1155",sS={errors:{disconnected:()=>"MetaMask: Disconnected from chain. Attempting to connect.",permanentlyDisconnected:()=>"MetaMask: Disconnected from MetaMask background. Page reload required.",sendSiteMetadata:()=>"MetaMask: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:e=>`MetaMask: The MetaMask Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidNetworkParams:()=>"MetaMask: Received invalid network parameters. Please report this bug.",invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`MetaMask: Connected to chain with ID "${e}".`},warnings:{chainIdDeprecation:"MetaMask: 'ethereum.chainId' is deprecated and may be removed in the future. Please use the 'eth_chainId' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",networkVersionDeprecation:"MetaMask: 'ethereum.networkVersion' is deprecated and may be removed in the future. Please use the 'net_version' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",selectedAddressDeprecation:"MetaMask: 'ethereum.selectedAddress' is deprecated and may be removed in the future. Please use the 'eth_accounts' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",enableDeprecation:"MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1102",sendDeprecation:"MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193",events:{close:"MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#disconnect",data:"MetaMask: The event 'data' is deprecated and will be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message",networkChanged:"MetaMask: The event 'networkChanged' is deprecated and may be removed in the future. Use 'chainChanged' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#chainchanged",notification:"MetaMask: The event 'notification' is deprecated and may be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message"},rpc:{ethDecryptDeprecation:"MetaMask: The RPC method 'eth_decrypt' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",ethGetEncryptionPublicKeyDeprecation:"MetaMask: The RPC method 'eth_getEncryptionPublicKey' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",walletWatchAssetNFTExperimental:"MetaMask: The RPC method 'wallet_watchAsset' is experimental for ERC721/ERC1155 assets and may change in the future.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-1.md and https://github.com/MetaMask/metamask-improvement-proposals/blob/main/PROCESS-GUIDE.md#proposal-lifecycle"},experimentalMethods:"MetaMask: 'ethereum._metamask' exposes non-standard, experimental methods. They may be removed or changed without warning."}};function cS(e){const t={ethDecryptDeprecation:!1,ethGetEncryptionPublicKeyDeprecation:!1,walletWatchAssetNFTExperimental:!1};return(r,n,i)=>{t.ethDecryptDeprecation||"eth_decrypt"!==r.method?t.ethGetEncryptionPublicKeyDeprecation||"eth_getEncryptionPublicKey"!==r.method?!t.walletWatchAssetNFTExperimental&&"wallet_watchAsset"===r.method&&[oS,aS].includes(r.params?.type||"")&&(e.warn(sS.warnings.rpc.walletWatchAssetNFTExperimental),t.walletWatchAssetNFTExperimental=!0):(e.warn(sS.warnings.rpc.ethGetEncryptionPublicKeyDeprecation),t.ethGetEncryptionPublicKeyDeprecation=!0):(e.warn(sS.warnings.rpc.ethDecryptDeprecation),t.ethDecryptDeprecation=!0),i()}}var uS=4294967295,lS=Math.floor(Math.random()*uS);var dS=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},fS=(e,t,r)=>(dS(e,t,"read from private field"),r?r.call(e):t.get(e)),hS=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},pS=(e,t,r,n)=>(dS(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),gS=(e,t,r)=>(dS(e,t,"access private method"),r),mS=-32600,yS=-32603,vS={"-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."}};function bS(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}var wS=(e,t)=>Object.hasOwnProperty.call(e,t);class AS extends TypeError{constructor(e,t){let r;const{message:n,explanation:i,...o}=e,{path:a}=e,s=0===a.length?n:`At path: ${a.join(".")} -- ${n}`;super(i??s),null!=i&&(this.cause=s),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function _S(e){return"object"==typeof e&&null!=e}function ES(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function SS(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:s,message:c=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${ES(n)}\``}=e;return{value:n,type:a,refinement:s,key:i[i.length-1],path:i,branch:o,...e,message:c}}function*kS(e,t,r,n){(function(e){return _S(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const i of e){const e=SS(i,t,r,n);e&&(yield e)}}function xS(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){const{path:n=[],branch:i=[e],coerce:o=!1,mask:a=!1}=r,s={path:n,branch:i};if(o&&(e=t.coercer(e,s),a&&"type"!==t.type&&_S(t.schema)&&_S(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let c="valid";for(const u of t.validator(e,s))u.explanation=r.message,c="not_valid",yield[u,void 0];for(let[u,l,d]of t.entries(e,s)){const t=xS(l,d,{path:void 0===u?n:[...n,u],branch:void 0===u?i:[...i,l],coerce:o,mask:a,message:r.message});for(const r of t)r[0]?(c=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):o&&(l=r[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):_S(e)&&(void 0!==l||u in e)&&(e[u]=l))}if("not_valid"!==c)for(const u of t.refiner(e,s))u.explanation=r.message,c="not_refined",yield[u,void 0];"valid"===c&&(yield[void 0,e])}()}class CS{constructor(e){const{type:t,schema:r,validator:n,refiner:i,coercer:o=e=>e,entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=o,this.validator=n?(e,t)=>kS(n(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>kS(i(e,t),t,this,e):()=>[]}assert(e,t){return IS(e,this,t)}create(e,t){return TS(e,this,t)}is(e){return OS(e,this)}mask(e,t){return function(e,t,r){const n=PS(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}(e,this,t)}validate(e){return PS(e,this,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}function IS(e,t,r){const n=PS(e,t,{message:r});if(n[0])throw n[0]}function TS(e,t,r){const n=PS(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function OS(e,t){return!PS(e,t)[0]}function PS(e,t){const r=xS(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(r);return n[0]?[new AS(n[0],(function*(){for(const e of r)e[0]&&(yield e[0])})),void 0]:[void 0,n[1]]}function MS(e,t){return new CS({type:e,schema:null,validator:t})}function RS(e){let t;return new CS({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})}function NS(e){return new CS({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${ES(e)}`})}function LS(e){const t=ES(e),r=typeof e;return new CS({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${ES(r)}`})}function BS(){return MS("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${ES(e)}`))}function DS(e){const t=e?Object.keys(e):[],r=MS("never",(()=>!1));return new CS({type:"object",schema:e||null,*entries(n){if(e&&_S(n)){const i=new Set(Object.keys(n));for(const r of t)i.delete(r),yield[r,n[r],e[r]];for(const e of i)yield[e,n[e],r]}},validator:e=>_S(e)||`Expected an object, but received: ${ES(e)}`,coercer:e=>_S(e)?{...e}:e})}function US(e){return new CS({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function jS(e,t){return new CS({type:"record",schema:null,*entries(r){if(_S(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>_S(e)||`Expected an object, but received: ${ES(e)}`})}function FS(){return MS("string",(e=>"string"==typeof e||`Expected a string, but received: ${ES(e)}`))}function zS(e){const t=e.map((e=>e.type)).join(" | ");return new CS({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const i=[];for(const t of e){const[...e]=xS(r,t,n),[o]=e;if(!o[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${ES(r)}`,...i]}})}var qS=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}},HS=e=>DS(e);function VS(e){let{path:t,branch:r}=e;const n=t[t.length-1];return wS(r[r.length-2],n)}function $S(e){return new CS({...e,type:`optional ${e.type}`,validator:(t,r)=>!VS(r)||e.validator(t,r),refiner:(t,r)=>!VS(r)||e.refiner(t,r)})}var KS,WS,GS,QS=zS([LS(null),MS("boolean",(e=>"boolean"==typeof e)),MS("finite number",(e=>OS(e,BS())&&Number.isFinite(e))),FS(),NS(RS((()=>QS))),jS(FS(),RS((()=>QS)))]),YS=(KS=QS,WS=MS("any",(()=>!0)),GS=e=>(function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Assertion failed",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:qS;try{IS(e,t)}catch(e){throw function(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}(n,`${r}: ${function(e){return function(e){return function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)&&"string"==typeof e.message?e.message:function(e){return null==e}(e)?"":String(e)}(e).replace(/\.$/u,"")}(e)}.`)}}(e,QS),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))),new CS({...KS,coercer:(e,t)=>OS(e,WS)?KS.coercer(GS(e),t):KS.coercer(e,t)}));function ZS(e){try{return function(e){TS(e,YS)}(e),!0}catch{return!1}}var JS=LS("2.0"),XS=function(e){return new CS({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}(zS([BS(),FS()])),ek=HS({code:MS("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${ES(e)}`)),message:FS(),data:$S(YS),stack:$S(FS())}),tk=zS([jS(FS(),YS),NS(YS)]),rk=HS({id:XS,jsonrpc:JS,method:FS(),params:$S(tk)}),nk=HS({jsonrpc:JS,method:FS(),params:$S(tk)});function ik(e){return OS(e,rk)}function ok(e){return OS(e,ek)}DS({id:XS,jsonrpc:JS,result:US(MS("unknown",(()=>!0))),error:US(ek)}),zS([HS({id:XS,jsonrpc:JS,result:YS}),HS({id:XS,jsonrpc:JS,error:ek})]);var ak,sk,ck={exports:{}};var uk=function(e){function t(e){let n,i,o,a=null;function s(){for(var e=arguments.length,r=new Array(e),i=0;i{if("%%"===e)return"%";u++;const i=t.formatters[n];if("function"==typeof i){const t=r[u];e=i.call(o,t),r.splice(u,1),u--}return e})),t.formatArgs.call(o,r),(o.log||t.log).apply(o,r)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}return ak=function(a,s){s=s||{};var c=typeof a;if("string"===c&&a.length>0)return function(o){if(!((o=String(o)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*n;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*t;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(a);if("number"===c&&isFinite(a))return s.long?function(i){var a=Math.abs(i);return a>=n?o(i,a,n,"day"):a>=r?o(i,a,r,"hour"):a>=t?o(i,a,t,"minute"):a>=e?o(i,a,e,"second"):i+" ms"}(a):function(i){var o=Math.abs(i);return o>=n?Math.round(i/n)+"d":o>=r?Math.round(i/r)+"h":o>=t?Math.round(i/t)+"m":o>=e?Math.round(i/e)+"s":i+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))}}(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==De&&"env"in De&&(e=De.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=uk(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ck,ck.exports);var lk=n(ck.exports),dk="Unspecified error message. This is a bug, please report it.",fk={code:yS,message:pk(yS)},hk="Unspecified server error.";function pk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dk;if(function(e){return Number.isInteger(e)}(e)){const t=e.toString();if(wS(vS,t))return vS[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return hk}return t}function gk(e){let{fallbackError:t=fk,shouldIncludeStack:r=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!ok(t))throw new Error("Must provide fallback error with integer number code and string message.");const n=function(e,t){return e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize?e.serialize():ok(e)?e:{...t,data:{cause:mk(e)}}}(e,t);return r||delete n.stack,n}function mk(e){return Array.isArray(e)?e.map((e=>ZS(e)?e:bS(e)?yk(e):null)):bS(e)?yk(e):ZS(e)?e:null}function yk(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const n=e[r];return ZS(n)&&(t[r]=n),t}),{})}var vk=Sk;Sk.default=Sk,Sk.stable=Ik,Sk.stableStringify=Ik;var bk="[...]",wk="[Circular]",Ak=[],_k=[];function Ek(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Sk(e,t,r,n){var i;void 0===n&&(n=Ek()),xk(e,"",0,[],void 0,0,n);try{i=0===_k.length?JSON.stringify(e,t,r):JSON.stringify(e,Ok(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==Ak.length;){var o=Ak.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function kk(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);void 0!==i.get?i.configurable?(Object.defineProperty(n,r,{value:e}),Ak.push([n,r,t,i])):_k.push([t,r,e]):(n[r]=e,Ak.push([n,r,t]))}function xk(e,t,r,n,i,o,a){var s;if(o+=1,"object"==typeof e&&null!==e){for(s=0;sa.depthLimit)return void kk(bk,e,t,i);if(void 0!==a.edgesLimit&&r+1>a.edgesLimit)return void kk(bk,e,t,i);if(n.push(e),Array.isArray(e))for(s=0;st?1:0}function Ik(e,t,r,n){void 0===n&&(n=Ek());var i,o=Tk(e,"",0,[],void 0,0,n)||e;try{i=0===_k.length?JSON.stringify(o,t,r):JSON.stringify(o,Ok(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==Ak.length;){var a=Ak.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return i}function Tk(e,t,r,n,i,o,a){var s;if(o+=1,"object"==typeof e&&null!==e){for(s=0;sa.depthLimit)return void kk(bk,e,t,i);if(void 0!==a.edgesLimit&&r+1>a.edgesLimit)return void kk(bk,e,t,i);if(n.push(e),Array.isArray(e))for(s=0;s0)for(var n=0;n<_k.length;n++){var i=_k[n];if(i[1]===t&&i[0]===r){r=i[2],_k.splice(n,1);break}}return e.call(this,t,r)}}var Pk=n(vk),Mk=class extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}(this.data)&&(e.data.cause=mk(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return Pk(this.serialize(),Rk,2)}};function Rk(e,t){if("[Circular]"!==t)return t}var Nk=e=>function(e,t){const[r,n]=function(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,r]}}return[]}(t);return new Mk(e,r??pk(e),n)}(mS,e);var Lk={};Object.defineProperty(Lk,"__esModule",{value:!0});const Bk=tt;function Dk(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}let Uk=class extends Bk.EventEmitter{emit(e){let t="error"===e;const r=this._events;if(void 0!==r)t=t&&void 0===r.error;else if(!t)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o0&&([e]=i),e instanceof Error)throw e;const t=new Error("Unhandled error."+(e?` (${e.message})`:""));throw t.context=e,t}const a=r[e];if(void 0===a)return!1;if("function"==typeof a)Dk(a,this,i);else{const e=a.length,t=function(e){const t=e.length,r=new Array(t);for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:{};super(),hS(this,qk),hS(this,Vk),hS(this,Kk),hS(this,jk,!1),hS(this,Fk,void 0),hS(this,zk,void 0),pS(this,Fk,[]),pS(this,zk,e)}destroy(){fS(this,Fk).forEach((e=>{"destroy"in e&&"function"==typeof e.destroy&&e.destroy()})),pS(this,Fk,[]),pS(this,jk,!0)}push(e){gS(this,qk,Hk).call(this),fS(this,Fk).push(e)}handle(e,t){if(gS(this,qk,Hk).call(this),t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?gS(this,Vk,$k).call(this,e,t):gS(this,Vk,$k).call(this,e):t?gS(this,Kk,Wk).call(this,e,t):this._promiseHandle(e)}asMiddleware(){return gS(this,qk,Hk).call(this),async(t,r,n,i)=>{var o,a;try{const[s,c,u]=await gS(o=e,Yk,Zk).call(o,t,r,fS(this,Fk));return c?(await gS(a=e,ex,tx).call(a,u),i(s)):n((async t=>{var r;try{await gS(r=e,ex,tx).call(r,u)}catch(e){return t(e)}return t()}))}catch(e){return i(e)}}}async _promiseHandle(e){return new Promise(((t,r)=>{gS(this,Kk,Wk).call(this,e,((e,n)=>{e&&void 0===n?r(e):t(n)})).catch(r)}))}};jk=new WeakMap,Fk=new WeakMap,zk=new WeakMap,qk=new WeakSet,Hk=function(){if(fS(this,jk))throw new Error("This engine is destroyed and can no longer be used.")},Vk=new WeakSet,$k=async function(e,t){try{if(0===e.length){const e=[{id:null,jsonrpc:"2.0",error:new Mk(mS,"Request batch must contain plain objects. Received an empty array")}];return t?t(null,e):e}const r=(await Promise.all(e.map(this._promiseHandle.bind(this)))).filter((e=>void 0!==e));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}},Kk=new WeakSet,Wk=async function(e,t){var r;if(!e||Array.isArray(e)||"object"!=typeof e){const r=new Mk(mS,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:null,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const r=new Mk(mS,"Must specify a string method. Received: "+typeof e.method,{request:e});return fS(this,zk)&&!ik(e)?t(null):t(r,{id:e.id??null,jsonrpc:"2.0",error:r})}if(fS(this,zk)&&function(e){return OS(e,nk)}(e)&&!ik(e)){try{await fS(this,zk).call(this,e)}catch(e){return t(e)}return t(null)}let n=null;const i={...e},o={id:i.id,jsonrpc:i.jsonrpc};try{await gS(r=ox,Gk,Qk).call(r,i,o,fS(this,Fk))}catch(e){n=e}return n&&(delete o.result,o.error||(o.error=gk(n))),t(n,o)},Gk=new WeakSet,Qk=async function(e,t,r){var n,i,o;const[a,s,c]=await gS(n=ox,Yk,Zk).call(n,e,t,r);if(gS(i=ox,rx,nx).call(i,e,t,s),await gS(o=ox,ex,tx).call(o,c),a)throw a},Yk=new WeakSet,Zk=async function(e,t,r){var n;const i=[];let o=null,a=!1;for(const s of r)if([o,a]=await gS(n=ox,Jk,Xk).call(n,e,t,s,i),a)break;return[o,a,i.reverse()]},Jk=new WeakSet,Xk=async function(e,t,r,n){return new Promise((i=>{const o=e=>{const r=e||t.error;r&&(t.error=gk(r)),i([r,!0])},a=r=>{t.error?o(t.error):(r&&("function"!=typeof r&&o(new Mk(yS,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${sx(e)}`,{request:e})),n.push(r)),i([null,!1]))};try{r(e,t,a,o)}catch(e){o(e)}}))},ex=new WeakSet,tx=async function(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))},rx=new WeakSet,nx=function(e,t,r){if(!wS(t,"result")&&!wS(t,"error"))throw new Mk(yS,`JsonRpcEngine: Response has no error or result for request:\n${sx(e)}`,{request:e});if(!r)throw new Mk(yS,`JsonRpcEngine: Nothing ended request:\n${sx(e)}`,{request:e})},hS(ox,Gk),hS(ox,Yk),hS(ox,Jk),hS(ox,ex),hS(ox,rx);var ax=ox;function sx(e){return JSON.stringify(e,null,2)}var cx=Object.freeze(["eth_subscription"]),ux=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:console;return[(e,t,r,n)=>{const i=e.id,o=lS=(lS+1)%uS;e.id=o,t.id=o,r((r=>{e.id=i,t.id=i,r()}))},lx(e),cS(e)]};function lx(e){return(t,r,n)=>{"string"==typeof t.method&&t.method||(r.error=Nk({message:"The request 'method' must be a non-empty string.",data:t})),n((t=>{const{error:n}=r;return n?(e.error(`MetaMask - RPC Error: ${n.message}`,n),t()):t()}))}}var dx=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(n,i)=>{n||i.error?t(n||i.error):!r||Array.isArray(i)?e(i):e(i.result)}},fx=e=>Boolean(e)&&"string"==typeof e&&e.startsWith("0x"),hx=()=>{};async function px(e,t){try{const t=await async function(){return{name:gx(window),icon:await mx(window)}}();e.handle({jsonrpc:"2.0",id:1,method:"metamask_sendDomainMetadata",params:t},hx)}catch(e){t.error({message:sS.errors.sendSiteMetadata(),originalError:e})}}function gx(e){const{document:t}=e,r=t.querySelector('head > meta[property="og:site_name"]');if(r)return r.content;const n=t.querySelector('head > meta[name="title"]');return n?n.content:t.title&&t.title.length>0?t.title:window.location.hostname}async function mx(e){const{document:t}=e,r=t.querySelectorAll('head > link[rel~="icon"]');for(const n of Array.from(r))if(n&&await yx(n.href))return n.href;return null}async function yx(e){return new Promise(((t,r)=>{try{const r=document.createElement("img");r.onload=()=>t(!0),r.onerror=()=>t(!1),r.src=e}catch(e){r(e)}}))}var vx=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},bx=(e,t,r)=>(vx(e,t,"read from private field"),r?r.call(e):t.get(e)),wx=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Ax=(e,t,r,n)=>(vx(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function _x(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class Ex extends Qe{emit(e){let t="error"===e;const r=this._events;if(void 0!==r)t=t&&void 0===r.error;else if(!t)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o0&&([e]=i),e instanceof Error)throw e;const t=new Error("Unhandled error."+(e?` (${e.message})`:""));throw t.context=e,t}const a=r[e];if(void 0===a)return!1;if("function"==typeof a)_x(a,this,i);else{const e=a.length,t=function(e){const t=e.length,r=new Array(t);for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:{};super(),wx(this,Sx,void 0),wx(this,kx,void 0),this._log=t,this.setMaxListeners(r),this._state={...e._defaultState},Ax(this,kx,null),Ax(this,Sx,null),this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this.request=this.request.bind(this);const i=new ax;n.forEach((e=>i.push(e))),this._rpcEngine=i}get chainId(){return bx(this,Sx)}get selectedAddress(){return bx(this,kx)}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw Nk({message:sS.errors.invalidRequestArgs(),data:e});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw Nk({message:sS.errors.invalidRequestMethod(),data:e});if(void 0!==r&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw Nk({message:sS.errors.invalidRequestParams(),data:e});const n=null==r?{method:t}:{method:t,params:r};return new Promise(((e,t)=>{this._rpcRequest(n,dx(e,t))}))}_initializeState(e){if(this._state.initialized)throw new Error("Provider already initialized.");if(e){const{accounts:t,chainId:r,isUnlocked:n,networkVersion:i}=e;this._handleConnect(r),this._handleChainChanged({chainId:r,networkVersion:i}),this._handleUnlockStateChanged({accounts:t,isUnlocked:n}),this._handleAccountsChanged(t)}this._state.initialized=!0,this.emit("_initialized")}_rpcRequest(e,t){let r=t;return Array.isArray(e)||(e.jsonrpc||(e.jsonrpc="2.0"),"eth_accounts"!==e.method&&"eth_requestAccounts"!==e.method||(r=(r,n)=>{this._handleAccountsChanged(n.result??[],"eth_accounts"===e.method),t(r,n)})),this._rpcEngine.handle(e,r)}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),this._log.debug(sS.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new Mk(1013,t??sS.errors.disconnected()),this._log.debug(r)):(r=new Mk(1011,t??sS.errors.permanentlyDisconnected()),this._log.error(r),Ax(this,Sx,null),this._state.accounts=null,Ax(this,kx,null),this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleChainChanged(){let{chainId:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};fx(e)?(this._handleConnect(e),e!==bx(this,Sx)&&(Ax(this,Sx,e),this._state.initialized&&this.emit("chainChanged",bx(this,Sx)))):this._log.error(sS.errors.invalidNetworkParams(),{chainId:e})}_handleAccountsChanged(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e;Array.isArray(e)||(this._log.error("MetaMask: Received invalid accounts parameter. Please report this bug.",e),r=[]);for(const n of e)if("string"!=typeof n){this._log.error("MetaMask: Received non-string account. Please report this bug.",e),r=[];break}if(!xx(this._state.accounts,r)&&(t&&null!==this._state.accounts&&this._log.error("MetaMask: 'eth_accounts' unexpectedly updated accounts. Please report this bug.",r),this._state.accounts=r,bx(this,kx)!==r[0]&&Ax(this,kx,r[0]||null),this._state.initialized)){const e=[...r];this.emit("accountsChanged",e)}}_handleUnlockStateChanged(){let{accounts:e,isUnlocked:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e??[])):this._log.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.")}};Sx=new WeakMap,kx=new WeakMap,Cx._defaultState={accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1};var Ix=Cx;var Tx={},Ox={exports:{}},Px=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};super(Object.assign(Object.assign({},e),{objectMode:!0})),this._substreams={}}createStream(e){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new zx.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const r=(0,Fx.default)(t);(0,jx.finished)(e,{readable:!1},r),(0,jx.finished)(e,{writable:!1},r)}(this,(e=>t.destroy(e||void 0))),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=qx}_read(){}_write(e,t,r){const{name:n,data:i}=e;if(!n)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),r();const o=this._substreams[n];return o?(o!==qx&&o.push(i),r()):(console.warn(`ObjectMultiplex - orphaned data for stream "${n}"`),r())}};Tx.ObjectMultiplex=Hx;var Vx=n(Tx.ObjectMultiplex);const $x=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;$x.writable=e=>$x(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,$x.readable=e=>$x(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,$x.duplex=e=>$x.writable(e)&&$x.readable(e),$x.transform=e=>$x.duplex(e)&&"function"==typeof e._transform;var Kx,Wx=$x,Gx=class extends Ix{constructor(e,t){let{jsonRpcStreamName:r,logger:n=console,maxEventListeners:i=100,rpcMiddleware:o=[]}=t;if(super({logger:n,maxEventListeners:i,rpcMiddleware:o}),!Wx.duplex(e))throw new Error(sS.errors.invalidDuplexStream());this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this);const a=new Vx;zr.pipeline(e,a,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this._jsonRpcConnection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={},r=new zr.Duplex({objectMode:!0,read:()=>{},write:function(r,o,a){let s=null;try{r.id?function(e){const{id:r}=e;if(null===r)return;const n=t[r];n?(delete t[r],Object.assign(n.res,e),setTimeout(n.end)):console.warn(`StreamMiddleware - Unknown response id "${r}"`)}(r):function(r){e?.retryOnMessage&&r.method===e.retryOnMessage&&Object.values(t).forEach((e=>{let{req:r,retryCount:n=0}=e;if(!r.id)return;if(n>=3)throw new Error(`StreamMiddleware - Retry limit exceeded for request id "${r.id}"`);const o=t[r.id];o&&(o.retryCount=n+1),i(r)})),n.emit("notification",r)}(r)}catch(e){s=e}a(s)}}),n=new ix;return{events:n,middleware:(e,r,n,o)=>{t[e.id]={req:e,res:r,next:n,end:o},i(e)},stream:r};function i(e){r.push(e)}}({retryOnMessage:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}),zr.pipeline(this._jsonRpcConnection.stream,a.createStream(r),this._jsonRpcConnection.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider")),this._rpcEngine.push(this._jsonRpcConnection.middleware),this._jsonRpcConnection.events.on("notification",(t=>{const{method:r,params:n}=t;"metamask_accountsChanged"===r?this._handleAccountsChanged(n):"metamask_unlockStateChanged"===r?this._handleUnlockStateChanged(n):"metamask_chainChanged"===r?this._handleChainChanged(n):cx.includes(r)?this.emit("message",{type:r,data:n}):"METAMASK_STREAM_FAILURE"===r&&e.destroy(new Error(sS.errors.permanentlyDisconnected()))}))}async _initializeStateAsync(){let e;try{e=await this.request({method:"metamask_getProviderState"})}catch(e){this._log.error("MetaMask: Failed to get initial state. Please report this bug.",e)}this._initializeState(e)}_handleStreamDisconnect(e,t){let r=`MetaMask: Lost connection to "${e}".`;t?.stack&&(r+=`\n${t.stack}`),this._log.warn(r),this.listenerCount("error")>0&&this.emit("error",r),this._handleDisconnect(!1,t?t.message:void 0)}_handleChainChanged(){let{chainId:e,networkVersion:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};fx(e)&&(e=>Boolean(e)&&"string"==typeof e)(t)?"loading"===t?this._handleDisconnect(!0):super._handleChainChanged({chainId:e}):this._log.error(sS.errors.invalidNetworkParams(),{chainId:e,networkVersion:t})}},Qx=class extends Gx{constructor(e){let{jsonRpcStreamName:t="metamask-provider",logger:r=console,maxEventListeners:n=100,shouldSendMetadata:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(super(e,{jsonRpcStreamName:t,logger:r,maxEventListeners:n,rpcMiddleware:ux(r)}),this._sentWarnings={chainId:!1,networkVersion:!1,selectedAddress:!1,enable:!1,experimentalMethods:!1,send:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}},wx(this,Kx,void 0),this._initializeStateAsync(),Ax(this,Kx,null),this.isMetaMask=!0,this._sendSync=this._sendSync.bind(this),this.enable=this.enable.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this._warnOfDeprecation=this._warnOfDeprecation.bind(this),this._metamask=this._getExperimentalApi(),this._jsonRpcConnection.events.on("notification",(e=>{const{method:t}=e;cx.includes(t)&&(this.emit("data",e),this.emit("notification",e.params.result))})),i)if("complete"===document.readyState)px(this._rpcEngine,this._log);else{const e=()=>{px(this._rpcEngine,this._log),window.removeEventListener("DOMContentLoaded",e)};window.addEventListener("DOMContentLoaded",e)}}get chainId(){return this._sentWarnings.chainId||(this._log.warn(sS.warnings.chainIdDeprecation),this._sentWarnings.chainId=!0),super.chainId}get networkVersion(){return this._sentWarnings.networkVersion||(this._log.warn(sS.warnings.networkVersionDeprecation),this._sentWarnings.networkVersion=!0),bx(this,Kx)}get selectedAddress(){return this._sentWarnings.selectedAddress||(this._log.warn(sS.warnings.selectedAddressDeprecation),this._sentWarnings.selectedAddress=!0),super.selectedAddress}sendAsync(e,t){this._rpcRequest(e,t)}addListener(e,t){return this._warnOfDeprecation(e),super.addListener(e,t)}on(e,t){return this._warnOfDeprecation(e),super.on(e,t)}once(e,t){return this._warnOfDeprecation(e),super.once(e,t)}prependListener(e,t){return this._warnOfDeprecation(e),super.prependListener(e,t)}prependOnceListener(e,t){return this._warnOfDeprecation(e),super.prependOnceListener(e,t)}_handleDisconnect(e,t){super._handleDisconnect(e,t),bx(this,Kx)&&!e&&Ax(this,Kx,null)}_warnOfDeprecation(e){!1===this._sentWarnings?.events[e]&&(this._log.warn(sS.warnings.events[e]),this._sentWarnings.events[e]=!0)}async enable(){return this._sentWarnings.enable||(this._log.warn(sS.warnings.enableDeprecation),this._sentWarnings.enable=!0),new Promise(((e,t)=>{try{this._rpcRequest({method:"eth_requestAccounts",params:[]},dx(e,t))}catch(e){t(e)}}))}send(e,t){return this._sentWarnings.send||(this._log.warn(sS.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof e||t&&!Array.isArray(t)?e&&"object"==typeof e&&"function"==typeof t?this._rpcRequest(e,t):this._sendSync(e):new Promise(((r,n)=>{try{this._rpcRequest({method:e,params:t},dx(r,n,!1))}catch(e){n(e)}}))}_sendSync(e){let t;switch(e.method){case"eth_accounts":t=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":t=this.selectedAddress??null;break;case"eth_uninstallFilter":this._rpcRequest(e,hx),t=!0;break;case"net_version":t=bx(this,Kx)??null;break;default:throw new Error(sS.errors.unsupportedSync(e.method))}return{id:e.id,jsonrpc:e.jsonrpc,result:t}}_getExperimentalApi(){var e=this;return new Proxy({isUnlocked:async()=>(this._state.initialized||await new Promise((e=>{this.on("_initialized",(()=>e()))})),this._state.isUnlocked),requestBatch:async e=>{if(!Array.isArray(e))throw Nk({message:"Batch requests must be made with an array of request objects.",data:e});return new Promise(((t,r)=>{this._rpcRequest(e,dx(t,r))}))}},{get:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:{};super._handleChainChanged({chainId:e,networkVersion:t}),this._state.isConnected&&t!==bx(this,Kx)&&(Ax(this,Kx,t),this._state.initialized&&this.emit("networkChanged",bx(this,Kx)))}};Kx=new WeakMap;const Yx=lk("MM_SDK");Yx.color="#FFAC1C";var Zx={},Jx={};Object.defineProperty(Jx,"__esModule",{value:!0}),Jx.EthereumProviderError=Jx.EthereumRpcError=void 0;const Xx=vk;class eC extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return Xx.default(this.serialize(),tC,2)}}function tC(e,t){if("[Circular]"!==t)return t}Jx.EthereumRpcError=eC,Jx.EthereumProviderError=class extends eC{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}};var rC={},nC={};Object.defineProperty(nC,"__esModule",{value:!0}),nC.errorValues=nC.errorCodes=void 0,nC.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}},nC.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."}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=nC,r=Jx,n=t.errorCodes.rpc.internal,i={code:n,message:o(n)};function o(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unspecified error message. This is a bug, please report it.";if(Number.isInteger(r)){const n=r.toString();if(u(t.errorValues,n))return t.errorValues[n].message;if(s(r))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function a(e){if(!Number.isInteger(e))return!1;const r=e.toString();return!!t.errorValues[r]||!!s(e)}function s(e){return e>=-32099&&e<=-32e3}function c(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=o,e.isValidCode=a,e.serializeError=function(e){let{fallbackError:t=i,shouldIncludeStack:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var s,l;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof r.EthereumRpcError)return e.serialize();const d={};if(e&&"object"==typeof e&&!Array.isArray(e)&&u(e,"code")&&a(e.code)){const t=e;d.code=t.code,t.message&&"string"==typeof t.message?(d.message=t.message,u(t,"data")&&(d.data=t.data)):(d.message=o(d.code),d.data={originalError:c(e)})}else{d.code=t.code;const r=null===(s=e)||void 0===s?void 0:s.message;d.message=r&&"string"==typeof r?r:t.message,d.data={originalError:c(e)}}const f=null===(l=e)||void 0===l?void 0:l.stack;return n&&e&&f&&"string"==typeof f&&(d.stack=f),d}}(rC);var iC={};Object.defineProperty(iC,"__esModule",{value:!0}),iC.ethErrors=void 0;const oC=Jx,aC=rC,sC=nC;function cC(e,t){const[r,n]=lC(t);return new oC.EthereumRpcError(e,r||aC.getMessageFromCode(e),n)}function uC(e,t){const[r,n]=lC(t);return new oC.EthereumProviderError(e,r||aC.getMessageFromCode(e),n)}function lC(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}iC.ethErrors={rpc:{parse:e=>cC(sC.errorCodes.rpc.parse,e),invalidRequest:e=>cC(sC.errorCodes.rpc.invalidRequest,e),invalidParams:e=>cC(sC.errorCodes.rpc.invalidParams,e),methodNotFound:e=>cC(sC.errorCodes.rpc.methodNotFound,e),internal:e=>cC(sC.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return cC(t,e)},invalidInput:e=>cC(sC.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>cC(sC.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>cC(sC.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>cC(sC.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>cC(sC.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>cC(sC.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>uC(sC.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>uC(sC.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>uC(sC.errorCodes.provider.unsupportedMethod,e),disconnected:e=>uC(sC.errorCodes.provider.disconnected,e),chainDisconnected:e=>uC(sC.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new oC.EthereumProviderError(t,r,n)}}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=Jx;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=rC;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=iC;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=nC;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})}(Zx);const dC={METAMASK_GETPROVIDERSTATE:"metamask_getProviderState",METAMASK_CONNECTSIGN:"metamask_connectSign",METAMASK_CONNECTWITH:"metamask_connectWith",METAMASK_OPEN:"metamask_open",METAMASK_BATCH:"metamask_batch",PERSONAL_SIGN:"personal_sign",WALLET_REQUESTPERMISSIONS:"wallet_requestPermissions",WALLET_REVOKEPERMISSIONS:"wallet_revokePermissions",WALLET_GETPERMISSIONS:"wallet_getPermissions",WALLET_WATCHASSET:"wallet_watchAsset",WALLET_ADDETHEREUMCHAIN:"wallet_addEthereumChain",WALLET_SWITCHETHETHEREUMCHAIN:"wallet_switchEthereumChain",ETH_REQUESTACCOUNTS:"eth_requestAccounts",ETH_ACCOUNTS:"eth_accounts",ETH_CHAINID:"eth_chainId",ETH_SENDTRANSACTION:"eth_sendTransaction",ETH_SIGNTYPEDDATA:"eth_signTypedData",ETH_SIGNTYPEDDATA_V3:"eth_signTypedData_v3",ETH_SIGNTYPEDDATA_V4:"eth_signTypedData_v4",ETH_SIGNTRANSACTION:"eth_signTransaction",ETH_SIGN:"eth_sign",PERSONAL_EC_RECOVER:"personal_ecRecover"},fC={[dC.ETH_REQUESTACCOUNTS]:!0,[dC.ETH_SENDTRANSACTION]:!0,[dC.ETH_SIGNTRANSACTION]:!0,[dC.ETH_SIGN]:!0,[dC.ETH_ACCOUNTS]:!0,[dC.PERSONAL_SIGN]:!0,[dC.ETH_SIGNTYPEDDATA]:!0,[dC.ETH_SIGNTYPEDDATA_V3]:!0,[dC.ETH_SIGNTYPEDDATA_V4]:!0,[dC.WALLET_REQUESTPERMISSIONS]:!0,[dC.WALLET_GETPERMISSIONS]:!0,[dC.WALLET_WATCHASSET]:!0,[dC.WALLET_ADDETHEREUMCHAIN]:!0,[dC.WALLET_SWITCHETHETHEREUMCHAIN]:!0,[dC.METAMASK_CONNECTSIGN]:!0,[dC.METAMASK_CONNECTWITH]:!0,[dC.PERSONAL_EC_RECOVER]:!0,[dC.METAMASK_BATCH]:!0,[dC.METAMASK_OPEN]:!0},hC=Object.keys(fC).map((e=>e.toLowerCase())),pC=["eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sign"].map((e=>e.toLowerCase())),gC=".sdk-comm",mC="providerType",yC=".MMSDK_cached_address",vC=".MMSDK_cached_chainId",bC="chainChanged",wC="accountsChanged",AC="disconnect",_C="connect",EC="connected";class SC{constructor(){let{enabled:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{enabled:!1};this.enabled=!1,this.enabled=e}persistChannelConfig(e){return rS(this,void 0,void 0,(function*(){const t=JSON.stringify(e);Yx(`[StorageManagerWeb: persistChannelConfig()] enabled=${this.enabled}`,e),localStorage.setItem(gC,t)}))}getPersistedChannelConfig(){return rS(this,void 0,void 0,(function*(){let e;try{if(Yx(`[StorageManagerWeb: getPersistedChannelConfig()] enabled=${this.enabled}`),e=localStorage.getItem(gC),Yx("[StorageManagerWeb: getPersistedChannelConfig()]",e),!e)return;const t=JSON.parse(e);return Yx("[StorageManagerWeb: getPersistedChannelConfig()] channelConfig",t),t}catch(e){return void console.error("[StorageManagerWeb: getPersistedChannelConfig()] Can't find existing channel config",e)}}))}persistAccounts(e){return rS(this,void 0,void 0,(function*(){Yx(`[StorageManagerWeb: persistAccounts()] enabled=${this.enabled}`,e);const t=JSON.stringify(e);localStorage.setItem(yC,t)}))}getCachedAccounts(){return rS(this,void 0,void 0,(function*(){try{const e=localStorage.getItem(yC);return e?JSON.parse(e):[]}catch(e){throw console.error("[StorageManagerWeb: getCachedAccounts()] Error reading cached accounts",e),e}}))}persistChainId(e){return rS(this,void 0,void 0,(function*(){Yx(`[StorageManagerWeb: persistChainId()] enabled=${this.enabled}`,e),localStorage.setItem(vC,e)}))}getCachedChainId(){return rS(this,void 0,void 0,(function*(){try{const e=localStorage.getItem(vC);return null!=e?e:void 0}catch(e){throw console.error("[StorageManagerWeb: getCachedChainId()] Error reading cached chainId",e),e}}))}terminate(){return rS(this,void 0,void 0,(function*(){Yx(`[StorageManagerWeb: terminate()] enabled=${this.enabled}`),localStorage.removeItem(gC)}))}}const kC=e=>new SC(e);class xC extends Qx{constructor(e){let{connectionStream:t,shouldSendMetadata:r,autoRequestAccounts:n=!1}=e;super(t,{logger:console,maxEventListeners:100,shouldSendMetadata:r}),this.state={autoRequestAccounts:!1,providerStateRequested:!1,chainId:"",networkVersion:""},Yx(`[SDKProvider: constructor()] autoRequestAccounts=${n}`),this.state.autoRequestAccounts=n}forceInitializeState(){return rS(this,void 0,void 0,(function*(){return Yx(`[SDKProvider: forceInitializeState()] autoRequestAccounts=${this.state.autoRequestAccounts}`),this._initializeStateAsync()}))}_setConnected(){Yx("[SDKProvider: _setConnected()] Setting connected state"),this._state.isConnected=!0}getState(){return this._state}getSDKProviderState(){return this.state}getSelectedAddress(){var e;const{accounts:t}=this._state;return t&&0!==t.length?(null===(e=t[0])||void 0===e?void 0:e.toLowerCase())||"":(Yx("[SDKProvider: getSelectedAddress] No accounts found"),null)}getChainId(){return this.state.chainId}getNetworkVersion(){return this.state.networkVersion}setSDKProviderState(e){this.state=Object.assign(Object.assign({},this.state),e)}handleDisconnect(e){let{terminate:t=!1}=e;!function(e){let{terminate:t=!1,instance:r}=e;const{state:n}=r;r.isConnected()?(Yx(`[SDKProvider: handleDisconnect()] cleaning up provider state terminate=${t}`,r),t&&(r._state.accounts=null,r._state.isUnlocked=!1,r._state.isPermanentlyDisconnected=!0,r._state.initialized=!1),r._handleAccountsChanged([]),r._state.isConnected=!1,r.emit("disconnect",Zx.ethErrors.provider.disconnected()),n.providerStateRequested=!1):Yx("[SDKProvider: handleDisconnect()] not connected --- interrupt disconnection")}({terminate:t,instance:this})}_initializeStateAsync(){return rS(this,void 0,void 0,(function*(){return function(e){var t,r;return rS(this,void 0,void 0,(function*(){void 0===e.state&&(e.state={autoRequestAccounts:!1,providerStateRequested:!1,chainId:""});const{state:n}=e;let i;if(n.providerStateRequested)Yx("[SDKProvider: initializeStateAsync()] initialization already in progress");else{let o;n.providerStateRequested=!0;let a=null,s=!1,c=!1;const u=kC({enabled:!0});if(u){const e=yield u.getPersistedChannelConfig();s=null!==(t=null==e?void 0:e.relayPersistence)&&void 0!==t&&t,o=yield u.getCachedChainId();const r=yield u.getCachedAccounts();r.length>0&&(a=r[0])}if(Yx(`[SDKProvider: initializeStateAsync()] relayPersistence=${s}`,{relayPersistence:s,cachedChainId:o,cachedSelectedAddress:a}),s)if(o&&a)i={accounts:[a],chainId:o,isUnlocked:!1},c=!0;else try{i=yield e.request({method:"metamask_getProviderState"})}catch(t){return e._log.error("MetaMask: Failed to get initial state. Please report this bug.",t),void(n.providerStateRequested=!1)}if(0===(null===(r=null==i?void 0:i.accounts)||void 0===r?void 0:r.length))if(e.getSelectedAddress())i.accounts=[e.getSelectedAddress()];else{Yx("[SDKProvider: initializeStateAsync()] Fetch accounts remotely.");const t=yield e.request({method:"eth_requestAccounts",params:[]});i.accounts=t}e._initializeState(i),n.providerStateRequested=!1,c&&(e._state.isConnected=!0,e.emit("connect",{chainId:null==i?void 0:i.chainId}))}}))}(this)}))}_initializeState(e){return Yx("[SDKProvider: _initializeState()]",e),function(e,t,r){return Yx("[SDKProvider: initializeState()] set state._initialized to false"),e._state.initialized=!1,t(r)}(this,super._initializeState.bind(this),e)}_handleChainChanged(){let{chainId:e,networkVersion:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.state.chainId=e,this.state.networkVersion=t,function(e){let{instance:t,chainId:r,networkVersion:n,superHandleChainChanged:i}=e;Yx(`[SDKProvider: handleChainChanged()] chainId=${r} networkVersion=${n}`);let o=n;n||(Yx("[SDKProvider: handleChainChanged()] forced network version to prevent provider error"),o="1"),t._state.isConnected=!0,t.emit("connect",{chainId:r}),i({chainId:r,networkVersion:o})}({instance:this,chainId:e,networkVersion:t,superHandleChainChanged:super._handleChainChanged.bind(this)})}}var CC={exports:{}};!function(e){!function(t){var r=Object.hasOwnProperty,n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i="object"==typeof De&&!0,o="function"==typeof Symbol,a="object"==typeof Reflect,s="function"==typeof setImmediate?setImmediate:setTimeout,c=o?a&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function u(){this._events={},this._conf&&l.call(this,this._conf)}function l(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==t&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function d(e,t){var r="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(r+=" Event name: "+t+"."),void 0!==De&&De.emitWarning){var n=new Error(r);n.name="MaxListenersExceededWarning",n.emitter=this,n.count=e,De.emitWarning(n)}else console.error(r),console.trace&&console.trace()}var f=function(e,t,r){var n=arguments.length;switch(n){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,r];default:for(var i=new Array(n);n--;)i[n]=arguments[n];return i}};function h(e,r){for(var n={},i=e.length,o=r?r.length:0,a=0;a0;)if(o===e[a])return n;i(t)}}Object.assign(p.prototype,{subscribe:function(e,t,r){var n=this,i=this._target,o=this._emitter,a=this._listeners,s=function(){var n=f.apply(null,arguments),a={data:n,name:t,original:e};r?!1!==r.call(i,a)&&o.emit.apply(o,[a.name].concat(n)):o.emit.apply(o,[t].concat(n))};if(a[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,o._newListener&&o._removeListener&&!n._onNewListener?(this._onNewListener=function(r){r===t&&null===a[e]&&(a[e]=s,n._on.call(i,e,s))},o.on("newListener",this._onNewListener),this._onRemoveListener=function(r){r===t&&!o.hasListeners(r)&&a[e]&&(a[e]=null,n._off.call(i,e,s))},a[e]=null,o.on("removeListener",this._onRemoveListener)):(a[e]=s,n._on.call(i,e,s))},unsubscribe:function(e){var t,r,n,i=this,o=this._listeners,a=this._emitter,s=this._off,u=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function l(){i._onNewListener&&(a.off("newListener",i._onNewListener),a.off("removeListener",i._onRemoveListener),i._onNewListener=null,i._onRemoveListener=null);var e=A.call(a,i);a._observers.splice(e,1)}if(e){if(!(t=o[e]))return;s.call(u,e,t),delete o[e],--this._listenersCount||l()}else{for(n=(r=c(o)).length;n-- >0;)e=r[n],s.call(u,e,o[e]);this._listeners={},this._listenersCount=0,l()}}});var v=y(["function"]),b=y(["object","function"]);function w(e,t,r){var n,i,o,a=0,s=new e((function(c,u,l){function d(){i&&(i=null),a&&(clearTimeout(a),a=0)}r=g(r,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),n=!r.overload&&"function"==typeof e.prototype.cancel&&"function"==typeof l;var f=function(e){d(),c(e)},h=function(e){d(),u(e)};n?t(f,h,l):(i=[function(e){h(e||Error("canceled"))}],t(f,h,(function(e){if(o)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");i.push(e)})),o=!0),r.timeout>0&&(a=setTimeout((function(){var e=Error("timeout");e.code="ETIMEDOUT",a=0,s.cancel(e),u(e)}),r.timeout))}));return n||(s.cancel=function(e){if(i){for(var t=i.length,r=1;r0;)"_listeners"!==(h=v[s])&&(b=_(e,t,r[h],n+1,i))&&(w?w.push.apply(w,b):w=b);return w}if("**"===A){for((y=n+1===i||n+2===i&&"*"===E)&&r._listeners&&(w=_(e,t,r,i,i)),s=(v=c(r)).length;s-- >0;)"_listeners"!==(h=v[s])&&("*"===h||"**"===h?(r[h]._listeners&&!y&&(b=_(e,t,r[h],i,i))&&(w?w.push.apply(w,b):w=b),b=_(e,t,r[h],n,i)):b=_(e,t,r[h],h===E?n+2:n,i),b&&(w?w.push.apply(w,b):w=b));return w}r[A]&&(w=_(e,t,r[A],n+1,i))}if((p=r["*"])&&_(e,t,p,n+1,i),g=r["**"])if(n0;)"_listeners"!==(h=v[s])&&(h===E?_(e,t,g[h],n+2,i):h===A?_(e,t,g[h],n+1,i):((m={})[h]=g[h],_(e,t,{"**":m},n+1,i)));else g._listeners?_(e,t,g,i,i):g["*"]&&g["*"]._listeners&&_(e,t,g["*"],i,i);return w}function E(e,t,r){var n,i,o=0,a=0,s=this.delimiter,c=s.length;if("string"==typeof e)if(-1!==(n=e.indexOf(s))){i=new Array(5);do{i[o++]=e.slice(a,n),a=n+c}while(-1!==(n=e.indexOf(s,a)));i[o++]=e.slice(a)}else i=[e],o=1;else i=e,o=e.length;if(o>1)for(n=0;n+10&&l._listeners.length>this._maxListeners&&(l._listeners.warned=!0,d.call(this,l._listeners.length,u))):l._listeners=t,!0;return!0}function S(e,t,r,n){for(var i,o,a,s,u=c(e),l=u.length,d=e._listeners;l-- >0;)i=e[o=u[l]],a="_listeners"===o?r:r?r.concat(o):[o],s=n||"symbol"==typeof o,d&&t.push(s?a:a.join(this.delimiter)),"object"==typeof i&&S.call(this,i,t,a,s);return t}function k(e){for(var t,r,n,i=c(e),o=i.length;o-- >0;)(t=e[r=i[o]])&&(n=!0,"_listeners"===r||k(t)||delete e[r]);return n}function x(e,t,r){this.emitter=e,this.event=t,this.listener=r}function C(e,r,n){if(!0===n)a=!0;else if(!1===n)o=!0;else{if(!n||"object"!=typeof n)throw TypeError("options should be an object or true");var o=n.async,a=n.promisify,c=n.nextTick,u=n.objectify}if(o||c||a){var l=r,d=r._origin||r;if(c&&!i)throw Error("process.nextTick is not supported");a===t&&(a="AsyncFunction"===r.constructor.name),r=function(){var e=arguments,t=this,r=this.event;return a?c?Promise.resolve():new Promise((function(e){s(e)})).then((function(){return t.event=r,l.apply(t,e)})):(c?Ee:s)((function(){t.event=r,l.apply(t,e)}))},r._async=!0,r._origin=d}return[r,u?new x(this,e,r):this]}function I(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,l.call(this,e)}x.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},I.EventEmitter2=I,I.prototype.listenTo=function(e,r,i){if("object"!=typeof e)throw TypeError("target musts be an object");var o=this;function a(t){if("object"!=typeof t)throw TypeError("events must be an object");var r,n=i.reducers,a=A.call(o,e);r=-1===a?new p(o,e,i):o._observers[a];for(var s,u=c(t),l=u.length,d="function"==typeof n,f=0;f0;)n=r[i],e&&n._target!==e||(n.unsubscribe(t),o=!0);return o},I.prototype.delimiter=".",I.prototype.setMaxListeners=function(e){e!==t&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},I.prototype.getMaxListeners=function(){return this._maxListeners},I.prototype.event="",I.prototype.once=function(e,t,r){return this._once(e,t,!1,r)},I.prototype.prependOnceListener=function(e,t,r){return this._once(e,t,!0,r)},I.prototype._once=function(e,t,r,n){return this._many(e,1,t,r,n)},I.prototype.many=function(e,t,r,n){return this._many(e,t,r,!1,n)},I.prototype.prependMany=function(e,t,r,n){return this._many(e,t,r,!0,n)},I.prototype._many=function(e,t,r,n,i){var o=this;if("function"!=typeof r)throw new Error("many only accepts instances of Function");function a(){return 0==--t&&o.off(e,a),r.apply(this,arguments)}return a._origin=r,this._on(e,a,n,i)},I.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||u.call(this);var e,t,r,n,i,a,s=arguments[0],c=this.wildcard;if("newListener"===s&&!this._newListener&&!this._events.newListener)return!1;if(c&&(e=s,"newListener"!==s&&"removeListener"!==s&&"object"==typeof s)){if(r=s.length,o)for(n=0;n3)for(t=new Array(d-1),i=1;i3)for(r=new Array(f-1),a=1;a0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,d.call(this,this._events[e].length,e))):this._events[e]=r,a)},I.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var r,i=[];if(this.wildcard){var o="string"==typeof e?e.split(this.delimiter):e.slice();if(!(i=_.call(this,null,o,this.listenerTree,0)))return this}else{if(!this._events[e])return this;r=this._events[e],i.push({_listeners:r})}for(var a=0;a0){for(r=0,n=(t=this._all).length;r0;)"function"==typeof(n=s[r[o]])?i.push(n):i.push.apply(i,n);return i}if(this.wildcard){if(!(a=this.listenerTree))return[];var u=[],l="string"==typeof e?e.split(this.delimiter):e.slice();return _.call(this,u,l,a,0),u}return s&&(n=s[e])?"function"==typeof n?[n]:n:[]},I.prototype.eventNames=function(e){var t=this._events;return this.wildcard?S.call(this,this.listenerTree,[],null,e):t?c(t):[]},I.prototype.listenerCount=function(e){return this.listeners(e).length},I.prototype.hasListeners=function(e){if(this.wildcard){var r=[],n="string"==typeof e?e.split(this.delimiter):e.slice();return _.call(this,r,n,this.listenerTree,0),r.length>0}var i=this._events,o=this._all;return!!(o&&o.length||i&&(e===t?c(i).length:i[e]))},I.prototype.listenersAny=function(){return this._all?this._all:[]},I.prototype.waitFor=function(e,r){var n=this,i=typeof r;return"number"===i?r={timeout:r}:"function"===i&&(r={filter:r}),w((r=g(r,{timeout:0,filter:t,handleError:!1,Promise:Promise,overload:!1},{filter:v,Promise:m})).Promise,(function(t,i,o){function a(){var o=r.filter;if(!o||o.apply(n,arguments))if(n.off(e,a),r.handleError){var s=arguments[0];s?i(s):t(f.apply(null,arguments).slice(1))}else t(f.apply(null,arguments))}o((function(){n.off(e,a)})),n._on(e,a,!1)}),{timeout:r.timeout,overload:r.overload})};var T=I.prototype;Object.defineProperties(I,{defaultMaxListeners:{get:function(){return T._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");T._maxListeners=e},enumerable:!0},once:{value:function(e,t,r){return w((r=g(r,{Promise:Promise,timeout:0,overload:!1},{Promise:m})).Promise,(function(r,n,i){var o;if("function"==typeof e.addEventListener)return o=function(){r(f.apply(null,arguments))},i((function(){e.removeEventListener(t,o)})),void e.addEventListener(t,o,{once:!0});var a,s=function(){a&&e.removeListener("error",a),r(f.apply(null,arguments))};"error"!==t&&(a=function(r){e.removeListener(t,s),n(r)},e.once("error",a)),i((function(){a&&e.removeListener("error",a),e.removeListener(t,s)})),e.once(t,s)}),{timeout:r.timeout,overload:r.overload})},writable:!0,configurable:!0}}),Object.defineProperties(T,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),"function"==typeof t&&t.amd?t((function(){return I})):e.exports=I}()}(CC);var IC=n(CC.exports);const TC={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class OC{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||TC,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r{this.observers[e]||(this.observers[e]=new Map);const r=this.observers[e].get(t)||0;this.observers[e].set(t,r+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{let[t,n]=e;for(let i=0;i{let[n,i]=t;for(let o=0;o{e=r,t=n}));return r.resolve=e,r.reject=t,r}function NC(e){return null==e?"":""+e}const LC=/###/g;function BC(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(LC,"."):e}function i(){return!e||"string"==typeof e}const o="string"!=typeof t?t:t.split(".");let a=0;for(;a":">",'"':""","'":"'","/":"/"};function qC(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>zC[e])):e}const HC=[" ",",","?","!",";"],VC=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}(20);function $C(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let i=e;for(let o=0;o-1&&a0?e.replace("_","-"):e}class WC extends MC{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],r&&(Array.isArray(r)?a.push(...r):"string"==typeof r&&i?a.push(...r.split(i)):a.push(r)));const s=UC(this.data,a);return!s&&!t&&!r&&e.indexOf(".")>-1&&(e=a[0],t=a[1],r=a.slice(2).join(".")),s||!o||"string"!=typeof r?s:$C(this.data&&this.data[e]&&this.data[e][t],r,i)}addResource(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),DC(this.data,a,n),i.silent||this.emit("added",e,t,r,n)}addResources(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const i in r)("string"==typeof r[i]||Array.isArray(r[i]))&&this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);let s=UC(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?jC(s,r,i):s={...s,...r},DC(this.data,a,s),o.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var GC={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,r,n,i))})),t}};const QC={};class YC extends MC{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,r){["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((e=>{t[e]&&(r[e]=t[e])}))}(0,e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=PC.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const r=this.resolve(e,t);return r&&void 0!==r.res}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=r&&e.indexOf(r)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,r){t=t||"",r=r||"";const n=HC.filter((e=>t.indexOf(e)<0&&r.indexOf(e)<0));if(0===n.length)return!0;const i=VC.getRegExp(`(${n.map((e=>"?"===e?"\\?":e)).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(r);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o}(e,r,n));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i};const o=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}translate(e,t,r){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const n=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],c=t.lng||this.language,u=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(u){const e=t.nsSeparator||this.options.nsSeparator;return n?{res:`${s}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${o}`}return n?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:o}const l=this.resolve(e,t);let d=l&&l.res;const f=l&&l.usedKey||o,h=l&&l.exactUsedKey||o,p=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&d&&"string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0&&("string"!=typeof g||!Array.isArray(d))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return n?(l.res=e,l.usedParams=this.getUsedParamsDetails(t),l):e}if(i){const e=Array.isArray(d),r=e?[]:{},n=e?h:f;for(const o in d)if(Object.prototype.hasOwnProperty.call(d,o)){const e=`${n}${i}${o}`;r[o]=this.translate(e,{...t,joinArrays:!1,ns:a}),r[o]===e&&(r[o]=d[o])}d=r}}else if(m&&"string"==typeof g&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,t,r));else{let n=!1,a=!1;const u=void 0!==t.count&&"string"!=typeof t.count,f=YC.hasDefaultValue(t),h=u?this.pluralResolver.getSuffix(c,t.count,t):"",p=t.ordinal&&u?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",g=u&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),m=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${h}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(n=!0,d=m),this.isValidLookup(d)||(a=!0,d=o);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,v=f&&m!==d&&this.options.updateMissing;if(a||n||v){if(this.logger.log(v?"updateKey":"missingKey",c,s,o,v?m:d),i){const e=this.resolve(o,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const r=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&r&&r[0])for(let t=0;t{const i=f&&n!==d?n:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,r,i,v,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,r,i,v,t),this.emit("missingKey",e,s,r,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach((e=>{const r=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&r.indexOf(`${this.options.pluralSeparator}zero`)<0&&r.push(`${this.options.pluralSeparator}zero`),r.forEach((r=>{n([e],o+r,t[`defaultValue${r}`]||m)}))})):n(e,o,m))}d=this.extendTranslation(d,e,t,l,r),a&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${o}`),(a||n)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${o}`:o,n?d:void 0):this.options.parseMissingKeyHandler(d))}return n?(l.res=d,l.usedParams=this.getUsedParamsDetails(t),l):d}extendTranslation(e,t,r,n,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const a="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let c=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,r.lng||this.language,r),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(r.nest=!1)}!r.lng&&"v1"!==this.options.compatibilityAPI&&n&&n.res&&(r.lng=n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,n=new Array(e),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),c=s.key;r=c;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const l=void 0!==a.count&&"string"!=typeof a.count,d=l&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);u.forEach((e=>{this.isValidLookup(t)||(o=e,!QC[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(QC[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${h.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((r=>{if(this.isValidLookup(t))return;i=r;const o=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,a);else{let e;l&&(e=this.pluralResolver.getSuffix(r,a.count,a));const t=`${this.options.pluralSeparator}zero`,n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(o.push(c+e),a.ordinal&&0===e.indexOf(n)&&o.push(c+e.replace(n,this.options.pluralSeparator)),d&&o.push(c+t)),f){const r=`${c}${this.options.contextSeparator}${a.context}`;o.push(r),l&&(o.push(r+e),a.ordinal&&0===e.indexOf(n)&&o.push(r+e.replace(n,this.options.pluralSeparator)),d&&o.push(r+t))}}let s;for(;s=o.pop();)this.isValidLookup(t)||(n=s,t=this.getResource(r,e,s,a))})))}))})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&"string"!=typeof e.replace;let n=r?e.replace:e;if(r&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!r){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}function ZC(e){return e.charAt(0).toUpperCase()+e.slice(1)}class JC{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=PC.create("languageUtils")}getScriptPartFromCode(e){if(!(e=KC(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=KC(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map((e=>e.toLowerCase())):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=ZC(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=ZC(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=ZC(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const r=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(r)||(t=r)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find((e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),n=[],i=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((e=>{n.indexOf(e)<0&&i(this.formatLanguageCode(e))})),n}}let XC=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],eI={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};const tI=["v1","v2","v3"],rI=["v4"],nI={zero:0,one:1,two:2,few:3,many:4,other:5};class iI{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=PC.create("pluralResolver"),this.options.compatibilityJSON&&!rI.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){const e={};return XC.forEach((t=>{t.lngs.forEach((r=>{e[r]={numbers:t.nr,plurals:eI[t.fc]}}))})),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(KC("dev"===e?"en":e),{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.getRule(e,t);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort(((e,t)=>nI[e]-nI[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):r.numbers.map((r=>this.getSuffix(e,r,t))):[]}getSuffix(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:this.getSuffixRetroCompatible(n,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let n=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===n?n="plural":1===n&&(n=""));const i=()=>this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString();return"v1"===this.options.compatibilityJSON?1===n?"":"number"==typeof n?`_plural_${n.toString()}`:i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!tI.includes(this.options.compatibilityJSON)}}function oI(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=function(e,t,r){const n=UC(e,r);return void 0!==n?n:UC(t,r)}(e,t,r);return!o&&i&&"string"==typeof r&&(o=$C(e,r,n),void 0===o&&(o=$C(t,r,n))),o}class aI{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=PC.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:n,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:s,formatSeparator:c,unescapeSuffix:u,unescapePrefix:l,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:h,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:qC,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=i?FC(i):o||"{{",this.suffix=a?FC(a):s||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":l||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?FC(d):f||FC("$t("),this.nestingSuffix=h?FC(h):p||FC(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,r,n){let i,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}const u=e=>{if(e.indexOf(this.formatSeparator)<0){const i=oI(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,r,{...n,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(oI(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,r,{...n,...t,interpolationkey:o})};this.resetRegExp();const l=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,d=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>c(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?c(this.escape(e)):c(e)}].forEach((t=>{for(a=0;i=t.regex.exec(e);){const r=i[1].trim();if(o=u(r),void 0===o)if("function"==typeof l){const t=l(e,i,n);o="string"==typeof t?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))o="";else{if(d){o=i[0];continue}this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),o=""}else"string"==typeof o||this.useRawValueToEscape||(o=NC(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let r,n,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){const r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;const n=e.split(new RegExp(`${r}[ ]*{`));let o=`{${n[1]}`;e=n[0],o=this.interpolate(o,i);const a=o.match(/'/g),s=o.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${r}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e}for(;r=this.nestingRegexp.exec(e);){let s=[];i={...o},i=i.replace&&"string"!=typeof i.replace?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){const e=r[1].split(this.formatSeparator).map((e=>e.trim()));r[1]=e.shift(),s=e,c=!0}if(n=t(a.call(this,r[1].trim(),i),i),n&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=NC(n)),n||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),n=""),c&&(n=s.reduce(((e,t)=>this.format(e,t,o.lng,{...o,interpolationkey:r[1].trim()})),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}function sI(e){const t={};return function(r,n,i){const o=n+JSON.stringify(i);let a=t[o];return a||(a=e(KC(n),i),t[o]=a),a(r)}}class cI{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=PC.create("formatter"),this.options=e,this.formats={number:sI(((e,t)=>{const r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)})),currency:sI(((e,t)=>{const r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)})),datetime:sI(((e,t)=>{const r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)})),relativetime:sI(((e,t)=>{const r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")})),list:sI(((e,t)=>{const r=new Intl.ListFormat(e,{...t});return e=>r.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=sI(t)}format(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t.split(this.formatSeparator).reduce(((e,t)=>{const{formatName:i,formatOptions:o}=function(e){let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);"currency"===t&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach((e=>{if(e){const[t,...n]=e.split(":"),i=n.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();r[o]||(r[o]=i),"false"===i&&(r[o]=!1),"true"===i&&(r[o]=!0),isNaN(i)||(r[o]=parseInt(i,10))}}))}return{formatName:t,formatOptions:r}}(t);if(this.formats[i]){let t=e;try{const a=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},s=a.locale||a.lng||n.locale||n.lng||r;t=this.formats[i](e,s,{...o,...n,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e}),e);return i}}class uI extends MC{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=PC.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,n.backend,n)}queueLoad(e,t,r,n){const i={},o={},a={},s={};return e.forEach((e=>{let n=!0;t.forEach((t=>{const a=`${e}|${t}`;!r.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,n=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))})),n||(a[e]=!0)})),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,r){const n=e.split("|"),i=n[0],o=n[1];t&&this.emit("failedLoading",i,o,t),r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2;const a={};this.queue.forEach((r=>{!function(e,t,r){const{obj:n,k:i}=BC(e,t,Object);n[i]=n[i]||[],n[i].push(r)}(r.loaded,[i],o),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach((e=>{a[e]||(a[e]={});const t=r.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:n,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&n{this.read.call(this,e,t,r,n+1,2*i,o)}),i):o(a,s)},s=this.backend[r].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const r=s(e,t);r&&"function"==typeof r.then?r.then((e=>a(null,e))).catch(a):a(null,r)}catch(e){a(e)}}prepareLoading(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const i=this.queueLoad(e,t,r,n);if(!i.toLoad.length)return i.pending.length||n(),null;i.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=e.split("|"),n=r[0],i=r[1];this.read(n,i,"read",void 0,void 0,((r,o)=>{r&&this.logger.warn(`${t}loading namespace ${i} for language ${n} failed`,r),!r&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${n}`,o),this.loaded(e,r,o)}))}saveMissing(e,t,r,n,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=r&&""!==r){if(this.backend&&this.backend.create){const s={...o,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=5===c.length?c(e,t,r,n,s):c(e,t,r,n),i&&"function"==typeof i.then?i.then((e=>a(null,e))).catch(a):a(null,i)}catch(e){a(e)}else c(e,t,r,n,a,s)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}}function lI(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const r=e[3]||e[2];Object.keys(r).forEach((e=>{t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function dI(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function fI(){}class hI extends MC{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var r;if(super(),this.options=dI(e),this.services={},this.logger=PC,this.modules={external:[]},r=this,Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((e=>{"function"==typeof r[e]&&(r[e]=r[e].bind(r))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const n=lI();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options={...n,...this.options,...dI(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...n.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?PC.init(i(this.modules.logger),this.options):PC.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=cI);const r=new JC(this.options);this.store=new WC(this.options.resources,this.options);const o=this.services;o.logger=PC,o.resourceStore=this.store,o.languageUtils=r,o.pluralResolver=new iI(r,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(o.formatter=i(t),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new aI(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new uI(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,r||(r=fI),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const o=RC(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(t),r(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),o}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fI;const r="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],n=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};r?n(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>n(e))),this.options.preload&&this.options.preload.forEach((e=>n(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,r){const n=RC();return e||(e=this.languages),t||(t=this.options.ns),r||(r=fI),this.services.backendConnector.reload(e,t,(e=>{n.resolve(),r(e)})),n}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&GC.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const n=RC();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(e,o)=>{o?(i(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((function(){return r.t(...arguments)})),t&&t(e,(function(){return r.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const r="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);r&&(this.language||i(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(r)),this.loadResources(r,(e=>{o(e,r)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),n}getFixedT(e,t,r){var n=this;const i=function(e,t){let o;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),c=2;c`${o.keyPrefix}${u}${e}`)):o.keyPrefix?`${o.keyPrefix}${u}${e}`:e,n.t(l,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;const o=(e,t)=>{const r=this.services.backendConnector.state[`${e}|${t}`];return-1===r||2===r};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!(!this.hasResourceBundle(r,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!o(r,e)||n&&!o(i,e)))}loadNamespaces(e,t){const r=RC();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=RC();"string"==typeof e&&(e=[e]);const n=this.options.preload||[],i=e.filter((e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return i.length?(this.options.preload=n.concat(i),this.loadResources((e=>{r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new JC(lI());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new hI(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fI;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},i=new hI(n);return void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e)),["store","services","language"].forEach((e=>{i[e]=this[e]})),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new WC(this.store.data,n),i.services.resourceStore=i.store),i.translator=new YC(i.services,n),i.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n!0});var s;this.provider=a,t&&"undefined"!=typeof window&&(s=o,window.ethereum=s,window.dispatchEvent(new Event("ethereum#initialized"))),i&&"undefined"!=typeof window&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:console,r=!1,n=!1;if(!window.web3){const i="__isMetaMaskShim__";let o={currentProvider:e};Object.defineProperty(o,i,{value:!0,enumerable:!0,configurable:!1,writable:!1}),o=new Proxy(o,{get:function(o,a){for(var s=arguments.length,c=new Array(s>2?s-2:0),u=2;u{t.debug("MetaMask: Failed to log web3 shim usage.",e)}))):(r=!0,t.warn("You are accessing the MetaMask window.web3.currentProvider shim. This property is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3")),Reflect.get(o,a,...c)},set:function(){return t.warn("You are accessing the MetaMask window.web3 shim. This object is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),Reflect.set(...arguments)}}),Object.defineProperty(window,"web3",{value:o,enumerable:!1,configurable:!0,writable:!0})}}(this.provider),this.provider.on("_initialized",(()=>{const e={chainId:this.provider.getChainId(),isConnected:this.provider.isConnected(),isMetaNask:this.provider.isMetaMask,selectedAddress:this.provider.getSelectedAddress(),networkVersion:this.provider.getNetworkVersion()};Yx("[Ethereum: constructor()] provider initialized",e)}))}static init(e){var t;return Yx("[Ethereum: init()] Initializing Ethereum service"),this.instance=new CI(e),null===(t=this.instance)||void 0===t?void 0:t.provider}static destroy(){CI.instance=void 0}static getInstance(){var e;if(!(null===(e=this.instance)||void 0===e?void 0:e.provider))throw new Error("Ethereum instance not intiialized - call Ethereum.factory first.");return this.instance}static getProvider(){var e;if(!(null===(e=this.instance)||void 0===e?void 0:e.provider))throw new Error("Ethereum instance not intiialized - call Ethereum.factory first.");return this.instance.provider}}class II extends zr.Duplex{constructor(t){let{name:r,remote:n,platformManager:i}=t;super({objectMode:!0}),this.state={_name:null,remote:null,platformManager:null},this.state._name=r,this.state.remote=n,this.state.platformManager=i,this._onMessage=this._onMessage.bind(this),this.state.remote.on(e.EventType.MESSAGE,this._onMessage)}_write(e,t,r){return rS(this,void 0,void 0,(function*(){return function(e,t,r,n){var i,o,a,s,c,u,l,d,f,h,p,g,m,y;return rS(this,void 0,void 0,(function*(){const r=null===(i=e.state.remote)||void 0===i?void 0:i.isReady(),v=null===(o=e.state.remote)||void 0===o?void 0:o.isConnected(),b=null===(a=e.state.remote)||void 0===a?void 0:a.isPaused(),w=CI.getProvider(),_=null===(s=e.state.remote)||void 0===s?void 0:s.getChannelId(),E=null===(c=e.state.remote)||void 0===c?void 0:c.isAuthorized(),{method:S,data:k}=(e=>{var t;let r;return A.isBuffer(e)?(r=e.toJSON(),r._isBuffer=!0):r=e,{method:null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.method,data:r}})(t);if(Yx(`[RCPMS: write()] method='${S}' isRemoteReady=${r} channelId=${_} isSocketConnected=${v} isRemotePaused=${b} providerConnected=${w.isConnected()}`,t),!_)return S!==dC.METAMASK_GETPROVIDERSTATE&&Yx("[RCPMS: write()] Invalid channel id -- undefined"),n();Yx(`[RCPMS: write()] remote.isPaused()=${null===(u=e.state.remote)||void 0===u?void 0:u.isPaused()} authorized=${E} ready=${r} socketConnected=${v}`,t);try{if(null===(l=e.state.remote)||void 0===l||l.sendMessage(null==k?void 0:k.data).then((()=>{Yx(`[RCPMS: _write()] ${S} sent successfully`)})).catch((e=>{Yx("[RCPMS: _write()] error sending message",e)})),!(null===(d=e.state.platformManager)||void 0===d?void 0:d.isSecure()))return Yx(`[RCPMS: _write()] unsecure platform for method ${S} -- return callback`),n();if(!v&&!r)return Yx(`[RCPMS: _write()] invalid connection status targetMethod=${S} socketConnected=${v} ready=${r} providerConnected=${w.isConnected()}`),n();if(!v&&r)return console.warn("[RCPMS: _write()] invalid socket status -- shouldn't happen"),n();const t=null!==(p=null===(h=null===(f=e.state.remote)||void 0===f?void 0:f.getKeyInfo())||void 0===h?void 0:h.ecies.public)&&void 0!==p?p:"",i=encodeURI(`channelId=${_}&pubkey=${t}&comm=socket&t=d&v=2`);fC[S]?(Yx(`[RCPMS: _write()] redirect link for '${S}' socketConnected=${v} connect?${i}`),null===(g=e.state.platformManager)||void 0===g||g.openDeeplink(`${bI}?${i}`,`${wI}?${i}`,"_self")):(null===(m=e.state.remote)||void 0===m?void 0:m.isPaused())?(Yx(`[RCPMS: _write()] MM is PAUSED! deeplink with connect! targetMethod=${S}`),null===(y=e.state.platformManager)||void 0===y||y.openDeeplink(`${bI}?redirect=true&${i}`,`${wI}?redirect=true&${i}`,"_self")):Yx(`[RCPMS: _write()] method ${S} doesn't need redirect.`)}catch(e){return Yx("[RCPMS: _write()] error sending message",e),n(new Error("RemoteCommunicationPostMessageStream - disconnected"))}return n()}))}(this,e,0,r)}))}_read(){}_onMessage(e){return function(e,t){try{if(Yx("[RCPMS: onMessage()] message",t),!t||"object"!=typeof t)return;if("object"!=typeof(null==t?void 0:t.data))return;if(!(null==t?void 0:t.name))return void Yx(`[RCPMS: onMessage()] ignore message without name message=${t}`);if((null==t?void 0:t.name)!==mI.PROVIDER)return void Yx(`[RCPMS: onMessage()] ignore message with wrong name message=${t}`);if(A.isBuffer(t)){const r=A.from(t);e.push(r)}else e.push(t)}catch(e){Yx(`[RCPMS: onMessage()] ignore message error err=${e}`)}}(this,e)}start(){}}var TI={exports:{}};!function(e,t){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,n="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,o="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in r,s="ArrayBuffer"in r;if(s)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function m(e){var t=new FileReader,r=g(t);return t.readAsArrayBuffer(e),r}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(m)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=g(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var n=/([?&])_=[^&]*/;n.test(this.url)?this.url=this.url.replace(n,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function A(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function _(e,t){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},v.call(w.prototype),v.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];_.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,n){return new Promise((function(i,a){var c=new w(e,n);if(c.signal&&c.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var e,t,r={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout((function(){i(new _(n,r))}),0)},u.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){a(new t.DOMException("Aborted","AbortError"))}),0)},u.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?u.withCredentials=!0:"omit"===c.credentials&&(u.withCredentials=!1),"responseType"in u&&(o?u.responseType="blob":s&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof h?c.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){u.setRequestHeader(e,d(n.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&c.signal.removeEventListener("abort",l)}),u.send(void 0===c._bodyInit?null:c._bodyInit)}))}S.polyfill=!0,r.fetch||(r.fetch=S,r.Headers=h,r.Request=w,r.Response=_),t.Headers=h,t.Request=w,t.Response=_,t.fetch=S}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(TI,TI.exports);var OI=n(TI.exports);let PI=1;const MI=e=>new Promise((t=>{setTimeout((()=>{t(!0)}),e)})),RI=t=>{let{checkInstallationOnAllCalls:r=!1,communicationLayerPreference:n,injectProvider:i,shouldShimWeb3:o,platformManager:a,installer:s,sdk:c,remoteConnection:u,debug:l}=t;return rS(void 0,void 0,void 0,(function*(){var t,d;const f=(e=>{let{name:t,remoteConnection:r}=e;if(!r||!(null==r?void 0:r.getConnector()))throw new Error("Missing remote connection parameter");return new II({name:t,remote:null==r?void 0:r.getConnector(),platformManager:null==r?void 0:r.getPlatformManager()})})({name:mI.INPAGE,target:mI.CONTENT_SCRIPT,platformManager:a,communicationLayerPreference:n,remoteConnection:u}),h=a.getPlatformType(),p=c.options.dappMetadata,g=`Sdk/Javascript SdkVersion/${yI} Platform/${h} dApp/${null!==(t=p.url)&&void 0!==t?t:p.name} dAppTitle/${p.name}`;let m=null,y=null;const v=null===(d=c.options.storage)||void 0===d?void 0:d.storageManager;if(v){try{const e=yield v.getCachedAccounts();e.length>0&&(m=e[0])}catch(e){console.error(`[initializeMobileProvider] failed to get cached addresses: ${e}`)}try{const e=yield v.getCachedChainId();e&&(y=e)}catch(e){console.error(`[initializeMobileProvider] failed to parse cached chainId: ${e}`)}}Yx(`[initializeMobileProvider] cachedAccountAddress: ${m}, cachedChainId: ${y}`);const b=!(!i||h===e.PlatformType.NonBrowser||h===e.PlatformType.ReactNative),w=CI.init({shouldSetOnWindow:b,connectionStream:f,shouldShimWeb3:o});let A=!1;const _=e=>{A=e},E=()=>A,S=(t,n,i,o)=>rS(void 0,void 0,void 0,(function*(){var l,d,f,h,p,b,w,S,k;if(A){null==u||u.showActiveModal();let e=E();for(;e;)yield MI(1e3),e=E();return Yx("[initializeMobileProvider: sendRequest()] initial method completed -- prevent installation and call provider"),i(...n)}const x=a.isMetaMaskInstalled(),C=null==u?void 0:u.isConnected(),I=CI.getProvider();let T=null,O=null;if(T=null!==(l=I.getSelectedAddress())&&void 0!==l?l:m,O=I.getChainId()||y,T&&v&&T!==m&&v.persistAccounts([T]).catch((e=>{console.error(`[initializeMobileProvider] failed to persist account: ${e}`)})),O&&(y=O,v&&v.persistChainId(O).catch((e=>{console.error(`[initializeMobileProvider] failed to persist chainId: ${e}`)}))),Yx("[initializeMobileProvider: sendRequest()]",{selectedAddress:T,chainId:O}),o&&Yx(`[initializeMobileProvider: sendRequest()] method=${t} ongoing=${A} selectedAddress=${T} isInstalled=${x} checkInstallationOnAllCalls=${r} socketConnected=${C}`),T&&t.toLowerCase()===dC.ETH_ACCOUNTS.toLowerCase())return[T];if(O&&t.toLowerCase()===dC.ETH_CHAINID.toLowerCase())return O;const P=[dC.ETH_REQUESTACCOUNTS,dC.WALLET_REQUESTPERMISSIONS,dC.METAMASK_CONNECTSIGN,dC.METAMASK_CONNECTWITH],M=!fC[t],R=null===(d=c.options.readonlyRPCMap)||void 0===d?void 0:d[O];if(R&&M)try{const e=null===(f=null==n?void 0:n[0])||void 0===f?void 0:f.params,r=yield(e=>{let{rpcEndpoint:t,method:r,sdkInfo:n,params:i}=e;return rS(void 0,void 0,void 0,(function*(){const e=JSON.stringify({jsonrpc:"2.0",method:r,params:i,id:(PI+=1,PI)}),o={Accept:"application/json","Content-Type":"application/json"};let a;t.includes("infura")&&(o["Metamask-Sdk-Info"]=n);try{a=yield OI(t,{method:"POST",headers:o,body:e})}catch(t){throw t instanceof Error?new Error(`Failed to fetch from RPC: ${t.message}`):new Error(`Failed to fetch from RPC: ${t}`)}if(!a.ok)throw new Error(`Server responded with a status of ${a.status}`);return(yield a.json()).result}))})({rpcEndpoint:R,sdkInfo:g,method:t,params:e||[]});return o&&Yx(`initializeProvider::ReadOnlyRPCResponse ${r}`),r}catch(e){console.warn(`[initializeMobileProvider: sendRequest()] method=${t} readOnlyRPCRequest failed:`,e)}if((!x||x&&!C)&&t!==dC.METAMASK_GETPROVIDERSTATE){const o=(null===(h=null==n?void 0:n[0])||void 0===h?void 0:h.params)||[];if(-1!==P.indexOf(t)||r){_(!0);try{yield s.start({wait:!1})}catch(r){if(_(!1),e.PROVIDER_UPDATE_TYPE.EXTENSION===r){if(Yx(`[initializeMobileProvider: sendRequest()] extension provider detect: re-create ${t} on the active provider`),t.toLowerCase()===dC.METAMASK_CONNECTSIGN.toLowerCase()){const e=yield null===(p=c.getProvider())||void 0===p?void 0:p.request({method:dC.ETH_REQUESTACCOUNTS,params:[]});if(!e.length)throw new Error("SDK state invalid -- undefined accounts");return yield null===(b=c.getProvider())||void 0===b?void 0:b.request({method:dC.PERSONAL_SIGN,params:[o[0],e[0]]})}if(t.toLowerCase()===dC.METAMASK_CONNECTWITH.toLowerCase()){const[e]=o;return yield(e=>{let{method:t,sdk:r,params:n}=e;return rS(void 0,void 0,void 0,(function*(){var e,i,o,a;if(!r.isExtensionActive())throw new Error("SDK state invalid -- extension is not active");Yx("[MetaMaskProvider: extensionConnectWithOverwrite()] Overwriting request method",t,n);const s=yield null===(e=r.getProvider())||void 0===e?void 0:e.request({method:dC.ETH_REQUESTACCOUNTS,params:[]});if(!s.length)throw new Error("SDK state invalid -- undefined accounts");if((null==t?void 0:t.toLowerCase())===dC.PERSONAL_SIGN.toLowerCase()){const e={method:t,params:[n[0],s[0]]};return yield null===(i=r.getProvider())||void 0===i?void 0:i.request(e)}if((null==t?void 0:t.toLowerCase())===dC.ETH_SENDTRANSACTION.toLowerCase()){const e={method:t,params:[Object.assign(Object.assign({},n[0]),{from:s[0]})]};return yield null===(o=r.getProvider())||void 0===o?void 0:o.request(e)}return pC.includes(t.toLowerCase())?(console.warn(`MetaMaskSDK connectWith method=${t} -- not handled by the extension -- call separately`),s):yield null===(a=r.getProvider())||void 0===a?void 0:a.request({method:t,params:n})}))})({method:e.method,sdk:c,params:e.params})}return Yx(`[initializeMobileProvider: sendRequest()] sending '${t}' on active provider`,o),yield null===(w=c.getProvider())||void 0===w?void 0:w.request({method:t,params:o})}throw Yx(`[initializeMobileProvider: sendRequest()] failed to start installer: ${r}`),r}const a=i(...n);try{yield new Promise(((t,r)=>{null==u||u.getConnector().once(e.EventType.AUTHORIZED,(()=>{t(!0)})),c.once(e.EventType.PROVIDER_UPDATE,(t=>{Yx(`[initializeMobileProvider: sendRequest()] PROVIDER_UPDATE --- remote provider request interupted type=${t}`),t===e.PROVIDER_UPDATE_TYPE.EXTENSION?r(e.EventType.PROVIDER_UPDATE):r(new Error("Connection Terminated"))}))}))}catch(r){if(_(!1),r===e.EventType.PROVIDER_UPDATE)return yield null===(S=c.getProvider())||void 0===S?void 0:S.request({method:t,params:o});throw r}return _(!1),a}if(a.isSecure()&&fC[t])return i(...n);if(c.isExtensionActive())return Yx(`[initializeMobileProvider: sendRequest()] EXTENSION active - redirect request '${t}' to it`,n,o),yield null===(k=c.getProvider())||void 0===k?void 0:k.request({method:t,params:o});throw Yx(`[initializeMobileProvider: sendRequest()] method=${t} --- skip --- not connected/installed`),new Error("MetaMask is not connected/installed, please call eth_requestAccounts to connect first.")}const N=yield i(...n);return Yx(`[initializeMobileProvider: sendRequest()] method=${t} rpcResponse: ${N}`),N})),{request:k}=w;w.request=function(){for(var e=arguments.length,t=new Array(e),r=0;r{Yx(`[Analytics: send()] error: ${e}`)}))}}NI=new WeakMap,LI=new WeakMap,BI=new WeakMap;const UI=e=>{let{provider:t,sdkInstance:r}=e;if("state"in t)throw new Error("INVALID EXTENSION PROVIDER");return new Proxy(t,{get:(e,n)=>"request"===n?function(n){var i,o;return rS(this,void 0,void 0,(function*(){Yx("[wrapExtensionProvider()] Overwriting request method",n);const{method:a,params:s}=n,c=hC.includes(a.toLowerCase());if(c&&(null===(i=r.analytics)||void 0===i||i.send({event:LE.SDK_RPC_REQUEST,params:{method:a,from:"extension"}})),a===dC.METAMASK_BATCH&&Array.isArray(s))return(e=>{let{params:t,target:r,args:n,trackEvent:i,provider:o,sdkInstance:a}=e;return rS(void 0,void 0,void 0,(function*(){var e;for(const r of t)yield null==o?void 0:o.request({method:r.method,params:r.params});const s=yield r.request(n);return i&&(null===(e=a.analytics)||void 0===e||e.send({event:LE.SDK_RPC_REQUEST_DONE,params:{method:n.method,from:"extension"}})),s}))})({params:s,target:e,args:n,trackEvent:c,sdkInstance:r,provider:t});if(a.toLowerCase()===dC.METAMASK_CONNECTSIGN.toLowerCase()&&Array.isArray(s))return(e=>{let{target:t,params:r}=e;return rS(void 0,void 0,void 0,(function*(){const e=yield t.request({method:dC.ETH_REQUESTACCOUNTS,params:[]});if(!e.length)throw new Error("SDK state invalid -- undefined accounts");return yield t.request({method:dC.PERSONAL_SIGN,params:[r[0],e[0]]})}))})({target:e,params:s});if(a.toLowerCase()===dC.METAMASK_CONNECTWITH.toLowerCase()&&Array.isArray(s))return(e=>{let{target:t,params:r}=e;return rS(void 0,void 0,void 0,(function*(){const[e]=r,n=e.method,i=e.params,o=yield t.request({method:dC.ETH_REQUESTACCOUNTS,params:[]});if(!o.length)throw new Error("SDK state invalid -- undefined accounts");return(null==n?void 0:n.toLowerCase())===dC.PERSONAL_SIGN.toLowerCase()?yield t.request({method:n,params:[i[0],o[0]]}):(null==n?void 0:n.toLowerCase())===dC.ETH_SENDTRANSACTION.toLowerCase()?yield t.request({method:n,params:[Object.assign(Object.assign({},i[0]),{from:o[0]})]}):pC.includes(n.toLowerCase())?(console.warn(`MetaMaskSDK connectWith method=${n} -- not handled by the extension -- call separately`),o):yield t.request({method:n,params:i})}))})({target:e,params:s});let u;try{return u=yield e.request(n),u}finally{c&&(null===(o=r.analytics)||void 0===o||o.send({event:LE.SDK_RPC_REQUEST_DONE,params:{method:a,from:"extension"}}))}}))}:"getChainId"===n?function(){return t.chainId}:"getNetworkVersion"===n?function(){return t.networkVersion}:"getSelectedAddress"===n?function(){return t.selectedAddress}:"isConnected"===n?function(){return t._state.isConnected}:e[n]})};var jI;!function(e){e.Announce="eip6963:announceProvider",e.Request="eip6963:requestProvider"}(jI||(jI={}));var FI={exports:{}};!function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(r),a=Math.max(i,o),s=0,c=e.map([t,r],(function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===s)return 0;a-=1}else if(c[0][a]1?i-1:0),a=1;a0){var a=Object.keys(r),c=s.default.find(a,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(r[c]);if(void 0!==u)return u}var l=s.default.find(a,(function(e){return t.isPlatform(e)}));if(l){var d=this.satisfies(r[l]);if(void 0!==d)return d}}if(o>0){var f=Object.keys(i),h=s.default.find(f,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(s.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(t),n={name:o.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:o.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=a,e.exports=t.default}})}(FI);var zI,qI=n(FI.exports);!function(e){e.Disabled="Disabled",e.Temporary="Temporary",e.UntilResponse="UntilResponse"}(zI||(zI={}));const HI=()=>"wakeLock"in navigator,VI=()=>{if("undefined"==typeof navigator)return!1;const{userAgent:e}=navigator,t=/CPU (?:iPhone )?OS (\d+)(?:_\d+)?_?\d+ like Mac OS X/iu.exec(e);return!!t&&parseInt(t[1],10)<10&&!window.MSStream};class $I{constructor(e){this.enabled=!1,this._eventsAdded=!1,this.debug=null!=e&&e}start(){if(this.enabled=!1,HI()&&!this._eventsAdded){this._eventsAdded=!0,this._wakeLock=void 0;const e=()=>rS(this,void 0,void 0,(function*(){null!==this._wakeLock&&"visible"===document.visibilityState&&(yield this.enable())}));document.addEventListener("visibilitychange",e),document.addEventListener("fullscreenchange",e)}else VI()?this.noSleepTimer=void 0:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","MetaMask SDK - Listening for responses"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK"),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),this.noSleepVideo.addEventListener("loadedmetadata",(()=>{Yx("[WakeLockManager: start()] video loadedmetadata",this.noSleepVideo),this.noSleepVideo&&(this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",(()=>{this.noSleepVideo&&this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())})))})))}_addSourceToVideo(e,t,r){const n=document.createElement("source");n.src=r,n.type=`video/${t}`,e.appendChild(n)}isEnabled(){return this.enabled}setDebug(e){Yx("[WakeLockManager: setDebug()] activate debug mode"),this.debug=e}enable(){return rS(this,void 0,void 0,(function*(){this.enabled&&this.disable("from_enable");const e=HI(),t=VI();if(Yx(`[WakeLockManager: enable()] hasWakelock=${e} isOldIos=${t}`,this.noSleepVideo),this.start(),HI())try{const e=yield navigator.wakeLock.request("screen");this._wakeLock=e,this.enabled=!0}catch(e){return Yx("[WakeLockManager: enable()] failed to enable wake lock",e),this.enabled=!1,!1}else if(VI())return this.disable("from_enable_old_ios"),this.noSleepTimer=window.setInterval((()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3),this.enabled=!0,!0;return!!this.noSleepVideo&&(this.noSleepVideo.play().then((()=>{Yx("[WakeLockManager: enable()] video started playing successfully")})).catch((e=>{console.warn("[WakeLockManager: enable()] video failed to play",e)})),this.enabled=!0,!0)}))}disable(e){if(this.enabled){if(Yx(`[WakeLockManager: disable()] context=${e}`),HI())this._wakeLock&&(Yx("[WakeLockManager: disable()] release wake lock"),this._wakeLock.release()),this._wakeLock=void 0;else if(VI())this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=void 0);else try{if(!this.noSleepVideo)return void Yx("[WakeLockManager: disable()] noSleepVideo is undefined");Yx("[WakeLockManager: disable()] pause noSleepVideo"),this.noSleepVideo.firstChild&&(this.noSleepVideo.removeChild(this.noSleepVideo.firstChild),this.noSleepVideo.load()),this.noSleepVideo.pause(),this.noSleepVideo.src="",this.noSleepVideo.remove()}catch(e){console.log(e)}this.enabled=!1}}}class KI{constructor(e){let{useDeepLink:t,preferredOpenLink:r,wakeLockStatus:n=zI.UntilResponse,debug:i=!1}=e;this.state={wakeLock:new $I,wakeLockStatus:zI.UntilResponse,wakeLockTimer:void 0,wakeLockFeatureActive:!1,platformType:void 0,useDeeplink:!1,preferredOpenLink:void 0,debug:!1},this.state.platformType=this.getPlatformType(),this.state.useDeeplink=t,this.state.preferredOpenLink=r,this.state.wakeLockStatus=n,this.state.debug=i,this.state.wakeLock.setDebug(i)}enableWakeLock(){return function(e){const{state:t}=e;if(t.wakeLockStatus===zI.Disabled)return void Yx("[PlatfformManager: enableWakeLock()] WakeLock is disabled");t.wakeLock.enable().catch((e=>{console.error("[PlatfformManager: enableWakeLock()] WakeLock is not supported",e)}));const r=t.wakeLockStatus===zI.Temporary?2e3:4e4;t.wakeLockTimer=setTimeout((()=>{e.disableWakeLock()}),r),t.wakeLockFeatureActive||t.wakeLockStatus!==zI.UntilResponse||(t.wakeLockFeatureActive=!0,window.addEventListener("focus",(()=>{e.disableWakeLock()})))}(this)}disableWakeLock(){return function(e){const{state:t}=e;t.wakeLockStatus!==zI.Disabled&&(t.wakeLockTimer&&clearTimeout(t.wakeLockTimer),t.wakeLock.disable("disableWakeLock"))}(this)}openDeeplink(e,t,r){return function(e,t,r,n){const{state:i}=e;Yx(`[PlatfformManager: openDeeplink()] universalLink --\x3e ${t}`),Yx(`[PlatfformManager: openDeeplink()] deepLink --\x3e ${r}`),e.isBrowser()&&e.enableWakeLock();try{if(i.preferredOpenLink)return void i.preferredOpenLink(i.useDeeplink?r:t,n);if(Yx(`[PlatfformManager: openDeeplink()] open link now useDeepLink=${i.useDeeplink} link=${i.useDeeplink?r:t}`),i.useDeeplink)"undefined"!=typeof window&&(window.location.href=r);else if("undefined"!=typeof document){const e=document.createElement("a");e.href=t,e.target="_self",e.rel="noreferrer noopener",e.click()}}catch(e){console.log("[PlatfformManager: openDeeplink()] can't open link",e)}}(this,e,t,r)}isReactNative(){var e;return this.isNotBrowser()&&"undefined"!=typeof window&&(null===window||void 0===window?void 0:window.navigator)&&"ReactNative"===(null===(e=window.navigator)||void 0===e?void 0:e.product)}isMetaMaskInstalled(){return function(){const e=CI.getProvider()||(null===window||void 0===window?void 0:window.ethereum);return Yx(`[PlatfformManager: isMetaMaskInstalled()] isMetaMask=${null==e?void 0:e.isMetaMask} isConnected=${null==e?void 0:e.isConnected()}`),(null==e?void 0:e.isMetaMask)&&(null==e?void 0:e.isConnected())}()}isDesktopWeb(){return this.isBrowser()&&!this.isMobileWeb()}isMobile(){var e,t;const r=qI.parse(window.navigator.userAgent);return"mobile"===(null===(e=null==r?void 0:r.platform)||void 0===e?void 0:e.type)||"tablet"===(null===(t=null==r?void 0:r.platform)||void 0===t?void 0:t.type)}isSecure(){return this.isReactNative()||this.isMobileWeb()}isMetaMaskMobileWebView(){return"undefined"!=typeof window&&Boolean(window.ReactNativeWebView)&&Boolean(navigator.userAgent.endsWith("MetaMaskMobile"))}isMobileWeb(){return this.state.platformType===e.PlatformType.MobileWeb}isNotBrowser(){var e;return"undefined"==typeof window||!(null===window||void 0===window?void 0:window.navigator)||void 0!==ur&&"ReactNative"===(null===(e=null==ur?void 0:ur.navigator)||void 0===e?void 0:e.product)||"ReactNative"===(null===navigator||void 0===navigator?void 0:navigator.product)}isNodeJS(){return this.isNotBrowser()&&!this.isReactNative()}isBrowser(){return!this.isNotBrowser()}isUseDeepLink(){return this.state.useDeeplink}getPlatformType(){return function(t){const{state:r}=t;return r.platformType?r.platformType:t.isReactNative()?e.PlatformType.ReactNative:t.isNotBrowser()?e.PlatformType.NonBrowser:t.isMetaMaskMobileWebView()?e.PlatformType.MetaMaskMobileWebview:t.isMobile()?e.PlatformType.MobileWeb:e.PlatformType.DesktopWeb}(this)}}var WI="INSTALLED",GI="NOT_INSTALLED",QI="REGISTERED",YI="REGISTERING",ZI="RELOADING",JI={CHROME:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",FIREFOX:"https://addons.mozilla.org/firefox/addon/ether-metamask/",DEFAULT:"https://metamask.io"},XI="REGISTRATION_IN_PROGRESS",eT="FORWARDER_ID",tT=function(){function e(t){var r=void 0===t?{}:t,n=r.forwarderOrigin,i=void 0===n?"https://fwd.metamask.io":n,o=r.forwarderMode,a=void 0===o?e.FORWARDER_MODE.INJECT:o;this.forwarderOrigin=i,this.forwarderMode=a,this.state=e.isMetaMaskInstalled()?WI:GI;var s=e._detectBrowser();this.downloadUrl=s?JI[s]:JI.DEFAULT,this._onMessage=this._onMessage.bind(this),this._onMessageFromForwarder=this._onMessageFromForwarder.bind(this),this._openForwarder=this._openForwarder.bind(this),this._openDownloadPage=this._openDownloadPage.bind(this),this.startOnboarding=this.startOnboarding.bind(this),this.stopOnboarding=this.stopOnboarding.bind(this),window.addEventListener("message",this._onMessage),a===e.FORWARDER_MODE.INJECT&&"true"===sessionStorage.getItem(XI)&&e._injectForwarder(this.forwarderOrigin)}return e.prototype._onMessage=function(e){if(e.origin===this.forwarderOrigin)return"metamask:reload"===e.data.type?this._onMessageFromForwarder(e):void console.debug("Unknown message from '"+e.origin+"' with data "+JSON.stringify(e.data))},e.prototype._onMessageUnknownStateError=function(e){throw new Error("Unknown state: '"+e+"'")},e.prototype._onMessageFromForwarder=function(t){return function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,s)}c((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){return function(e,t){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=(i=a.trys).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]1?t-1:0),n=1;n1?t-1:0),n=1;n1){for(var l=Array(u),d=0;d1){for(var f=Array(d),h=0;h import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",n),"default"in n||M("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",n),n.default}throw e._result}function be(e){return"string"==typeof e||"function"==typeof e||!!(e===i||e===a||T||e===o||e===l||e===d||I||e===p||k||x||C)||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===s||e.$$typeof===c||e.$$typeof===u||e.$$typeof===ye||void 0!==e.getModuleId)}function we(){var e=v.current;return null===e&&M("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."),e}ye=Symbol.for("react.module.reference");var Ae,_e,Ee,Se,ke,xe,Ce,Ie=0;function Te(){}Te.__reactDisabledLog=!0;var Oe,Pe=O.ReactCurrentDispatcher;function Me(e,t,r){if(void 0===Oe)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);Oe=n&&n[1]||""}return"\n"+Oe+e}var Re,Ne=!1,Le="function"==typeof WeakMap?WeakMap:Map;function Be(e,t){if(!e||Ne)return"";var r,n=Re.get(e);if(void 0!==n)return n;Ne=!0;var i,o=Error.prepareStackTrace;Error.prepareStackTrace=void 0,i=Pe.current,Pe.current=null,function(){if(0===Ie){Ae=console.log,_e=console.info,Ee=console.warn,Se=console.error,ke=console.group,xe=console.groupCollapsed,Ce=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Te,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Ie++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){r=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){r=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var s=t.stack.split("\n"),c=r.stack.split("\n"),u=s.length-1,l=c.length-1;u>=1&&l>=0&&s[u]!==c[l];)l--;for(;u>=1&&l>=0;u--,l--)if(s[u]!==c[l]){if(1!==u||1!==l)do{if(u--,--l<0||s[u]!==c[l]){var d="\n"+s[u].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),"function"==typeof e&&Re.set(e,d),d}}while(u>=1&&l>=0);break}}}finally{Ne=!1,Pe.current=i,function(){if(0==--Ie){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:Ae}),info:D({},e,{value:_e}),warn:D({},e,{value:Ee}),error:D({},e,{value:Se}),group:D({},e,{value:ke}),groupCollapsed:D({},e,{value:xe}),groupEnd:D({},e,{value:Ce})})}Ie<0&&M("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=o}var f=e?e.displayName||e.name:"",h=f?Me(f):"";return"function"==typeof e&&Re.set(e,h),h}function De(e,t,r){if(null==e)return"";if("function"==typeof e)return Be(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return Me(e);switch(e){case l:return Me("Suspense");case d:return Me("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case u:return Be(e.render,!1);case f:return De(e.type,t,r);case h:var n=e,i=n._payload,o=n._init;try{return De(o(i),t,r)}catch(e){}}return""}Re=new Le;var Ue,je={},Fe=O.ReactDebugCurrentFrame;function ze(e){if(e){var t=e._owner,r=De(e.type,e._source,t?t.type:null);Fe.setExtraStackFrame(r)}else Fe.setExtraStackFrame(null)}function qe(e){if(e){var t=e._owner;S(De(e.type,e._source,t?t.type:null))}else S(null)}function He(){if(A.current){var e=Z(A.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Ue=!1;var Ve={};function $e(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=He();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!Ve[r]){Ve[r]=!0;var n="";e&&e._owner&&e._owner!==A.current&&(n=" It was passed a child from "+Z(e._owner.type)+"."),qe(e),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),qe(null)}}}function Ke(e,t){if("object"==typeof e)if(W(e))for(var r=0;r",u=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,M("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,u)}var l=ae.apply(this,arguments);if(null==l)return l;if(s)for(var d=2;d ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}Ze(t)}((function(){0===i.length?(w.current=null,r(t)):tt(t,r,n)}))}catch(e){n(e)}else r(t)}var rt=!1;function nt(e){if(!rt){rt=!0;var t=0;try{for(;t is not supported and will be removed in a future major release. Did you mean to render instead?")),t.Provider},set:function(e){t.Provider=e}},_currentValue:{get:function(){return t._currentValue},set:function(e){t._currentValue=e}},_currentValue2:{get:function(){return t._currentValue2},set:function(e){t._currentValue2=e}},_threadCount:{get:function(){return t._threadCount},set:function(e){t._threadCount=e}},Consumer:{get:function(){return r||(r=!0,M("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),t.Consumer}},displayName:{get:function(){return t.displayName},set:function(e){i||(P("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",e),i=!0)}}}),t.Consumer=o,t._currentRenderer=null,t._currentRenderer2=null,t},t.createElement=it,t.createFactory=function(e){var t=Ge.bind(null,e);return t.type=e,Qe||(Qe=!0,P("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return P("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},t.createRef=function(){var e={current:null};return Object.seal(e),e},t.forwardRef=function(e){null!=e&&e.$$typeof===f?M("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?M("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&M("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||M("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var t,r={$$typeof:u,render:e};return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(r){t=r,e.name||e.displayName||(e.displayName=r)}}),r},t.isValidElement=ce,t.lazy=function(e){var t,r,n={$$typeof:h,_payload:{_status:-1,_result:e},_init:ve};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){M("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(n,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(e){M("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),r=e,Object.defineProperty(n,"propTypes",{enumerable:!0})}}}),n},t.memo=function(e,t){be(e)||M("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e);var r,n={$$typeof:f,type:e,compare:void 0===t?null:t};return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return r},set:function(t){r=t,e.name||e.displayName||(e.displayName=t)}}),n},t.startTransition=function(e,t){var r=b.transition;b.transition={};var n=b.transition;b.transition._updatedFibers=new Set;try{e()}finally{b.transition=r,null===r&&n._updatedFibers&&(n._updatedFibers.size>10&&P("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),n._updatedFibers.clear())}},t.unstable_act=function(e){var t=Je;Je++,null===w.current&&(w.current=[]);var r,n=w.isBatchingLegacy;try{if(w.isBatchingLegacy=!0,r=e(),!n&&w.didScheduleLegacyUpdate){var i=w.current;null!==i&&(w.didScheduleLegacyUpdate=!1,nt(i))}}catch(e){throw et(t),e}finally{w.isBatchingLegacy=n}if(null!==r&&"object"==typeof r&&"function"==typeof r.then){var o=r,a=!1,s={then:function(e,r){a=!0,o.then((function(n){et(t),0===Je?tt(n,e,r):e(n)}),(function(e){et(t),r(e)}))}};return Xe||"undefined"==typeof Promise||Promise.resolve().then((function(){})).then((function(){a||(Xe=!0,M("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))})),s}var c=r;if(et(t),0===Je){var u=w.current;return null!==u&&(nt(u),w.current=null),{then:function(e,t){null===w.current?(w.current=[],tt(c,e,t)):e(c)}}}return{then:function(e,t){e(c)}}},t.useCallback=function(e,t){return we().useCallback(e,t)},t.useContext=function(e){var t=we();if(void 0!==e._context){var r=e._context;r.Consumer===e?M("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&M("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return t.useContext(e)},t.useDebugValue=function(e,t){return we().useDebugValue(e,t)},t.useDeferredValue=function(e){return we().useDeferredValue(e)},t.useEffect=function(e,t){return we().useEffect(e,t)},t.useId=function(){return we().useId()},t.useImperativeHandle=function(e,t,r){return we().useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return we().useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return we().useLayoutEffect(e,t)},t.useMemo=function(e,t){return we().useMemo(e,t)},t.useReducer=function(e,t,r){return we().useReducer(e,t,r)},t.useRef=function(e){return we().useRef(e)},t.useState=function(e){return we().useState(e)},t.useSyncExternalStore=function(e,t,r){return we().useSyncExternalStore(e,t,r)},t.useTransition=function(){return we().useTransition()},t.version="18.2.0","undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(uT,uT.exports)),uT.exports}function dT(){return cT||(cT=1,"production"===De.env.NODE_ENV?oT.exports=function(){if(nT)return aT;nT=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),d=Symbol.iterator,f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,p={};function g(e,t,r){this.props=e,this.context=t,this.refs=p,this.updater=r||f}function m(){}function y(e,t,r){this.props=e,this.context=t,this.refs=p,this.updater=r||f}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=g.prototype;var v=y.prototype=new m;v.constructor=y,h(v,g.prototype),v.isPureReactComponent=!0;var b=Array.isArray,w=Object.prototype.hasOwnProperty,A={current:null},_={key:!0,ref:!0,__self:!0,__source:!0};function E(t,r,n){var i,o={},a=null,s=null;if(null!=r)for(i in void 0!==r.ref&&(s=r.ref),void 0!==r.key&&(a=""+r.key),r)w.call(r,i)&&!_.hasOwnProperty(i)&&(o[i]=r[i]);var c=arguments.length-2;if(1===c)o.children=n;else if(1>>1,o=e[n];if(!(0>>1;ni(c,r))ui(l,c)?(e[n]=l,e[u]=r,n=u):(e[n]=c,e[s]=r,n=s);else{if(!(ui(l,r)))break e;e[n]=l,e[u]=r,n=u}}}return t}function i(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var c=[],u=[],l=1,d=null,f=3,h=!1,p=!1,g=!1,m="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var i=r(u);null!==i;){if(null===i.callback)n(u);else{if(!(i.startTime<=e))break;n(u),i.sortIndex=i.expirationTime,t(c,i)}i=r(u)}}function w(e){if(g=!1,b(e),!p)if(null!==r(c))p=!0,M(A);else{var t=r(u);null!==t&&R(w,t.startTime-e)}}function A(t,i){p=!1,g&&(g=!1,y(k),k=-1),h=!0;var o=f;try{for(b(i),d=r(c);null!==d&&(!(d.expirationTime>i)||t&&!I());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=i);i=e.unstable_now(),"function"==typeof s?d.callback=s:d===r(c)&&n(c),b(i)}else n(c);d=r(c)}if(null!==d)var l=!0;else{var m=r(u);null!==m&&R(w,m.startTime-i),l=!1}return l}finally{d=null,f=o,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,E=!1,S=null,k=-1,x=5,C=-1;function I(){return!(e.unstable_now()-Ce||125a?(n.sortIndex=o,t(u,n),null===r(c)&&n===r(u)&&(g?(y(k),k=-1):g=!0,R(w,o-a))):(n.sortIndex=s,t(c,n),p||h||(p=!0,M(A))),n},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(e){var t=f;return function(){var r=f;f=t;try{return e.apply(this,arguments)}finally{f=r}}}}(wT)),wT):bT.exports=(hT||(hT=1,function(e){"production"!==De.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=!1,r=!1;function n(e,t){var r=e.length;e.push(t),function(e,t,r){for(var n=r;n>0;){var i=n-1>>>1,o=e[i];if(!(a(o,t)>0))return;e[i]=t,e[n]=o,n=i}}(e,t,r)}function i(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],r=e.pop();return r!==t&&(e[0]=r,function(e,t){for(var r=0,n=e.length,i=n>>>1;ra)||r&&!T());){var s=h.callback;if("function"==typeof s){h.callback=null,p=h.priorityLevel;var c=s(h.expirationTime<=a);a=e.unstable_now(),"function"==typeof c?h.callback=c:h===i(l)&&o(l),A(a)}else o(l);h=i(l)}if(null!==h)return!0;var u=i(d);return null!==u&&L(_,u.startTime-a),!1}(n,a)}finally{h=null,p=s,g=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S=!1,k=null,x=-1,C=5,I=-1;function T(){return!(e.unstable_now()-I125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=e>0?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return i(l)},e.unstable_next=function(e){var t;switch(p){case 1:case 2:case 3:t=3;break;default:t=p}var r=p;p=t;try{return e()}finally{p=r}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=p;p=e;try{return t()}finally{p=r}},e.unstable_scheduleCallback=function(t,r,o){var a,s,c=e.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;a="number"==typeof u&&u>0?c+u:c}else a=c;switch(t){case 1:s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}var h=a+s,p={id:f++,callback:r,priorityLevel:t,startTime:a,expirationTime:h,sortIndex:-1};return a>c?(p.sortIndex=a,n(d,p),null===i(l)&&p===i(d)&&(y?B():y=!0,L(_,a-c))):(p.sortIndex=h,n(l,p),m||g||(m=!0,N(E))),p},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=p;return function(){var r=p;p=t;try{return e.apply(this,arguments)}finally{p=r}}},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(AT)),AT)),bT.exports}function ET(){if(gT)return vT;gT=1;var e=dT(),t=_T();function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r