>>=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 A;else if("p224"===e)t=new x;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return w[e]=t,t},P.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},P.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")},P.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},P.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},P.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)},P.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},P.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)},P.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},P.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},P.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},P.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},P.prototype.isqr=function(e){return this.imul(e,e.clone())},P.prototype.sqr=function(e){return this.mul(e,e)},P.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 u=new o(1).toRed(this),s=u.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(s);)c.redIAdd(s);for(var f=this.pow(c,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(u);){for(var v=d,m=0;0!==v.cmp(u);m++)v=v.redSqr();n(m=0;n--){for(var l=t.words[n],c=s-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++u||0===n&&0===c)&&(i=this.mul(i,r[a]),u=0,a=0)):u=0}s=26}return i},P.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},P.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new _(e)},i(_,P),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},_.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)},_.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)},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},3580: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.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var a=r(8334);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return a.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return a.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return a.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return a.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return a.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return a.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return a.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return a.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return a.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return a.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return a.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return a.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return a.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return a.TransactionDescription}});var u=r(7419);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return u.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return u.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return u.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return u.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return u.isAddress}});var s=o(r(1800));t.base64=s;var l=r(3482);Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return l.Base58}});var c=r(9716);Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return c.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return c.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return c.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return c.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return c.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return c.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return c.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return c.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return c.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return c.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return c.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return c.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return c.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return c.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return c.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return c.stripZeros}});var f=r(1049);Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return f._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return f.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return f.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return f.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return f.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return f.namehash}});var h=r(5148);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return h.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return h.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return h.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return h.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return h.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return h.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return h.mnemonicToSeed}});var d=r(1529);Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return d.getJsonWalletAddress}});var p=r(8062);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return p.keccak256}});var v=r(9502);Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return v.Logger}});var m=r(6620);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return m.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return m.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return m.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return m.sha512}});var g=r(4530);Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return g.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return g.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return g.sha256}});var y=r(3770);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return y.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return y.shuffled}});var b=r(520);Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return b.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return b.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return b.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return b.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return b.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return b.shallowCopy}});var w=o(r(7986));t.RLP=w;var k=r(8865);Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return k.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return k.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return k.SigningKey}});var A=r(3902);Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return A.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return A.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return A.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return A._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return A.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return A.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return A.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return A.Utf8ErrorFuncs}});var x=r(5452);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return x.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return x.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return x.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return x.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return x.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return x.TransactionTypes}});var E=r(9601);Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return E.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return E.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return E.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return E.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return E.parseUnits}});var S=r(2876);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return S.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return S.verifyTypedData}});var P=r(5889);Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return P._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return P.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return P.poll}});var _=r(6620);Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return _.SupportedAlgorithm}});var C=r(3902);Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return C.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return C.Utf8ErrorReason}})},7143:function(e){"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 u=new i(n,o||e,a),s=r?r+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],u]:e._events[s].push(u):(e._events[s]=u,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function u(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),u.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},u.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=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;othis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},9046:function(e,t,r){"use strict";var n=r(2325),i=r(2534);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 u(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i>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,u){var s=0,l=t;return s+=(l=l+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,u){return t+n+o+u>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,u,s,l){var c=0,f=t;return c+=(f=f+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,u,s,l){return t+n+o+u+l>>>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}},2534:function(e){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},7898:function(e,t,r){var n;!function(){"use strict";var i="input is invalid type",o="object"===typeof window,a=o?window:{};a.JS_SHA3_NO_WINDOW&&(o=!1);var u=!o&&"object"===typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"===typeof process&&process.versions&&process.versions.node?a=r.g:u&&(a=self);var s=!a.JS_SHA3_NO_COMMON_JS&&e.exports,l=r.amdO,c=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,f="0123456789abcdef".split(""),h=[4,1024,262144,67108864],d=[0,8,16,24],p=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],v=[224,256,384,512],m=[128,256],g=["hex","buffer","arrayBuffer","array","digest"],y={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!c||!a.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 b=function(e,t,r){return function(n){return new I(e,t,e).update(n)[r]()}},w=function(e,t,r){return function(n,i){return new I(e,t,i).update(n)[r]()}},k=function(e,t,r){return function(t,n,i,o){return P["cshake"+e].update(t,n,i,o)[r]()}},A=function(e,t,r){return function(t,n,i,o){return P["kmac"+e].update(t,n,i,o)[r]()}},x=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 L(e,t,r){I.call(this,e,t,r)}I.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!c||!ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var n,o,a=this.blocks,u=this.byteCount,s=e.length,l=this.blockCount,f=0,h=this.s;f>2]|=e[f]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(a[n>>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)<=u){for(this.start=n-u,this.block=a[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},I.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!c||!ArrayBuffer.isView(e)))throw new Error(i);t=!0}var n=0,o=e.length;if(t)n=o;else for(var a=0;a=57344?n+=3:(u=65536+((1023&u)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},I.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]+f[15&e]+f[e>>12&15]+f[e>>8&15]+f[e>>20&15]+f[e>>16&15]+f[e>>28&15]+f[e>>24&15];a%t===0&&(D(r),o=0)}return i&&(e=r[o],u+=f[e>>4&15]+f[15&e],i>1&&(u+=f[e>>12&15]+f[e>>8&15]),i>2&&(u+=f[e>>20&15]+f[e>>16&15])),u},I.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,u=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(u);for(var s=new Uint32Array(e);a>8&255,s[e+2]=t>>16&255,s[e+3]=t>>24&255;u%r===0&&D(n)}return o&&(e=u<<2,t=n[a],s[e]=255&t,o>1&&(s[e+1]=t>>8&255),o>2&&(s[e+2]=t>>16&255)),s},L.prototype=new I,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),I.prototype.finalize.call(this)};var D=function(e){var t,r,n,i,o,a,u,s,l,c,f,h,d,v,m,g,y,b,w,k,A,x,E,S,P,_,C,N,O,T,M,R,I,L,D,B,F,j,Z,U,z,q,K,H,G,V,W,J,Q,Y,X,$,ee,te,re,ne,ie,oe,ae,ue,se,le,ce;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],u=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],c=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|u>>>31),r=(d=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<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^(s<<1|l>>>31),r=o^(l<<1|s>>>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^(c<<1|f>>>31),r=u^(f<<1|c>>>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=s^(h<<1|d>>>31),r=l^(d<<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=c^(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,v=e[0],m=e[1],V=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,N=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,ue=e[31]<<9|e[30]>>>23,se=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,y=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,Q=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,I=e[44]<<29|e[45]>>>3,S=e[6]<<28|e[7]>>>4,P=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,Z=e[27]<<25|e[26]>>>7,k=e[36]<<21|e[37]>>>11,A=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,H=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,_=e[18]<<20|e[19]>>>12,C=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,U=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,x=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=v^~g&b,e[1]=m^~y&w,e[10]=S^~_&N,e[11]=P^~C&O,e[20]=L^~B&j,e[21]=D^~F&Z,e[30]=H^~V&J,e[31]=G^~W&Q,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~b&k,e[3]=y^~w&A,e[12]=_^~N&T,e[13]=C^~O&M,e[22]=B^~j&U,e[23]=F^~Z&z,e[32]=V^~J&Y,e[33]=W^~Q&X,e[42]=ne^~oe&ue,e[43]=ie^~ae&se,e[4]=b^~k&x,e[5]=w^~A&E,e[14]=N^~T&R,e[15]=O^~M&I,e[24]=j^~U&q,e[25]=Z^~z&K,e[34]=J^~Y&$,e[35]=Q^~X&ee,e[44]=oe^~ue&le,e[45]=ae^~se&ce,e[6]=k^~x&v,e[7]=A^~E&m,e[16]=T^~R&S,e[17]=M^~I&P,e[26]=U^~q&L,e[27]=z^~K&D,e[36]=Y^~$&H,e[37]=X^~ee&G,e[46]=ue^~le&te,e[47]=se^~ce&re,e[8]=x^~v&g,e[9]=E^~m&y,e[18]=R^~S&_,e[19]=I^~P&C,e[28]=q^~L&B,e[29]=K^~D&F,e[38]=$^~H&V,e[39]=ee^~G&W,e[48]=le^~te&ne,e[49]=ce^~re&ie,e[0]^=p[n],e[1]^=p[n+1]};if(s)e.exports=P;else{for(C=0;C<_.length;++C)a[_[C]]=P[_[C]];l&&(void 0===(n=function(){return P}.call(t,r,t,e))||(e.exports=n))}}()},2325:function(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)}},4463:function(e,t,r){"use strict";var n=r(2791),i=r(5296);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;rt}return!1}(t,r,i,n)&&(r=null),n||null===i?function(e){return!!f.call(p,e)||!f.call(d,e)&&(h.test(e)?p[e]=!0:(d[e]=!0,!1))}(t)&&(null===r?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=null===r?3!==i.type&&"":r:(t=i.attributeName,n=i.attributeNamespace,null===r?e.removeAttribute(t):(r=3===(i=i.type)||4===i&&!0===r?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,y);m[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,y);m[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,y);m[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),A=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),_=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),M=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var R=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var I=Symbol.iterator;function L(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=I&&e[I]||e["@@iterator"])?e:null}var D,B=Object.assign;function F(e){if(void 0===D)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);D=t&&t[1]||""}return"\n"+D+e}var j=!1;function Z(e,t){if(!e||j)return"";j=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var n=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){n=l}e.call(t.prototype)}else{try{throw Error()}catch(l){n=l}e()}}catch(l){if(l&&n&&"string"===typeof l.stack){for(var i=l.stack.split("\n"),o=n.stack.split("\n"),a=i.length-1,u=o.length-1;1<=a&&0<=u&&i[a]!==o[u];)u--;for(;1<=a&&0<=u;a--,u--)if(i[a]!==o[u]){if(1!==a||1!==u)do{if(a--,0>--u||i[a]!==o[u]){var s="\n"+i[a].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}}while(1<=a&&0<=u);break}}}finally{j=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?F(e):""}function U(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=Z(e.type,!1);case 11:return e=Z(e.type.render,!1);case 1:return e=Z(e.type,!0);default:return""}}function z(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case x:return"Fragment";case A:return"Portal";case S:return"Profiler";case E:return"StrictMode";case N:return"Suspense";case O:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case _:return(e.displayName||"Context")+".Consumer";case P:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case T:return null!==(t=e.displayName||null)?t:z(e.type)||"Memo";case M:t=e._payload,e=e._init;try{return z(e(t))}catch(r){}}return null}function q(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return z(t);case 8:return t===E?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function K(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function H(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=H(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof r&&"function"===typeof r.get&&"function"===typeof r.set){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function V(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=H(e)?e.checked?"true":"false":e.value),(e=n)!==r&&(t.setValue(e),!0)}function W(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var r=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function Q(e,t){var r=null==t.defaultValue?"":t.defaultValue,n=null!=t.checked?t.checked:t.defaultChecked;r=K(null!=t.value?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function X(e,t){Y(e,t);var r=K(t.value),n=t.type;if(null!=r)"number"===n?(0===r&&""===e.value||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if("submit"===n||"reset"===n)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,r):t.hasOwnProperty("defaultValue")&&ee(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function $(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!("submit"!==n&&"reset"!==n||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}""!==(r=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==r&&(e.name=r)}function ee(e,t,r){"number"===t&&W(e.ownerDocument)===e||(null==r?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var te=Array.isArray;function re(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=le.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 ce(e,t)}))}:ce);function he(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 de={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 ve(e,t,r){return null==t||"boolean"===typeof t||""===t?"":r||"number"!==typeof t||0===t||de.hasOwnProperty(e)&&de[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=ve(r,t[r],n);"float"===r&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}Object.keys(de).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),de[t]=de[e]}))}));var ge=B({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 ye(e,t){if(t){if(ge[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 ke(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ae=null,xe=null,Ee=null;function Se(e){if(e=bi(e)){if("function"!==typeof Ae)throw Error(o(280));var t=e.stateNode;t&&(t=ki(t),Ae(e.stateNode,e.type,t))}}function Pe(e){xe?Ee?Ee.push(e):Ee=[e]:xe=e}function _e(){if(xe){var e=xe,t=Ee;if(Ee=xe=null,Se(e),t)for(e=0;e>>=0,0===e?32:31-(ut(e)/st|0)|0},ut=Math.log,st=Math.LN2;var lt=64,ct=4194304;function ft(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 ht(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 u=a&~i;0!==u?n=ft(u):0!==(o&=a)&&(n=ft(o))}else 0!==(a=r&~i)?n=ft(a):0!==o&&(n=ft(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 gt(e,t,r){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=r}function yt(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-at(r),i=1<=Ir),Br=String.fromCharCode(32),Fr=!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 Zr(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Ur=!1;var zr={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 qr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!zr[e.type]:"textarea"===t}function Kr(e,t,r,n){Pe(n),0<(t=Gn(t,"onChange")).length&&(r=new lr("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Hr=null,Gr=null;function Vr(e){Fn(e,0)}function Wr(e){if(V(wi(e)))return e}function Jr(e,t){if("change"===e)return t}var Qr=!1;if(c){var Yr;if(c){var Xr="oninput"in document;if(!Xr){var $r=document.createElement("div");$r.setAttribute("oninput","return;"),Xr="function"===typeof $r.oninput}Yr=Xr}else Yr=!1;Qr=Yr&&(!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=ln(n)}}function fn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hn(){for(var e=window,t=W();t instanceof e.HTMLIFrameElement;){try{var r="string"===typeof t.contentWindow.location.href}catch(n){r=!1}if(!r)break;t=W((e=t.contentWindow).document)}return t}function dn(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=hn(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&fn(r.ownerDocument.documentElement,r)){if(null!==n&&dn(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=cn(r,o);var a=cn(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,gn=null,yn=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!==W(n)||("selectionStart"in(n=mn)&&dn(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},yn&&sn(yn,n)||(yn=n,0<(n=Gn(gn,"onSelect")).length&&(t=new lr("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=mn)))}function kn(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var An={animationend:kn("Animation","AnimationEnd"),animationiteration:kn("Animation","AnimationIteration"),animationstart:kn("Animation","AnimationStart"),transitionend:kn("Transition","TransitionEnd")},xn={},En={};function Sn(e){if(xn[e])return xn[e];if(!An[e])return e;var t,r=An[e];for(t in r)if(r.hasOwnProperty(t)&&t in En)return xn[e]=r[t];return e}c&&(En=document.createElement("div").style,"AnimationEvent"in window||(delete An.animationend.animation,delete An.animationiteration.animation,delete An.animationstart.animation),"TransitionEvent"in window||delete An.transitionend.transition);var Pn=Sn("animationend"),_n=Sn("animationiteration"),Cn=Sn("animationstart"),Nn=Sn("transitionend"),On=new Map,Tn="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),s(t,[e])}for(var Rn=0;Rnxi||(e.current=Ai[xi],Ai[xi]=null,xi--)}function Pi(e,t){xi++,Ai[xi]=e.current,e.current=t}var _i={},Ci=Ei(_i),Ni=Ei(!1),Oi=_i;function Ti(e,t){var r=e.type.contextTypes;if(!r)return _i;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(){Si(Ni),Si(Ci)}function Ii(e,t,r){if(Ci.current!==_i)throw Error(o(168));Pi(Ci,t),Pi(Ni,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,q(e)||"Unknown",i));return B({},r,n)}function Di(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_i,Oi=Ci.current,Pi(Ci,e),Pi(Ni,Ni.current),!0}function Bi(e,t,r){var n=e.stateNode;if(!n)throw Error(o(169));r?(e=Li(e,t,Oi),n.__reactInternalMemoizedMergedChildContext=e,Si(Ni),Si(Ci),Pi(Ci,e)):Si(Ni),Pi(Ni,r)}var Fi=null,ji=!1,Zi=!1;function Ui(e){null===Fi?Fi=[e]:Fi.push(e)}function zi(){if(!Zi&&null!==Fi){Zi=!0;var e=0,t=bt;try{var r=Fi;for(bt=1;e>=a,i-=a,Qi=1<<32-at(t)+i|r<v?(m=f,f=null):m=f.sibling;var g=d(i,f,u[v],s);if(null===g){null===f&&(f=m);break}e&&f&&null===g.alternate&&t(i,f),o=a(g,o,v),null===c?l=g:c.sibling=g,c=g,f=m}if(v===u.length)return r(i,f),io&&Xi(i,v),l;if(null===f){for(;vm?(g=v,v=null):g=v.sibling;var b=d(i,v,y.value,l);if(null===b){null===v&&(v=g);break}e&&v&&null===b.alternate&&t(i,v),u=a(b,u,m),null===f?c=b:f.sibling=b,f=b,v=g}if(y.done)return r(i,v),io&&Xi(i,m),c;if(null===v){for(;!y.done;m++,y=s.next())null!==(y=h(i,y.value,l))&&(u=a(y,u,m),null===f?c=y:f.sibling=y,f=y);return io&&Xi(i,m),c}for(v=n(i,v);!y.done;m++,y=s.next())null!==(y=p(v,i,m,y.value,l))&&(e&&null!==y.alternate&&v.delete(null===y.key?m:y.key),u=a(y,u,m),null===f?c=y:f.sibling=y,f=y);return e&&v.forEach((function(e){return t(i,e)})),io&&Xi(i,m),c}return function e(n,o,a,s){if("object"===typeof a&&null!==a&&a.type===x&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case k:e:{for(var l=a.key,c=o;null!==c;){if(c.key===l){if((l=a.type)===x){if(7===c.tag){r(n,c.sibling),(o=i(c,a.props.children)).return=n,n=o;break e}}else if(c.elementType===l||"object"===typeof l&&null!==l&&l.$$typeof===M&&Jo(l)===c.type){r(n,c.sibling),(o=i(c,a.props)).ref=Vo(n,c,a),o.return=n,n=o;break e}r(n,c);break}t(n,c),c=c.sibling}a.type===x?((o=Dl(a.props.children,n.mode,s,a.key)).return=n,n=o):((s=Ll(a.type,a.key,a.props,null,n.mode,s)).ref=Vo(n,o,a),s.return=n,n=s)}return u(n);case A:e:{for(c=a.key;null!==o;){if(o.key===c){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=jl(a,n.mode,s)).return=n,n=o}return u(n);case M:return e(n,o,(c=a._init)(a._payload),s)}if(te(a))return v(n,o,a,s);if(L(a))return m(n,o,a,s);Wo(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=Fl(a,n.mode,s)).return=n,n=o),u(n)):r(n,o)}}var Yo=Qo(!0),Xo=Qo(!1),$o={},ea=Ei($o),ta=Ei($o),ra=Ei($o);function na(e){if(e===$o)throw Error(o(174));return e}function ia(e,t){switch(Pi(ra,t),Pi(ta,e),Pi(ea,$o),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Si(ea),Pi(ea,t)}function oa(){Si(ea),Si(ta),Si(ra)}function aa(e){na(ra.current);var t=na(ea.current),r=se(t,e.type);t!==r&&(Pi(ta,e),Pi(ea,r))}function ua(e){ta.current===e&&(Si(ea),Si(ta))}var sa=Ei(0);function la(e){for(var t=e;null!==t;){if(13===t.tag){var r=t.memoizedState;if(null!==r&&(null===(r=r.dehydrated)||"$?"===r.data||"$!"===r.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ca=[];function fa(){for(var e=0;er?r:4,e(!0);var n=da.transition;da.transition={};try{e(!1),t()}finally{bt=r,da.transition=n}}function eu(){return _a().memoizedState}function tu(e,t,r){var n=rl(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},nu(e))iu(t,r);else if(null!==(r=No(e,t,r,n))){nl(r,e,n,tl()),ou(r,t,n)}}function ru(e,t,r){var n=rl(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(nu(e))iu(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,u=o(a,r);if(i.hasEagerState=!0,i.eagerState=u,un(u,a)){var s=t.interleaved;return null===s?(i.next=i,Co(t)):(i.next=s.next,s.next=i),void(t.interleaved=i)}}catch(l){}null!==(r=No(e,t,i,n))&&(nl(r,e,n,i=tl()),ou(r,t,n))}}function nu(e){var t=e.alternate;return e===va||null!==t&&t===va}function iu(e,t){ba=ya=!0;var r=e.pending;null===r?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function ou(e,t,r){if(0!==(4194240&r)){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,yt(e,r)}}var au={readContext:Po,useCallback:Aa,useContext:Aa,useEffect:Aa,useImperativeHandle:Aa,useInsertionEffect:Aa,useLayoutEffect:Aa,useMemo:Aa,useReducer:Aa,useRef:Aa,useState:Aa,useDebugValue:Aa,useDeferredValue:Aa,useTransition:Aa,useMutableSource:Aa,useSyncExternalStore:Aa,useId:Aa,unstable_isNewReconciler:!1},uu={readContext:Po,useCallback:function(e,t){return Pa().memoizedState=[e,void 0===t?null:t],e},useContext:Po,useEffect:qa,useImperativeHandle:function(e,t,r){return r=null!==r&&void 0!==r?r.concat([e]):null,Ua(4194308,4,Va.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ua(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ua(4,2,e,t)},useMemo:function(e,t){var r=Pa();return t=void 0===t?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Pa();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=tu.bind(null,va,e),[n.memoizedState,e]},useRef:function(e){return e={current:e},Pa().memoizedState=e},useState:Fa,useDebugValue:Ja,useDeferredValue:function(e){return Pa().memoizedState=e},useTransition:function(){var e=Fa(!1),t=e[0];return e=$a.bind(null,e[1]),Pa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=va,i=Pa();if(io){if(void 0===r)throw Error(o(407));r=r()}else{if(r=t(),null===Os)throw Error(o(349));0!==(30&pa)||Ra(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,qa(La.bind(null,n,a,e),[e]),n.flags|=2048,ja(9,Ia.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=Pa(),t=Os.identifierPrefix;if(io){var r=Yi;t=":"+t+"R"+(r=(Qi&~(1<<32-at(Qi)-1)).toString(32)+r),0<(r=wa++)&&(t+="H"+r.toString(32)),t+=":"}else t=":"+t+"r"+(r=ka++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},su={readContext:Po,useCallback:Qa,useContext:Po,useEffect:Ka,useImperativeHandle:Wa,useInsertionEffect:Ha,useLayoutEffect:Ga,useMemo:Ya,useReducer:Na,useRef:Za,useState:function(){return Na(Ca)},useDebugValue:Ja,useDeferredValue:function(e){return Xa(_a(),ma.memoizedState,e)},useTransition:function(){return[Na(Ca)[0],_a().memoizedState]},useMutableSource:Ta,useSyncExternalStore:Ma,useId:eu,unstable_isNewReconciler:!1},lu={readContext:Po,useCallback:Qa,useContext:Po,useEffect:Ka,useImperativeHandle:Wa,useInsertionEffect:Ha,useLayoutEffect:Ga,useMemo:Ya,useReducer:Oa,useRef:Za,useState:function(){return Oa(Ca)},useDebugValue:Ja,useDeferredValue:function(e){var t=_a();return null===ma?t.memoizedState=e:Xa(t,ma.memoizedState,e)},useTransition:function(){return[Oa(Ca)[0],_a().memoizedState]},useMutableSource:Ta,useSyncExternalStore:Ma,useId:eu,unstable_isNewReconciler:!1};function cu(e,t){try{var r="",n=t;do{r+=U(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 fu(e,t,r){return{value:e,source:null,stack:null!=r?r:null,digest:null!=t?t:null}}function hu(e,t){try{console.error(t.value)}catch(r){setTimeout((function(){throw r}))}}var du="function"===typeof WeakMap?WeakMap:Map;function pu(e,t,r){(r=Io(-1,r)).tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Hs||(Hs=!0,Gs=n),hu(0,t)},r}function vu(e,t,r){(r=Io(-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(){hu(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(r.callback=function(){hu(0,t),"function"!==typeof n&&(null===Vs?Vs=new Set([this]):Vs.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),r}function mu(e,t,r){var n=e.pingCache;if(null===n){n=e.pingCache=new du;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=Pl.bind(null,e,t,r),t.then(e,e))}function gu(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 yu(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=Io(-1,1)).tag=2,Lo(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var bu=w.ReactCurrentOwner,wu=!1;function ku(e,t,r,n){t.child=null===e?Xo(t,null,r,n):Yo(t,e.child,r,n)}function Au(e,t,r,n,i){r=r.render;var o=t.ref;return So(t,i),n=Ea(e,t,r,n,o,i),r=Sa(),null===e||wu?(io&&r&&eo(t),t.flags|=1,ku(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hu(e,t,i))}function xu(e,t,r,n,i){if(null===e){var o=r.type;return"function"!==typeof o||Rl(o)||void 0!==o.defaultProps||null!==r.compare||void 0!==r.defaultProps?((e=Ll(r.type,null,n,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Eu(e,t,o,n,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((r=null!==(r=r.compare)?r:sn)(a,n)&&e.ref===t.ref)return Hu(e,t,i)}return t.flags|=1,(e=Il(o,n)).ref=t.ref,e.return=t,t.child=e}function Eu(e,t,r,n,i){if(null!==e){var o=e.memoizedProps;if(sn(o,n)&&e.ref===t.ref){if(wu=!1,t.pendingProps=n=o,0===(e.lanes&i))return t.lanes=e.lanes,Hu(e,t,i);0!==(131072&e.flags)&&(wu=!0)}}return _u(e,t,r,n,i)}function Su(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},Pi(Is,Rs),Rs|=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,Pi(Is,Rs),Rs|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=null!==o?o.baseLanes:r,Pi(Is,Rs),Rs|=n}else null!==o?(n=o.baseLanes|r,t.memoizedState=null):n=r,Pi(Is,Rs),Rs|=n;return ku(e,t,i,r),t.child}function Pu(e,t){var r=t.ref;(null===e&&null!==r||null!==e&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function _u(e,t,r,n,i){var o=Mi(r)?Oi:Ci.current;return o=Ti(t,o),So(t,i),r=Ea(e,t,r,n,o,i),n=Sa(),null===e||wu?(io&&n&&eo(t),t.flags|=1,ku(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hu(e,t,i))}function Cu(e,t,r,n,i){if(Mi(r)){var o=!0;Di(t)}else o=!1;if(So(t,i),null===t.stateNode)Ku(e,t),Ko(t,r,n),Go(t,r,n,i),n=!0;else if(null===e){var a=t.stateNode,u=t.memoizedProps;a.props=u;var s=a.context,l=r.contextType;"object"===typeof l&&null!==l?l=Po(l):l=Ti(t,l=Mi(r)?Oi:Ci.current);var c=r.getDerivedStateFromProps,f="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(u!==n||s!==l)&&Ho(t,a,n,l),To=!1;var h=t.memoizedState;a.state=h,Fo(t,n,a,i),s=t.memoizedState,u!==n||h!==s||Ni.current||To?("function"===typeof c&&(Uo(t,r,c,n),s=t.memoizedState),(u=To||qo(t,r,u,n,h,s,l))?(f||"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=s),a.props=n,a.state=s,a.context=l,n=u):("function"===typeof a.componentDidMount&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,Ro(e,t),u=t.memoizedProps,l=t.type===t.elementType?u:go(t.type,u),a.props=l,f=t.pendingProps,h=a.context,"object"===typeof(s=r.contextType)&&null!==s?s=Po(s):s=Ti(t,s=Mi(r)?Oi:Ci.current);var d=r.getDerivedStateFromProps;(c="function"===typeof d||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(u!==f||h!==s)&&Ho(t,a,n,s),To=!1,h=t.memoizedState,a.state=h,Fo(t,n,a,i);var p=t.memoizedState;u!==f||h!==p||Ni.current||To?("function"===typeof d&&(Uo(t,r,d,n),p=t.memoizedState),(l=To||qo(t,r,l,n,h,p,s)||!1)?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(n,p,s),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(n,p,s)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),a.props=n,a.state=p,a.context=s,n=l):("function"!==typeof a.componentDidUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return Nu(e,t,r,n,o,i)}function Nu(e,t,r,n,i,o){Pu(e,t);var a=0!==(128&t.flags);if(!n&&!a)return i&&Bi(t,r,!1),Hu(e,t,o);n=t.stateNode,bu.current=t;var u=a&&"function"!==typeof r.getDerivedStateFromError?null:n.render();return t.flags|=1,null!==e&&a?(t.child=Yo(t,e.child,null,o),t.child=Yo(t,null,u,o)):ku(e,t,u,o),t.memoizedState=n.state,i&&Bi(t,r,!0),t.child}function Ou(e){var t=e.stateNode;t.pendingContext?Ii(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ii(0,t.context,!1),ia(e,t.containerInfo)}function Tu(e,t,r,n,i){return po(),vo(i),t.flags|=256,ku(e,t,r,n),t.child}var Mu,Ru,Iu,Lu,Du={dehydrated:null,treeContext:null,retryLane:0};function Bu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fu(e,t,r){var n,i=t.pendingProps,a=sa.current,u=!1,s=0!==(128&t.flags);if((n=s)||(n=(null===e||null!==e.memoizedState)&&0!==(2&a)),n?(u=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Pi(sa,1&a),null===e)return lo(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):(s=i.children,e=i.fallback,u?(i=t.mode,u=t.child,s={mode:"hidden",children:s},0===(1&i)&&null!==u?(u.childLanes=0,u.pendingProps=s):u=Bl(s,i,0,null),e=Dl(e,i,r,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=Bu(r),t.memoizedState=Du,e):ju(t,s));if(null!==(a=e.memoizedState)&&null!==(n=a.dehydrated))return function(e,t,r,n,i,a,u){if(r)return 256&t.flags?(t.flags&=-257,Zu(e,t,u,n=fu(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=Bl({mode:"visible",children:n.children},i,0,null),(a=Dl(a,i,u,null)).flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,0!==(1&t.mode)&&Yo(t,e.child,null,u),t.child.memoizedState=Bu(u),t.memoizedState=Du,a);if(0===(1&t.mode))return Zu(e,t,u,null);if("$!"===i.data){if(n=i.nextSibling&&i.nextSibling.dataset)var s=n.dgst;return n=s,Zu(e,t,u,n=fu(a=Error(o(419)),n,void 0))}if(s=0!==(u&e.childLanes),wu||s){if(null!==(n=Os)){switch(u&-u){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|u))?0:i)&&i!==a.retryLane&&(a.retryLane=i,Oo(e,i),nl(n,e,i,-1))}return ml(),Zu(e,t,u,n=fu(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Cl.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,no=li(i.nextSibling),ro=t,io=!0,oo=null,null!==e&&(Vi[Wi++]=Qi,Vi[Wi++]=Yi,Vi[Wi++]=Ji,Qi=e.id,Yi=e.overflow,Ji=t),t=ju(t,n.children),t.flags|=4096,t)}(e,t,s,i,n,a,r);if(u){u=i.fallback,s=t.mode,n=(a=e.child).sibling;var l={mode:"hidden",children:i.children};return 0===(1&s)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null):(i=Il(a,l)).subtreeFlags=14680064&a.subtreeFlags,null!==n?u=Il(n,u):(u=Dl(u,s,r,null)).flags|=2,u.return=t,i.return=t,i.sibling=u,t.child=i,i=u,u=t.child,s=null===(s=e.child.memoizedState)?Bu(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},u.memoizedState=s,u.childLanes=e.childLanes&~r,t.memoizedState=Du,i}return e=(u=e.child).sibling,i=Il(u,{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 ju(e,t){return(t=Bl({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Zu(e,t,r,n){return null!==n&&vo(n),Yo(t,e.child,null,r),(e=ju(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Uu(e,t,r){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),Eo(e.return,t,r)}function zu(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 qu(e,t,r){var n=t.pendingProps,i=n.revealOrder,o=n.tail;if(ku(e,t,n.children,r),0!==(2&(n=sa.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&&Uu(e,r,t);else if(19===e.tag)Uu(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(Pi(sa,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===la(e)&&(i=r),r=r.sibling;null===(r=i)?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),zu(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===la(e)){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}zu(t,!0,r,null,o);break;case"together":zu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ku(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hu(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Bs|=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=Il(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Il(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Gu(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 Vu(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 Wu(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 Vu(t),null;case 1:case 17:return Mi(t.type)&&Ri(),Vu(t),null;case 3:return n=t.stateNode,oa(),Si(Ni),Si(Ci),fa(),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&&(ul(oo),oo=null))),Ru(e,t),Vu(t),null;case 5:ua(t);var i=na(ra.current);if(r=t.type,null!==e&&null!=t.stateNode)Iu(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 Vu(t),null}if(e=na(ea.current),fo(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[hi]=t,n[di]=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=s.createElement(r,{is:n.is}):(e=s.createElement(r),"select"===r&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[hi]=t,e[di]=n,Mu(e,t,!1,!1),t.stateNode=e;e:{switch(s=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;iqs&&(t.flags|=128,n=!0,Gu(a,!1),t.lanes=4194304)}else{if(!n)if(null!==(e=la(s))){if(t.flags|=128,n=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Gu(a,!0),null===a.tail&&"hidden"===a.tailMode&&!s.alternate&&!io)return Vu(t),null}else 2*Ye()-a.renderingStartTime>qs&&1073741824!==r&&(t.flags|=128,n=!0,Gu(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(null!==(r=a.last)?r.sibling=s:t.child=s,a.last=s)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ye(),t.sibling=null,r=sa.current,Pi(sa,n?1&r|2:1&r),t):(Vu(t),null);case 22:case 23:return hl(),n=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==n&&(t.flags|=8192),n&&0!==(1&t.mode)?0!==(1073741824&Rs)&&(Vu(t),6&t.subtreeFlags&&(t.flags|=8192)):Vu(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ju(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 oa(),Si(Ni),Si(Ci),fa(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ua(t),null;case 13:if(Si(sa),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 Si(sa),null;case 4:return oa(),null;case 10:return xo(t.type._context),null;case 22:case 23:return hl(),null;default:return null}}Mu=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}},Ru=function(){},Iu=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,na(ea.current);var o,a=null;switch(r){case"input":i=J(e,i),n=J(e,n),a=[];break;case"select":i=B({},i,{value:void 0}),n=B({},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=$n)}for(c in ye(r,n),r=null,i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(u.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in n){var l=n[c];if(s=null!=i?i[c]:void 0,n.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(a||(a=[]),a.push(c,r)),r=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!==typeof l&&"number"!==typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(u.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&jn("scroll",e),a||s===l||(a=[])):(a=a||[]).push(c,l))}r&&(a=a||[]).push("style",r);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Lu=function(e,t,r,n){r!==n&&(t.flags|=4)};var Qu=!1,Yu=!1,Xu="function"===typeof WeakSet?WeakSet:Set,$u=null;function es(e,t){var r=e.ref;if(null!==r)if("function"===typeof r)try{r(null)}catch(n){Sl(e,t,n)}else r.current=null}function ts(e,t,r){try{r()}catch(n){Sl(e,t,n)}}var rs=!1;function ns(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&&ts(t,r,o)}i=i.next}while(i!==n)}}function is(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 os(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 as(e){var t=e.alternate;null!==t&&(e.alternate=null,as(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[di],delete t[vi],delete t[mi],delete t[gi])),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 us(e){return 5===e.tag||3===e.tag||4===e.tag}function ss(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||us(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 ls(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=$n));else if(4!==n&&null!==(e=e.child))for(ls(e,t,r),e=e.sibling;null!==e;)ls(e,t,r),e=e.sibling}function cs(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(cs(e,t,r),e=e.sibling;null!==e;)cs(e,t,r),e=e.sibling}var fs=null,hs=!1;function ds(e,t,r){for(r=r.child;null!==r;)ps(e,t,r),r=r.sibling}function ps(e,t,r){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,r)}catch(u){}switch(r.tag){case 5:Yu||es(r,t);case 6:var n=fs,i=hs;fs=null,ds(e,t,r),hs=i,null!==(fs=n)&&(hs?(e=fs,r=r.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)):fs.removeChild(r.stateNode));break;case 18:null!==fs&&(hs?(e=fs,r=r.stateNode,8===e.nodeType?si(e.parentNode,r):1===e.nodeType&&si(e,r),zt(e)):si(fs,r.stateNode));break;case 4:n=fs,i=hs,fs=r.stateNode.containerInfo,hs=!0,ds(e,t,r),fs=n,hs=i;break;case 0:case 11:case 14:case 15:if(!Yu&&(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))&&ts(r,t,a),i=i.next}while(i!==n)}ds(e,t,r);break;case 1:if(!Yu&&(es(r,t),"function"===typeof(n=r.stateNode).componentWillUnmount))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(u){Sl(r,t,u)}ds(e,t,r);break;case 21:ds(e,t,r);break;case 22:1&r.mode?(Yu=(n=Yu)||null!==r.memoizedState,ds(e,t,r),Yu=n):ds(e,t,r);break;default:ds(e,t,r)}}function vs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var r=e.stateNode;null===r&&(r=e.stateNode=new Xu),t.forEach((function(t){var n=Nl.bind(null,e,t);r.has(t)||(r.add(t),t.then(n,n))}))}}function ms(e,t){var r=t.deletions;if(null!==r)for(var n=0;ni&&(i=u),n&=~a}if(n=i,10<(n=(120>(n=Ye()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ss(n/1960))-n)){e.timeoutHandle=ni(Al.bind(null,e,Us,Ks),n);break}Al(e,Us,Ks);break;default:throw Error(o(329))}}}return il(e,Ye()),e.callbackNode===r?ol.bind(null,e):null}function al(e,t){var r=Zs;return e.current.memoizedState.isDehydrated&&(dl(e,t).flags|=256),2!==(e=gl(e,t))&&(t=Us,Us=r,null!==t&&ul(t)),e}function ul(e){null===Us?Us=e:Us.push.apply(Us,e)}function sl(e,t){for(t&=~js,t&=~Fs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0e?16:e,null===Js)var n=!1;else{if(e=Js,Js=null,Qs=0,0!==(6&Ns))throw Error(o(331));var i=Ns;for(Ns|=4,$u=e.current;null!==$u;){var a=$u,u=a.child;if(0!==(16&$u.flags)){var s=a.deletions;if(null!==s){for(var l=0;lYe()-zs?dl(e,0):js|=r),il(e,t)}function _l(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var r=tl();null!==(e=Oo(e,t))&&(gt(e,t,r),il(e,r))}function Cl(e){var t=e.memoizedState,r=0;null!==t&&(r=t.retryLane),_l(e,r)}function Nl(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),_l(e,r)}function Ol(e,t){return Ve(e,t)}function Tl(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 Ml(e,t,r,n){return new Tl(e,t,r,n)}function Rl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Il(e,t){var r=e.alternate;return null===r?((r=Ml(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 Ll(e,t,r,n,i,a){var u=2;if(n=e,"function"===typeof e)Rl(e)&&(u=1);else if("string"===typeof e)u=5;else e:switch(e){case x:return Dl(r.children,i,a,t);case E:u=8,i|=8;break;case S:return(e=Ml(12,r,t,2|i)).elementType=S,e.lanes=a,e;case N:return(e=Ml(13,r,t,i)).elementType=N,e.lanes=a,e;case O:return(e=Ml(19,r,t,i)).elementType=O,e.lanes=a,e;case R:return Bl(r,i,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case P:u=10;break e;case _:u=9;break e;case C:u=11;break e;case T:u=14;break e;case M:u=16,n=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Ml(u,r,t,i)).elementType=e,t.type=n,t.lanes=a,t}function Dl(e,t,r,n){return(e=Ml(7,e,n,t)).lanes=r,e}function Bl(e,t,r,n){return(e=Ml(22,e,n,t)).elementType=R,e.lanes=r,e.stateNode={isHidden:!1},e}function Fl(e,t,r){return(e=Ml(6,e,null,t)).lanes=r,e}function jl(e,t,r){return(t=Ml(4,null!==e.children?e.children:[],e.key,t)).lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zl(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 Ul(e,t,r,n,i,o,a,u,s){return e=new Zl(e,t,r,u,s),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Ml(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mo(o),e}function zl(e){if(!e)return _i;e:{if(ze(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 ql(e,t,r,n,i,o,a,u,s){return(e=Ul(r,n,!0,e,0,o,0,u,s)).context=zl(null),r=e.current,(o=Io(n=tl(),i=rl(r))).callback=void 0!==t&&null!==t?t:null,Lo(r,o,i),e.current.lanes=i,gt(e,i,n),il(e,n),e}function Kl(e,t,r,n){var i=t.current,o=tl(),a=rl(i);return r=zl(r),null===t.context?t.context=r:t.pendingContext=r,(t=Io(o,a)).payload={element:e},null!==(n=void 0===n?null:n)&&(t.callback=n),null!==(e=Lo(i,t,a))&&(nl(e,i,a,o),Do(e,i,a)),a}function Hl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Gl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var r=e.retryLane;e.retryLane=0!==r&&r>>1,i=e[n];if(!(0>>1;no(s,r))lo(c,s)?(e[n]=c,e[l]=r,n=l):(e[n]=s,e[u]=r,n=u);else{if(!(lo(c,r)))break e;e[n]=c,e[l]=r,n=l}}}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 u=Date,s=u.now();t.unstable_now=function(){return u.now()-s}}var l=[],c=[],f=1,h=null,d=3,p=!1,v=!1,m=!1,g="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=n(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,r(l,t)}t=n(c)}}function k(e){if(m=!1,w(e),!v)if(null!==n(l))v=!0,R(A);else{var t=n(c);null!==t&&I(k,t.startTime-e)}}function A(e,r){v=!1,m&&(m=!1,y(P),P=-1),p=!0;var o=d;try{for(w(r),h=n(l);null!==h&&(!(h.expirationTime>r)||e&&!N());){var a=h.callback;if("function"===typeof a){h.callback=null,d=h.priorityLevel;var u=a(h.expirationTime<=r);r=t.unstable_now(),"function"===typeof u?h.callback=u:h===n(l)&&i(l),w(r)}else i(l);h=n(l)}if(null!==h)var s=!0;else{var f=n(c);null!==f&&I(k,f.startTime-r),s=!1}return s}finally{h=null,d=o,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,E=!1,S=null,P=-1,_=5,C=-1;function N(){return!(t.unstable_now()-C<_)}function O(){if(null!==S){var e=t.unstable_now();C=e;var r=!0;try{r=S(!0,e)}finally{r?x():(E=!1,S=null)}}else E=!1}if("function"===typeof b)x=function(){b(O)};else if("undefined"!==typeof MessageChannel){var T=new MessageChannel,M=T.port2;T.port1.onmessage=O,x=function(){M.postMessage(null)}}else x=function(){g(O,0)};function R(e){S=e,E||(E=!0,x())}function I(e,r){P=g((function(){e(t.unstable_now())}),r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){v||p||(v=!0,R(A))},t.unstable_forceFrameRate=function(e){0>e||125a?(e.sortIndex=o,r(c,e),null===n(l)&&e===n(c)&&(m?(y(P),P=-1):m=!0,I(k,o-a))):(e.sortIndex=u,r(l,e),v||p||(v=!0,R(A))),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=d;return function(){var r=d;d=t;try{return e.apply(this,arguments)}finally{d=r}}}},5296:function(e,t,r){"use strict";e.exports=r(6813)},2065:function(e){"use strict";!function(t){var r=2147483647;function n(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,u=2600822924,s=528734635,l=1541459225,c=new Uint32Array(64);function f(e){for(var f=0,h=e.length;h>=64;){var d=r,p=n,v=i,m=o,g=a,y=u,b=s,w=l,k=void 0,A=void 0,x=void 0,E=void 0,S=void 0;for(A=0;A<16;A++)x=f+4*A,c[A]=(255&e[x])<<24|(255&e[x+1])<<16|(255&e[x+2])<<8|255&e[x+3];for(A=16;A<64;A++)E=((k=c[A-2])>>>17|k<<15)^(k>>>19|k<<13)^k>>>10,S=((k=c[A-15])>>>7|k<<25)^(k>>>18|k<<14)^k>>>3,c[A]=(E+c[A-7]|0)+(S+c[A-16]|0)|0;for(A=0;A<64;A++)E=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&y^~g&b)|0)+(w+(t[A]+c[A]|0)|0)|0,S=((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&p^d&v^p&v)|0,w=b,b=y,y=g,g=m+E|0,m=v,v=p,p=d,d=E+S|0;r=r+d|0,n=n+p|0,i=i+v|0,o=o+m|0,a=a+g|0,u=u+y|0,s=s+b|0,l=l+w|0,f+=64,h-=64}}f(e);var h,d=e.length%64,p=e.length/536870912|0,v=e.length<<3,m=d<56?56:120,g=e.slice(e.length-d,e.length);for(g.push(128),h=d+1;h>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(v>>>24&255),g.push(v>>>16&255),g.push(v>>>8&255),g.push(v>>>0&255),f(g),[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,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,l>>>24&255,l>>>16&255,l>>>8&255,l>>>0&255]}function i(e,t,r){e=e.length<=64?e:n(e);var i,o=64+t.length+4,a=new Array(o),u=new Array(64),s=[];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(;r>=32;)l(),s=s.concat(n(u.concat(n(a)))),r-=32;return r>0&&(l(),s=s.concat(n(u.concat(n(a))).slice(0,r))),s}function o(e,t,r,n,i){var o;for(l(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)s(e,16*o,i,16),u(i,n),l(i,0,e,t+16*o,16);for(o=0;o>>32-t}function u(e,t){l(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=a(t[0]+t[12],7),t[8]^=a(t[4]+t[0],9),t[12]^=a(t[8]+t[4],13),t[0]^=a(t[12]+t[8],18),t[9]^=a(t[5]+t[1],7),t[13]^=a(t[9]+t[5],9),t[1]^=a(t[13]+t[9],13),t[5]^=a(t[1]+t[13],18),t[14]^=a(t[10]+t[6],7),t[2]^=a(t[14]+t[10],9),t[6]^=a(t[2]+t[14],13),t[10]^=a(t[6]+t[2],18),t[3]^=a(t[15]+t[11],7),t[7]^=a(t[3]+t[15],9),t[11]^=a(t[7]+t[3],13),t[15]^=a(t[11]+t[7],18),t[1]^=a(t[0]+t[3],7),t[2]^=a(t[1]+t[0],9),t[3]^=a(t[2]+t[1],13),t[0]^=a(t[3]+t[2],18),t[6]^=a(t[5]+t[4],7),t[7]^=a(t[6]+t[5],9),t[4]^=a(t[7]+t[6],13),t[5]^=a(t[4]+t[7],18),t[11]^=a(t[10]+t[9],7),t[8]^=a(t[11]+t[10],9),t[9]^=a(t[8]+t[11],13),t[10]^=a(t[9]+t[8],18),t[12]^=a(t[15]+t[14],7),t[13]^=a(t[12]+t[15],9),t[14]^=a(t[13]+t[12],13),t[15]^=a(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 f(e,t){if("number"!==typeof e||e%1)throw new Error("invalid "+t);return e}function h(e,t,n,a,u,h,d){if(n=f(n,"N"),a=f(a,"r"),u=f(u,"p"),h=f(h,"dkLen"),0===n||0!==(n&n-1))throw new Error("N must be power of 2");if(n>r/128/a)throw new Error("N too large");if(a>r/128/u)throw new Error("r too large");if(!c(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!c(t))throw new Error("salt must be an array or buffer");t=Array.prototype.slice.call(t);for(var p=i(e,t,128*u*a),v=new Uint32Array(32*u*a),m=0;mT&&(r=T);for(var c=0;cT&&(r=T);for(var m=0;m>0&255),p.push(v[I]>>8&255),p.push(v[I]>>16&255),p.push(v[I]>>24&255);var L=i(e,p,h);return d&&d(null,1,L),L}d&&M(t)};if(!d)for(;;){var I=R();if(void 0!=I)return I}R()}var d={scrypt:function(e,t,r,n,i,o,a){return new Promise((function(u,s){var l=0;a&&a(0),h(e,t,r,n,i,o,(function(e,t,r){if(e)s(e);else if(r)a&&1!==l&&a(1),u(new Uint8Array(r));else if(a&&t!==l)return l=t,a(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(h(e,t,r,n,i,o))}};e.exports=d}()},1561:function(e,t,r){"use strict";var n=r(2791);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,u=n.useLayoutEffect,s=n.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(n){return!0}}var c="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,c=n[1];return u((function(){i.value=r,i.getSnapshot=t,l(i)&&c({inst:i})}),[e,r,t]),a((function(){return l(i)&&c({inst:i}),e((function(){l(i)&&c({inst:i})}))}),[e]),s(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},7595:function(e,t,r){"use strict";var n=r(2791),i=r(7248);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,u=n.useRef,s=n.useEffect,l=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var f=u(null);if(null===f.current){var h={hasValue:!1,value:null};f.current=h}else h=f.current;f=l((function(){function e(e){if(!s){if(s=!0,a=e,e=n(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return u=t}return u=e}if(t=u,o(a,e))return t;var r=n(e);return void 0!==i&&i(t,r)?t:(a=e,u=r)}var a,u,s=!1,l=void 0===r?null:r;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]}),[t,r,n,i]);var d=a(e,f[0],f[1]);return s((function(){h.hasValue=!0,h.value=d}),[d]),c(d),d}},7248:function(e,t,r){"use strict";e.exports=r(1561)},327:function(e,t,r){"use strict";e.exports=r(7595)},2737:function(e,t,r){"use strict";r.r(t),r.d(t,{create:function(){return s},createStore:function(){return n.M},default:function(){return l},useStore:function(){return a}});var n=r(1407),i=r(2791),o=r(327).useSyncExternalStoreWithSelector;function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.getState,r=arguments.length>2?arguments[2]:void 0;var n=o(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return(0,i.useDebugValue)(n),n}var u=function(e){var t="function"===typeof e?(0,n.M)(e):e,r=function(e,r){return a(t,e,r)};return Object.assign(r,t),r},s=function(e){return e?u(e):u},l=function(e){return s(e)}},8097:function(e,t,r){"use strict";r.r(t),r.d(t,{createWithEqualityFn:function(){return l},useStoreWithEqualityFn:function(){return u}});var n=r(2791),i=r(327),o=r(1407),a=i.useSyncExternalStoreWithSelector;function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.getState,r=arguments.length>2?arguments[2]:void 0,i=a(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return(0,n.useDebugValue)(i),i}var s=function(e,t){var r=(0,o.M)(e),n=function(e){return u(r,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t)};return Object.assign(n,r),n},l=function(e,t){return e?s(e,t):s}},6601:function(){},3897:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var o=this.tryEntries[i],u=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),b}},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;M(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},6015:function(e){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},7424:function(e,t,r){var n=r(5372),i=r(8872),o=r(6116),a=r(2218);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},861:function(e,t,r){var n=r(3405),i=r(9498),o=r(6116),a=r(2281);e.exports=function(e){return n(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},5036:function(e,t,r){var n=r(8698).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},4062:function(e,t,r){var n=r(8698).default,i=r(5036);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},8698:function(e){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},6116:function(e,t,r){var n=r(3897);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},3496:function(e,t,r){var n=r(3808),i=r(6015),o=r(6035),a=r(3515);function u(t){var r="function"===typeof Map?new Map:void 0;return e.exports=u=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("undefined"!==typeof 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,u(t)}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports},5423:function(e,t,r){"use strict";var n=r(7424).default,i=r(7061).default,o=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]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=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)&&o(t,e,r);return a(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{s(n.next(e))}catch(t){o(t)}}function u(e){try{s(n.throw(e))}catch(t){o(t)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getPriorityConnector=t.getSelectedConnector=t.initializeConnector=void 0;var l,c=r(9002),f=r(2791),h=r(2737),d=r(8097);function p(){for(var e=arguments.length,t=new Array(e),r=0;r1&&void 0!==arguments[1])||arguments[1],a=d(),h=c(),p=(0,f.useState)(void 0!==l),v=n(p,2),m=v[0],g=v[1];return(0,f.useEffect)((function(){if(!m){var e=!1;return function(){return s(this,void 0,void 0,i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==l){e.next=13;break}return e.prev=1,e.next=4,Promise.resolve().then((function(){return u(r(6832))}));case 4:t=e.sent,n=t.Web3Provider,l=n,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(1),console.debug("@ethersproject/providers not available"),l=null;case 13:case"end":return e.stop()}}),e,null,[[1,9]])})))}().then((function(){e||g(!0)})),function(){e=!0}}}),[m]),(0,f.useMemo)((function(){if(o){if(e.customProvider)return e.customProvider;if(l&&e.provider)return new l(e.provider,t)}}),[m,o,a,h,t])}function v(e){return b(e,a())}function m(e){var t,r=h();return null===(t=b(e,(0,f.useMemo)((function(){return void 0===r?void 0:[r]}),[r])))||void 0===t?void 0:t[0]}return{useProvider:p,useENSNames:v,useENSName:m}}(p,w,k);return[p,Object.assign(Object.assign(Object.assign({},w),k),A),a]},t.getSelectedConnector=p,t.getPriorityConnector=function(){for(var e=arguments.length,t=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:[],r=(0,f.useState)(),i=n(r,2),o=i[0],a=i[1];return(0,f.useEffect)((function(){if(e&&t.length){var r=!1;return Promise.all(t.map((function(t){return e.lookupAddress(t)}))).then((function(e){r||a(e)})).catch((function(e){r||(console.debug("Could not fetch ENS names",e),a(new Array(t.length).fill(null)))})),function(){r=!0,a(void 0)}}}),[e,t]),null!==o&&void 0!==o?o:new Array(t.length).fill(void 0)}},4329: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(5423),t),i(r(9058),t),i(r(607),t)},9058:function(e,t,r){"use strict";var n=r(6690).default,i=r(9728).default,o=r(1655).default,a=r(6389).default;Object.defineProperty(t,"__esModule",{value:!0}),t.MockEIP1193Provider=void 0;var u=function(e){o(r,e);var t=a(r);function r(){var e;return n(this,r),(e=t.apply(this,arguments)).eth_chainId=jest.fn((function(e){return e})),e.eth_accounts=jest.fn((function(e){return e})),e.eth_requestAccounts=jest.fn((function(e){return e})),e}return i(r,[{key:"request",value:function(e){if(!this.chainId)return Promise.reject(new Error);switch(e.method){case"eth_chainId":return Promise.resolve(this.eth_chainId(this.chainId));case"eth_accounts":return Promise.resolve(this.eth_accounts(this.accounts));case"eth_requestAccounts":return Promise.resolve(this.eth_requestAccounts(this.accounts));default:throw new Error("Method not supported on mock: ".concat(JSON.stringify(e)))}}},{key:"emitConnect",value:function(e){this.emit("connect",{chainId:e})}},{key:"emitDisconnect",value:function(e){this.emit("disconnect",e)}},{key:"emitChainChanged",value:function(e){this.emit("chainChanged",e)}},{key:"emitAccountsChanged",value:function(e){this.emit("accountsChanged",e)}}]),r}(r(7143).EventEmitter);t.MockEIP1193Provider=u},607:function(e,t,r){"use strict";var n=r(861).default,i=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]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=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)&&i(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useWeb3React=t.Web3ReactProvider=void 0;var u=a(r(2791)),s=r(5423),l=(0,u.createContext)(void 0);t.Web3ReactProvider=function(e){var t=e.children,r=e.connectors,i=e.connectorOverride,o=e.network,a=e.lookupENS,c=void 0===a||a,f=(0,u.useRef)(r);if(r.length!=f.current.length||r.some((function(e,t){var r=f.current[t];return e[0]!==r[0]})))throw new Error("The connectors prop passed to Web3ReactProvider must be referentially static. If connectors is changing, try providing a key prop to Web3ReactProvider that changes every time connectors changes.");var h=s.getPriorityConnector.apply(void 0,n(r)),d=h.usePriorityConnector,p=h.useSelectedChainId,v=h.useSelectedAccounts,m=h.useSelectedIsActivating,g=h.useSelectedAccount,y=h.useSelectedIsActive,b=h.useSelectedProvider,w=h.useSelectedENSNames,k=h.useSelectedENSName,A=d(),x=null!==i&&void 0!==i?i:A,E=p(x),S=v(x),P=m(x),_=g(x),C=y(x),N=b(x,o),O=w(x,c?N:void 0),T=k(x,c?N:void 0);return u.default.createElement(l.Provider,{value:{connector:x,chainId:E,accounts:S,isActivating:P,account:_,isActive:C,provider:N,ENSNames:O,ENSName:T,hooks:h}},t)},t.useWeb3React=function(){var e=(0,u.useContext)(l);if(!e)throw Error("useWeb3React can only be used within the Web3ReactProvider component");return e}},7377:function(e,t,r){"use strict";var n=r(7061).default,i=r(9728).default,o=r(6690).default,a=r(6115).default,u=r(1655).default,s=r(6389).default,l=r(3496).default,c=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]}),f=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),h=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)&&c(t,e,r);return f(t,e),t},d=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{s(n.next(e))}catch(t){o(t)}}function u(e){try{s(n.throw(e))}catch(t){o(t)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MetaMask=t.NoMetaMaskError=void 0;var p=r(9748),v=function(e){u(r,e);var t=s(r);function r(){var e;return o(this,r),(e=t.call(this,"MetaMask not installed")).name=r.name,Object.setPrototypeOf(a(e),r.prototype),e}return i(r)}(l(Error));function m(e){return Number.parseInt(e,16)}t.NoMetaMaskError=v;var g=function(e){u(a,e);var t=s(a);function a(e){var r,n=e.actions,i=e.options,u=e.onError;return o(this,a),(r=t.call(this,n,u)).options=i,r}return i(a,[{key:"isomorphicInitialize",value:function(){return d(this,void 0,void 0,n().mark((function e(){var t=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.eagerConnection){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",this.eagerConnection=Promise.resolve().then((function(){return h(r(226))})).then((function(e){return d(t,void 0,void 0,n().mark((function t(){var r,i,o,a=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.default(this.options);case 2:(o=t.sent)&&(this.provider=o,(null===(r=this.provider.providers)||void 0===r?void 0:r.length)&&(this.provider=null!==(i=this.provider.providers.find((function(e){return e.isMetaMask})))&&void 0!==i?i:this.provider.providers[0]),this.provider.on("connect",(function(e){var t=e.chainId;a.actions.update({chainId:m(t)})})),this.provider.on("disconnect",(function(e){var t;1013!==e.code?(a.actions.resetState(),null===(t=a.onError)||void 0===t||t.call(a,e)):console.debug('MetaMask logged connection error 1013: "Try again later"')})),this.provider.on("chainChanged",(function(e){a.actions.update({chainId:m(e)})})),this.provider.on("accountsChanged",(function(e){0===e.length?a.actions.resetState():a.actions.update({accounts:e})})));case 4:case"end":return t.stop()}}),t,this)})))})));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"connectEagerly",value:function(){return d(this,void 0,void 0,n().mark((function e(){var t,r,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.actions.startActivation(),e.prev=1,e.next=4,this.isomorphicInitialize();case 4:if(this.provider){e.next=6;break}return e.abrupt("return",t());case 6:return e.next=8,this.provider.request({method:"eth_accounts"});case 8:if((r=e.sent).length){e.next=11;break}throw new Error("No accounts returned");case 11:return e.next=13,this.provider.request({method:"eth_chainId"});case 13:i=e.sent,this.actions.update({chainId:m(i),accounts:r}),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(1),console.debug("Could not connect eagerly",e.t0),this.actions.resetState();case 21:case"end":return e.stop()}}),e,this,[[1,17]])})))}},{key:"activate",value:function(e){var t,r;return d(this,void 0,void 0,n().mark((function i(){var o,a=this;return n().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return(null===(r=null===(t=this.provider)||void 0===t?void 0:t.isConnected)||void 0===r?void 0:r.call(t))||(o=this.actions.startActivation()),i.abrupt("return",this.isomorphicInitialize().then((function(){return d(a,void 0,void 0,n().mark((function t(){var r,i,o,a,u,s=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.provider){t.next=2;break}throw new v;case 2:return t.next=4,this.provider.request({method:"eth_requestAccounts"});case 4:return r=t.sent,t.next=7,this.provider.request({method:"eth_chainId"});case 7:if(i=t.sent,o=m(i),(a="number"===typeof e?e:null===e||void 0===e?void 0:e.chainId)&&o!==a){t.next=12;break}return t.abrupt("return",this.actions.update({chainId:o,accounts:r}));case 12:return u="0x".concat(a.toString(16)),t.abrupt("return",this.provider.request({method:"wallet_switchEthereumChain",params:[{chainId:u}]}).catch((function(t){var r,n;if(4902===((null===(n=null===(r=t.data)||void 0===r?void 0:r.originalError)||void 0===n?void 0:n.code)||t.code)&&"number"!==typeof e){if(!s.provider)throw new Error("No provider");return s.provider.request({method:"wallet_addEthereumChain",params:[Object.assign(Object.assign({},e),{chainId:u})]})}throw t})).then((function(){return s.activate(a)})));case 14:case"end":return t.stop()}}),t,this)})))})).catch((function(e){throw null===o||void 0===o||o(),e})));case 2:case"end":return i.stop()}}),i,this)})))}},{key:"watchAsset",value:function(e){var t=e.address,r=e.symbol,i=e.decimals,o=e.image;return d(this,void 0,void 0,n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.provider){e.next=2;break}throw new Error("No provider");case 2:return e.abrupt("return",this.provider.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:t,symbol:r,decimals:i,image:o}}}).then((function(e){if(!e)throw new Error("Rejected");return!0})));case 3:case"end":return e.stop()}}),e,this)})))}}]),a}(p.Connector);t.MetaMask=g},9002:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWeb3ReactStoreAndActions=t.MAX_SAFE_CHAIN_ID=void 0;var n=r(7419),i=r(2737);t.MAX_SAFE_CHAIN_ID=0xfffffffffffec;var o={chainId:void 0,accounts:void 0,activating:!1};t.createWeb3ReactStoreAndActions=function(){var e=(0,i.createStore)()((function(){return o})),r=0;return[e,{startActivation:function(){var t=++r;return e.setState(Object.assign(Object.assign({},o),{activating:!0})),function(){r===t&&e.setState({activating:!1})}},update:function(i){if(void 0!==i.chainId&&function(e){if(!Number.isInteger(e)||e<=0||e>t.MAX_SAFE_CHAIN_ID)throw new Error("Invalid chainId ".concat(e))}(i.chainId),void 0!==i.accounts)for(var o=0;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){s=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw a}}}}},9388:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(1120),i=r(8814),o=r(2963);function a(e){var t=(0,i.Z)();return function(){var r,i=(0,n.Z)(e);if(t){var a=(0,n.Z)(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return(0,o.Z)(this,r)}}},1752:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1120);function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=(0,n.Z)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},i.apply(this,arguments)}},1120:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},136:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(9611);function i(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&&(0,n.Z)(e,t)}},8814:function(e,t,r){"use strict";function n(){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}}r.d(t,{Z:function(){return n}})},9199:function(e,t,r){"use strict";function n(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}r.d(t,{Z:function(){return n}})},2963:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(1002),i=r(7326);function o(e,t){if(t&&("object"===(0,n.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}},4165:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1002);function i(){i=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",c=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),u=new M(n||[]);return a(o,"_invoke",{value:C(e,r,u)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var p="suspendedStart",v="suspendedYield",m="executing",g="completed",y={};function b(){}function w(){}function k(){}var A={};f(A,s,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(R([])));E&&E!==r&&o.call(E,s)&&(A=E);var S=k.prototype=b.prototype=Object.create(A);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,a,u,s){var l=d(e[i],e,a);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==(0,n.Z)(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,s)}),(function(e){r("throw",e,u,s)})):t.resolve(f).then((function(e){c.value=e,u(c)}),(function(e){return r("throw",e,u,s)}))}s(l.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 C(t,r,n){var i=p;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var s=N(u,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var l=d(t,r,n);if("normal"===l.type){if(i=n.done?g:v,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=g,n.method="throw",n.arg=l.arg)}}}function N(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(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 T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function R(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(s&&l){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),T(r),y}},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;T(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:R(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}},9611:function(e,t,r){"use strict";function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}r.d(t,{Z:function(){return n}})},3433:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(907);var i=r(9199),o=r(181);function a(e){return function(e){if(Array.isArray(e))return(0,n.Z)(e)}(e)||(0,i.Z)(e)||(0,o.Z)(e)||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.")}()}},9142:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1002);function i(e){var t=function(e,t){if("object"!==(0,n.Z)(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==(0,n.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,n.Z)(t)?t:String(t)}},1002:function(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)}r.d(t,{Z:function(){return n}})},181:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(907);function i(e,t){if(e){if("string"===typeof e)return(0,n.Z)(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)?(0,n.Z)(e,t):void 0}}},1407:function(e,t,r){"use strict";r.d(t,{M:function(){return i}});var n=function(e){var t,r=new Set,n=function(e,n){var i="function"===typeof e?e(t):e;if(!Object.is(i,t)){var o=t;t=(null!=n?n:"object"!==typeof i)?i:Object.assign({},t,i),r.forEach((function(e){return e(t,o)}))}},i=function(){return t},o={setState:n,getState:i,subscribe:function(e){return r.add(e),function(){return r.delete(e)}},destroy:function(){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()}};return t=e(n,i,o),o},i=function(e){return e?n(e):n}}},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].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.amdO={},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};r.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"===typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"===typeof n.then)return n}var o=Object.create(null);r.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var u=2&i&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){a[e]=function(){return n[e]}}));return a.default=function(){return n},r.d(o,a),o}}(),r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},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.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e=r(2791),t=r.t(e,2),n=r(1250);function i(e){if(Array.isArray(e))return e}var o=r(181);function a(){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 u(e,t){return i(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,u=[],s=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(e){l=!0,i=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(e,t)||(0,o.Z)(e,t)||a()}var s=r(3433),l=r(5671),c=r(3144),f=r(136),h=r(9388),d=r(1120),p=r(9611);var v=r(8814);function m(e,t,r){return m=(0,v.Z)()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&(0,p.Z)(i,r.prototype),i},m.apply(null,arguments)}function g(e){var t="function"===typeof Map?new Map:void 0;return g=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return m(e,arguments,(0,d.Z)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,p.Z)(n,e)},g(e)}var y=r(9199);var b,w=r(7762);function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function O(e,t,r,n){void 0===n&&(n={});var i=n,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,s=void 0!==u&&u,l=a.history,c=b.Pop,f=null,h=d();function d(){return(l.state||{idx:null}).idx}function p(){c=b.Pop;var e=d(),t=null==e?null:e-h;h=e,f&&f({action:c,location:m.location,delta:t})}function v(e){var t="null"!==a.location.origin?a.location.origin:a.location.href,r="string"===typeof e?e:C(e);return E(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==h&&(h=0,l.replaceState(k({},l.state,{idx:h}),""));var m={get action(){return c},get location(){return e(a,l)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(x,p),f=e,function(){a.removeEventListener(x,p),f=null}},createHref:function(e){return t(a,e)},createURL:v,encodeLocation:function(e){var t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=b.Push;var n=_(m.location,e,t);r&&r(n,e);var i=P(n,h=d()+1),o=m.createHref(n);try{l.pushState(i,"",o)}catch(u){if(u instanceof DOMException&&"DataCloneError"===u.name)throw u;a.location.assign(o)}s&&f&&f({action:c,location:m.location,delta:1})},replace:function(e,t){c=b.Replace;var n=_(m.location,e,t);r&&r(n,e);var i=P(n,h=d()),o=m.createHref(n);l.replaceState(i,"",o),s&&f&&f({action:c,location:m.location,delta:0})},go:function(e){return l.go(e)}};return m}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(A||(A={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function T(e,t,r){void 0===r&&(r="/");var n=H(("string"===typeof t?N(t):t).pathname||"/",r);if(null==n)return null;var i=M(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var r=e.length===t.length&&e.slice(0,-1).every((function(e,r){return e===t[r]}));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(E(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+u+'".'),M(e.children,t,s,u)),(null!=e.path||e.index)&&t.push({path:u,score:U(u,e.index),routesMeta:s})};return e.forEach((function(e,t){var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?")){var n,o=(0,w.Z)(R(e.path));try{for(o.s();!(n=o.n()).done;){var a=n.value;i(e,t,a)}}catch(u){o.e(u)}finally{o.f()}}else i(e,t)})),t}function R(e){var t=e.split("/");if(0===t.length)return[];var r,n=i(r=t)||(0,y.Z)(r)||(0,o.Z)(r)||a(),u=n[0],l=n.slice(1),c=u.endsWith("?"),f=u.replace(/\?$/,"");if(0===l.length)return c?[f,""]:[f];var h=R(l.join("/")),d=[];return d.push.apply(d,(0,s.Z)(h.map((function(e){return""===e?f:[f,e].join("/")})))),c&&d.push.apply(d,(0,s.Z)(h)),d.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var I=/^:\w+$/,L=3,D=2,B=1,F=10,j=-2,Z=function(e){return"*"===e};function U(e,t){var r=e.split("/"),n=r.length;return r.some(Z)&&(n+=j),t&&(n+=D),r.filter((function(e){return!Z(e)})).reduce((function(e,t){return e+(I.test(t)?L:""===t?B:F)}),n)}function z(e,t){for(var r=e.routesMeta,n={},i="/",o=[],a=0;a and the router will parse it for you.'}function V(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function W(e,t,r,n){var i;void 0===n&&(n=!1),"string"===typeof e?i=N(e):(E(!(i=k({},e)).pathname||!i.pathname.includes("?"),G("?","pathname","search",i)),E(!i.pathname||!i.pathname.includes("#"),G("#","pathname","hash",i)),E(!i.search||!i.search.includes("#"),G("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(n||null==u)o=r;else{var s=t.length-1;if(u.startsWith("..")){for(var l=u.split("/");".."===l[0];)l.shift(),s-=1;i.pathname=l.join("/")}o=s>=0?t[s]:"/"}var c=function(e,t){void 0===t&&(t="/");var r="string"===typeof e?N(e):e,n=r.pathname,i=r.search,o=void 0===i?"":i,a=r.hash,u=void 0===a?"":a,s=n?n.startsWith("/")?n:function(e,t){var r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(n,t):t;return{pathname:s,search:Y(o),hash:X(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),h=(a||"."===u)&&r.endsWith("/");return c.pathname.endsWith("/")||!f&&!h||(c.pathname+="/"),c}var J=function(e){return e.join("/").replace(/\/\/+/g,"/")},Q=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},Y=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},X=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},$=function(e){(0,f.Z)(r,e);var t=(0,h.Z)(r);function r(){return(0,l.Z)(this,r),t.apply(this,arguments)}return(0,c.Z)(r)}(g(Error));function ee(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var te=["post","put","patch","delete"],re=(new Set(te),["get"].concat(te));new Set(re),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function ne(){return ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||E(!1),a=a.slice(0,Math.min(a.length,s+1))}return a.reduceRight((function(t,i,o){var s=i.route.id?null==u?void 0:u[i.route.id]:null,l=null;n&&(l=i.route.errorElement||ye);var c=r.concat(a.slice(0,o+1)),f=function(){var r;return r=s?l:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(we,{match:i,routeContext:{outlet:t,matches:c,isDataRoute:null!=n},children:r})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===o)?e.createElement(be,{location:n.location,revalidation:n.revalidation,component:l,error:s,children:f(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):f()}),null)}var Ae=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Ae||{}),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 Ee(t){var r=e.useContext(ie);return r||E(!1),r}function Se(t){var r=e.useContext(oe);return r||E(!1),r}function Pe(t){var r=function(t){var r=e.useContext(le);return r||E(!1),r}(),n=r.matches[r.matches.length-1];return n.route.id||E(!1),n.route.id}t.startTransition;function _e(e){E(!1)}function Ce(t){var r=t.basename,n=void 0===r?"/":r,i=t.children,o=void 0===i?null:i,a=t.location,u=t.navigationType,s=void 0===u?b.Pop:u,l=t.navigator,c=t.static,f=void 0!==c&&c;fe()&&E(!1);var h=n.replace(/^\/*/,"/"),d=e.useMemo((function(){return{basename:h,navigator:l,static:f}}),[h,l,f]);"string"===typeof a&&(a=N(a));var p=a,v=p.pathname,m=void 0===v?"/":v,g=p.search,y=void 0===g?"":g,w=p.hash,k=void 0===w?"":w,A=p.state,x=void 0===A?null:A,S=p.key,P=void 0===S?"default":S,_=e.useMemo((function(){var e=H(m,h);return null==e?null:{location:{pathname:e,search:y,hash:k,state:x,key:P},navigationType:s}}),[h,m,y,k,x,P,s]);return null==_?null:e.createElement(ue.Provider,{value:d},e.createElement(se.Provider,{children:o,value:_}))}function Ne(e){var t=e.children,r=e.location;return me(Me(t),r)}var Oe=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(Oe||{}),Te=new Promise((function(){}));e.Component;function Me(t,r){void 0===r&&(r=[]);var n=[];return e.Children.forEach(t,(function(t,i){if(e.isValidElement(t)){var o=[].concat((0,s.Z)(r),[i]);if(t.type!==e.Fragment){t.type!==_e&&E(!1),t.props.index&&t.props.children&&E(!1);var a={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(a.children=Me(t.props.children,o)),n.push(a)}else n.push.apply(n,Me(t.props.children,o))}})),n}function Re(){return Re=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);var Le=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];var De=t.startTransition;function Be(t){var r,n=t.basename,i=t.children,o=t.future,a=t.window,s=e.useRef();null==s.current&&(s.current=(void 0===(r={window:a,v5Compat:!0})&&(r={}),O((function(e,t){var r=e.location;return _("",{pathname:r.pathname,search:r.search,hash:r.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:C(t)}),null,r)));var l=s.current,c=u(e.useState({action:l.action,location:l.location}),2),f=c[0],h=c[1],d=(o||{}).v7_startTransition,p=e.useCallback((function(e){d&&De?De((function(){return h(e)})):h(e)}),[h,d]);return e.useLayoutEffect((function(){return l.listen(p)}),[l,p]),e.createElement(Ce,{basename:n,children:i,location:f.location,navigationType:f.action,navigator:l})}var Fe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,je=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ze=e.forwardRef((function(t,r){var n,i=t.onClick,o=t.relative,a=t.reloadDocument,u=t.replace,s=t.state,l=t.target,c=t.to,f=t.preventScrollReset,h=Ie(t,Le),d=e.useContext(ue).basename,p=!1;if("string"===typeof c&&je.test(c)&&(n=c,Fe))try{var v=new URL(window.location.href),m=c.startsWith("//")?new URL(v.protocol+c):new URL(c),g=H(m.pathname,d);m.origin===v.origin&&null!=g?c=g+m.search+m.hash:p=!0}catch(w){}var y=function(t,r){var n=(void 0===r?{}:r).relative;fe()||E(!1);var i=e.useContext(ue),o=i.basename,a=i.navigator,u=ve(t,{relative:n}),s=u.hash,l=u.pathname,c=u.search,f=l;return"/"!==o&&(f="/"===l?o:J([o,l])),a.createHref({pathname:f,search:c,hash:s})}(c,{relative:o}),b=function(t,r){var n=void 0===r?{}:r,i=n.target,o=n.replace,a=n.state,u=n.preventScrollReset,s=n.relative,l=pe(),c=he(),f=ve(t,{relative:s});return e.useCallback((function(e){if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(e,i)){e.preventDefault();var r=void 0!==o?o:C(c)===C(f);l(t,{replace:r,state:a,preventScrollReset:u,relative:s})}}),[c,l,f,o,a,i,t,u,s])}(c,{replace:u,state:s,target:l,preventScrollReset:f,relative:o});return e.createElement("a",Re({},h,{href:n||y,onClick:p||a?i:function(e){i&&i(e),e.defaultPrevented||b(e)},ref:r,target:l}))}));var Ue,ze;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Ue||(Ue={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(ze||(ze={}));var qe=r(4329),Ke=r(7377),He=u((0,qe.initializeConnector)((function(e){return new Ke.MetaMask({actions:e})})),2),Ge=He[0],Ve=He[1],We=r(9142);function Je(e,t,r){return(t=(0,We.Z)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Qe=function(e){return e[e.SEPOLIA=11155111]="SEPOLIA",e[e.OPTIMISM=10]="OPTIMISM",e[e.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",e[e.LOCAL=1337]="LOCAL",e}({}),Ye=Je({},Qe.SEPOLIA,"0x9e5ed0e7873E0d7f10eEb6dE72E87fE087A12776"),Xe=Je({},Qe.SEPOLIA,"0xA855B1F82127158bE35dF4a7867D9a3d7fc5166c"),$e=r(4165);function et(e,t,r,n,i,o,a){try{var u=e[o](a),s=u.value}catch(l){return void r(l)}u.done?t(s):Promise.resolve(s).then(n,i)}function tt(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){et(o,n,i,a,u,"next",e)}function u(e){et(o,n,i,a,u,"throw",e)}a(void 0)}))}}var rt=r(184),nt="0xaa36a7",it="11155111",ot=Ve.useIsActivating,at=Ve.useIsActive;function ut(){var t=ot(),r=at(),n=(0,e.useCallback)(tt((0,$e.Z)().mark((function e(){var t,r,n,i;return(0,$e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ge.activate().catch((function(){}));case 2:return e.prev=2,e.t0=String,e.next=6,null===(t=window.ethereum)||void 0===t?void 0:t.request({method:"net_version"}).catch((function(){return"0x1"}));case 6:if(e.t1=e.sent,r=(0,e.t0)(e.t1),console.log("networkId",r),r===nt||r===it){e.next=13;break}return i={chainId:"0xaa36a7",chainName:"Sepolia",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia-infura.brave.com/"],blockExplorerUrls:["https://sepolia.etherscan.io"]},e.next=13,null===(n=window.ethereum)||void 0===n?void 0:n.request({method:"wallet_addEthereumChain",params:[i]});case 13:e.next=18;break;case 15:e.prev=15,e.t2=e.catch(2),console.error("FAILED TO ADD SEPOLIA:",e.t2);case 18:case"end":return e.stop()}}),e,null,[[2,15]])}))),[]);return(0,rt.jsxs)("div",{children:[(0,rt.jsx)("div",{}),!r&&(0,rt.jsx)("button",{onClick:n,disabled:t,children:"Connect"})]})}var st=r(7303),lt=r(7326),ct=r(1752),ft=r(3198),ht=r(9745),dt=r(8408),pt=r(7419),vt=r(2257),mt=r(9716),gt=r(520),yt=r(5452),bt=r(9502),wt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{s(n.next(e))}catch(t){o(t)}}function u(e){try{s(n.throw(e))}catch(t){o(t)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},kt=new bt.Logger("contracts/5.7.0");function At(e,t){return wt(this,void 0,void 0,(0,$e.Z)().mark((function r(){var n,i;return(0,$e.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return"string"!==typeof(n=r.sent)&&kt.throwArgumentError("invalid address or ENS name","name",n),r.prev=4,r.abrupt("return",(0,pt.getAddress)(n));case 8:r.prev=8,r.t0=r.catch(4);case 10:return e||kt.throwError("a provider or signer is needed to resolve ENS names",bt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"}),r.next=13,e.resolveName(n);case 13:return null==(i=r.sent)&&kt.throwArgumentError("resolver or addr is not configured for ENS name","name",n),r.abrupt("return",i);case 16:case"end":return r.stop()}}),r,null,[[4,8]])})))}function xt(e,t,r){return wt(this,void 0,void 0,(0,$e.Z)().mark((function n(){return(0,$e.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!Array.isArray(r)){n.next=4;break}return n.next=3,Promise.all(r.map((function(r,n){return xt(e,Array.isArray(t)?t[n]:t[r.name],r)})));case 3:case 7:case 11:case 17:return n.abrupt("return",n.sent);case 4:if("address"!==r.type){n.next=8;break}return n.next=7,At(e,t);case 8:if("tuple"!==r.type){n.next=12;break}return n.next=11,xt(e,t,r.components);case 12:if("array"!==r.baseType){n.next=18;break}if(Array.isArray(t)){n.next=15;break}return n.abrupt("return",Promise.reject(kt.makeError("invalid value for array",bt.Logger.errors.INVALID_ARGUMENT,{argument:"value",value:t})));case 15:return n.next=17,Promise.all(t.map((function(t){return xt(e,t,r.arrayChildren)})));case 18:return n.abrupt("return",t);case 19:case"end":return n.stop()}}),n)})))}function Et(e,t,r){return wt(this,void 0,void 0,(0,$e.Z)().mark((function n(){var i,o,a,u,s,l,c,f,h,d,p=this;return(0,$e.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i={},r.length===t.inputs.length+1&&"object"===typeof r[r.length-1]&&(i=(0,gt.shallowCopy)(r.pop())),kt.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?i.from?i.from=(0,gt.resolveProperties)({override:At(e.signer,i.from),signer:e.signer.getAddress()}).then((function(e){return wt(p,void 0,void 0,(0,$e.Z)().mark((function t(){return(0,$e.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,pt.getAddress)(e.signer)!==e.override&&kt.throwError("Contract with a Signer cannot override from",bt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.abrupt("return",e.override);case 2:case"end":return t.stop()}}),t)})))})):i.from=e.signer.getAddress():i.from&&(i.from=At(e.provider,i.from)),n.next=6,(0,gt.resolveProperties)({args:xt(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:(0,gt.resolveProperties)(i)||{}});case 6:if(o=n.sent,a=e.interface.encodeFunctionData(t,o.args),u={data:a,to:o.address},null!=(s=o.overrides).nonce&&(u.nonce=vt.O$.from(s.nonce).toNumber()),null!=s.gasLimit&&(u.gasLimit=vt.O$.from(s.gasLimit)),null!=s.gasPrice&&(u.gasPrice=vt.O$.from(s.gasPrice)),null!=s.maxFeePerGas&&(u.maxFeePerGas=vt.O$.from(s.maxFeePerGas)),null!=s.maxPriorityFeePerGas&&(u.maxPriorityFeePerGas=vt.O$.from(s.maxPriorityFeePerGas)),null!=s.from&&(u.from=s.from),null!=s.type&&(u.type=s.type),null!=s.accessList&&(u.accessList=(0,yt.accessListify)(s.accessList)),null==u.gasLimit&&null!=t.gas){for(l=21e3,c=(0,mt.arrayify)(a),f=0;f1)){e=e.substring(1);var r=t[0];try{null==i[e]&&(0,gt.defineReadOnly)(i,e,i[r])}catch(n){}null==i.functions[e]&&(0,gt.defineReadOnly)(i.functions,e,i.functions[r]),null==i.callStatic[e]&&(0,gt.defineReadOnly)(i.callStatic,e,i.callStatic[r]),null==i.populateTransaction[e]&&(0,gt.defineReadOnly)(i.populateTransaction,e,i.populateTransaction[r]),null==i.estimateGas[e]&&(0,gt.defineReadOnly)(i.estimateGas,e,i.estimateGas[r])}}))}return(0,c.Z)(e,[{key:"deployed",value:function(){return this._deployed()}},{key:"_deployed",value:function(e){var t=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return t})):this._deployedPromise=this.provider.getCode(this.address,e).then((function(e){return"0x"===e&&kt.throwError("contract not deployed",bt.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:t.address,operation:"getDeployed"}),t}))),this._deployedPromise}},{key:"fallback",value:function(e){var t=this;this.signer||kt.throwError("sending a transactions require a signer",bt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var r=(0,gt.shallowCopy)(e||{});return["from","to"].forEach((function(e){null!=r[e]&&kt.throwError("cannot override "+e,bt.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})})),r.to=this.resolvedAddress,this.deployed().then((function(){return t.signer.sendTransaction(r)}))}},{key:"connect",value:function(e){"string"===typeof e&&(e=new dt.b(e,this.provider));var t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&(0,gt.defineReadOnly)(t,"deployTransaction",this.deployTransaction),t}},{key:"attach",value:function(e){return new this.constructor(e,this.interface,this.signer||this.provider)}},{key:"_normalizeRunningEvent",value:function(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}},{key:"_getRunningEvent",value:function(e){if("string"===typeof e){if("error"===e)return this._normalizeRunningEvent(new Ot);if("event"===e)return this._normalizeRunningEvent(new Nt("event",null));if("*"===e)return this._normalizeRunningEvent(new Mt(this.address,this.interface));var t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Tt(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{var r=e.topics[0];if("string"!==typeof r)throw new Error("invalid topic");var n=this.interface.getEvent(r);return this._normalizeRunningEvent(new Tt(this.address,this.interface,n,e.topics))}catch(o){}var i={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Nt(Ct(i),i))}return this._normalizeRunningEvent(new Mt(this.address,this.interface))}},{key:"_checkRunningEvents",value:function(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];var t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}},{key:"_wrapEvent",value:function(e,t,r){var n=this,i=(0,gt.deepCopy)(t);return i.removeListener=function(){r&&(e.removeListener(r),n._checkRunningEvents(e))},i.getBlock=function(){return n.provider.getBlock(t.blockHash)},i.getTransaction=function(){return n.provider.getTransaction(t.transactionHash)},i.getTransactionReceipt=function(){return n.provider.getTransactionReceipt(t.transactionHash)},e.prepareEvent(i),i}},{key:"_addEventListener",value:function(e,t,r){var n=this;if(this.provider||kt.throwError("events require a provider or a signer with a provider",bt.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){var i=function(r){var i=n._wrapEvent(e,r,t);if(null==i.decodeError)try{var o=e.getEmit(i);n.emit.apply(n,[e.filter].concat((0,s.Z)(o)))}catch(a){i.decodeError=a.error}null!=e.filter&&n.emit("event",i),null!=i.decodeError&&n.emit("error",i.decodeError,i)};this._wrappedEmits[e.tag]=i,null!=e.filter&&this.provider.on(e.filter,i)}}},{key:"queryFilter",value:function(e,t,r){var n=this,i=this._getRunningEvent(e),o=(0,gt.shallowCopy)(i.filter);return"string"===typeof t&&(0,mt.isHexString)(t,32)?(null!=r&&kt.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),o.blockHash=t):(o.fromBlock=null!=t?t:0,o.toBlock=null!=r?r:"latest"),this.provider.getLogs(o).then((function(e){return e.map((function(e){return n._wrapEvent(i,e,null)}))}))}},{key:"on",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}},{key:"once",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}},{key:"emit",value:function(e){if(!this.provider)return!1;for(var t=this._getRunningEvent(e),r=arguments.length,n=new Array(r>1?r-1:0),i=1;i0;return this._checkRunningEvents(t),o}},{key:"listenerCount",value:function(e){var t=this;return this.provider?null==e?Object.keys(this._runningEvents).reduce((function(e,r){return e+t._runningEvents[r].listenerCount()}),0):this._getRunningEvent(e).listenerCount():0}},{key:"listeners",value:function(e){if(!this.provider)return[];if(null==e){var t=[];for(var r in this._runningEvents)this._runningEvents[r].listeners().forEach((function(e){t.push(e)}));return t}return this._getRunningEvent(e).listeners()}},{key:"removeAllListeners",value:function(e){if(!this.provider)return this;if(null==e){for(var t in this._runningEvents){var r=this._runningEvents[t];r.removeAllListeners(),this._checkRunningEvents(r)}return this}var n=this._getRunningEvent(e);return n.removeAllListeners(),this._checkRunningEvents(n),this}},{key:"off",value:function(e,t){if(!this.provider)return this;var r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"getContractAddress",value:function(e){return(0,pt.getContractAddress)(e)}},{key:"getInterface",value:function(e){return st.vU.isInterface(e)?e:new st.vU(e)}},{key:"isIndexed",value:function(e){return st.Hk.isIndexed(e)}}]),e}(),It=function(e){(0,f.Z)(r,e);var t=(0,h.Z)(r);function r(){return(0,l.Z)(this,r),t.apply(this,arguments)}return(0,c.Z)(r)}(Rt),Lt=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"node",type:"uint256"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"address",name:"nft",type:"address"}],name:"NewSubdomainContract",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"node",type:"uint256"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"}],name:"NodeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"node",type:"uint256"},{indexed:!0,internalType:"uint96",name:"protocols",type:"uint96"},{indexed:!1,internalType:"bytes32",name:"publicKey",type:"bytes32"},{indexed:!1,internalType:"uint32",name:"ip",type:"uint32"},{indexed:!1,internalType:"uint16",name:"port",type:"uint16"},{indexed:!1,internalType:"bytes32[]",name:"routers",type:"bytes32[]"}],name:"WsChanged",type:"event"},{inputs:[{internalType:"uint256",name:"node",type:"uint256"},{internalType:"uint32",name:"protocols",type:"uint32"}],name:"clearProtocols",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getInitializedVersion",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"records",outputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint96",name:"protocols",type:"uint96"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"fqdn",type:"bytes"}],name:"registerNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"fqdn",type:"bytes"},{internalType:"contract IQNSNFT",name:"nft",type:"address"}],name:"registerSubdomainContract",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"node",type:"uint256"},{internalType:"bytes32",name:"publicKey",type:"bytes32"},{internalType:"uint32",name:"ip",type:"uint32"},{internalType:"uint16",name:"port",type:"uint16"},{internalType:"bytes32[]",name:"routers",type:"bytes32[]"}],name:"setWsRecord",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"node",type:"uint256"}],name:"ws",outputs:[{components:[{internalType:"bytes32",name:"publicKey",type:"bytes32"},{internalType:"uint32",name:"ip",type:"uint32"},{internalType:"uint16",name:"port",type:"uint16"},{internalType:"bytes32[]",name:"routers",type:"bytes32[]"}],internalType:"struct IQNS.WsRecord",name:"",type:"tuple"}],stateMutability:"view",type:"function"}],Dt=function(){function e(){(0,l.Z)(this,e)}return(0,c.Z)(e,null,[{key:"createInterface",value:function(){return new st.vU(Lt)}},{key:"connect",value:function(e,t){return new It(e,Lt,t)}}]),e}();Dt.abi=Lt;var Bt=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{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"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{inputs:[{internalType:"bytes",name:"name",type:"bytes"},{internalType:"contract IQNSNFT",name:"nft",type:"address"}],name:"allowSubdomains",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"baseNode",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInitializedVersion",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract QNSRegistry",name:"_qns",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"qns",outputs:[{internalType:"contract QNSRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"name",type:"bytes"},{internalType:"address",name:"owner",type:"address"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_baseNode",type:"uint256"}],name:"setBaseNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFromAndClearProtocols",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"}],Ft=function(){function e(){(0,l.Z)(this,e)}return(0,c.Z)(e,null,[{key:"createInterface",value:function(){return new st.vU(Bt)}},{key:"connect",value:function(e,t){return new It(e,Bt,t)}}]),e}();function jt(e){var t,r=e.split("."),n=new Uint8Array(e.length+r.length),i=0,o=(0,w.Z)(r);try{for(o.s();!(t=o.n()).done;){var a=t.value,u=a.length;n[i]=u,i++;for(var s=0;s>>0}var Wt=Ve.useChainId,Jt=Ve.useProvider;var Qt=function(t){var r,n=t.our,i=Wt(),o=Jt(),a=u((0,e.useState)(!1),2),s=a[0],l=a[1];if(!i)return(0,rt.jsx)("p",{children:"connect your wallet"});if(!o)return(0,rt.jsx)("p",{children:"idk whats wrong"});if(!(i in Ye))return(0,rt.jsx)("p",{children:"change networks"});var c=Ye[i],f=Dt.connect(c,o.getSigner());return(0,rt.jsx)("div",{id:"signup-form",className:"col",children:s?(0,rt.jsx)(Zt,{msg:"Booting Node"}):(0,rt.jsx)("div",{className:"row",style:{margin:"0 0 1em"},children:(0,rt.jsx)("button",{onClick:function(){return(r=r||tt((0,$e.Z)().mark((function e(){var t,r;return(0,$e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.setWsRecord("".concat((0,Gt.VM)(n.name)),"0x".concat(n.networking_key),n.ws_routing?Vt(n.ws_routing[0]):0,n.ws_routing?n.ws_routing[1]:0,n.allowed_routers.map((function(e){return(0,Gt.VM)(e)})));case 2:return t=e.sent,l(!0),e.next=6,t.wait();case 6:return e.next=8,fetch("/get-ws-info",{method:"PUT"});case 8:r=setInterval(tt((0,$e.Z)().mark((function e(){return(0,$e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/");case 2:e.sent.status<400&&(clearInterval(r),window.location.replace("/"));case 4:case"end":return e.stop()}}),e)}))),2e3);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)},children:"Set QNS Networking"})})})},Yt=r(3580),Xt=Ve.useChainId,$t=Ve.useAccounts,er=Ve.useProvider;var tr=function(t){var r,n=t.setConfirmedUqName,i=Xt(),o=$t(),a=er(),s=pe(),l=u((0,e.useState)(""),2),c=l[0],f=l[1];if(!i)return(0,rt.jsx)("p",{children:"connect your wallet"});if(!a)return(0,rt.jsx)("p",{children:"idk whats wrong"});if(!(i in Xe))return(0,rt.jsx)("p",{children:"change networks"});var h=Xe[i],d=Ft.connect(h,a.getSigner());return(0,rt.jsxs)("div",{id:"signup-form",className:"col",children:[(0,rt.jsxs)("div",{className:"row",children:[(0,rt.jsx)("h4",{children:"What is your .uq name?"}),(0,rt.jsxs)("div",{className:"tooltip-container",children:[(0,rt.jsx)("div",{className:"tooltip-button",children:"\u2139"}),(0,rt.jsx)("div",{className:"tooltip-content",children:"Uqbar nodes use a .uq name in order to identify themselves to other nodes in the network"})]})]}),(0,rt.jsxs)("div",{className:"row",style:{margin:"0 0 1em"},children:[(0,rt.jsx)("div",{style:{fontSize:"0.75em"},children:"Address:"}),o&&(0,rt.jsx)("div",{id:"current-address",children:o[0]})]}),(0,rt.jsxs)("div",{className:"row",children:[(0,rt.jsx)("input",{value:c,onChange:function(e){return f(e.target.value)},type:"text",minLength:9,required:!0,name:"uq-name",placeholder:"e.g. myname"}),(0,rt.jsx)("div",{className:"uq",children:".uq"})]}),(0,rt.jsx)("button",{onClick:function(){return(r=r||tt((0,$e.Z)().mark((function e(){var t;return(0,$e.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c){e.next=3;break}return window.alert("Please enter a name"),e.abrupt("return",!1);case 3:return t=(0,Yt.namehash)("".concat(c,".uq")),e.prev=4,e.next=7,d.ownerOf(t);case 7:e.sent==o[0]?(n("".concat(c,".uq")),s("/set-password")):window.alert("You do not own this .uq name. Please try again."),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),window.alert("This .uq name is not registered. Please try again.");case 14:case"end":return e.stop()}}),e,null,[[4,11]])})))).apply(this,arguments)},children:"Confirm Ownership of Uqname"})]})},rr=Ve.useChainId,nr=Ve.useProvider;var ir=function(){var t=rr(),r=nr(),n=u((0,e.useState)(""),2),i=n[0],o=n[1],a=u((0,e.useState)(null),2),s=a[0],l=a[1];return(0,rt.jsx)(rt.Fragment,{children:t&&r?t in Ye&&t in Xe?(0,rt.jsx)(Be,{children:(0,rt.jsxs)(Ne,{children:[(0,rt.jsx)(_e,{path:"/",element:(0,rt.jsx)(Kt,{setConfirmedUqName:o})}),(0,rt.jsx)(_e,{path:"/reset",element:(0,rt.jsx)(tr,{setConfirmedUqName:o})}),(0,rt.jsx)(_e,{path:"/set-password",element:(0,rt.jsx)(Ht,{confirmedUqName:i,setOur:l})}),(0,rt.jsx)(_e,{path:"/set-ws",element:(0,rt.jsx)(Qt,{our:s})})]})}):(0,rt.jsx)("p",{children:"change networks"}):(0,rt.jsx)(ut,{})})},or=[[Ge,Ve]];n.createRoot(document.getElementById("root")).render((0,rt.jsx)(e.StrictMode,{children:(0,rt.jsx)(qe.Web3ReactProvider,{connectors:or,children:(0,rt.jsxs)("div",{id:"signup-page",className:"col",children:[(0,rt.jsxs)("div",{id:"signup-form-header",className:"row",children:[(0,rt.jsx)("img",{alt:"icon",style:{margin:"0 1em 0.2em 0"},src:"data:image/vnd.microsoft.icon;base64,AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAqhP/x////AP///wAqhP//KoT//////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AKoT//yqE//////8A////ACqE//8qhP//////AP///wD///8A////AP///wD/4xwJ////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////ACmE/7MqhP//////AP///wAqhP//KoT//////wD///8AKoT//yqE//////8A////AP///wD///8A////AP/fIBD53CD/+N4hJ////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AKoT//yqE//////8A////ACqE//8qhP//////AP///wAqhP//KoT//////wD///8A////AP///wD///8A/98gEPncIP/53CD/+dwg/////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AK4X/zP///wAqhP//KoT//////wD///8AKoT//yqE//////8A////ACqE//8qhP//////AP///wD///8A////AP///wD/3yAQ+dwg//ncIP/53CD/+dwg/////wD///8A////AP///wD///8A////AP///wD///8A////ACqE//8rhf/M////ACqE//8qhP//////AP///wAqhP//KoT//////wD///8AKoT//yqE//////8A////AP///wD///8A////AP/fIBD53CD/+dwg//ncIP/53CD/+dwg/////wD///8A////AP///wD///8A////AP///wD///8AKoT//yuF/8z///8AKoT//yqE//////8A////ACqE//8qhP//////AP///wAqhP//KoT//////wD///8A////AP///wD///8A/98gEPncIP/53CD/+dwg//ncIP/53CD/+dwg/////wD///8A////AP///wD///8A////AP///wAqhP//K4X/zP///wAqhP//KoT//////wD///8AKoT//yqE//////8A////ACqE//8qhP//////AP///wD///8A////AP///wD/3yAQ+dwg//ncIP/53CD/+dwg//ncIP/53CD/9twjHf///wD///8A////AP///wD///8A////ACqE//8rhf/M////ACqE//8qhP//////AP///wAqhP//KoT//////wD///8AKoT//yqE//////8A////AP///wD///8A////AP/fIBD53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CD/////AP///wD///8AKoT//////wD///8AKoT//yuF/8z///8AKoT//yqE//////8A////ACqE//////8A////AP///wD///8A////ACqE//8qhP/D////AP///wD///8A/98gEPncIP/53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CCx////AP///wAqhP//////AP///wAqhP//K4X/zP///wAqhP//KoT//////wD///8A////AP///wD///8A////AP///wD///8AKoT//yqE//8qhP//////AP///wD/3yAQ+dwg//ncIP/53CD/+dwg//ncIP/53CD/+dwg//ncIP////8A////ACqE//////8A////ACqE//8rhf/M////ACqE//8qhP//////AP///wD///8A////AP///wD///8A////AP///wAqhP//KoT//yqE//8qhP//////AP/fIBD53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CD/+dwg/////wAqhP//KoT//////wD///8AKoT//yuF/8z///8AKoT//yqE//////8A////AP///wD///8A////AP///wD///8A////ACqE//8qhP//KoT//yqE//8qhP///98gEPncIP/53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CD/+dwfyyqE//8qhP//////AP///wAqhP//K4X/zP///wAqhP//////AP///wD///8A////AP///wD///8A////AP///wD///8AKoT//yqE//8qhP//KoT//yqE////3yAQ+dwg//ncIP/53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CD/KoT//yqE//////8A////ACqE//8rhf/M////ACqE//////8A////AP///wD///8A////AP///wD///8A////AP///wAqhP//KoT//yqE//8qhP//KoT////fIBD53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CD/+dwg//ncIP8qhP//KoT//////wD///8AKoT//yuF/8z///8AKoT//////wD///8A////AP///wD///8A////AP///wD///8A////ACqE//8qhP//KoT//yqE//8qhP//Lob7wPncIP/53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CD/+dwg/yqE//8qhP//////AP///wAqhP//K4X/zP///wAqhP//////AP///wD///8A////AP///wD///8A////AP///wD///8AKoT//yqE//8qhP//KoT//yqE//8thvvL+dwg//ncIP/53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CD/KoT//yqE//////8A////ACqE//8rhf/M////ACqE//////8A////AP///wD///8A////AP///wD///8A////AP///wAqhP//KoT//yqE//8qhP//KoT////fIBD53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CD/+dwg//ncIP8qhP//KoT//////wD///8AKoT//yuF/8z///8AKoT//////wD///8A////AP///wD///8A////AP///wD///8A////ACqE//8qhP//KoT//yqE//8qhP///98gEPncIP/53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CD/+dwg/yqE//8qhP//////AP///wAqhP//K4X/zP///wAqhP//KoT//////wD///8A////AP///wD///8A////AP///wD///8AKoT//yqE//8qhP//KoT//yqE////3yAQ+dwg//ncIP/53CD/+dwg//ncIP/53CD/+dwg//ncIP/53B/7AKr/AyqE//////8A////ACqE//8rhf/M////ACqE//8qhP//////AP///wD///8A////AP///wD///8A////AP///wAqhP//KoT//yqE//8qhP//////AP/fIBD53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CD/+dwg/////wD///8AKoT//////wD///8AKoT//yuF/8z///8AKoT//yqE//////8A////AP///wD///8A////AP///wD///8A////ACqE//8qhP//KoT//////wD///8A/98gEPncIP/53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CD/////AP///wAqhP//////AP///wAqhP//K4X/zP///wAqhP//KoT//////wD///8AKoT/kf///wD///8A////AP///wD///8AKoT//yqE//////8A////AP///wD/3yAQ+dwg//ncIP/53CD/+dwg//ncIP/53CD/+dwg//ncIP7///8A////AP///wD///8A////ACqE//8rhf/M////ACqE//8qhP//////AP///wAqhP//KoT//////wD///8AKoT/3SqE//////8A////AP///wD///8A////AP/fIBD53CD/+dwg//ncIP/53CD/+dwg//ncIP/53CD/////AP///wD///8A////AP///wD///8AKoT//yuF/8z///8AKoT//yqE//////8A////ACqE//8qhP//////AP///wAqhP//KoT//////wD///8A////AP///wD///8A/98gEPncIP/53CD/+dwg//ncIP/53CD/+dwg//rcIL3///8A////AP///wD///8A////AP///wAqhP//K4X/zP///wAqhP//KoT//////wD///8AKoT//yqE//////8A////ACqE//8qhP//////AP///wD///8A////AP///wD/3yAQ+dwg//ncIP/53CD/+dwg//ncIP/53CD/////AP///wD///8A////AP///wD///8A////ACqE//8rhf/M////ACqE//8qhP//////AP///wAqhP//KoT//////wD///8AKoT//yqE//////8A////AP///wD///8A////AP/fIBD53CD/+dwg//ncIP/53CD/+dwg/////wD///8A////AP///wD///8A////AP///wD///8A////ACuF/8z///8AKoT//yqE//////8A////ACqE//8qhP//////AP///wAqhP//KoT//////wD///8A////AP///wD///8A/98gEPncIP/53CD/+dwg//ncIP////8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wAqhP//KoT//////wD///8AKoT//yqE//////8A////ACqE//8qhP//////AP///wD///8A////AP///wD/3yAQ+dwg//ncIP/53CD/////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////ACqE//8qhP//////AP///wAqhP//KoT//////wD///8AKoT//yqE//////8A////AP///wD///8A////AP/fIBD53CD/+dwg9////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////ACqE//8qhP//////AP///wAqhP//KoT//////wD///8A////AP///wD///8A/98gEP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AAKr/AyqE//////8A////ACqE//8qhP//////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//Z////mff/+Znx//mZ8P/pmfB/yZnwP8mZ8B/JmfAPyZnwDsm+cAbJ/jAGyf4QBMn+AADL/gAAy/4AAMv+AADL/gAAy/4AAMv+AADJ/gAAyf4QBsn+MAbJvnAHyZnwD8mZ8A/JmfAfyZnwP+mZ8H/5mfD/+Znx//+Z9///mf/8="}),(0,rt.jsx)("h1",{style:{textAlign:"center"},children:"Uqbar Setup"})]}),(0,rt.jsx)(ir,{})]})})}))}()}();
-//# sourceMappingURL=main.f54b619d.js.map
\ No newline at end of file
+/*! For license information please see main.321651c6.js.LICENSE.txt */
+!function(){var e={2056:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});var n="abi/5.7.0"},5054:function(e,t,r){"use strict";r.d(t,{R:function(){return D},$:function(){return B}});var n=r(5671),i=r(3144),o=r(9716),a=r(520),u=r(9502),s=r(2056),l=r(3198),c=r(136),f=r(9388),h=r(7419),d=function(e){(0,c.Z)(r,e);var t=(0,f.Z)(r);function r(e){return(0,n.Z)(this,r),t.call(this,"address","address",e,!1)}return(0,i.Z)(r,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{t=(0,h.getAddress)(t)}catch(r){this._throwError(r.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return(0,h.getAddress)((0,o.hexZeroPad)(e.readValue().toHexString(),20))}}]),r}(l.XI),p=function(e){(0,c.Z)(r,e);var t=(0,f.Z)(r);function r(e){var i;return(0,n.Z)(this,r),(i=t.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,i}return(0,i.Z)(r,[{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)}}]),r}(l.XI),v=new u.Logger(s.i);function m(e,t,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){var i={};n=t.map((function(e){var t=e.localName;return t||v.throwError("cannot encode object for signature with missing names",u.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]&&v.throwError("cannot encode object for signature with duplicate names",u.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]=!0,r[t]}))}else v.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&v.throwArgumentError("types/value length mismatch","tuple",r);var o=new l.QV(e.wordSize),a=new l.QV(e.wordSize),s=[];t.forEach((function(e,t){var r=n[t];if(e.dynamic){var i=a.length;e.encode(a,r);var u=o.writeUpdatableValue();s.push((function(e){u(e+i)}))}else e.encode(o,r)})),s.forEach((function(e){e(o.length)}));var c=e.appendWriter(o);return c+=e.appendWriter(a)}function g(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(s){if(s.code===u.Logger.errors.BUFFER_OVERRUN)throw s;(i=s).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(s){if(s.code===u.Logger.errors.BUFFER_OVERRUN)throw s;(i=s).baseType=t.name,i.name=t.localName,i.type=t.type}void 0!=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(){var e=r[a];e instanceof Error&&Object.defineProperty(r,a,{enumerable:!0,get:function(){throw e}})},a=0;a=0?i:"")+"]",s=-1===i||e.dynamic;return(a=t.call(this,"array",u,o,s)).coder=e,a.length=i,a}return(0,i.Z)(r,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;re._data.length&&v.throwError("insufficient data length",u.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n256||n%8!==0)&&R.throwArgumentError("invalid "+r[1]+" bit length","param",e),new C(n/8,"int"===r[1],e.name)}if(r=e.type.match(I)){var i=parseInt(r[1]);return(0===i||i>32)&&R.throwArgumentError("invalid bytes length","param",e),new E(i,e.name)}return R.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new l.Ej(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new l.QV(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(M._R.from(e))}));return new T(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&R.throwError("types/values length mismatch",u.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(M._R.from(e))})),i=new T(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(M._R.from(e))}));return new T(i,"_").decode(this._getReader((0,o.arrayify)(t),r))}}]),e}(),B=new D},3198:function(e,t,r){"use strict";r.d(t,{BR:function(){return f},Ej:function(){return p},QV:function(){return d},XI:function(){return h}});var n=r(5671),i=r(3144),o=r(9716),a=r(2257),u=r(520),s=r(9502),l=r(2056),c=new s.Logger(l.i);function f(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(a){t.push({path:o,error:a})}}}([],e),t}var h=function(){function e(t,r,i,o){(0,n.Z)(this,e),this.name=t,this.type=r,this.localName=i,this.dynamic=o}return(0,i.Z)(e,[{key:"_throwError",value:function(e,t){c.throwArgumentError(e,this.localName,t)}}]),e}(),d=function(){function e(t){(0,n.Z)(this,e),(0,u.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return(0,i.Z)(e,[{key:"data",get:function(){return(0,o.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,o.concat)(e._data))}},{key:"writeBytes",value:function(e){var t=(0,o.arrayify)(e),r=t.length%this.wordSize;return r&&(t=(0,o.concat)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=(0,o.arrayify)(a.O$.from(e));return t.length>this.wordSize&&c.throwError("value out-of-bounds",s.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,o.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}(),p=function(){function e(t,r,i,a){(0,n.Z)(this,e),(0,u.defineReadOnly)(this,"_data",(0,o.arrayify)(t)),(0,u.defineReadOnly)(this,"wordSize",r||32),(0,u.defineReadOnly)(this,"_coerceFunc",i),(0,u.defineReadOnly)(this,"allowLoose",a),this._offset=0}return(0,i.Z)(e,[{key:"data",get:function(){return(0,o.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:c.throwError("data out-of-bounds",s.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 a.O$.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}()},3165:function(e,t,r){"use strict";r.d(t,{HY:function(){return k},IC:function(){return N},QV:function(){return A},Xg:function(){return P},YW:function(){return _},_R:function(){return b},pc:function(){return g}});var n=r(136),i=r(9388),o=r(5671),a=r(3144),u=r(2257),s=r(520),l=r(9502),c=r(2056),f=new l.Logger(c.i),h={},d={calldata:!0,memory:!0,storage:!0},p={calldata:!0,memory:!0};function v(e,t){if("bytes"===e||"string"===e){if(d[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&p[t])return!0;return(d[t]||"payable"===t)&&f.throwArgumentError("invalid modifier","name",t),!1}function m(e,t){for(var r in t)(0,s.defineReadOnly)(e,r,t[r])}var g=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),y=new RegExp(/^(.*)\[([0-9]*)\]$/),b=function(){function e(t,r){(0,o.Z)(this,e),t!==h&&f.throwError("use fromString",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),m(this,r);var n=this.type.match(y);m(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,a.Z)(e,[{key:"format",value:function(e){if(e||(e=g.sighash),g[e]||f.throwArgumentError("invalid format type","format",e),e===g.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!==g.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===g.full?", ":",")+")"):r+=this.type,e!==g.sighash&&(!0===this.indexed&&(r+=" indexed"),e===g.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(h,{name:t.name||null,type:O(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){f.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,u=0;u2&&f.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||f.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=u.O$.from(r[1]),r[0]):e}function E(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 S(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&&f.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&f.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||f.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&&f.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&&f.throwArgumentError("unable to determine stateMutability","value",e),t}var P=function(e){(0,n.Z)(r,e);var t=(0,i.Z)(r);function r(){return(0,o.Z)(this,r),t.apply(this,arguments)}return(0,a.Z)(r,[{key:"format",value:function(e){if(e||(e=g.sighash),g[e]||f.throwArgumentError("invalid format type","format",e),e===g.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===g.sighash&&f.throwError("cannot format a constructor for sighash",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===g.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&&f.throwArgumentError("invalid constructor object","value",e);var t=S(e);t.constant&&f.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(b.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?u.O$.from(e.gas):null};return new r(h,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=x(e,t)).match(R);return n&&"constructor"===n[1].trim()||f.throwArgumentError("invalid constructor string","value",e),t.inputs=w(n[2].trim(),!1),E(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(k),_=function(e){(0,n.Z)(r,e);var t=(0,i.Z)(r);function r(){return(0,o.Z)(this,r),t.apply(this,arguments)}return(0,a.Z)(r,[{key:"format",value:function(e){if(e||(e=g.sighash),g[e]||f.throwArgumentError("invalid format type","format",e),e===g.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!==g.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===g.full?", ":",")+") ",e!==g.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&&f.throwArgumentError("invalid function object","value",e);var t=S(e),n={type:e.type,name:M(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(b.fromObject):[],outputs:e.outputs?e.outputs.map(b.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?u.O$.from(e.gas):null};return new r(h,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=x(e,t)).split(" returns ");n.length>2&&f.throwArgumentError("invalid function string","value",e);var i=n[0].match(R);if(i||f.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&M(t.name),t.inputs=w(i[2],!1),E(i[3].trim(),t),n.length>1){var o=n[1].match(R);""==o[1].trim()&&""==o[3].trim()||f.throwArgumentError("unexpected tokens","value",e),t.outputs=w(o[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(P);function C(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||f.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}var N=function(e){(0,n.Z)(r,e);var t=(0,i.Z)(r);function r(){return(0,o.Z)(this,r),t.apply(this,arguments)}return(0,a.Z)(r,[{key:"format",value:function(e){if(e||(e=g.sighash),g[e]||f.throwArgumentError("invalid format type","format",e),e===g.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!==g.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===g.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&&f.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:M(e.name),inputs:e.inputs?e.inputs.map(b.fromObject):[]};return C(new r(h,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(R);return n||f.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&M(t.name),t.inputs=w(n[2],!1),C(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(k);function O(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var T=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function M(e){return e&&e.match(T)||f.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var R=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},8334:function(e,t,r){"use strict";r.r(t),r.d(t,{AbiCoder:function(){return i.R},ConstructorFragment:function(){return n.Xg},ErrorFragment:function(){return n.IC},EventFragment:function(){return n.QV},FormatTypes:function(){return n.pc},Fragment:function(){return n.HY},FunctionFragment:function(){return n.YW},Indexed:function(){return o.Hk},Interface:function(){return o.vU},LogDescription:function(){return o.CC},ParamType:function(){return n._R},TransactionDescription:function(){return o.vk},checkResultErrors:function(){return a.BR},defaultAbiCoder:function(){return i.$}});var n=r(3165),i=r(5054),o=r(7303),a=r(3198)},7303:function(e,t,r){"use strict";r.d(t,{CC:function(){return y},Hk:function(){return k},vU:function(){return E},vk:function(){return b}});var n=r(3144),i=r(5671),o=r(136),a=r(9388),u=r(7419),s=r(2257),l=r(9716),c=r(1583),f=r(8062),h=r(520),d=r(5054),p=r(3165),v=r(9502),m=r(2056),g=new v.Logger(m.i),y=function(e){(0,o.Z)(r,e);var t=(0,a.Z)(r);function r(){return(0,i.Z)(this,r),t.apply(this,arguments)}return(0,n.Z)(r)}(h.Description),b=function(e){(0,o.Z)(r,e);var t=(0,a.Z)(r);function r(){return(0,i.Z)(this,r),t.apply(this,arguments)}return(0,n.Z)(r)}(h.Description),w=function(e){(0,o.Z)(r,e);var t=(0,a.Z)(r);function r(){return(0,i.Z)(this,r),t.apply(this,arguments)}return(0,n.Z)(r)}(h.Description),k=function(e){(0,o.Z)(r,e);var t=(0,a.Z)(r);function r(){return(0,i.Z)(this,r),t.apply(this,arguments)}return(0,n.Z)(r,null,[{key:"isIndexed",value:function(e){return!(!e||!e._isIndexed)}}]),r}(h.Description),A={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function x(e,t){var r=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return r.error=t,r}var E=function(){function e(t){var r=this;(0,i.Z)(this,e);var n=[];n="string"===typeof t?JSON.parse(t):t,(0,h.defineReadOnly)(this,"fragments",n.map((function(e){return p.HY.from(e)})).filter((function(e){return null!=e}))),(0,h.defineReadOnly)(this,"_abiCoder",(0,h.getStatic)(this instanceof e?this.constructor:void 0,"getAbiCoder")()),(0,h.defineReadOnly)(this,"functions",{}),(0,h.defineReadOnly)(this,"errors",{}),(0,h.defineReadOnly)(this,"events",{}),(0,h.defineReadOnly)(this,"structs",{}),this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":return r.deploy?void g.warn("duplicate definition - constructor"):void(0,h.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]?g.warn("duplicate definition - "+n):t[n]=e})),this.deploy||(0,h.defineReadOnly)(this,"deploy",p.Xg.from({payable:!1,type:"constructor"})),(0,h.defineReadOnly)(this,"_isInterface",!0)}return(0,n.Z)(e,[{key:"format",value:function(e){e||(e=p.pc.full),e===p.pc.sighash&&g.throwArgumentError("interface does not support formatting sighash","format",e);var t=this.fragments.map((function(t){return t.format(e)}));return e===p.pc.json?JSON.stringify(t.map((function(e){return JSON.parse(e)}))):t}},{key:"getFunction",value:function(e){if((0,l.isHexString)(e)){for(var t in this.functions)if(e===this.getSighash(t))return this.functions[t];g.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?g.throwArgumentError("no matching function","name",r):n.length>1&&g.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var i=this.functions[p.YW.fromString(e).format()];return i||g.throwArgumentError("no matching function","signature",e),i}},{key:"getEvent",value:function(e){if((0,l.isHexString)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];g.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?g.throwArgumentError("no matching event","name",n):i.length>1&&g.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}var o=this.events[p.QV.fromString(e).format()];return o||g.throwArgumentError("no matching event","signature",e),o}},{key:"getError",value:function(e){if((0,l.isHexString)(e)){var t=(0,h.getStatic)(this.constructor,"getSighash");for(var r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}g.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?g.throwArgumentError("no matching error","name",n):i.length>1&&g.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}var o=this.errors[p.YW.fromString(e).format()];return o||g.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(r){throw t}}return(0,h.getStatic)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"===typeof e&&(e=this.getEvent(e)),(0,h.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,l.arrayify)(t);return(0,l.hexlify)(r.slice(0,4))!==this.getSighash(e)&&g.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",(0,l.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"===typeof e&&(e=this.getError(e)),(0,l.hexlify)((0,l.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,l.arrayify)(t);return(0,l.hexlify)(r.slice(0,4))!==this.getSighash(e)&&g.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",(0,l.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),(0,l.hexlify)((0,l.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,l.arrayify)(t),n=null,i="",o=null,a=null,u=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(f){}break;case 4:var s=(0,l.hexlify)(r.slice(0,4)),c=A[s];if(c)o=this._abiCoder.decode(c.inputs,r.slice(4)),a=c.name,u=c.signature,c.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 f=this.getError(s);o=this._abiCoder.decode(f.inputs,r.slice(4)),a=f.name,u=f.format()}catch(f){}}return g.throwError("call revert exception"+i,v.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,l.hexlify)(t),errorArgs:o,errorName:a,errorSignature:u,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),(0,l.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&&g.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,c.id)(t):"bytes"===e.type?(0,f.keccak256)((0,l.hexlify)(t)):("bool"===e.type&&"boolean"===typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=s.O$.from(t).toHexString()),"address"===e.type&&r._abiCoder.encode(["address"],[t]),(0,l.hexZeroPad)((0,l.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?g.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&&g.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&&g.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,a){var u=t[a];if(e.indexed)if("string"===e.type)n.push((0,c.id)(u));else if("bytes"===e.type)n.push((0,f.keccak256)(u));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[u]))}else i.push(e),o.push(u)})),{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,l.isHexString)(r[0],32)&&r[0].toLowerCase()===n||g.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(p._R.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(i.push(e),a.push(!1)):(o.push(e),a.push(!1))}));var u=null!=r?this._abiCoder.decode(i,(0,l.concat)(r)):null,s=this._abiCoder.decode(o,t,!0),c=[],f=0,h=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==u)c[t]=new k({_isIndexed:!0,hash:null});else if(a[t])c[t]=new k({_isIndexed:!0,hash:u[h++]});else try{c[t]=u[h++]}catch(n){c[t]=n}else try{c[t]=s[f++]}catch(n){c[t]=n}if(e.name&&null==c[e.name]){var r=c[t];r instanceof Error?Object.defineProperty(c,e.name,{enumerable:!0,get:function(){throw x("property ".concat(JSON.stringify(e.name)),r)}}):c[e.name]=r}}));for(var d=function(e){var t=c[e];t instanceof Error&&Object.defineProperty(c,e,{enumerable:!0,get:function(){throw x("index ".concat(e),t)}})},m=0;m=0)throw e;return h.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",c.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:r})}))),null==r.chainId?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then((function(t){return 0!==t[1]&&t[0]!==t[1]&&h.throwArgumentError("chainId address mismatch","transaction",e),t[0]})),t.next=23,(0,l.resolveProperties)(r);case 23:return t.abrupt("return",t.sent);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"_checkProvider",value:function(e){this.provider||h.throwError("missing provider",c.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}}],[{key:"isSigner",value:function(e){return!(!e||!e._isSigner)}}]),e}(),m=function(e){(0,i.Z)(r,e);var t=(0,o.Z)(r);function r(e,i){var o;return(0,u.Z)(this,r),o=t.call(this),(0,l.defineReadOnly)((0,n.Z)(o),"address",e),(0,l.defineReadOnly)((0,n.Z)(o),"provider",i||null),o}return(0,s.Z)(r,[{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"_fail",value:function(e,t){return Promise.resolve().then((function(){h.throwError(e,c.Logger.errors.UNSUPPORTED_OPERATION,{operation:t})}))}},{key:"signMessage",value:function(e){return this._fail("VoidSigner cannot sign messages","signMessage")}},{key:"signTransaction",value:function(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}},{key:"_signTypedData",value:function(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}},{key:"connect",value:function(e){return new r(this.address,e)}}]),r}(v)},7419:function(e,t,r){"use strict";r.r(t),r.d(t,{getAddress:function(){return v},getContractAddress:function(){return y},getCreate2Address:function(){return b},getIcapAddress:function(){return g},isAddress:function(){return m}});var n=r(9716),i=r(2257),o=r(8062),a=r(7986),u=new(r(9502).Logger)("address/5.7.0");function s(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 l={},c=0;c<10;c++)l[String(c)]=String(c);for(var f=0;f<26;f++)l[String.fromCharCode(65+f)]=String(10+f);var h,d=Math.floor((h=9007199254740991,Math.log10?Math.log10(h):Math.log(h)/Math.LN10));function p(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return l[e]})).join("");t.length>=d;){var r=t.substring(0,d);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 v(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=s(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)!==p(e)&&u.throwArgumentError("bad icap checksum","address",e),t=(0,i.g$)(e.substring(4));t.length<40;)t="0"+t;t=s("0x"+t)}else u.throwArgumentError("invalid address","address",e);return t}function m(e){try{return v(e),!0}catch(t){}return!1}function g(e){for(var t=(0,i.t2)(v(e).substring(2)).toUpperCase();t.length<30;)t="0"+t;return"XE"+p("XE00"+t)+t}function y(e){var t=null;try{t=v(e.from)}catch(s){u.throwArgumentError("missing from address","transaction",e)}var r=(0,n.stripZeros)((0,n.arrayify)(i.O$.from(e.nonce).toHexString()));return v((0,n.hexDataSlice)((0,o.keccak256)((0,a.encode)([t,r])),12))}function b(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),v((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",v(e),t,r])),12))}},7354:function(e,t,r){"use strict";r.d(t,{J:function(){return i},c:function(){return o}});var n=r(9716);function i(e){e=atob(e);for(var t=[],r=0;r0;)r.push(i%this.base),i=i/this.base|0}for(var u="",s=0;0===t[s]&&s=0;--l)u+=this.alphabet[r[l]];return u}},{key:"decode",value:function(e){if("string"!==typeof e)throw new TypeError("Expected String");var t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(var r=0;r>=8;for(;i>0;)t.push(255&i),i>>=8}for(var u=0;e[u]===this._leader&&u0&&(10===arguments[0]?v||(v=!0,f.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?f.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",s.Logger.errors.UNEXPECTED_ARGUMENT,{}):f.throwError("BigNumber.toString does not accept parameters",s.Logger.errors.UNEXPECTED_ARGUMENT,{})),b(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(h,g(t)):t.match(/^-?[0-9]+$/)?new e(h,g(new c(t))):f.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&w("underflow","BigNumber.from",t),(t>=d||t<=-d)&&w("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if((0,u.isBytes)(r))return e.from((0,u.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,u.isHexString)(i)||"-"===i[0]&&(0,u.isHexString)(i.substring(1))))return e.from(i)}return f.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function g(e){if("string"!==typeof e)return g(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&f.throwArgumentError("invalid hex","value",e),"0x00"===(e=g(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 m.from(g(e))}function b(e){var t=m.from(e).toHexString();return"-"===t[0]?new c("-"+t.substring(3),16):new c(t.substring(2),16)}function w(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),f.throwError(e,s.Logger.errors.NUMERIC_FAULT,n)}function k(e){return new c(e,36).toString(16)}function A(e){return new c(e,16).toString(36)}},9716:function(e,t,r){"use strict";r.r(t),r.d(t,{arrayify:function(){return l},concat:function(){return c},hexConcat:function(){return y},hexDataLength:function(){return m},hexDataSlice:function(){return g},hexStripZeros:function(){return w},hexValue:function(){return b},hexZeroPad:function(){return k},hexlify:function(){return v},isBytes:function(){return s},isBytesLike:function(){return a},isHexString:function(){return d},joinSignature:function(){return x},splitSignature:function(){return A},stripZeros:function(){return f},zeroPad:function(){return h}});var n=new(r(9502).Logger)("bytes/5.7.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function a(e){return d(e)&&!(e.length%2)||s(e)}function u(e){return"number"===typeof e&&e==e&&e%1===0}function s(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(!u(e.length)||e.length<0)return!1;for(var t=0;t=256)return!1}return!0}function l(e,t){if(t||(t={}),"number"===typeof e){n.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),o(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),d(e)){var a=e.substring(2);a.length%2&&("left"===t.hexPad?a="0"+a:"right"===t.hexPad?a+="0":n.throwArgumentError("hex data is odd-length","value",e));for(var u=[],l=0;lt&&n.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),o(r)}function d(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}var p="0123456789abcdef";function v(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r=p[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),i(e))return e.toHexString();if(d(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(s(e)){for(var o="0x",a=0;a>4]+p[15&u]}return o}return n.throwArgumentError("invalid hexlify value","value",e)}function m(e){if("string"!==typeof e)e=v(e);else if(!d(e)||e.length%2)return null;return(e.length-2)/2}function g(e,t,r){return"string"!==typeof e?e=v(e):(!d(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function y(e){var t="0x";return e.forEach((function(e){t+=v(e).substring(2)})),t}function b(e){var t=w(v(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function w(e){"string"!==typeof e&&(e=v(e)),d(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function A(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(e)){var r=l(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=v(r.slice(0,32)),t.s=v(r.slice(32,64))):65===r.length?(t.r=v(r.slice(0,32)),t.s=v(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=v(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 i=h(l(t._vs),32);t._vs=v(i);var o=i[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=o:t.recoveryParam!==o&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),i[0]&=127;var u=v(i);null==t.s?t.s=u:t.s!==u&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.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&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&d(t.r)?t.r=k(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&d(t.s)?t.s=k(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);var c=l(t.s);c[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(c[0]|=128);var f=v(c);t._vs&&(d(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=k(t._vs,32)),null==t._vs?t._vs=f:t._vs!==f&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function x(e){return v(c([(e=A(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},5422:function(e,t,r){"use strict";r.d(t,{Bz:function(){return u},_Y:function(){return o},fh:function(){return a},tL:function(){return i}});var n=r(2257),i=n.O$.from(-1),o=n.O$.from(0),a=n.O$.from(1),u=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},4867:function(e,t,r){"use strict";r.d(t,{R:function(){return n}});var n="0x0000000000000000000000000000000000000000000000000000000000000000"},9366:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});var n="hash/5.7.0"},1583:function(e,t,r){"use strict";r.d(t,{id:function(){return o}});var n=r(8062),i=r(3374);function o(e){return(0,n.keccak256)((0,i.Y0)(e))}},1049:function(e,t,r){"use strict";r.r(t),r.d(t,{_TypedDataEncoder:function(){return a.E},dnsEncode:function(){return i.Kn},ensNormalize:function(){return i.w3},hashMessage:function(){return o.r},id:function(){return n.id},isValidName:function(){return i.r1},messagePrefix:function(){return o.B},namehash:function(){return i.VM}});var n=r(1583),i=r(5235),o=r(2273),a=r(5992)},2273:function(e,t,r){"use strict";r.d(t,{B:function(){return a},r:function(){return u}});var n=r(9716),i=r(8062),o=r(3374),a="\x19Ethereum Signed Message:\n";function u(e){return"string"===typeof e&&(e=(0,o.Y0)(e)),(0,i.keccak256)((0,n.concat)([(0,o.Y0)(a),(0,o.Y0)(String(e.length)),e]))}},5235:function(e,t,r){"use strict";r.d(t,{Kn:function(){return F},w3:function(){return L},r1:function(){return D},VM:function(){return B}});var n=r(9716),i=r(3374),o=r(8062),a=r(9502),u=r(9366),s=r(3433),l=r(7762);function c(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 f(e){return function(e){var t=0;return function(){return e[t++]}}(function(e){var t=0;function r(){return e[t++]<<8|e[t++]}for(var n=r(),i=1,o=[0,1],a=1;a>--l&1}for(var h=Math.pow(2,31),d=h>>>1,p=d>>1,v=h-1,m=0,g=0;g<31;g++)m=m<<1|f();for(var y=[],b=0,w=h;;){for(var k=Math.floor(((m-b+1)*i-1)/w),A=0,x=n;x-A>1;){var E=A+x>>>1;k>>1|f(),S=S<<1^d,P=(P^d)<<1|d|1;b=S,w=1+P-S}var _=n-4;return y.map((function(t){switch(t-_){case 3:return _+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return _+256+(e[s++]<<8|e[s++]);case 1:return _+e[s++];default:return t-1}}))}(e))}function h(e){return 1&e?~e>>1:e>>1}function d(e,t){for(var r=Array(e),n=0,i=-1;n>=1),check:2==o}}()}(b),E=45,S=95;function P(e){return(0,i.XL)(e)}function _(e){return e.filter((function(e){return 65039!=e}))}function C(e){var t,r=(0,l.Z)(e.split("."));try{for(r.s();!(t=r.n()).done;){var n=t.value,i=P(n);try{for(var o=i.lastIndexOf(S)-1;o>=0;o--)if(i[o]!==S)throw new Error("underscore only allowed at start");if(i.length>=4&&i.every((function(e){return e<128}))&&i[2]===E&&i[3]===E)throw new Error("invalid label extension")}catch(a){throw new Error('Invalid label "'.concat(n,'": ').concat(a.message))}}}catch(a){r.e(a)}finally{r.f()}return e}function N(e){return C(function(e,t){var r=P(e).reverse(),n=[];for(;r.length;){var i=O(r);if(i)n.push.apply(n,(0,s.Z)(t(i)));else{var o=r.pop();if(w.has(o))n.push(o);else if(!k.has(o)){var a=A[o];if(!a)throw new Error("Disallowed codepoint: 0x".concat(o.toString(16).toUpperCase()));n.push.apply(n,(0,s.Z)(a))}}}return C((u=String.fromCodePoint.apply(String,n),u.normalize("NFC")));var u}(e,_))}function O(e,t){var r,n,i,o=x,a=[],u=e.length;t&&(t.length=0);for(var l=function(){var l=e[--u];if(!(o=null===(r=o.branches.find((function(e){return e.set.has(l)})))||void 0===r?void 0:r.node))return 0;if(o.save)i=l;else if(o.check&&l===i)return 0;a.push(l),o.fe0f&&(a.push(65039),u>0&&65039==e[u-1]&&u--),o.valid&&(n=a.slice(),2==o.valid&&n.splice(1,1),t&&t.push.apply(t,(0,s.Z)(e.slice(u).reverse())),e.length=u)};u&&0!==l(););return n}var T=new a.Logger(u.i),M=new Uint8Array(32);function R(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function I(e){var t=(0,i.Y0)(N(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(R(t.slice(n))),r}function L(e){return I(e).map((function(e){return(0,i.ZN)(e)})).join(".")}function D(e){try{return 0!==I(e).length}catch(t){}return!1}function B(e){"string"!==typeof e&&T.throwArgumentError("invalid ENS name; not a string","name",e);for(var t=M,r=I(e);r.length;)t=(0,o.keccak256)((0,n.concat)([t,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(t)}function F(e){return(0,n.hexlify)((0,n.concat)(I(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"}M.fill(0)},5992:function(e,t,r){"use strict";r.d(t,{E:function(){return N}});var n=r(4165),i=r(5671),o=r(3144),a=r(7419),u=r(2257),s=r(9716),l=r(8062),c=r(520),f=r(9502),h=r(9366),d=r(1583),p=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{s(n.next(e))}catch(t){o(t)}}function u(e){try{s(n.throw(e))}catch(t){o(t)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}s((n=n.apply(e,t||[])).next())}))},v=new f.Logger(h.i),m=new Uint8Array(32);m.fill(0);var g=u.O$.from(-1),y=u.O$.from(0),b=u.O$.from(1),w=u.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var k=(0,s.hexZeroPad)(b.toHexString(),32),A=(0,s.hexZeroPad)(y.toHexString(),32),x={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},E=["name","version","chainId","verifyingContract","salt"];function S(e){return function(t){return"string"!==typeof t&&v.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var P={name:S("name"),version:S("version"),chainId:function(e){try{return u.O$.from(e).toString()}catch(t){}return v.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,a.getAddress)(e).toLowerCase()}catch(t){}return v.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=(0,s.arrayify)(e);if(32!==t.length)throw new Error("bad length");return(0,s.hexlify)(t)}catch(r){}return v.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function _(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))&&v.throwArgumentError("invalid numeric width","type",e);var i=w.mask(r?n-1:n),o=r?i.add(b).mul(g):y;return function(t){var r=u.O$.from(t);return(r.lt(o)||r.gt(i))&&v.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),(0,s.hexZeroPad)(r.toTwos(256).toHexString(),32)}}var c=e.match(/^bytes(\d+)$/);if(c){var f=parseInt(c[1]);return(0===f||f>32||c[1]!==String(f))&&v.throwArgumentError("invalid bytes width","type",e),function(t){return(0,s.arrayify)(t).length!==f&&v.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=(0,s.arrayify)(e),r=t.length%32;return r?(0,s.hexConcat)([t,m.slice(r)]):(0,s.hexlify)(t)}(t)}}switch(e){case"address":return function(e){return(0,s.hexZeroPad)((0,a.getAddress)(e),32)};case"bool":return function(e){return e?k:A};case"bytes":return function(e){return(0,l.keccak256)(e)};case"string":return function(e){return(0,d.id)(e)}}return null}function C(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var N=function(){function e(t){(0,i.Z)(this,e),(0,c.defineReadOnly)(this,"types",Object.freeze((0,c.deepCopy)(t))),(0,c.defineReadOnly)(this,"_encoderCache",{}),(0,c.defineReadOnly)(this,"_types",{});var r={},n={},o={};Object.keys(t).forEach((function(e){r[e]={},n[e]=[],o[e]={}}));var a=function(e){var i={};t[e].forEach((function(o){i[o.name]&&v.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&&v.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),_(a)||(n[a]||v.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),n[a].push(e),r[e][a]=!0)}))};for(var u in t)a(u);var s=Object.keys(n).filter((function(e){return 0===n[e].length}));for(var l in 0===s.length?v.throwArgumentError("missing primary type","types",t):s.length>1&&v.throwArgumentError("ambiguous primary types or unused types: ".concat(s.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),(0,c.defineReadOnly)(this,"primaryType",s[0]),function e(i,a){a[i]&&v.throwArgumentError("circular type reference to ".concat(JSON.stringify(i)),"types",t),a[i]=!0,Object.keys(r[i]).forEach((function(t){n[t]&&(e(t,a),Object.keys(a).forEach((function(e){o[e][t]=!0})))})),delete a[i]}(this.primaryType,{}),o){var f=Object.keys(o[l]);f.sort(),this._types[l]=C(l,t[l])+f.map((function(e){return C(e,t[e])})).join("")}}return(0,o.Z)(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=_(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&&v.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,s.hexConcat)(r))}}var u=this.types[e];if(u){var c=(0,d.id)(this._types[e]);return function(e){var r=u.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,s.hexConcat)(r)}}return v.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||v.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(_(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&&v.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return n._visit(o,e,r)}))}var u=this.types[e];return u?u.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=n._visit(a,t[o],r),e}),{}):v.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=x[n];i||v.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 E.indexOf(e.name)-E.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:r},t)}},{key:"encode",value:function(t,r,n){return(0,s.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,i,o){return p(this,void 0,void 0,(0,n.Z)().mark((function a(){var u,l,f;return(0,n.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:t=(0,c.shallowCopy)(t),u={},t.verifyingContract&&!(0,s.isHexString)(t.verifyingContract,20)&&(u[t.verifyingContract]="0x"),(l=e.from(r)).visit(i,(function(e,t){return"address"!==e||(0,s.isHexString)(t,20)||(u[t]="0x"),t})),a.t0=(0,n.Z)().keys(u);case 6:if((a.t1=a.t0()).done){a.next=13;break}return f=a.t1.value,a.next=10,o(f);case 10:u[f]=a.sent,a.next=6;break;case 13:return t.verifyingContract&&u[t.verifyingContract]&&(t.verifyingContract=u[t.verifyingContract]),i=l.visit(i,(function(e,t){return"address"===e&&u[t]?u[t]:t})),a.abrupt("return",{domain:t,value:i});case 16:case"end":return a.stop()}}),a)})))}},{key:"getPayload",value:function(t,r,n){e.hashDomain(t);var i={},o=[];E.forEach((function(e){var r=t[e];null!=r&&(i[e]=P[e](r),o.push({name:e,type:x[e]}))}));var a=e.from(r),l=(0,c.shallowCopy)(r);return l.EIP712Domain?v.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):l.EIP712Domain=o,a.encode(n),{types:l,domain:i,primaryType:a.primaryType,message:a.visit(n,(function(e,t){if(e.match(/^bytes(\d*)/))return(0,s.hexlify)((0,s.arrayify)(t));if(e.match(/^u?int/))return u.O$.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!==typeof t&&v.throwArgumentError("invalid string","value",t),t}return v.throwArgumentError("unsupported type","type",e)}))}}}]),e}()},5148:function(e,t,r){"use strict";r.r(t),r.d(t,{HDNode:function(){return L},defaultPath:function(){return I},entropyToMnemonic:function(){return F},getAccountPath:function(){return Z},isValidMnemonic:function(){return j},mnemonicToEntropy:function(){return B},mnemonicToSeed:function(){return D}});var n=r(5671),i=r(3144),o=r(3482),a=r(9716),u=r(2257),s=r(3374),l=r(2522),c=r(520),f=r(8865),h=r(9598),d=r(4667),p=r(5452),v=r(136),m=r(9388),g=r(1583),y=r(9502),b=new y.Logger("wordlists/5.7.0"),w=function(){function e(t){(0,n.Z)(this,e),b.checkAbstract(this instanceof e?this.constructor:void 0,e),(0,c.defineReadOnly)(this,"locale",t)}return(0,i.Z)(e,[{key:"split",value:function(e){return e.toLowerCase().split(/ +/g)}},{key:"join",value:function(e){return e.join(" ")}}],[{key:"check",value:function(e){for(var t=[],r=0;r<2048;r++){var n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return(0,g.id)(t.join("\n")+"\n")}},{key:"register",value:function(e,t){t||(t=e.locale)}}]),e}(),k=null;function A(e){if(null==k&&(k="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==w.check(e)))throw k=null,new Error("BIP39 Wordlist for en (English) FAILED")}var x=new(function(e){(0,v.Z)(r,e);var t=(0,m.Z)(r);function r(){return(0,n.Z)(this,r),t.call(this,"en")}return(0,i.Z)(r,[{key:"getWord",value:function(e){return A(this),k[e]}},{key:"getWordIndex",value:function(e){return A(this),k.indexOf(e)}}]),r}(w));w.register(x);var E={en:x},S=new y.Logger("hdnode/5.7.0"),P=u.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),_=(0,s.Y0)("Bitcoin seed"),C=2147483648;function N(e){return(1<=256)throw new Error("Depth too large!");return T((0,a.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,a.hexlify)(this.depth),this.parentFingerprint,(0,a.hexZeroPad)((0,a.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,a.concat)(["0x00",this.privateKey]):this.publicKey]))}},{key:"neuter",value:function(){return new e(R,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}},{key:"_derive",value:function(t){if(t>4294967295)throw new Error("invalid index - "+String(t));var r=this.path;r&&(r+="/"+(t&~C));var n=new Uint8Array(37);if(t&C){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set((0,a.arrayify)(this.privateKey),1),r&&(r+="'")}else n.set((0,a.arrayify)(this.publicKey));for(var i=24;i>=0;i-=8)n[33+(i>>3)]=t>>24-i&255;var o=(0,a.arrayify)((0,h.Gy)(d.p.sha512,this.chainCode,n)),s=o.slice(0,32),l=o.slice(32),c=null,p=null;this.privateKey?c=O(u.O$.from(s).add(this.privateKey).mod(P)):p=new f.SigningKey((0,a.hexlify)(s))._addPoint(this.publicKey);var v=r,m=this.mnemonic;return m&&(v=Object.freeze({phrase:m.phrase,path:r,locale:m.locale||"en"})),new e(R,c,p,this.fingerprint,O(l),t,this.depth+1,v)}},{key:"derivePath",value:function(e){var t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();for(var r=this,n=0;n=C)throw new Error("invalid path index - "+i);r=r._derive(C+o)}else{if(!i.match(/^[0-9]+$/))throw new Error("invalid path component - "+i);var a=parseInt(i);if(a>=C)throw new Error("invalid path index - "+i);r=r._derive(a)}}return r}}],[{key:"_fromSeed",value:function(t,r){var n=(0,a.arrayify)(t);if(n.length<16||n.length>64)throw new Error("invalid seed");var i=(0,a.arrayify)((0,h.Gy)(d.p.sha512,_,n));return new e(R,O(i.slice(0,32)),null,"0x00000000",O(i.slice(32)),0,0,r)}},{key:"fromMnemonic",value:function(t,r,n){return t=F(B(t,n=M(n)),n),e._fromSeed(D(t,r),{phrase:t,path:"m",locale:n.locale})}},{key:"fromSeed",value:function(t){return e._fromSeed(t,null)}},{key:"fromExtendedKey",value:function(t){var r=o.Base58.decode(t);82===r.length&&T(r.slice(0,78))===t||S.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var n=r[4],i=(0,a.hexlify)(r.slice(5,9)),u=parseInt((0,a.hexlify)(r.slice(9,13)).substring(2),16),s=(0,a.hexlify)(r.slice(13,45)),l=r.slice(45,78);switch((0,a.hexlify)(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new e(R,null,(0,a.hexlify)(l),i,s,u,n,null);case"0x0488ade4":case"0x04358394 ":if(0!==l[0])break;return new e(R,(0,a.hexlify)(l.slice(1)),null,i,s,u,n,null)}return S.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}]),e}();function D(e,t){t||(t="");var r=(0,s.Y0)("mnemonic"+t,s.Uj.NFKD);return(0,l.n)((0,s.Y0)(e,s.Uj.NFKD),r,2048,64,"sha512")}function B(e,t){t=M(t),S.checkNormalize();var r=t.split(e);if(r.length%3!==0)throw new Error("invalid mnemonic");for(var n=(0,a.arrayify)(new Uint8Array(Math.ceil(11*r.length/8))),i=0,o=0;o>3]|=1<<7-i%8),i++}var l=32*r.length/3,c=N(r.length/3);if(((0,a.arrayify)((0,h.JQ)(n.slice(0,l/8)))[0]&c)!==(n[n.length-1]&c))throw new Error("invalid checksum");return(0,a.hexlify)(n.slice(0,l/8))}function F(e,t){if(t=M(t),(e=(0,a.arrayify)(e)).length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");for(var r=[0],n=11,i=0;i8?(r[r.length-1]<<=8,r[r.length-1]|=e[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[i]>>8-n,r.push(e[i]&(1<<8-n)-1),n+=3);var o=e.length/4,u=(0,a.arrayify)((0,h.JQ)(e))[0]&N(o);return r[r.length-1]<<=o,r[r.length-1]|=u>>8-o,t.join(r.map((function(e){return t.getWord(e)})))}function j(e,t){try{return B(e,t),!0}catch(r){}return!1}function Z(e){return("number"!==typeof e||e<0||e>=C||e%1)&&S.throwArgumentError("invalid account index","index",e),"m/44'/60'/".concat(e,"'/0/0")}},5382:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});var n="json-wallets/5.7.0"},1529:function(e,t,r){"use strict";r.r(t),r.d(t,{decryptCrowdsale:function(){return w},decryptJsonWallet:function(){return S},decryptJsonWalletSync:function(){return P},decryptKeystore:function(){return E.pe},decryptKeystoreSync:function(){return E.hb},encryptKeystore:function(){return E.HI},getJsonWalletAddress:function(){return x},isCrowdsaleWallet:function(){return k},isKeystoreWallet:function(){return A}});var n=r(5671),i=r(3144),o=r(136),a=r(9388),u=r(468),s=r.n(u),l=r(7419),c=r(9716),f=r(8062),h=r(2522),d=r(3374),p=r(520),v=r(9502),m=r(5382),g=r(8661),y=new v.Logger(m.i),b=function(e){(0,o.Z)(r,e);var t=(0,a.Z)(r);function r(){return(0,n.Z)(this,r),t.apply(this,arguments)}return(0,i.Z)(r,[{key:"isCrowdsaleAccount",value:function(e){return!(!e||!e._isCrowdsaleAccount)}}]),r}(p.Description);function w(e,t){var r=JSON.parse(e);t=(0,g.Ij)(t);var n=(0,l.getAddress)((0,g.gx)(r,"ethaddr")),i=(0,g.p3)((0,g.gx)(r,"encseed"));i&&i.length%16===0||y.throwArgumentError("invalid encseed","json",e);for(var o=(0,c.arrayify)((0,h.n)(t,t,2e3,32,"sha256")).slice(0,16),a=i.slice(0,16),u=i.slice(16),p=new(s().ModeOfOperation.cbc)(o,a),v=s().padding.pkcs7.strip((0,c.arrayify)(p.decrypt(u))),m="",w=0;wu[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=d[15&t[o]];i.push(e+"=Uint8Array(0x"+r+")")}else i.push(e+"="+JSON.stringify(t))}catch(l){i.push(e+"="+JSON.stringify(n[e].toString()))}})),i.push("code=".concat(r)),i.push("version=".concat(this.version));var o=t,u="";switch(r){case f.NUMERIC_FAULT:u="NUMERIC_FAULT";var s=t;switch(s){case"overflow":case"underflow":case"division-by-zero":u+="-"+s;break;case"negative-power":case"negative-width":u+="-unsupported";break;case"unbound-bitwise-result":u+="-unbound-result"}break;case f.CALL_EXCEPTION:case f.INSUFFICIENT_FUNDS:case f.MISSING_NEW:case f.NONCE_EXPIRED:case f.REPLACEMENT_UNDERPRICED:case f.TRANSACTION_REPLACED:case f.UNPREDICTABLE_GAS_LIMIT:u=r}u&&(t+=" [ See: https://links.ethers.org/v5-errors-"+u+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var l=new Error(t);return l.reason=o,l.code=r,Object.keys(n).forEach((function(e){l[e]=n[e]})),l}},{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"),h&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:h})}},{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 l||(l=new e("logger/5.7.0")),l}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}a=!!t,o=!!r}},{key:"setLogLevel",value:function(t){var r=u[t.toLowerCase()];null!=r?s=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();p.errors=f,p.levels=c},2522:function(e,t,r){"use strict";r.d(t,{n:function(){return o}});var n=r(9716),i=r(9598);function o(e,t,r,o,a){var u;e=(0,n.arrayify)(e),t=(0,n.arrayify)(t);var s,l,c=1,f=new Uint8Array(o),h=new Uint8Array(t.length+4);h.set(t);for(var d=1;d<=c;d++){h[t.length]=d>>24&255,h[t.length+1]=d>>16&255,h[t.length+2]=d>>8&255,h[t.length+3]=255&d;var p=(0,n.arrayify)((0,i.Gy)(a,e,h));u||(u=p.length,l=new Uint8Array(u),s=o-((c=Math.ceil(o/u))-1)*u),l.set(p);for(var v=1;v0&&null==e[e.length-1];)e.pop();return e.map((function(e){if(Array.isArray(e)){var t={};e.forEach((function(e){t[z(e)]=!0}));var r=Object.keys(t);return r.sort(),r.join("|")}return z(e)})).join("&")}function K(e){if("string"===typeof e){if(e=e.toLowerCase(),32===(0,A.hexDataLength)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+q(e);if(n.Sg.isForkEvent(e))throw U.warn("not implemented"),new Error("not implemented");if(e&&"object"===typeof e)return"filter:"+(e.address||"*")+":"+q(e.topics||[])}throw new Error("invalid event - "+e)}function H(){return(new Date).getTime()}function G(e){return new Promise((function(t){setTimeout(t,e)}))}var V=["block","network","pending","poll"],W=function(){function e(t,r,n){(0,g.Z)(this,e),(0,S.defineReadOnly)(this,"tag",t),(0,S.defineReadOnly)(this,"listener",r),(0,S.defineReadOnly)(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}return(0,y.Z)(e,[{key:"event",get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}},{key:"type",get:function(){return this.tag.split(":")[0]}},{key:"hash",get:function(){var e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}},{key:"filter",get:function(){var e=this.tag.split(":");if("filter"!==e[0])return null;var t,r=e[1],n=""===(t=e[2])?[]:t.split(/&/g).map((function(e){if(""===e)return[];var t=e.split("|").map((function(e){return"null"===e?null:e}));return 1===t.length?t[0]:t})),i={};return n.length>0&&(i.topics=n),r&&"*"!==r&&(i.address=r),i}},{key:"pollable",value:function(){return this.tag.indexOf(":")>=0||V.indexOf(this.tag)>=0}}]),e}(),J={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Q(e){return(0,A.hexZeroPad)(k.O$.from(e).toHexString(),32)}function Y(e){return w.Base58.encode((0,A.concat)([e,(0,A.hexDataSlice)((0,P.JQ)((0,P.JQ)(e)),0,4)]))}var X=new RegExp("^(ipfs)://(.*)$","i"),$=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),X,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function ee(e,t){try{return(0,_.ZN)(te(e,t))}catch(r){}return null}function te(e,t){if("0x"===e)return null;var r=k.O$.from((0,A.hexDataSlice)(e,t,t+32)).toNumber(),n=k.O$.from((0,A.hexDataSlice)(e,r,r+32)).toNumber();return(0,A.hexDataSlice)(e,r+32,r+32+n)}function re(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):U.throwArgumentError("unsupported IPFS format","link",e),"https://gateway.ipfs.io/ipfs/".concat(e)}function ne(e){var t=(0,A.arrayify)(e);if(t.length>32)throw new Error("internal; should not happen");var r=new Uint8Array(32);return r.set(t,32-t.length),r}function ie(e){if(e.length%32===0)return e;var t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function oe(e){for(var t=[],r=0,n=0;n=1&&a<=75)return Y((0,A.concat)([[r.p2pkh],"0x"+o[2]]))}}if(null!=r.p2sh){var u=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(u){var s=parseInt(u[1],16);if(u[2].length===2*s&&s>=1&&s<=75)return Y((0,A.concat)([[r.p2sh],"0x"+u[2]]))}}if(null!=r.prefix){var l=n[1],c=n[0];if(0===c?20!==l&&32!==l&&(c=-1):c=-1,c>=0&&n.length===2+l&&l>=1&&l<=75){var f=O().toWords(n.slice(2));return f.unshift(c),O().encode(r.prefix,f)}}return null}},{key:"getAddress",value:function(e){return Z(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n,o;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e&&(e=60),60!==e){t.next=16;break}return t.prev=2,t.next=5,this._fetch("0x3b3b57de");case 5:if("0x"!==(r=t.sent)&&r!==x.R){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",this.provider.formatter.callAddress(r));case 11:if(t.prev=11,t.t0=t.catch(2),t.t0.code!==i.Logger.errors.CALL_EXCEPTION){t.next=15;break}return t.abrupt("return",null);case 15:throw t.t0;case 16:return t.next=18,this._fetchBytes("0xf1cb7e06",Q(e));case 18:if(null!=(n=t.sent)&&"0x"!==n){t.next=21;break}return t.abrupt("return",null);case 21:return null==(o=this._getAddress(e,n))&&U.throwError("invalid or unsupported coin data",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")"),coinType:e,data:n}),t.abrupt("return",o);case 24:case"end":return t.stop()}}),t,this,[[2,11]])})))}},{key:"getAvatar",value:function(){return Z(this,void 0,void 0,(0,m.Z)().mark((function e(){var t,r,n,i,o,a,u,s,l,c,f,h,d,p,v,g;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[{type:"name",content:this.name}],e.prev=1,e.next=4,this.getText("avatar");case 4:if(null!=(r=e.sent)){e.next=7;break}return e.abrupt("return",null);case 7:n=0;case 8:if(!(n<$.length)){e.next=91;break}if(null!=(i=r.match($[n]))){e.next=12;break}return e.abrupt("continue",88);case 12:o=i[1].toLowerCase(),e.t0=o,e.next="https"===e.t0?16:"data"===e.t0?18:"ipfs"===e.t0?20:"erc721"===e.t0||"erc1155"===e.t0?22:88;break;case 16:return t.push({type:"url",content:r}),e.abrupt("return",{linkage:t,url:r});case 18:return t.push({type:"data",content:r}),e.abrupt("return",{linkage:t,url:r});case 20:return t.push({type:"ipfs",content:r}),e.abrupt("return",{linkage:t,url:re(r)});case 22:if(a="erc721"===o?"0xc87b56dd":"0x0e89341c",t.push({type:o,content:r}),e.t1=this._resolvedAddress,e.t1){e.next=29;break}return e.next=28,this.getAddress();case 28:e.t1=e.sent;case 29:if(u=e.t1,2===(s=(i[2]||"").split("/")).length){e.next=33;break}return e.abrupt("return",null);case 33:return e.next=35,this.provider.formatter.address(s[0]);case 35:if(l=e.sent,c=(0,A.hexZeroPad)(k.O$.from(s[1]).toHexString(),32),"erc721"!==o){e.next=48;break}return e.t2=this.provider.formatter,e.next=41,this.provider.call({to:l,data:(0,A.hexConcat)(["0x6352211e",c])});case 41:if(e.t3=e.sent,f=e.t2.callAddress.call(e.t2,e.t3),u===f){e.next=45;break}return e.abrupt("return",null);case 45:t.push({type:"owner",content:f}),e.next=57;break;case 48:if("erc1155"!==o){e.next=57;break}return e.t4=k.O$,e.next=52,this.provider.call({to:l,data:(0,A.hexConcat)(["0x00fdd58e",(0,A.hexZeroPad)(u,32),c])});case 52:if(e.t5=e.sent,!(h=e.t4.from.call(e.t4,e.t5)).isZero()){e.next=56;break}return e.abrupt("return",null);case 56:t.push({type:"balance",content:h.toString()});case 57:return d={to:this.provider.formatter.address(s[0]),data:(0,A.hexConcat)([a,c])},e.t6=ee,e.next=61,this.provider.call(d);case 61:if(e.t7=e.sent,null!=(p=(0,e.t6)(e.t7,0))){e.next=65;break}return e.abrupt("return",null);case 65:return t.push({type:"metadata-url-base",content:p}),"erc1155"===o&&(p=p.replace("{id}",c.substring(2)),t.push({type:"metadata-url-expanded",content:p})),p.match(/^ipfs:/i)&&(p=re(p)),t.push({type:"metadata-url",content:p}),e.next=71,(0,C.fetchJson)(p);case 71:if(v=e.sent){e.next=74;break}return e.abrupt("return",null);case 74:if(t.push({type:"metadata",content:JSON.stringify(v)}),"string"===typeof(g=v.image)){e.next=78;break}return e.abrupt("return",null);case 78:if(!g.match(/^(https:\/\/|data:)/i)){e.next=81;break}e.next=86;break;case 81:if(null!=g.match(X)){e.next=84;break}return e.abrupt("return",null);case 84:t.push({type:"url-ipfs",content:g}),g=re(g);case 86:return t.push({type:"url",content:g}),e.abrupt("return",{linkage:t,url:g});case 88:n++,e.next=8;break;case 91:e.next=95;break;case 93:e.prev=93,e.t8=e.catch(1);case 95:return e.abrupt("return",null);case 96:case"end":return e.stop()}}),e,this,[[1,93]])})))}},{key:"getContentHash",value:function(){return Z(this,void 0,void 0,(0,m.Z)().mark((function e(){var t,r,n,o,a,u,s,l,c;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._fetchBytes("0xbc1c58d1");case 2:if(null!=(t=e.sent)&&"0x"!==t){e.next=5;break}return e.abrupt("return",null);case 5:if(!(r=t.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/))){e.next=10;break}if(n=parseInt(r[3],16),r[4].length!==2*n){e.next=10;break}return e.abrupt("return","ipfs://"+w.Base58.encode("0x"+r[1]));case 10:if(!(o=t.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/))){e.next=15;break}if(a=parseInt(o[3],16),o[4].length!==2*a){e.next=15;break}return e.abrupt("return","ipns://"+w.Base58.encode("0x"+o[1]));case 15:if(!(u=t.match(/^0xe40101fa011b20([0-9a-f]*)$/))){e.next=19;break}if(64!==u[1].length){e.next=19;break}return e.abrupt("return","bzz://"+u[1]);case 19:if(!(s=t.match(/^0x90b2c605([0-9a-f]*)$/))){e.next=25;break}if(68!==s[1].length){e.next=25;break}return l={"=":"","+":"-","/":"_"},c=(0,b.c)("0x"+s[1]).replace(/[=+\/]/g,(function(e){return l[e]})),e.abrupt("return","sia://"+c);case 25:return e.abrupt("return",U.throwError("invalid or unsupported content hash data",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t}));case 26:case"end":return e.stop()}}),e,this)})))}},{key:"getText",value:function(e){return Z(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,_.Y0)(e),(r=(0,A.concat)([Q(64),Q(r.length),r])).length%32!==0&&(r=(0,A.concat)([r,(0,A.hexZeroPad)("0x",32-e.length%32)])),t.next=5,this._fetchBytes("0x59d1d43c",(0,A.hexlify)(r));case 5:if(null!=(n=t.sent)&&"0x"!==n){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",(0,_.ZN)(n));case 9:case"end":return t.stop()}}),t,this)})))}}]),e}(),ue=null,se=1,le=function(e){(0,p.Z)(r,e);var t=(0,v.Z)(r);function r(e){var n;if((0,g.Z)(this,r),(n=t.call(this))._events=[],n._emitted={block:-2},n.disableCcipRead=!1,n.formatter=(this instanceof r?this.constructor:void 0).getFormatter(),(0,S.defineReadOnly)((0,d.Z)(n),"anyNetwork","any"===e),n.anyNetwork&&(e=n.detectNetwork()),e instanceof Promise)n._networkPromise=e,e.catch((function(e){})),n._ready().catch((function(e){}));else{var i=(0,S.getStatic)(this instanceof r?this.constructor:void 0,"getNetwork")(e);i?((0,S.defineReadOnly)((0,d.Z)(n),"_network",i),n.emit("network",i,null)):U.throwArgumentError("invalid network","network",e)}return n._maxInternalBlockNumber=-1024,n._lastBlockNumber=-2,n._maxFilterBlockRange=10,n._pollingInterval=4e3,n._fastQueryDate=0,n}return(0,y.Z)(r,[{key:"_ready",value:function(){return Z(this,void 0,void 0,(0,m.Z)().mark((function e(){var t;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=this._network){e.next=17;break}if(t=null,!this._networkPromise){e.next=11;break}return e.prev=3,e.next=6,this._networkPromise;case 6:t=e.sent,e.next=11;break;case 9:e.prev=9,e.t0=e.catch(3);case 11:if(null!=t){e.next=15;break}return e.next=14,this.detectNetwork();case 14:t=e.sent;case 15:t||U.throwError("no network detected",i.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=t:(0,S.defineReadOnly)(this,"_network",t),this.emit("network",t,null));case 17:return e.abrupt("return",this._network);case 18:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"ready",get:function(){var e=this;return(0,C.poll)((function(){return e._ready().then((function(e){return e}),(function(e){if(e.code!==i.Logger.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}))}},{key:"ccipReadFetch",value:function(e,t,r){return Z(this,void 0,void 0,(0,m.Z)().mark((function n(){var o,a,u,s,l,c,f,h,d;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.disableCcipRead&&0!==r.length){n.next=2;break}return n.abrupt("return",null);case 2:o=e.to.toLowerCase(),a=t.toLowerCase(),u=[],s=0;case 6:if(!(s=0?null:JSON.stringify({data:a,sender:o}),n.next=12,(0,C.fetchJson)({url:c,errorPassThrough:!0},f,(function(e,t){return e.status=t.statusCode,e}));case 12:if(!(h=n.sent).data){n.next=15;break}return n.abrupt("return",h.data);case 15:if(d=h.message||"unknown error",!(h.status>=400&&h.status<500)){n.next=18;break}return n.abrupt("return",U.throwError("response not found during CCIP fetch: ".concat(d),i.Logger.errors.SERVER_ERROR,{url:l,errorMessage:d}));case 18:u.push(d);case 19:s++,n.next=6;break;case 22:return n.abrupt("return",U.throwError("error encountered during CCIP fetch: ".concat(u.map((function(e){return JSON.stringify(e)})).join(", ")),i.Logger.errors.SERVER_ERROR,{urls:r,errorMessages:u}));case 23:case"end":return n.stop()}}),n,this)})))}},{key:"_getInternalBlockNumber",value:function(e){return Z(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n,i,o,a=this;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._ready();case 2:if(!(e>0)){t.next=20;break}case 3:if(!this._internalBlockNumber){t.next=20;break}return r=this._internalBlockNumber,t.prev=5,t.next=8,r;case 8:if(n=t.sent,!(H()-n.respTime<=e)){t.next=11;break}return t.abrupt("return",n.blockNumber);case 11:return t.abrupt("break",20);case 14:if(t.prev=14,t.t0=t.catch(5),this._internalBlockNumber!==r){t.next=18;break}return t.abrupt("break",20);case 18:t.next=3;break;case 20:return i=H(),o=(0,S.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((function(e){return null}),(function(e){return e}))}).then((function(e){var t=e.blockNumber,r=e.networkError;if(r)throw a._internalBlockNumber===o&&(a._internalBlockNumber=null),r;var n=H();return(t=k.O$.from(t).toNumber())1e3)U.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(n,")")),this.emit("error",U.makeError("network block skew detected",i.Logger.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(o=this._emitted.block+1;o<=n;o++)this.emit("block",o);return this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach((function(e){if("block"!==e){var t=a._emitted[e];"pending"!==t&&n-t>12&&delete a._emitted[e]}}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=n-1),this._events.forEach((function(e){switch(e.type){case"tx":var t=e.hash,i=a.getTransactionReceipt(t).then((function(e){return e&&null!=e.blockNumber?(a._emitted["t:"+t]=e.blockNumber,a.emit(t,e),null):null})).catch((function(e){a.emit("error",e)}));r.push(i);break;case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=n-1);var o=e.filter;o.fromBlock=e._lastBlockNumber+1,o.toBlock=n;var u=o.toBlock-a._maxFilterBlockRange;u>o.fromBlock&&(o.fromBlock=u),o.fromBlock<0&&(o.fromBlock=0);var s=a.getLogs(o).then((function(t){e._inflight=!1,0!==t.length&&t.forEach((function(t){t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),a._emitted["b:"+t.blockHash]=t.blockNumber,a._emitted["t:"+t.transactionHash]=t.blockNumber,a.emit(o,t)}))})).catch((function(t){a.emit("error",t),e._inflight=!1}));r.push(s)}}})),this._lastBlockNumber=n,Promise.all(r).then((function(){a.emit("didPoll",t)})).catch((function(e){a.emit("error",e)})),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"resetEventsBlock",value:function(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}},{key:"network",get:function(){return this._network}},{key:"detectNetwork",value:function(){return Z(this,void 0,void 0,(0,m.Z)().mark((function e(){return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",U.throwError("provider does not support network detection",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"}));case 1:case"end":return e.stop()}}),e)})))}},{key:"getNetwork",value:function(){return Z(this,void 0,void 0,(0,m.Z)().mark((function e(){var t,r,n;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready();case 2:return t=e.sent,e.next=5,this.detectNetwork();case 5:if(r=e.sent,t.chainId===r.chainId){e.next=23;break}if(!this.anyNetwork){e.next=20;break}return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,t),e.next=19,G(0);case 19:return e.abrupt("return",this._network);case 20:throw n=U.makeError("underlying network changed",i.Logger.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:r}),this.emit("error",n),n;case 23:return e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"blockNumber",get:function(){var e=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then((function(t){e._setFastBlockNumber(t)}),(function(e){})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}},{key:"polling",get:function(){return null!=this._poller},set:function(e){var t=this;e&&!this._poller?(this._poller=setInterval((function(){t.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((function(){t.poll(),t._bootstrapPoll=setTimeout((function(){t._poller||t.poll(),t._bootstrapPoll=null}),t.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(e){var t=this;if("number"!==typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){t.poll()}),this._pollingInterval))}},{key:"_getFastBlockNumber",value:function(){var e=this,t=H();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise}},{key:"_setFastBlockNumber",value:function(e){null!=this._fastBlockNumber&ðis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}},{key:"waitForTransaction",value:function(e,t,r){return Z(this,void 0,void 0,(0,m.Z)().mark((function n(){return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this._waitForTransaction(e,null==t?1:t,r||0,null));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"_waitForTransaction",value:function(e,t,r,n){return Z(this,void 0,void 0,(0,m.Z)().mark((function o(){var a,u=this;return(0,m.Z)().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.getTransactionReceipt(e);case 2:if(!(((a=o.sent)?a.confirmations:0)>=t)){o.next=5;break}return o.abrupt("return",a);case 5:return o.abrupt("return",new Promise((function(o,a){var s=[],l=!1,c=function(){return!!l||(l=!0,s.forEach((function(e){e()})),!1)},f=function(e){e.confirmations0){var v=setTimeout((function(){c()||a(U.makeError("timeout exceeded",i.Logger.errors.TIMEOUT,{timeout:r}))}),r);v.unref&&v.unref(),s.push((function(){clearTimeout(v)}))}})));case 6:case"end":return o.stop()}}),o,this)})))}},{key:"getBlockNumber",value:function(){return Z(this,void 0,void 0,(0,m.Z)().mark((function e(){return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._getInternalBlockNumber(0));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getGasPrice",value:function(){return Z(this,void 0,void 0,(0,m.Z)().mark((function e(){var t;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,this.perform("getGasPrice",{});case 4:return t=e.sent,e.prev=5,e.abrupt("return",k.O$.from(t));case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",U.throwError("bad result from backend",i.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e.t0}));case 12:case"end":return e.stop()}}),e,this,[[5,9]])})))}},{key:"getBalance",value:function(e,t){return Z(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,o;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,(0,S.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getBalance",n);case 7:return o=r.sent,r.prev=8,r.abrupt("return",k.O$.from(o));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",U.throwError("bad result from backend",i.Logger.errors.SERVER_ERROR,{method:"getBalance",params:n,result:o,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getTransactionCount",value:function(e,t){return Z(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,o;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,(0,S.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getTransactionCount",n);case 7:return o=r.sent,r.prev=8,r.abrupt("return",k.O$.from(o).toNumber());case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",U.throwError("bad result from backend",i.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:o,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getCode",value:function(e,t){return Z(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,o;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,(0,S.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getCode",n);case 7:return o=r.sent,r.prev=8,r.abrupt("return",(0,A.hexlify)(o));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",U.throwError("bad result from backend",i.Logger.errors.SERVER_ERROR,{method:"getCode",params:n,result:o,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getStorageAt",value:function(e,t,r){return Z(this,void 0,void 0,(0,m.Z)().mark((function n(){var o,a;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,(0,S.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((function(e){return(0,A.hexValue)(e)}))});case 4:return o=n.sent,n.next=7,this.perform("getStorageAt",o);case 7:return a=n.sent,n.prev=8,n.abrupt("return",(0,A.hexlify)(a));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",U.throwError("bad result from backend",i.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:o,result:a,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"_wrapTransaction",value:function(e,t,r){var n=this;if(null!=t&&32!==(0,A.hexDataLength)(t))throw new Error("invalid response - sendTransaction");var o=e;return null!=t&&e.hash!==t&&U.throwError("Transaction hash mismatch from Provider.sendTransaction.",i.Logger.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),o.wait=function(t,o){return Z(n,void 0,void 0,(0,m.Z)().mark((function n(){var a,u;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==t&&(t=1),null==o&&(o=0),a=void 0,0!==t&&null!=r&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r}),n.next=6,this._waitForTransaction(e.hash,t,o,a);case 6:if(null!=(u=n.sent)||0!==t){n.next=9;break}return n.abrupt("return",null);case 9:return this._emitted["t:"+e.hash]=u.blockNumber,0===u.status&&U.throwError("transaction failed",i.Logger.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:u}),n.abrupt("return",u);case 12:case"end":return n.stop()}}),n,this)})))},o}},{key:"sendTransaction",value:function(e){return Z(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n,i,o;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,Promise.resolve(e).then((function(e){return(0,A.hexlify)(e)}));case 4:return r=t.sent,null==(n=this.formatter.transaction(e)).confirmations&&(n.confirmations=0),t.next=9,this._getInternalBlockNumber(100+2*this.pollingInterval);case 9:return i=t.sent,t.prev=10,t.next=13,this.perform("sendTransaction",{signedTransaction:r});case 13:return o=t.sent,t.abrupt("return",this._wrapTransaction(n,o,i));case 17:throw t.prev=17,t.t0=t.catch(10),t.t0.transaction=n,t.t0.transactionHash=n.hash,t.t0;case 22:case"end":return t.stop()}}),t,this,[[10,17]])})))}},{key:"_getTransactionRequest",value:function(e){return Z(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n,i=this;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return r=t.sent,n={},["from","to"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?i._getAddress(e):null})))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?k.O$.from(e):null})))})),["type"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return null!=e?e:null})))})),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?(0,A.hexlify)(e):null})))})),t.t0=this.formatter,t.next=12,(0,S.resolveProperties)(n);case 12:return t.t1=t.sent,t.abrupt("return",t.t0.transactionRequest.call(t.t0,t.t1));case 14:case"end":return t.stop()}}),t,this)})))}},{key:"_getFilter",value:function(e){return Z(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n=this;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,r={},null!=e.address&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach((function(t){null!=e[t]&&(r[t]=e[t])})),["fromBlock","toBlock"].forEach((function(t){null!=e[t]&&(r[t]=n._getBlockTag(e[t]))})),t.t0=this.formatter,t.next=10,(0,S.resolveProperties)(r);case 10:return t.t1=t.sent,t.abrupt("return",t.t0.filter.call(t.t0,t.t1));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"_call",value:function(e,t,r){return Z(this,void 0,void 0,(0,m.Z)().mark((function n(){var o,a,u,s,l,c,f,h,d,p,v,g,y,b,w;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r>=10&&U.throwError("CCIP read exceeded maximum redirections",i.Logger.errors.SERVER_ERROR,{redirects:r,transaction:e}),o=e.to,n.next=4,this.perform("call",{transaction:e,blockTag:t});case 4:if(a=n.sent,!(r>=0&&"latest"===t&&null!=o&&"0x556f1830"===a.substring(0,10)&&(0,A.hexDataLength)(a)%32===4)){n.next=31;break}for(n.prev=6,u=(0,A.hexDataSlice)(a,4),s=(0,A.hexDataSlice)(u,0,32),k.O$.from(s).eq(o)||U.throwError("CCIP Read sender did not match",i.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:a}),l=[],c=k.O$.from((0,A.hexDataSlice)(u,32,64)).toNumber(),f=k.O$.from((0,A.hexDataSlice)(u,c,c+32)).toNumber(),h=(0,A.hexDataSlice)(u,c+32),d=0;d