@dodoex/wallet-web3 0.0.55-beta-entry.2 → 0.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{alchemy-provider-5870b6fa-c3458ce0.js → alchemy-provider-5870b6fa-13b8091b.js} +1 -1
- package/dist/{alchemy-websocket-provider-213da986-b76aadd7.js → alchemy-websocket-provider-213da986-092050ee.js} +1 -1
- package/dist/{blocto-8dcd5378.js → blocto-f6fc9aea.js} +1 -1
- package/dist/{ccip-2cdc0e6e.js → ccip-84b0dbe4.js} +1 -1
- package/dist/cjs/{alchemy-provider-5870b6fa-22229235.cjs → alchemy-provider-5870b6fa-64336a96.cjs} +1 -1
- package/dist/cjs/{alchemy-websocket-provider-213da986-d0bd62ee.cjs → alchemy-websocket-provider-213da986-a3b55d08.cjs} +1 -1
- package/dist/cjs/{blocto-9189db02.cjs → blocto-ac41246e.cjs} +1 -1
- package/dist/cjs/{ccip-cf4c8958.cjs → ccip-50cb6906.cjs} +1 -1
- package/dist/cjs/controllers/ConnectController.d.ts +6 -11
- package/dist/cjs/core/index.d.ts +2 -4
- package/dist/cjs/{draggabilly-4a795874.cjs → draggabilly-e7ced507.cjs} +1 -1
- package/dist/cjs/hash-808c8802.cjs +1 -0
- package/dist/cjs/id-9a0a1e7a.cjs +1 -0
- package/dist/cjs/index-187635d5.cjs +72 -0
- package/dist/cjs/index-1ed42dfb.cjs +1 -0
- package/dist/cjs/{index-8df03db9.cjs → index-2116322f.cjs} +2 -2
- package/dist/cjs/{index-63281f6f.cjs → index-431eafaf.cjs} +1 -1
- package/dist/cjs/{index-1d309dce.cjs → index-6311dfd3.cjs} +1 -1
- package/dist/cjs/{index-458ec813.cjs → index-797e10d2.cjs} +1 -1
- package/dist/cjs/index-8ff359b4.cjs +6 -0
- package/dist/cjs/{index-b289395f.cjs → index-bc5b594f.cjs} +1 -1
- package/dist/cjs/index-cdc94a75.cjs +28 -0
- package/dist/cjs/{index-d229b8b4.cjs → index-ee4bfece.cjs} +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-f9414662.cjs → index.es-405d08ac.cjs} +1 -1
- package/dist/cjs/inherits_browser-38fa9d17.cjs +1 -0
- package/dist/cjs/{interface-af41c890.cjs → interface-f3e26846.cjs} +1 -1
- package/dist/cjs/{lib-typedarrays-b768ceaf.cjs → lib-typedarrays-73e8b914.cjs} +1 -1
- package/dist/cjs/{portis-e8a9cfb5.cjs → portis-61c3d3b4.cjs} +1 -1
- package/dist/cjs/{provider-bc656af9.cjs → provider-9eb163e3.cjs} +1 -1
- package/dist/cjs/providers/connector/alchemy/index.d.ts +12 -8
- package/dist/cjs/providers/connector/alchemy/provider.d.ts +12 -8
- package/dist/cjs/providers/connector/index.d.ts +12 -8
- package/dist/cjs/providers/wallets/index.d.ts +1 -3
- package/dist/cjs/providers/wallets/types.d.ts +0 -2
- package/dist/cjs/{rainbow-3b59bcb8.cjs → rainbow-33ee3015.cjs} +1 -1
- package/dist/cjs/sha224-7b52a06c.cjs +1 -0
- package/dist/cjs/{sha256-56f21b8c.cjs → sha256-05927a0c.cjs} +1 -1
- package/dist/cjs/{typed-data-a777dbe1.cjs → typed-data-757a1f81.cjs} +1 -1
- package/dist/cjs/uAuth-6fb05f6c.cjs +1 -0
- package/dist/cjs/{walletConnect-59deaaa7.cjs → walletConnect-25b4005b.cjs} +1 -1
- package/dist/cjs/walletLink-00ebda9a.cjs +3 -0
- package/dist/controllers/ConnectController.d.ts +6 -11
- package/dist/core/index.d.ts +2 -4
- package/dist/{draggabilly-36d7b3a5.js → draggabilly-0d779ed7.js} +1 -1
- package/dist/hash-92ae3757.js +1 -0
- package/dist/id-e3e24f85.js +1 -0
- package/dist/{index-0a7c220d.js → index-0d9deec3.js} +1 -1
- package/dist/index-2c8fd538.js +28 -0
- package/dist/{index-3e23698a.js → index-35578e2d.js} +1 -1
- package/dist/index-3ab5d29e.js +6 -0
- package/dist/index-44de3ecf.js +72 -0
- package/dist/{index-7e946bf1.js → index-745cc73f.js} +1 -1
- package/dist/index-8fd2e408.js +1 -0
- package/dist/{index-b967e22c.js → index-9c4f1453.js} +1 -1
- package/dist/{index-b6011204.js → index-aa945484.js} +2 -2
- package/dist/index-f20d44fd.js +1 -0
- package/dist/{index.es-68fc128f.js → index.es-b1d1827b.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/inherits_browser-76e61e9e.js +1 -0
- package/dist/{interface-746c1865.js → interface-36186c54.js} +1 -1
- package/dist/{lib-typedarrays-5c5921fd.js → lib-typedarrays-ed0a9813.js} +1 -1
- package/dist/{portis-00d754f6.js → portis-63bd0722.js} +1 -1
- package/dist/{provider-4fe47dba.js → provider-d2bfbaca.js} +1 -1
- package/dist/providers/connector/alchemy/index.d.ts +12 -8
- package/dist/providers/connector/alchemy/provider.d.ts +12 -8
- package/dist/providers/connector/index.d.ts +12 -8
- package/dist/providers/wallets/index.d.ts +1 -3
- package/dist/providers/wallets/types.d.ts +0 -2
- package/dist/{rainbow-ba579cad.js → rainbow-41587daa.js} +1 -1
- package/dist/{sha224-ee67389b.js → sha224-b6089413.js} +1 -1
- package/dist/{sha256-6b5b8897.js → sha256-5f9a69f1.js} +1 -1
- package/dist/{typed-data-a96333aa.js → typed-data-4f5fbd06.js} +1 -1
- package/dist/uAuth-b64c1eab.js +1 -0
- package/dist/{walletConnect-6b2a7a4e.js → walletConnect-12293a0d.js} +1 -1
- package/dist/walletLink-66dc8df8.js +3 -0
- package/package.json +1 -1
- package/dist/cjs/id-5a06c725.cjs +0 -1
- package/dist/cjs/index-0d59d3a4.cjs +0 -37
- package/dist/cjs/index-2b5e634c.cjs +0 -1
- package/dist/cjs/index-32e6540a.cjs +0 -28
- package/dist/cjs/index-f92b0bd8.cjs +0 -6
- package/dist/cjs/sha224-542ed113.cjs +0 -1
- package/dist/cjs/uAuth-977cd558.cjs +0 -1
- package/dist/cjs/walletLink-8c611440.cjs +0 -3
- package/dist/id-cb48006b.js +0 -1
- package/dist/index-36aa5fe1.js +0 -37
- package/dist/index-7646623f.js +0 -1
- package/dist/index-8af79cad.js +0 -6
- package/dist/index-8c308a55.js +0 -1
- package/dist/index-98d378b6.js +0 -28
- package/dist/uAuth-6ea836c7.js +0 -1
- package/dist/walletLink-8d027247.js +0 -3
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./index-32e6540a.cjs"),t=require("./sha256-56f21b8c.cjs"),r=require("./lib-typedarrays-b768ceaf.cjs"),n=require("./interface-af41c890.cjs");require("@ethersproject/providers"),require("zustand"),require("@ethersproject/bytes"),require("@ethersproject/properties"),require("@ethersproject/address"),require("@ethersproject/abstract-signer"),require("buffer"),require("@ethersproject/abstract-provider"),require("@ethersproject/contracts"),require("events"),require("@ethersproject/constants"),require("@ethersproject/transactions"),require("./_commonjs-dynamic-modules-f09a98c7.cjs"),require("./id-5a06c725.cjs");var i=Object.freeze({__proto__:null,ConstructorFragment:n.ConstructorFragment,ErrorFragment:n.ErrorFragment,EventFragment:n.EventFragment,Fragment:n.Fragment,FunctionFragment:n.FunctionFragment,ParamType:n.ParamType,FormatTypes:n.FormatTypes,AbiCoder:n.AbiCoder,defaultAbiCoder:n.defaultAbiCoder,Interface:n.Interface,Indexed:n.Indexed,checkResultErrors:n.checkResultErrors,LogDescription:n.LogDescription,TransactionDescription:n.TransactionDescription}),a=function(){function e(t){void 0===t&&(t=e.defaultCreateUrl),this.createURL=void 0,this.createURL=t}return e.defaultCreateUrl=function(e,t){return"https://"+e+".ipns.dweb.link"+t.replace(/^\/?/,"/")},e.prototype.resolve=function(e){try{var t,r,n;if(e.startsWith("/ipfs/")||e.startsWith("/ipns/"))n=e.substring(1,5),t=e.substring(6).split("/")[0],r=e.substring(6+t.length);else{var i=new URL(e);if(""!==i.hash||""!==i.password||""!==i.port||""!==i.search||""!==i.username)throw new Error("invalid ipfs uri");n=i.protocol.substring(0,4),t=i.hostname,r=i.pathname}if("ipfs"!==n)throw new Error("only ipfs is supported, (not ipns)");return Promise.resolve(fetch(this.createURL(t,r)).then((function(e){return e.ok?e.text():Promise.reject(new Error("bad response"))})))}catch(e){return Promise.reject(e)}},e}(),o=function(){function e(e){this.options=void 0,this.options=e}return e.prototype.resolve=function(e,t){try{var r,n="";if(e.includes("@")){var i=e.split("@",1);n=i[0],r=i[1]}else r=e;var a="http://openid.net/specs/connect/1.0/issuer";return Promise.resolve(this.options.webfingerResolver.resolve(r,n,a,t)).then((function(e){var t,r=null==(t=e.links)?void 0:t.find((function(e){return e.rel===a}));if(!r||!r.href)throw new Error("bad jrd");return Promise.resolve(fetch(r.href+"/.well-known/openid-configuration").then((function(e){return e.ok?e.json():Promise.reject(new Error("bad openid-configuration response"))})))}))}catch(e){return Promise.reject(e)}},e}();function d(e,t,r){if(!e.s){if(r instanceof s){if(!r.s)return void(r.o=d.bind(null,e,t));1&t&&(t=r.s),r=r.v}if(r&&r.then)return void r.then(d.bind(null,e,t),d.bind(null,e,2));e.s=t,e.v=r;const n=e.o;n&&n(e)}}var s=function(){function e(){}return e.prototype.then=function(t,r){var n=new e,i=this.s;if(i){var a=1&i?t:r;if(a){try{d(n,1,a(this.v))}catch(e){d(n,2,e)}return n}return this}return this.o=function(e){try{var i=e.v;1&e.s?d(n,1,t?t(i):i):r?d(n,1,r(i)):d(n,2,i)}catch(e){d(n,2,e)}},n},e}();if("undefined"!=typeof window){var c=window;c.UAUTH_VERSION=c.UAUTH_VERSION||{},c.UAUTH_VERSION.COMMON="2.3.0"}var u=function(){function e(e){this.options=void 0,this.options=e}return e.prototype.resolve=function(e,t,r,n){try{var i=this,a="webfinger."+t+"."+r;return Promise.resolve(i.options.domainResolver.records(e,[a])).then((function(o){function c(e){if(f.subject!==u)throw new Error("resource invalid");return f}var u=t?"acct:"+t+"@"+e:""+e;if(!o[a])return{subject:u,links:[{rel:r,href:n}]};var f,l=JSON.parse(o[a]),h="string"==typeof l.host?Promise.resolve(fetch("/.well-known/webfinger?"+new URLSearchParams({resource:u,rel:r}).toString(),{headers:{Host:l.host}}).then((function(e){return e.ok?e.json():Promise.reject(new Error("bad webfinger response"))}))).then((function(e){f=e})):function(){if("string"==typeof l.uri){var e=new URL(l.uri);return function(e,t){var r,n=-1;e:{for(var i=0;i<t.length;i++){var a=t[i][0];if(a){var o=a();if(o&&o.then)break e;if(o===e){n=i;break}}else n=i}if(-1!==n){do{for(var c=t[n][1];!c;)n++,c=t[n][1];var u=c();if(u&&u.then){r=!0;break e}var f=t[n][2];n++}while(f&&!f());return u}}var l=new s,h=d.bind(null,l,2);return(r?u.then(p):o.then((function r(o){for(;;){if(o===e){n=i;break}if(++i===t.length){if(-1!==n)break;return void d(l,1,c)}if(a=t[i][0]){if((o=a())&&o.then)return void o.then(r).then(void 0,h)}else n=i}do{for(var s=t[n][1];!s;)n++,s=t[n][1];var c=s();if(c&&c.then)return void c.then(p).then(void 0,h);var u=t[n][2];n++}while(u&&!u());d(l,1,c)}))).then(void 0,h),l;function p(e){for(;;){var r=t[n][2];if(!r||r())break;n++;for(var i=t[n][1];!i;)n++,i=t[n][1];if((e=i())&&e.then)return void e.then(p).then(void 0,h)}d(l,1,e)}}(e.protocol,[[function(){return"http:"}],[function(){return"https:"},function(){return Promise.resolve(fetch(e.toString()).then((function(e){return e.ok?e.json():Promise.reject(new Error("bad webfinger response"))}))).then((function(e){f=e}))}],[function(){return"ipfs:"},function(){return Promise.resolve(i.options.ipfsResolver.resolve(l.uri)).then((function(e){f=JSON.parse(e)}))}],[function(){return"ipns:"}],[function(){return"swarm:"}],[void 0,function(){throw new Error("uri scheme not supported")}]])}if("string"!=typeof l.value)throw new Error("bad webfinger record");f=JSON.parse(l.value)}();return h&&h.then?h.then(c):c()}))}catch(e){return Promise.reject(e)}},e}(),f={},l={},h={exports:{}};!function(t,r){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof t?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:e.require$$1.Buffer}catch(e){}function d(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=d(e,r);return r-1>=t&&(n|=d(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o<a;o++){var d=e.charCodeAt(o)-48;i*=n,i+=d>=49?d-49+10:d>=17?d-17+10:d}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,d=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<d&67108863,this.words[a+1]=o>>>26-d&67108863,(d+=24)>=26&&(d-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<d&67108863,this.words[a+1]=o>>>26-d&67108863,(d+=24)>=26&&(d-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,a=0,o=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=s(e,t,n)<<a,this.words[o]|=67108863&i,a>=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=s(e,t,n)<<a,this.words[o]|=67108863&i,a>=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,d=Math.min(a,a-o)+r,s=0,u=r;u<d;u+=n)s=c(e,u,u+n,t),this.imuln(i),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s);if(0!==o){var f=1;for(s=c(e,u,e.length,t),u=0;u<o;u++)f*=t;this.imuln(f),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s)}this.strip()},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,d=67108863&o,s=o/67108864|0;r.words[0]=d;for(var c=1;c<n;c++){for(var u=s>>>26,f=67108863&s,l=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=l;h++){var p=c-h|0;u+=(o=(i=0|e.words[p])*(a=0|t.words[h])+f)/67108864|0,f=67108863&o}r.words[c]=0|f,s=0|u}return 0!==s?r.words[c]=0|s:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var d=this.words[o],s=(16777215&(d<<i|a)).toString(16);r=0!=(a=d>>>24-i&16777215)||o!==this.length-1?u[6-s.length]+s+r:s+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,d,s="le"===t,c=new e(a),u=this.clone();if(s){for(d=0;!u.isZero();d++)o=u.andln(255),u.iushrn(8),c[d]=o;for(;d<a;d++)c[d]=0}else{for(d=0;d<a-i;d++)c[d]=0;for(d=0;!u.isZero();d++)o=u.andln(255),u.iushrn(8),c[a-d-1]=o}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)a=(t=(0|r.words[o])-(0|n.words[o])+a)>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)a=(t=(0|r.words[o])+a)>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,a,o=e.words,d=t.words,s=r.words,c=0,u=0|o[0],f=8191&u,l=u>>>13,h=0|o[1],p=8191&h,m=h>>>13,v=0|o[2],y=8191&v,b=v>>>13,g=0|o[3],w=8191&g,A=g>>>13,M=0|o[4],R=8191&M,x=M>>>13,S=0|o[5],N=8191&S,E=S>>>13,_=0|o[6],C=8191&_,T=_>>>13,P=0|o[7],k=8191&P,K=P>>>13,D=0|o[8],F=8191&D,I=D>>>13,B=0|o[9],j=8191&B,O=B>>>13,U=0|d[0],L=8191&U,z=U>>>13,H=0|d[1],G=8191&H,q=H>>>13,$=0|d[2],J=8191&$,X=$>>>13,Z=0|d[3],V=8191&Z,W=Z>>>13,Y=0|d[4],Q=8191&Y,ee=Y>>>13,te=0|d[5],re=8191&te,ne=te>>>13,ie=0|d[6],ae=8191&ie,oe=ie>>>13,de=0|d[7],se=8191&de,ce=de>>>13,ue=0|d[8],fe=8191&ue,le=ue>>>13,he=0|d[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ve=(c+(n=Math.imul(f,L))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(l,L)|0))<<13)|0;c=((a=Math.imul(l,z))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(p,L),i=(i=Math.imul(p,z))+Math.imul(m,L)|0,a=Math.imul(m,z);var ye=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,G)|0))<<13)|0;c=((a=a+Math.imul(l,q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,L),i=(i=Math.imul(y,z))+Math.imul(b,L)|0,a=Math.imul(b,z),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,G)|0,a=a+Math.imul(m,q)|0;var be=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,J)|0))<<13)|0;c=((a=a+Math.imul(l,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,L),i=(i=Math.imul(w,z))+Math.imul(A,L)|0,a=Math.imul(A,z),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,G)|0,a=a+Math.imul(b,q)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,X)|0;var ge=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(l,V)|0))<<13)|0;c=((a=a+Math.imul(l,W)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(R,L),i=(i=Math.imul(R,z))+Math.imul(x,L)|0,a=Math.imul(x,z),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(A,G)|0,a=a+Math.imul(A,q)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,X)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0;var we=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((a=a+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(N,L),i=(i=Math.imul(N,z))+Math.imul(E,L)|0,a=Math.imul(E,z),n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(x,G)|0,a=a+Math.imul(x,q)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(A,J)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,a=a+Math.imul(b,W)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0;var Ae=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((a=a+Math.imul(l,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(C,L),i=(i=Math.imul(C,z))+Math.imul(T,L)|0,a=Math.imul(T,z),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(E,G)|0,a=a+Math.imul(E,q)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,X)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(A,V)|0,a=a+Math.imul(A,W)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,a=a+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0;var Me=(c+(n=n+Math.imul(f,ae)|0)|0)+((8191&(i=(i=i+Math.imul(f,oe)|0)+Math.imul(l,ae)|0))<<13)|0;c=((a=a+Math.imul(l,oe)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(k,L),i=(i=Math.imul(k,z))+Math.imul(K,L)|0,a=Math.imul(K,z),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,q)|0,n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,X)|0,n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(x,V)|0,a=a+Math.imul(x,W)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0;var Re=(c+(n=n+Math.imul(f,se)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(l,se)|0))<<13)|0;c=((a=a+Math.imul(l,ce)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(F,L),i=(i=Math.imul(F,z))+Math.imul(I,L)|0,a=Math.imul(I,z),n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,q)|0)+Math.imul(K,G)|0,a=a+Math.imul(K,q)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(x,Q)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(y,ae)|0,i=(i=i+Math.imul(y,oe)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0,n=n+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,se)|0,a=a+Math.imul(m,ce)|0;var xe=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;c=((a=a+Math.imul(l,le)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,L),i=(i=Math.imul(j,z))+Math.imul(O,L)|0,a=Math.imul(O,z),n=n+Math.imul(F,G)|0,i=(i=i+Math.imul(F,q)|0)+Math.imul(I,G)|0,a=a+Math.imul(I,q)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(K,J)|0,a=a+Math.imul(K,X)|0,n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(T,V)|0,a=a+Math.imul(T,W)|0,n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(y,se)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(b,se)|0,a=a+Math.imul(b,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,fe)|0,a=a+Math.imul(m,le)|0;var Se=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(l,pe)|0))<<13)|0;c=((a=a+Math.imul(l,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,q))+Math.imul(O,G)|0,a=Math.imul(O,q),n=n+Math.imul(F,J)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(K,V)|0,a=a+Math.imul(K,W)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(T,Q)|0,a=a+Math.imul(T,ee)|0,n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,n=n+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,oe)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,oe)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,se)|0,a=a+Math.imul(A,ce)|0,n=n+Math.imul(y,fe)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(b,fe)|0,a=a+Math.imul(b,le)|0;var Ne=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((a=a+Math.imul(m,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,X))+Math.imul(O,J)|0,a=Math.imul(O,X),n=n+Math.imul(F,V)|0,i=(i=i+Math.imul(F,W)|0)+Math.imul(I,V)|0,a=a+Math.imul(I,W)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(K,Q)|0,a=a+Math.imul(K,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(T,re)|0,a=a+Math.imul(T,ne)|0,n=n+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,oe)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,oe)|0,n=n+Math.imul(R,se)|0,i=(i=i+Math.imul(R,ce)|0)+Math.imul(x,se)|0,a=a+Math.imul(x,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(A,fe)|0,a=a+Math.imul(A,le)|0;var Ee=(c+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((a=a+Math.imul(b,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,W))+Math.imul(O,V)|0,a=Math.imul(O,W),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,ee)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(K,re)|0,a=a+Math.imul(K,ne)|0,n=n+Math.imul(C,ae)|0,i=(i=i+Math.imul(C,oe)|0)+Math.imul(T,ae)|0,a=a+Math.imul(T,oe)|0,n=n+Math.imul(N,se)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(E,se)|0,a=a+Math.imul(E,ce)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(x,fe)|0,a=a+Math.imul(x,le)|0;var _e=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;c=((a=a+Math.imul(A,me)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,ee))+Math.imul(O,Q)|0,a=Math.imul(O,ee),n=n+Math.imul(F,re)|0,i=(i=i+Math.imul(F,ne)|0)+Math.imul(I,re)|0,a=a+Math.imul(I,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(K,ae)|0,a=a+Math.imul(K,oe)|0,n=n+Math.imul(C,se)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(T,se)|0,a=a+Math.imul(T,ce)|0,n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(E,fe)|0,a=a+Math.imul(E,le)|0;var Ce=(c+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((a=a+Math.imul(x,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(O,re)|0,a=Math.imul(O,ne),n=n+Math.imul(F,ae)|0,i=(i=i+Math.imul(F,oe)|0)+Math.imul(I,ae)|0,a=a+Math.imul(I,oe)|0,n=n+Math.imul(k,se)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(K,se)|0,a=a+Math.imul(K,ce)|0,n=n+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,le)|0)+Math.imul(T,fe)|0,a=a+Math.imul(T,le)|0;var Te=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(E,pe)|0))<<13)|0;c=((a=a+Math.imul(E,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,ae),i=(i=Math.imul(j,oe))+Math.imul(O,ae)|0,a=Math.imul(O,oe),n=n+Math.imul(F,se)|0,i=(i=i+Math.imul(F,ce)|0)+Math.imul(I,se)|0,a=a+Math.imul(I,ce)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(K,fe)|0,a=a+Math.imul(K,le)|0;var Pe=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(T,pe)|0))<<13)|0;c=((a=a+Math.imul(T,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,se),i=(i=Math.imul(j,ce))+Math.imul(O,se)|0,a=Math.imul(O,ce),n=n+Math.imul(F,fe)|0,i=(i=i+Math.imul(F,le)|0)+Math.imul(I,fe)|0,a=a+Math.imul(I,le)|0;var ke=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(K,pe)|0))<<13)|0;c=((a=a+Math.imul(K,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,fe),i=(i=Math.imul(j,le))+Math.imul(O,fe)|0,a=Math.imul(O,le);var Ke=(c+(n=n+Math.imul(F,pe)|0)|0)+((8191&(i=(i=i+Math.imul(F,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((a=a+Math.imul(I,me)|0)+(i>>>13)|0)+(Ke>>>26)|0,Ke&=67108863;var De=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(O,pe)|0))<<13)|0;return c=((a=Math.imul(O,me))+(i>>>13)|0)+(De>>>26)|0,De&=67108863,s[0]=ve,s[1]=ye,s[2]=be,s[3]=ge,s[4]=we,s[5]=Ae,s[6]=Me,s[7]=Re,s[8]=xe,s[9]=Se,s[10]=Ne,s[11]=Ee,s[12]=_e,s[13]=Ce,s[14]=Te,s[15]=Pe,s[16]=ke,s[17]=Ke,s[18]=De,0!==c&&(s[19]=c,r.length++),r};function m(e,t,r){return(new v).mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=h),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var d=67108863&n,s=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=s;c++){var u=a-c,f=(0|e.words[u])*(0|t.words[c]),l=67108863&f;d=67108863&(l=l+d|0),i+=(o=(o=o+(f/67108864|0)|0)+(l>>>26)|0)>>>26,o&=67108863}r.words[a]=d,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},v.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var d=o<<1,s=Math.cos(2*Math.PI/d),c=Math.sin(2*Math.PI/d),u=0;u<i;u+=d)for(var f=s,l=c,h=0;h<o;h++){var p=r[u+h],m=n[u+h],v=r[u+h+o],y=n[u+h+o],b=f*v-l*y;y=f*y+l*v,v=b,r[u+h]=p+v,n[u+h]=m+y,r[u+h+o]=p-v,n[u+h+o]=m-y,h!==d&&(b=s*f-c*l,l=s*l+c*f,f=b)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0==(-8192&a))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),d=new Array(n),s=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,a,d,s,n,i),this.transform(c,a,u,f,n,i);for(var h=0;h<n;h++){var p=d[h]*u[h]-s[h]*f[h];s[h]=d[h]*f[h]+s[h]*u[h],d[h]=p}return this.conjugate(d,s,n),this.transform(d,s,l,a,n,i),this.conjugate(l,a,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),m(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var d=this.words[t]&a,s=(0|this.words[t])-d<<r;this.words[t]=s|o,o=d>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),d=67108863^67108863>>>a<<a,s=r;if(i-=o,i=Math.max(0,i),s){for(var c=0;c<o;c++)s.words[c]=this.words[c];s.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var f=0|this.words[c];this.words[c]=u<<26-a|f>>>a,u=f&d}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},a.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var d=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+d;var s=(0|e.words[i])*t;d=((a-=67108863&s)>>26)-(s/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)d=(a=(0|this.words[i+r])+d)>>26,this.words[i+r]=67108863&a;if(0===d)return this.strip();for(n(-1===d),d=0,i=0;i<this.length;i++)d=(a=-(0|this.words[i])+d)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var d,s=n.length-i.length;if("mod"!==t){(d=new a(null)).length=s+1,d.words=new Array(d.length);for(var c=0;c<d.length;c++)d.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,s);0===u.negative&&(n=u,d&&(d.words[s]=1));for(var f=s-1;f>=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);d&&(d.words[f]=l)}return d&&d.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:d||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(d=this.neg().divmod(e,t),"mod"!==t&&(i=d.div.neg()),"div"!==t&&(o=d.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(d=this.divmod(e.neg(),t),"mod"!==t&&(i=d.div.neg()),{div:i,mod:d.mod}):0!=(this.negative&e.negative)?(d=this.neg().divmod(e.neg(),t),"div"!==t&&(o=d.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:d.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,d},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),d=new a(0),s=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=t.clone();!t.isZero();){for(var l=0,h=1;0==(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(d.isOdd()||s.isOdd())&&(d.iadd(u),s.isub(f)),d.iushrn(1),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(d),o.isub(s)):(r.isub(t),d.isub(i),s.isub(o))}return{a:d,b:s,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),d=new a(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)d.isOdd()&&d.iadd(s),d.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(d)):(r.isub(t),d.isub(o))}return(i=0===t.cmpn(1)?o:d).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var d=0|this.words[o];a=(d+=a)>>>26,d&=67108863,this.words[o]=d}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new R(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){R.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(g,b),g.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,b),i(A,b),i(M,b),M.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new w;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return y[e]=t,t},R.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},R.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")},R.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},R.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},R.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)},R.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},R.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},R.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},R.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},R.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},R.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},R.prototype.isqr=function(e){return this.imul(e,e.clone())},R.prototype.sqr=function(e){return this.mul(e,e)},R.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 a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var d=new a(1).toRed(this),s=d.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,i),l=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=o;0!==h.cmp(d);){for(var m=h,v=0;0!==m.cmp(d);v++)m=m.redSqr();n(v<p);var y=this.pow(f,new a(1).iushln(p-v-1));l=l.redMul(y),f=y.redSqr(),h=h.redMul(f),p=v}return l},R.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},R.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],o=0,d=0,s=t.bitLength()%26;for(0===s&&(s=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],u=s-1;u>=0;u--){var f=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4==++d||0===n&&0===u)&&(i=this.mul(i,r[o]),d=0,o=0)):d=0}s=26}return i},R.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},R.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new x(e)},i(x,R),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.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),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)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(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),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)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(h,e.commonjsGlobal);var p,m={},v={},y={exports:{}};p=y,e.commonjsGlobal,p.exports=t.requireCore().enc.Hex,function(r){var n=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.fromBech32Address=r.toBech32Address=r.toChecksumAddress=void 0;var i=n(h.exports),a=n(t.requireSha256()),o=n(y.exports),d="qpzry9x8gf2tvdw0s3jn54khce6mua7l",s=[996825010,642813549,513874426,1027748829,705979059],c="zil",u="tzil";function f(e){return t=40,!!e.replace("0x","").match("^[0-9a-fA-F]{".concat(t,"}$"));var t}function l(e,t,r,n){void 0===n&&(n=!0);for(var i=0,a=0,o=[],d=(1<<r)-1,s=0;s<e.length;++s){var c=e[s];if(c<0||c>>t!=0)return null;for(i=i<<t|c,a+=t;a>=r;)a-=r,o.push(i>>a&d)}if(n)a>0&&o.push(i<<r-a&d);else if(a>=t||i<<r-a&d)return null;return Buffer.from(o)}function p(e){var t,r=[];for(t=0;t<e.length;++t)r.push(e.charCodeAt(t)>>5);for(r.push(0),t=0;t<e.length;++t)r.push(31&e.charCodeAt(t));return Buffer.from(r)}function m(e){for(var t=1,r=0;r<e.length;++r){var n=t>>25;t=(33554431&t)<<5^e[r];for(var i=0;i<5;++i)n>>i&1&&(t^=s[i])}return t}function v(e,t){for(var r=1^m(Buffer.concat([Buffer.from(p(e)),t,Buffer.from([0,0,0,0,0,0])])),n=[],i=0;i<6;++i)n.push(r>>5*(5-i)&31);return Buffer.from(n)}function b(e){var t,r=!1,n=!1;for(t=0;t<e.length;++t){if(e.charCodeAt(t)<33||e.charCodeAt(t)>126)return null;e.charCodeAt(t)>=97&&e.charCodeAt(t)<=122&&(r=!0),e.charCodeAt(t)>=65&&e.charCodeAt(t)<=90&&(n=!0)}if(r&&n)return null;var i=(e=e.toLowerCase()).lastIndexOf("1");if(i<1||i+7>e.length||e.length>90)return null;var a=e.substring(0,i),o=[];for(t=i+1;t<e.length;++t){var s=d.indexOf(e.charAt(t));if(-1===s)return null;o.push(s)}return function(e,t){return 1===m(Buffer.concat([p(e),t]))}(a,Buffer.from(o))?{hrp:a,data:Buffer.from(o.slice(0,o.length-6))}:null}r.toChecksumAddress=function(e){if(!f(e))throw new Error("".concat(e," is not a valid base 16 address"));e=e.toLowerCase().replace("0x","");for(var t=o.default.stringify((0,a.default)(o.default.parse(e))),r=new i.default(t,"hex","be"),n="0x",d=0;d<e.length;d++)-1!=="0123456789".indexOf(e[d])?n+=e[d]:n+=r.and(new i.default(2).pow(new i.default(255-6*d))).gte(new i.default(1))?e[d].toUpperCase():e[d].toLowerCase();return n},r.toBech32Address=function(e,t){if(void 0===t&&(t=!1),!f(e))throw new Error("Invalid address format.");var r=l(Buffer.from(e.replace("0x",""),"hex"),8,5);if(null===r)throw new Error("Could not convert byte Buffer to 5-bit Buffer");return function(e,t){for(var r=Buffer.concat([t,v(e,t)]),n=e+"1",i=0;i<r.length;++i)n+=d.charAt(r[i]);return n}(t?u:c,r)},r.fromBech32Address=function(e,t){void 0===t&&(t=!1);var n=b(e);if(null===n)throw new Error("Invalid bech32 address");var i=n.hrp,a=n.data,o=t?u:c;if(i!==o)throw new Error("Expected hrp to be ".concat(o," but got ").concat(i));var d=l(a,5,8,!1);if(null===d)throw new Error("Could not convert buffer to bytes");return(0,r.toChecksumAddress)(d.toString("hex"))}}(v);var b={},g={};!function(e){var t,r,n,i;Object.defineProperty(e,"__esModule",{value:!0}),e.BlockchainType=e.DnsRecordType=e.NamehashOptionsDefault=e.UDApiDefaultUrl=e.UnclaimedDomainResponse=e.NamingServiceName=e.UnsLocation=void 0,(t=e.UnsLocation||(e.UnsLocation={})).Layer1="UNSLayer1",t.Layer2="UNSLayer2",(r=e.NamingServiceName||(e.NamingServiceName={})).UNS="UNS",r.ZNS="ZNS",e.UnclaimedDomainResponse={addresses:{},meta:{domain:"",namehash:"",resolver:"",owner:null,type:"",ttl:0,blockchain:null},records:{}},e.UDApiDefaultUrl="https://unstoppabledomains.com/api/v1",e.NamehashOptionsDefault={format:"hex",prefix:!0,zns:!1},(n=e.DnsRecordType||(e.DnsRecordType={})).A="A",n.AAAA="AAAA",n.AFSDB="AFSDB",n.APL="APL",n.CAA="CAA",n.CDNSKEY="CDNSKEY",n.CDS="CDS",n.CERT="CERT",n.CNAME="CNAME",n.CSYNC="CSYNC",n.DHCID="DHCID",n.DLV="DLV",n.DNAME="DNAME",n.DNSKEY="DNSKEY",n.DS="DS",n.EUI48="EUI48",n.EUI64="EUI64",n.HINFO="HINFO",n.HIP="HIP",n.HTTPS="HTTPS",n.IPSECKEY="IPSECKEY",n.KEY="KEY",n.KX="KX",n.LOC="LOC",n.MX="MX",n.NAPTR="NAPTR",n.NS="NS",n.NSEC="NSEC",n.NSEC3="NSEC3",n.NSEC3PARAM="NSEC3PARAM",n.OPENPGPKEY="OPENPGPKEY",n.PTR="PTR",n.RP="RP",n.RRSIG="RRSIG",n.SIG="SIG",n.SMIMEA="SMIMEA",n.SOA="SOA",n.SRV="SRV",n.SSHFP="SSHFP",n.SVCB="SVCB",n.TA="TA",n.TKEY="TKEY",n.TLSA="TLSA",n.TSIG="TSIG",n.TXT="TXT",n.URI="URI",n.ZONEMD="ZONEMD",(i=e.BlockchainType||(e.BlockchainType={})).ETH="ETH",i.MATIC="MATIC",i.ZIL="ZIL"}(g);var w={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.hasProvider=e.ZnsSupportedNetwork=e.UnsSupportedNetwork=e.NullAddresses=e.NullAddress=void 0,e.NullAddress="0x0000000000000000000000000000000000000000",(t=e.NullAddresses||(e.NullAddresses={}))[t["0x"]=0]="0x",t[t["0x0000000000000000000000000000000000000000"]=1]="0x0000000000000000000000000000000000000000",t[t["0x0000000000000000000000000000000000000000000000000000000000000000"]=2]="0x0000000000000000000000000000000000000000000000000000000000000000";var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];Object.freeze(e);var r=new Set(e),n=function(e){return r.has(e)},i={guard:n,check:function(t){if(!n(t)){var r=JSON.stringify(t),i=e.map((function(e){return JSON.stringify(e)})).join(" | ");throw new TypeError("Value '".concat(r,"' is not assignable to type '").concat(i,"'."))}return t},values:e};return Object.freeze(i)};e.UnsSupportedNetwork=r("mainnet","rinkeby","goerli","polygon-mainnet","polygon-mumbai"),e.ZnsSupportedNetwork=r("mainnet","testnet"),e.hasProvider=function(e){return e&&!!e.provider}}(w),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unwrapResult=e.wrapResult=e.EthereumNetworksInverted=e.EthereumNetworks=e.findNamingServiceName=e.domainExtensionToNamingServiceName=e.constructRecords=e.isNullAddress=e.hexToBytes=e.signedLink=void 0;var t=g,r=w,n={infura:{mainnet:"https://mainnet.infura.io/v3/",rinkeby:"https://rinkeby.infura.io/v3/",goerli:"https://goerli.infura.io/v3/","polygon-mainnet":"https://polygon-mainnet.infura.io/v3/","polygon-mumbai":"https://polygon-mumbai.infura.io/v3/"},alchemy:{mainnet:"https://eth-mainnet.alchemyapi.io/v2/",rinkeby:"https://eth-rinkeby.alchemyapi.io/v2/",goerli:"https://eth-goerli.alchemyapi.io/v2/","polygon-mainnet":"https://polygon-mainnet.g.alchemy.com/v2/","polygon-mumbai":"https://polygon-mumbai.g.alchemy.com/v2/"}};e.signedLink=function(e,t,r){void 0===t&&(t="mainnet"),void 0===r&&(r="alchemy");var i=n[r][t];return"".concat(i).concat(e)},e.hexToBytes=function(e){for(var t=e.replace(/^0x/i,""),r=[],n=0;n<t.length;n+=2)r.push(parseInt(t.substr(n,2),16));return r},e.isNullAddress=function(e){return!e||Object.values(r.NullAddresses).includes(e)},e.constructRecords=function(e,t){var r={};return e.forEach((function(e,n){r[e]=(t instanceof Array?t[n]:null==t?void 0:t[e])||""})),r},e.domainExtensionToNamingServiceName={crypto:t.NamingServiceName.UNS,zil:t.NamingServiceName.ZNS};e.findNamingServiceName=function(t){var r=t.split(".").pop();return r?r in e.domainExtensionToNamingServiceName?e.domainExtensionToNamingServiceName[r]:e.domainExtensionToNamingServiceName.crypto:""},e.EthereumNetworks={mainnet:1,ropsten:3,rinkeby:4,goerli:5,"polygon-mainnet":137,"polygon-mumbai":80001},e.EthereumNetworksInverted={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",137:"polygon-mainnet",80001:"polygon-mumbai"};e.wrapResult=function(e){var t;try{t=e()}catch(e){return Promise.resolve({result:null,error:e})}return(t instanceof Promise?t:Promise.resolve(t)).then((function(e){return{result:e,error:null}}),(function(e){return{result:null,error:e}}))};e.unwrapResult=function(e){if(null!==e.error)throw e.error;return e.result}}(b);var A={};!function(t){var r,n,i,a=e.commonjsGlobal&&e.commonjsGlobal.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ResolutionError=t.ResolutionErrorCode=void 0,function(e){e.UnregisteredDomain="UnregisteredDomain",e.UnspecifiedResolver="UnspecifiedResolver",e.UnsupportedDomain="UnsupportedDomain",e.UnsupportedService="UnsupportedService",e.UnsupportedMethod="UnsupportedMethod",e.UnspecifiedCurrency="UnspecifiedCurrency",e.UnsupportedCurrency="UnsupportedCurrency",e.IncorrectResolverInterface="IncorrectResolverInterface",e.RecordNotFound="RecordNotFound",e.MetadataEndpointError="MetadataEndpointError",e.ServiceProviderError="ServiceProviderError",e.InvalidTwitterVerification="InvalidTwitterVerification",e.InconsistentDomainArray="InconsistentDomainArray",e.InvalidDomainAddress="InvalidDomainAddress"}(i=t.ResolutionErrorCode||(t.ResolutionErrorCode={}));var o=((n={})[i.UnregisteredDomain]=function(e){return"Domain ".concat(e.domain," is not registered")},n[i.UnspecifiedResolver]=function(e){return"".concat(e.location?"".concat(e.location,": "):"","Domain ").concat(e.domain," is not configured")},n[i.UnsupportedDomain]=function(e){return"Domain ".concat(e.domain," is not supported")},n[i.UnsupportedMethod]=function(e){var t,r=(null===(t=e.domain)||void 0===t?void 0:t.endsWith(".zil"))?" (if this method was called via the Resolution class with both UNS and ZNS providers configured not in the API mode, this error also means that the domain doesn't exist in UNS)":"";return"Method ".concat(e.methodName," is not supported for ").concat(e.domain).concat(r)},n[i.InvalidTwitterVerification]=function(e){return"".concat(e.location?"".concat(e.location,": "):"","Domain ").concat(e.domain," has invalid Twitter signature verification")},n[i.UnsupportedCurrency]=function(e){return"".concat(e.currencyTicker," is not supported")},n[i.IncorrectResolverInterface]=function(e){return"Domain resolver is configured incorrectly for ".concat(e.method)},n[i.RecordNotFound]=function(e){return"".concat(e.location?"".concat(e.location,": "):"","No ").concat(e.recordName," record found for ").concat(e.domain)},n[i.ServiceProviderError]=function(e){return"< ".concat(e.providerMessage," >")},n[i.MetadataEndpointError]=function(e){return"Failed to query tokenUri ".concat(e.tokenUri,". Error: ").concat(e.errorMessage)},n[i.UnsupportedService]=function(e){return"Naming service ".concat(e.namingService," is not supported")},n[i.InvalidDomainAddress]=function(e){return"Domain address ".concat(e.domain," is invalid")},n),d=function(e){function t(r,n){void 0===n&&(n={});var i=this,a=o[r],d=n.domain,s=n.method,c=n.currencyTicker,u=a(n);return(i=e.call(this,u)||this).code=r,i.domain=d,i.method=s,i.currencyTicker=c,i.name="ResolutionError",Object.setPrototypeOf(i,t.prototype),i}return a(t,e),t}(Error);t.ResolutionError=d,t.default=d}(A);var M={},R={},x=e.commonjsGlobal&&e.commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function d(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,d)}s((n=n.apply(e,t||[])).next())}))},S=e.commonjsGlobal&&e.commonjsGlobal.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(a){return function(d){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}},N=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(R,"__esModule",{value:!0});var E=N(e.browserPonyfill.exports),_=function(){function e(){}return e.fetch=function(e,t){return x(this,void 0,void 0,(function(){return S(this,(function(r){return[2,(0,E.default)(e,t)]}))}))},e}();R.default=_;var C=e.commonjsGlobal&&e.commonjsGlobal.__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]}),T=e.commonjsGlobal&&e.commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),P=e.commonjsGlobal&&e.commonjsGlobal.__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 T(t,e),t},k=e.commonjsGlobal&&e.commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function d(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,d)}s((n=n.apply(e,t||[])).next())}))},K=e.commonjsGlobal&&e.commonjsGlobal.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(a){return function(d){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}},D=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(M,"__esModule",{value:!0});var F=P(A),I=D(R),B=function(){function e(e,t){this.url=t,this.name=e}return e.factory=function(e,t){return new this(e,t)},e.prototype.request=function(e){return k(this,void 0,void 0,(function(){var t;return K(this,(function(r){switch(r.label){case 0:return[4,this.fetchJson(e)];case 1:if((t=r.sent()).error)throw new F.default(F.ResolutionErrorCode.ServiceProviderError,{providerMessage:t.error.message});return[2,t.result]}}))}))},e.prototype.fetchJson=function(e){return k(this,void 0,void 0,(function(){var t;return K(this,(function(r){switch(r.label){case 0:return[4,I.default.fetch(this.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:"1",method:e.method,params:e.params||[]}),headers:{"Content-Type":"application/json"}})];case 1:if(200!==(t=r.sent()).status)throw new F.default(F.ResolutionErrorCode.ServiceProviderError,{providerMessage:"Request to ".concat(this.url," failed with response status ").concat(t.status)});return[2,t.json()]}}))}))},e}();M.default=B;var j={},O=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(j,"__esModule",{value:!0}),j.fromDecStringToHex=j.fromHexStringToDecimals=j.znsChildhash=j.znsNamehash=j.eip137Childhash=j.eip137Namehash=void 0;var U=O(t.requireSha256()),L=O(r.requireSha3()),z=O(y.exports),H=O(r.requireLibTypedarrays()),G=O(h.exports);function q(e,t,r){var n="sha256"===r?U.default:L.default,i={outputLength:256},a=e.replace(/^0x/,""),o=z.default.stringify(n(t,i));return"0x".concat(z.default.stringify(n(z.default.parse("".concat(a).concat(o)),i)))}function $(e,t){if(!e)return H.default.create(Array.from(new Uint8Array(8)));var r="sha256"===t?U.default:L.default,n={outputLength:256},i=e.split("."),a=i[0],o=i.slice(1),d=r(a,n);return r($(o.join("."),t).concat(d),n)}function J(e){return"0x".concat(z.default.stringify(e))}j.eip137Namehash=function(e){return J($(e,"sha3"))},j.eip137Childhash=function(e,t){return q(e,t,"sha3")},j.znsNamehash=function(e){return J($(e,"sha256"))},j.znsChildhash=function(e,t){return q(e,t,"sha256")},j.fromHexStringToDecimals=function(e){if(e.startsWith("0x")){var t=e.slice(2,e.length);return new G.default(t,16).toString(10)}return e},j.fromDecStringToHex=function(e){if(!e.startsWith("0x")){var t=new G.default(e,10).toString(16);return"0x".concat(t.padStart(64,"0"))}return e};var X={};Object.defineProperty(X,"__esModule",{value:!0}),X.NamingService=void 0;var Z=function(){};X.NamingService=Z;var V={};!function(t){var r,n,i,a=e.commonjsGlobal&&e.commonjsGlobal.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationError=t.ConfigurationErrorCode=void 0,function(e){e.IncorrectProvider="IncorrectProvider",e.UnsupportedNetwork="UnsupportedNetwork",e.UnspecifiedUrl="UnspecifiedUrl",e.NetworkConfigMissing="NetworkConfigMissing",e.CustomNetworkConfigMissing="CustomNetworkConfigMissing",e.InvalidConfigurationField="InvalidProxyReader"}(i=t.ConfigurationErrorCode||(t.ConfigurationErrorCode={}));var o=((n={})[i.IncorrectProvider]=function(){return"Provider doesn't implement sendAsync or send method"},n[i.UnsupportedNetwork]=function(e){return"Unsupported network in Resolution ".concat(e.method||""," configuration")},n[i.UnspecifiedUrl]=function(e){return"Unspecified url in Resolution ".concat(e.method," configuration")},n[i.NetworkConfigMissing]=function(e){return"Missing configuration in Resolution ".concat(e.method,". Please specify ").concat(e.config)},n[i.CustomNetworkConfigMissing]=function(e){return"Missing configuration in Resolution ".concat(e.method,". Please specify ").concat(e.config," when using a custom network")},n[i.InvalidConfigurationField]=function(e){return"Invalid '".concat(e.field,"' in Resolution ").concat(e.method)},n),d=function(e){function t(r,n){void 0===n&&(n={});var i=this,a=o[r];return(i=e.call(this,a(n))||this).code=r,i.method=n.method,i.name="ConfigurationError",Object.setPrototypeOf(i,t.prototype),i}return a(t,e),t}(Error);t.ConfigurationError=d,t.default=d}(V);var W,Y=e.commonjsGlobal&&e.commonjsGlobal.__extends||(W=function(e,t){return W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},W(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}W(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Q=e.commonjsGlobal&&e.commonjsGlobal.__assign||function(){return Q=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Q.apply(this,arguments)},ee=e.commonjsGlobal&&e.commonjsGlobal.__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]}),te=e.commonjsGlobal&&e.commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),re=e.commonjsGlobal&&e.commonjsGlobal.__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)&&ee(t,e,r);return te(t,e),t},ne=e.commonjsGlobal&&e.commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function d(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,d)}s((n=n.apply(e,t||[])).next())}))},ie=e.commonjsGlobal&&e.commonjsGlobal.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(a){return function(d){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}},ae=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(m,"__esModule",{value:!0});var oe=v,de=b,se=w,ce=A,ue=g,fe=ae(M),le=j,he=X,pe=re(V),me=function(e){function t(r){void 0===r&&(r={url:t.UrlMap[1],network:"mainnet"});var n=e.call(this)||this;return n.name=ue.NamingServiceName.ZNS,n.checkNetworkConfig(r),n.network=t.NetworkNameMap[r.network],n.url=r.url||t.UrlMap[n.network],n.provider=r.provider||new fe.default(n.name,n.url),n.registryAddr=r.registryAddress||t.RegistryMap[n.network],n.checkRegistryAddress(n.registryAddr),n.registryAddr.startsWith("0x")&&(n.registryAddr=(0,oe.toBech32Address)(n.registryAddr)),n}return Y(t,e),t.prototype.owner=function(e){return ne(this,void 0,void 0,(function(){var t,r;return ie(this,(function(n){switch(n.label){case 0:return[4,this.getRecordsAddresses(e)];case 1:if(!(t=n.sent()))throw new ce.ResolutionError(ce.ResolutionErrorCode.UnregisteredDomain,{domain:e});if(!(r=t[0]))throw new ce.ResolutionError(ce.ResolutionErrorCode.UnregisteredDomain,{domain:e});return[2,r]}}))}))},t.prototype.resolver=function(e){return ne(this,void 0,void 0,(function(){var t,r;return ie(this,(function(n){switch(n.label){case 0:return[4,this.getRecordsAddresses(e)];case 1:if(!(t=n.sent())||!t[0])throw new ce.ResolutionError(ce.ResolutionErrorCode.UnregisteredDomain,{domain:e});if(r=t[1],(0,de.isNullAddress)(r))throw new ce.ResolutionError(ce.ResolutionErrorCode.UnspecifiedResolver,{domain:e});return[2,r]}}))}))},t.prototype.namehash=function(e){if(!this.checkDomain(e))throw new ce.ResolutionError(ce.ResolutionErrorCode.UnsupportedDomain,{domain:e});return(0,le.znsNamehash)(e)},t.prototype.childhash=function(e,t){return(0,le.znsChildhash)(e,t)},t.prototype.isSupportedDomain=function(e){return ne(this,void 0,void 0,(function(){return ie(this,(function(t){return[2,this.checkDomain(e)]}))}))},t.prototype.record=function(e,t){return ne(this,void 0,void 0,(function(){var r,n;return ie(this,(function(i){switch(i.label){case 0:return[4,this.records(e,[t])];case 1:if(r=i.sent(),!(n=r[t]))throw new ce.ResolutionError(ce.ResolutionErrorCode.RecordNotFound,{domain:e,recordName:t});return[2,n]}}))}))},t.prototype.records=function(e,t){return ne(this,void 0,void 0,(function(){var r;return ie(this,(function(n){switch(n.label){case 0:return[4,this.allRecords(e)];case 1:return r=n.sent(),[2,(0,de.constructRecords)(t,r)]}}))}))},t.prototype.allRecords=function(e){return ne(this,void 0,void 0,(function(){var t;return ie(this,(function(r){switch(r.label){case 0:return[4,this.resolver(e)];case 1:return t=r.sent(),[2,this.getResolverRecords(t)]}}))}))},t.prototype.twitter=function(e){return ne(this,void 0,void 0,(function(){return ie(this,(function(t){throw new ce.ResolutionError(ce.ResolutionErrorCode.UnsupportedMethod,{domain:e,methodName:"twitter"})}))}))},t.prototype.reverse=function(e,t){return ne(this,void 0,void 0,(function(){return ie(this,(function(e){throw new ce.ResolutionError(ce.ResolutionErrorCode.UnsupportedMethod,{methodName:"reverse"})}))}))},t.prototype.reverseOf=function(e,t){return ne(this,void 0,void 0,(function(){return ie(this,(function(e){throw new ce.ResolutionError(ce.ResolutionErrorCode.UnsupportedMethod,{methodName:"reverseOf"})}))}))},t.prototype.isRegistered=function(e){return ne(this,void 0,void 0,(function(){var t;return ie(this,(function(r){switch(r.label){case 0:return[4,this.getRecordsAddresses(e)];case 1:return t=r.sent(),[2,Boolean(t&&t[0])]}}))}))},t.prototype.getTokenUri=function(e){return ne(this,void 0,void 0,(function(){return ie(this,(function(e){throw new ce.ResolutionError(ce.ResolutionErrorCode.UnsupportedMethod,{methodName:"getTokenUri"})}))}))},t.prototype.getDomainFromTokenId=function(e){return ne(this,void 0,void 0,(function(){return ie(this,(function(e){throw new ce.ResolutionError(ce.ResolutionErrorCode.UnsupportedMethod,{methodName:"getDomainFromTokenId"})}))}))},t.prototype.isAvailable=function(e){return ne(this,void 0,void 0,(function(){return ie(this,(function(t){switch(t.label){case 0:return[4,this.isRegistered(e)];case 1:return[2,!t.sent()]}}))}))},t.prototype.registryAddress=function(e){return ne(this,void 0,void 0,(function(){return ie(this,(function(e){return[2,this.registryAddr]}))}))},t.prototype.locations=function(e){return ne(this,void 0,void 0,(function(){var t,r=this;return ie(this,(function(n){switch(n.label){case 0:return[4,Promise.all(e.map((function(e){return r.getRecordsAddresses(e)})))];case 1:return t=n.sent(),[2,e.reduce((function(e,n,i){var a,o=null,d=t[i];if(d){var s=d[0],c=d[1];o={registryAddress:r.registryAddr,resolverAddress:c,networkId:r.network,blockchain:ue.BlockchainType.ZIL,ownerAddress:s,blockchainProviderUrl:r.url}}return Q(Q({},e),((a={})[n]=o,a))}),{})]}}))}))},t.prototype.getRecordsAddresses=function(e){return ne(this,void 0,void 0,(function(){var t,r,n,i;return ie(this,(function(a){switch(a.label){case 0:if(!this.isSupportedDomain(e))throw new ce.ResolutionError(ce.ResolutionErrorCode.UnsupportedDomain,{domain:e});return[4,this.getContractMapValue(this.registryAddr,"records",this.namehash(e))];case 1:return(t=a.sent())?(r=t.arguments,n=r[0],i=r[1],[2,[n.startsWith("0x")?(0,oe.toBech32Address)(n):n,i]]):[2,void 0]}}))}))},t.prototype.getResolverRecords=function(e){return ne(this,void 0,void 0,(function(){var t;return ie(this,(function(r){switch(r.label){case 0:return(0,de.isNullAddress)(e)?[2,{}]:(t=(0,oe.toChecksumAddress)(e),[4,this.getContractField(t,"records")]);case 1:return[2,r.sent()||{}]}}))}))},t.prototype.fetchSubState=function(e,t,r){return void 0===r&&(r=[]),ne(this,void 0,void 0,(function(){var n;return ie(this,(function(i){return n=[e.replace("0x",""),t,r],"GetSmartContractSubState",[2,this.provider.request({method:"GetSmartContractSubState",params:n})]}))}))},t.prototype.getContractField=function(e,t,r){return void 0===r&&(r=[]),ne(this,void 0,void 0,(function(){var n;return ie(this,(function(i){switch(i.label){case 0:return n=e.startsWith("zil1")?(0,oe.fromBech32Address)(e):e,[4,this.fetchSubState(n,t,r)];case 1:return[2,(i.sent()||{})[t]]}}))}))},t.prototype.getContractMapValue=function(e,t,r){return ne(this,void 0,void 0,(function(){var n;return ie(this,(function(i){switch(i.label){case 0:return[4,this.getContractField(e,t,[r])];case 1:return[2,(n=i.sent())&&n[r]||null]}}))}))},t.prototype.checkDomain=function(e){var t=e.split(".");return!!t.length&&"zil"===t[t.length-1]&&t.every((function(e){return!!e.length}))},t.prototype.checkNetworkConfig=function(e){if(!e.network)throw new pe.default(pe.ConfigurationErrorCode.UnsupportedNetwork,{method:ue.NamingServiceName.ZNS});se.ZnsSupportedNetwork.guard(e.network)||this.checkCustomNetworkConfig(e)},t.prototype.checkRegistryAddress=function(e){if(!new RegExp("^0x[a-fA-F0-9]{40}$|^zil1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}$").test(e))throw new pe.default(pe.ConfigurationErrorCode.InvalidConfigurationField,{method:this.name,field:"registryAddress"})},t.prototype.checkCustomNetworkConfig=function(e){if(!e.registryAddress)throw new pe.default(pe.ConfigurationErrorCode.CustomNetworkConfigMissing,{method:ue.NamingServiceName.ZNS,config:"registryAddress"});if(!e.url&&!e.provider)throw new pe.default(pe.ConfigurationErrorCode.CustomNetworkConfigMissing,{method:ue.NamingServiceName.ZNS,config:"url or provider"})},t.UrlMap={1:"https://api.zilliqa.com",333:"https://dev-api.zilliqa.com",111:"http://localhost:4201"},t.NetworkNameMap={mainnet:1,testnet:333,localnet:111},t.RegistryMap={1:"zil1jcgu2wlx6xejqk9jw3aaankw6lsjzeunx2j0jz",333:"zil1hyj6m5w4atcn7s806s69r0uh5g4t84e8gp6nps"},t}(he.NamingService);m.default=me;var ve={},ye={},be={},ge={},we="6.5.4",Ae={},Me={exports:{}};!function(t,r){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof t?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:e.require$$1.Buffer}catch(e){}function d(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=d(e,r);return r-1>=t&&(n|=d(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o<a;o++){var d=e.charCodeAt(o)-48;i*=n,i+=d>=49?d-49+10:d>=17?d-17+10:d}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,d=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<d&67108863,this.words[a+1]=o>>>26-d&67108863,(d+=24)>=26&&(d-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<d&67108863,this.words[a+1]=o>>>26-d&67108863,(d+=24)>=26&&(d-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,a=0,o=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=s(e,t,n)<<a,this.words[o]|=67108863&i,a>=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=s(e,t,n)<<a,this.words[o]|=67108863&i,a>=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,d=Math.min(a,a-o)+r,s=0,u=r;u<d;u+=n)s=c(e,u,u+n,t),this.imuln(i),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s);if(0!==o){var f=1;for(s=c(e,u,e.length,t),u=0;u<o;u++)f*=t;this.imuln(f),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s)}this.strip()},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,d=67108863&o,s=o/67108864|0;r.words[0]=d;for(var c=1;c<n;c++){for(var u=s>>>26,f=67108863&s,l=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=l;h++){var p=c-h|0;u+=(o=(i=0|e.words[p])*(a=0|t.words[h])+f)/67108864|0,f=67108863&o}r.words[c]=0|f,s=0|u}return 0!==s?r.words[c]=0|s:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var d=this.words[o],s=(16777215&(d<<i|a)).toString(16);r=0!=(a=d>>>24-i&16777215)||o!==this.length-1?u[6-s.length]+s+r:s+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,d,s="le"===t,c=new e(a),u=this.clone();if(s){for(d=0;!u.isZero();d++)o=u.andln(255),u.iushrn(8),c[d]=o;for(;d<a;d++)c[d]=0}else{for(d=0;d<a-i;d++)c[d]=0;for(d=0;!u.isZero();d++)o=u.andln(255),u.iushrn(8),c[a-d-1]=o}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)a=(t=(0|r.words[o])-(0|n.words[o])+a)>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)a=(t=(0|r.words[o])+a)>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,a,o=e.words,d=t.words,s=r.words,c=0,u=0|o[0],f=8191&u,l=u>>>13,h=0|o[1],p=8191&h,m=h>>>13,v=0|o[2],y=8191&v,b=v>>>13,g=0|o[3],w=8191&g,A=g>>>13,M=0|o[4],R=8191&M,x=M>>>13,S=0|o[5],N=8191&S,E=S>>>13,_=0|o[6],C=8191&_,T=_>>>13,P=0|o[7],k=8191&P,K=P>>>13,D=0|o[8],F=8191&D,I=D>>>13,B=0|o[9],j=8191&B,O=B>>>13,U=0|d[0],L=8191&U,z=U>>>13,H=0|d[1],G=8191&H,q=H>>>13,$=0|d[2],J=8191&$,X=$>>>13,Z=0|d[3],V=8191&Z,W=Z>>>13,Y=0|d[4],Q=8191&Y,ee=Y>>>13,te=0|d[5],re=8191&te,ne=te>>>13,ie=0|d[6],ae=8191&ie,oe=ie>>>13,de=0|d[7],se=8191&de,ce=de>>>13,ue=0|d[8],fe=8191&ue,le=ue>>>13,he=0|d[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ve=(c+(n=Math.imul(f,L))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(l,L)|0))<<13)|0;c=((a=Math.imul(l,z))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(p,L),i=(i=Math.imul(p,z))+Math.imul(m,L)|0,a=Math.imul(m,z);var ye=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,G)|0))<<13)|0;c=((a=a+Math.imul(l,q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,L),i=(i=Math.imul(y,z))+Math.imul(b,L)|0,a=Math.imul(b,z),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,G)|0,a=a+Math.imul(m,q)|0;var be=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,J)|0))<<13)|0;c=((a=a+Math.imul(l,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,L),i=(i=Math.imul(w,z))+Math.imul(A,L)|0,a=Math.imul(A,z),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,G)|0,a=a+Math.imul(b,q)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,X)|0;var ge=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(l,V)|0))<<13)|0;c=((a=a+Math.imul(l,W)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(R,L),i=(i=Math.imul(R,z))+Math.imul(x,L)|0,a=Math.imul(x,z),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(A,G)|0,a=a+Math.imul(A,q)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,X)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,V)|0,a=a+Math.imul(m,W)|0;var we=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((a=a+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(N,L),i=(i=Math.imul(N,z))+Math.imul(E,L)|0,a=Math.imul(E,z),n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(x,G)|0,a=a+Math.imul(x,q)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(A,J)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,V)|0,a=a+Math.imul(b,W)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0;var Ae=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((a=a+Math.imul(l,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(C,L),i=(i=Math.imul(C,z))+Math.imul(T,L)|0,a=Math.imul(T,z),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(E,G)|0,a=a+Math.imul(E,q)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,X)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(A,V)|0,a=a+Math.imul(A,W)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,a=a+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0;var Me=(c+(n=n+Math.imul(f,ae)|0)|0)+((8191&(i=(i=i+Math.imul(f,oe)|0)+Math.imul(l,ae)|0))<<13)|0;c=((a=a+Math.imul(l,oe)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(k,L),i=(i=Math.imul(k,z))+Math.imul(K,L)|0,a=Math.imul(K,z),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,q)|0,n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,X)|0,n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(x,V)|0,a=a+Math.imul(x,W)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0;var Re=(c+(n=n+Math.imul(f,se)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(l,se)|0))<<13)|0;c=((a=a+Math.imul(l,ce)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(F,L),i=(i=Math.imul(F,z))+Math.imul(I,L)|0,a=Math.imul(I,z),n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,q)|0)+Math.imul(K,G)|0,a=a+Math.imul(K,q)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(E,V)|0,a=a+Math.imul(E,W)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(x,Q)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(y,ae)|0,i=(i=i+Math.imul(y,oe)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0,n=n+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,se)|0,a=a+Math.imul(m,ce)|0;var xe=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(l,fe)|0))<<13)|0;c=((a=a+Math.imul(l,le)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,L),i=(i=Math.imul(j,z))+Math.imul(O,L)|0,a=Math.imul(O,z),n=n+Math.imul(F,G)|0,i=(i=i+Math.imul(F,q)|0)+Math.imul(I,G)|0,a=a+Math.imul(I,q)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(K,J)|0,a=a+Math.imul(K,X)|0,n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(T,V)|0,a=a+Math.imul(T,W)|0,n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(y,se)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(b,se)|0,a=a+Math.imul(b,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,fe)|0,a=a+Math.imul(m,le)|0;var Se=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(l,pe)|0))<<13)|0;c=((a=a+Math.imul(l,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,q))+Math.imul(O,G)|0,a=Math.imul(O,q),n=n+Math.imul(F,J)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(K,V)|0,a=a+Math.imul(K,W)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(T,Q)|0,a=a+Math.imul(T,ee)|0,n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,n=n+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,oe)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,oe)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,se)|0,a=a+Math.imul(A,ce)|0,n=n+Math.imul(y,fe)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(b,fe)|0,a=a+Math.imul(b,le)|0;var Ne=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((a=a+Math.imul(m,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,X))+Math.imul(O,J)|0,a=Math.imul(O,X),n=n+Math.imul(F,V)|0,i=(i=i+Math.imul(F,W)|0)+Math.imul(I,V)|0,a=a+Math.imul(I,W)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(K,Q)|0,a=a+Math.imul(K,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(T,re)|0,a=a+Math.imul(T,ne)|0,n=n+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,oe)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,oe)|0,n=n+Math.imul(R,se)|0,i=(i=i+Math.imul(R,ce)|0)+Math.imul(x,se)|0,a=a+Math.imul(x,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(A,fe)|0,a=a+Math.imul(A,le)|0;var Ee=(c+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((a=a+Math.imul(b,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,W))+Math.imul(O,V)|0,a=Math.imul(O,W),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,ee)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(K,re)|0,a=a+Math.imul(K,ne)|0,n=n+Math.imul(C,ae)|0,i=(i=i+Math.imul(C,oe)|0)+Math.imul(T,ae)|0,a=a+Math.imul(T,oe)|0,n=n+Math.imul(N,se)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(E,se)|0,a=a+Math.imul(E,ce)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(x,fe)|0,a=a+Math.imul(x,le)|0;var _e=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;c=((a=a+Math.imul(A,me)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,ee))+Math.imul(O,Q)|0,a=Math.imul(O,ee),n=n+Math.imul(F,re)|0,i=(i=i+Math.imul(F,ne)|0)+Math.imul(I,re)|0,a=a+Math.imul(I,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(K,ae)|0,a=a+Math.imul(K,oe)|0,n=n+Math.imul(C,se)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(T,se)|0,a=a+Math.imul(T,ce)|0,n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(E,fe)|0,a=a+Math.imul(E,le)|0;var Ce=(c+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((a=a+Math.imul(x,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(O,re)|0,a=Math.imul(O,ne),n=n+Math.imul(F,ae)|0,i=(i=i+Math.imul(F,oe)|0)+Math.imul(I,ae)|0,a=a+Math.imul(I,oe)|0,n=n+Math.imul(k,se)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(K,se)|0,a=a+Math.imul(K,ce)|0,n=n+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,le)|0)+Math.imul(T,fe)|0,a=a+Math.imul(T,le)|0;var Te=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(E,pe)|0))<<13)|0;c=((a=a+Math.imul(E,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,ae),i=(i=Math.imul(j,oe))+Math.imul(O,ae)|0,a=Math.imul(O,oe),n=n+Math.imul(F,se)|0,i=(i=i+Math.imul(F,ce)|0)+Math.imul(I,se)|0,a=a+Math.imul(I,ce)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(K,fe)|0,a=a+Math.imul(K,le)|0;var Pe=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(T,pe)|0))<<13)|0;c=((a=a+Math.imul(T,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,se),i=(i=Math.imul(j,ce))+Math.imul(O,se)|0,a=Math.imul(O,ce),n=n+Math.imul(F,fe)|0,i=(i=i+Math.imul(F,le)|0)+Math.imul(I,fe)|0,a=a+Math.imul(I,le)|0;var ke=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(K,pe)|0))<<13)|0;c=((a=a+Math.imul(K,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,fe),i=(i=Math.imul(j,le))+Math.imul(O,fe)|0,a=Math.imul(O,le);var Ke=(c+(n=n+Math.imul(F,pe)|0)|0)+((8191&(i=(i=i+Math.imul(F,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((a=a+Math.imul(I,me)|0)+(i>>>13)|0)+(Ke>>>26)|0,Ke&=67108863;var De=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(O,pe)|0))<<13)|0;return c=((a=Math.imul(O,me))+(i>>>13)|0)+(De>>>26)|0,De&=67108863,s[0]=ve,s[1]=ye,s[2]=be,s[3]=ge,s[4]=we,s[5]=Ae,s[6]=Me,s[7]=Re,s[8]=xe,s[9]=Se,s[10]=Ne,s[11]=Ee,s[12]=_e,s[13]=Ce,s[14]=Te,s[15]=Pe,s[16]=ke,s[17]=Ke,s[18]=De,0!==c&&(s[19]=c,r.length++),r};function m(e,t,r){return(new v).mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=h),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var d=67108863&n,s=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=s;c++){var u=a-c,f=(0|e.words[u])*(0|t.words[c]),l=67108863&f;d=67108863&(l=l+d|0),i+=(o=(o=o+(f/67108864|0)|0)+(l>>>26)|0)>>>26,o&=67108863}r.words[a]=d,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},v.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var d=o<<1,s=Math.cos(2*Math.PI/d),c=Math.sin(2*Math.PI/d),u=0;u<i;u+=d)for(var f=s,l=c,h=0;h<o;h++){var p=r[u+h],m=n[u+h],v=r[u+h+o],y=n[u+h+o],b=f*v-l*y;y=f*y+l*v,v=b,r[u+h]=p+v,n[u+h]=m+y,r[u+h+o]=p-v,n[u+h+o]=m-y,h!==d&&(b=s*f-c*l,l=s*l+c*f,f=b)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0==(-8192&a))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),d=new Array(n),s=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,a,d,s,n,i),this.transform(c,a,u,f,n,i);for(var h=0;h<n;h++){var p=d[h]*u[h]-s[h]*f[h];s[h]=d[h]*f[h]+s[h]*u[h],d[h]=p}return this.conjugate(d,s,n),this.transform(d,s,l,a,n,i),this.conjugate(l,a,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),m(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var d=this.words[t]&a,s=(0|this.words[t])-d<<r;this.words[t]=s|o,o=d>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),d=67108863^67108863>>>a<<a,s=r;if(i-=o,i=Math.max(0,i),s){for(var c=0;c<o;c++)s.words[c]=this.words[c];s.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var f=0|this.words[c];this.words[c]=u<<26-a|f>>>a,u=f&d}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},a.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var d=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+d;var s=(0|e.words[i])*t;d=((a-=67108863&s)>>26)-(s/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)d=(a=(0|this.words[i+r])+d)>>26,this.words[i+r]=67108863&a;if(0===d)return this.strip();for(n(-1===d),d=0,i=0;i<this.length;i++)d=(a=-(0|this.words[i])+d)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var d,s=n.length-i.length;if("mod"!==t){(d=new a(null)).length=s+1,d.words=new Array(d.length);for(var c=0;c<d.length;c++)d.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,s);0===u.negative&&(n=u,d&&(d.words[s]=1));for(var f=s-1;f>=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);d&&(d.words[f]=l)}return d&&d.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:d||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(d=this.neg().divmod(e,t),"mod"!==t&&(i=d.div.neg()),"div"!==t&&(o=d.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(d=this.divmod(e.neg(),t),"mod"!==t&&(i=d.div.neg()),{div:i,mod:d.mod}):0!=(this.negative&e.negative)?(d=this.neg().divmod(e.neg(),t),"div"!==t&&(o=d.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:d.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,d},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),d=new a(0),s=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=t.clone();!t.isZero();){for(var l=0,h=1;0==(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(d.isOdd()||s.isOdd())&&(d.iadd(u),s.isub(f)),d.iushrn(1),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(d),o.isub(s)):(r.isub(t),d.isub(i),s.isub(o))}return{a:d,b:s,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),d=new a(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)d.isOdd()&&d.iadd(s),d.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(d)):(r.isub(t),d.isub(o))}return(i=0===t.cmpn(1)?o:d).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var d=0|this.words[o];a=(d+=a)>>>26,d&=67108863,this.words[o]=d}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new R(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){R.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(g,b),g.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,b),i(A,b),i(M,b),M.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new w;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return y[e]=t,t},R.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},R.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")},R.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},R.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},R.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)},R.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},R.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},R.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},R.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},R.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},R.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},R.prototype.isqr=function(e){return this.imul(e,e.clone())},R.prototype.sqr=function(e){return this.mul(e,e)},R.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 a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var d=new a(1).toRed(this),s=d.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,i),l=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=o;0!==h.cmp(d);){for(var m=h,v=0;0!==m.cmp(d);v++)m=m.redSqr();n(v<p);var y=this.pow(f,new a(1).iushln(p-v-1));l=l.redMul(y),f=y.redSqr(),h=h.redMul(f),p=v}return l},R.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},R.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],o=0,d=0,s=t.bitLength()%26;for(0===s&&(s=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],u=s-1;u>=0;u--){var f=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4==++d||0===n&&0===u)&&(i=this.mul(i,r[o]),d=0,o=0)):d=0}s=26}return i},R.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},R.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new x(e)},i(x,R),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.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),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)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(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),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)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Me,e.commonjsGlobal);var Re={};!function(e){var t=Re;function r(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16));return t}t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),a=i>>8,o=255&i;a?r.push(a,o):r.push(o)}return r},t.zero2=r,t.toHex=n,t.encode=function(e,t){return"hex"===t?n(e):e}}(),function(t){var r=Ae,n=Me.exports,i=e.minimalisticAssert,a=Re;r.assert=i,r.toArray=a.toArray,r.zero2=a.zero2,r.toHex=a.toHex,r.encode=a.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,a=e.clone(),o=0;o<n.length;o++){var d,s=a.andln(i-1);a.isOdd()?(d=s>(i>>1)-1?(i>>1)-s:s,a.isubn(d)):d=0,n[o]=d,a.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,a=0;e.cmpn(-i)>0||t.cmpn(-a)>0;){var o,d,s=e.andln(3)+i&3,c=t.andln(3)+a&3;3===s&&(s=-1),3===c&&(c=-1),o=0==(1&s)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?s:-s,r[0].push(o),d=0==(1&c)?0:3!==(n=t.andln(7)+a&7)&&5!==n||2!==s?c:-c,r[1].push(d),2*i===o+1&&(i=1-i),2*a===d+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new n(e,"hex","le")}}();var xe,Se={exports:{}};function Ne(e){this.rand=e}if(Se.exports=function(e){return xe||(xe=new Ne(null)),xe.generate(e)},Se.exports.Rand=Ne,Ne.prototype.generate=function(e){return this._rand(e)},Ne.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?Ne.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?Ne.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(Ne.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var Ee=e.require$$1;if("function"!=typeof Ee.randomBytes)throw new Error("Not supported");Ne.prototype._rand=function(e){return Ee.randomBytes(e)}}catch(o){}var _e={},Ce=Me.exports,Te=Ae,Pe=Te.getNAF,ke=Te.getJSF,Ke=Te.assert;function De(e,t){this.type=e,this.p=new Ce(t.p,16),this.red=t.prime?Ce.red(t.prime):Ce.mont(this.p),this.zero=new Ce(0).toRed(this.red),this.one=new Ce(1).toRed(this.red),this.two=new Ce(2).toRed(this.red),this.n=t.n&&new Ce(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Fe=De;function Ie(e,t){this.curve=e,this.type=t,this.precomputed=null}De.prototype.point=function(){throw new Error("Not implemented")},De.prototype.validate=function(){throw new Error("Not implemented")},De.prototype._fixedNafMul=function(e,t){Ke(e.precomputed);var r=e._getDoubles(),n=Pe(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var a,o,d=[];for(a=0;a<n.length;a+=r.step){o=0;for(var s=a+r.step-1;s>=a;s--)o=(o<<1)+n[s];d.push(o)}for(var c=this.jpoint(null,null,null),u=this.jpoint(null,null,null),f=i;f>0;f--){for(a=0;a<d.length;a++)(o=d[a])===f?u=u.mixedAdd(r.points[a]):o===-f&&(u=u.mixedAdd(r.points[a].neg()));c=c.add(u)}return c.toP()},De.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=Pe(t,r,this._bitLength),o=this.jpoint(null,null,null),d=a.length-1;d>=0;d--){for(var s=0;d>=0&&0===a[d];d--)s++;if(d>=0&&s++,o=o.dblp(s),d<0)break;var c=a[d];Ke(0!==c),o="affine"===e.type?c>0?o.mixedAdd(i[c-1>>1]):o.mixedAdd(i[-c-1>>1].neg()):c>0?o.add(i[c-1>>1]):o.add(i[-c-1>>1].neg())}return"affine"===e.type?o.toP():o},De.prototype._wnafMulAdd=function(e,t,r,n,i){var a,o,d,s=this._wnafT1,c=this._wnafT2,u=this._wnafT3,f=0;for(a=0;a<n;a++){var l=(d=t[a])._getNAFPoints(e);s[a]=l.wnd,c[a]=l.points}for(a=n-1;a>=1;a-=2){var h=a-1,p=a;if(1===s[h]&&1===s[p]){var m=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(m[1]=t[h].add(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].add(t[p].neg())):(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=ke(r[h],r[p]);for(f=Math.max(y[0].length,f),u[h]=new Array(f),u[p]=new Array(f),o=0;o<f;o++){var b=0|y[0][o],g=0|y[1][o];u[h][o]=v[3*(b+1)+(g+1)],u[p][o]=0,c[h]=m}}else u[h]=Pe(r[h],s[h],this._bitLength),u[p]=Pe(r[p],s[p],this._bitLength),f=Math.max(u[h].length,f),f=Math.max(u[p].length,f)}var w=this.jpoint(null,null,null),A=this._wnafT4;for(a=f;a>=0;a--){for(var M=0;a>=0;){var R=!0;for(o=0;o<n;o++)A[o]=0|u[o][a],0!==A[o]&&(R=!1);if(!R)break;M++,a--}if(a>=0&&M++,w=w.dblp(M),a<0)break;for(o=0;o<n;o++){var x=A[o];0!==x&&(x>0?d=c[o][x-1>>1]:x<0&&(d=c[o][-x-1>>1].neg()),w="affine"===d.type?w.mixedAdd(d):w.add(d))}}for(a=0;a<n;a++)c[a]=null;return i?w:w.toP()},De.BasePoint=Ie,Ie.prototype.eq=function(){throw new Error("Not implemented")},Ie.prototype.validate=function(){return this.curve.validate(this)},De.prototype.decodePoint=function(e,t){e=Te.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?Ke(e[e.length-1]%2==0):7===e[0]&&Ke(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},Ie.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Ie.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},Ie.prototype.encode=function(e,t){return Te.encode(this._encode(t),e)},Ie.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},Ie.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},Ie.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var a=0;a<e;a++)n=n.dbl();r.push(n)}return{step:e,points:r}},Ie.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},Ie.prototype._getBeta=function(){return null},Ie.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var Be=Ae,je=Me.exports,Oe=e.inherits_browser.exports,Ue=Fe,Le=Be.assert;function ze(e){Ue.call(this,"short",e),this.a=new je(e.a,16).toRed(this.red),this.b=new je(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Oe(ze,Ue);var He=ze;function Ge(e,t,r,n){Ue.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new je(t,16),this.y=new je(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function qe(e,t,r,n){Ue.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new je(0)):(this.x=new je(t,16),this.y=new je(r,16),this.z=new je(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}ze.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new je(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new je(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],Le(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new je(e.a,16),b:new je(e.b,16)}})):this._getEndoBasis(r)}}},ze.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:je.mont(e),r=new je(2).toRed(t).redInvm(),n=r.redNeg(),i=new je(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},ze.prototype._getEndoBasis=function(e){for(var t,r,n,i,a,o,d,s,c,u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,l=this.n.clone(),h=new je(1),p=new je(0),m=new je(0),v=new je(1),y=0;0!==f.cmpn(0);){var b=l.div(f);s=l.sub(b.mul(f)),c=m.sub(b.mul(h));var g=v.sub(b.mul(p));if(!n&&s.cmp(u)<0)t=d.neg(),r=h,n=s.neg(),i=c;else if(n&&2==++y)break;d=s,l=f,f=s,m=h,h=c,v=p,p=g}a=s.neg(),o=c;var w=n.sqr().add(i.sqr());return a.sqr().add(o.sqr()).cmp(w)>=0&&(a=t,o=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:n,b:i},{a:a,b:o}]},ze.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),d=a.mul(n.a),s=i.mul(r.b),c=a.mul(n.b);return{k1:e.sub(o).sub(d),k2:s.add(c).neg()}},ze.prototype.pointFromX=function(e,t){(e=new je(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},ze.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},ze.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(t[a]),d=e[a],s=d._getBeta();o.k1.negative&&(o.k1.ineg(),d=d.neg(!0)),o.k2.negative&&(o.k2.ineg(),s=s.neg(!0)),n[2*a]=d,n[2*a+1]=s,i[2*a]=o.k1,i[2*a+1]=o.k2}for(var c=this._wnafMulAdd(1,n,i,2*a,r),u=0;u<2*a;u++)n[u]=null,i[u]=null;return c},Oe(Ge,Ue.BasePoint),ze.prototype.point=function(e,t,r){return new Ge(this,e,t,r)},ze.prototype.pointFromJSON=function(e,t){return Ge.fromJSON(this,e,t)},Ge.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},Ge.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Ge.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var a=t[2];return n.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[n].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[n].concat(a.naf.points.map(i))}},n},Ge.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Ge.prototype.isInfinity=function(){return this.inf},Ge.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},Ge.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},Ge.prototype.getX=function(){return this.x.fromRed()},Ge.prototype.getY=function(){return this.y.fromRed()},Ge.prototype.mul=function(e){return e=new je(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Ge.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},Ge.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},Ge.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Ge.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},Ge.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Oe(qe,Ue.BasePoint),ze.prototype.jpoint=function(e,t,r){return new qe(this,e,t,r)},qe.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},qe.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},qe.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),d=n.redSub(i),s=a.redSub(o);if(0===d.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=d.redSqr(),u=c.redMul(d),f=n.redMul(c),l=s.redSqr().redIAdd(u).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(a.redMul(u)),p=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(l,h,p)},qe.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),d=i.redSub(a);if(0===o.cmpn(0))return 0!==d.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=o.redSqr(),c=s.redMul(o),u=r.redMul(s),f=d.redSqr().redIAdd(c).redISub(u).redISub(u),l=d.redMul(u.redISub(f)).redISub(i.redMul(c)),h=this.z.redMul(o);return this.curve.jpoint(f,l,h)},qe.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,a=this.x,o=this.y,d=this.z,s=d.redSqr().redSqr(),c=o.redAdd(o);for(t=0;t<e;t++){var u=a.redSqr(),f=c.redSqr(),l=f.redSqr(),h=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(s)),p=a.redMul(f),m=h.redSqr().redISub(p.redAdd(p)),v=p.redISub(m),y=h.redMul(v);y=y.redIAdd(y).redISub(l);var b=c.redMul(d);t+1<e&&(s=s.redMul(l)),a=m,d=b,c=y}return this.curve.jpoint(a,c.redMul(i),d)},qe.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},qe.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var d=n.redAdd(n).redIAdd(n),s=d.redSqr().redISub(o).redISub(o),c=a.redIAdd(a);c=(c=c.redIAdd(c)).redIAdd(c),e=s,t=d.redMul(o.redISub(s)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),f=this.y.redSqr(),l=f.redSqr(),h=this.x.redAdd(f).redSqr().redISub(u).redISub(l);h=h.redIAdd(h);var p=u.redAdd(u).redIAdd(u),m=p.redSqr(),v=l.redIAdd(l);v=(v=v.redIAdd(v)).redIAdd(v),e=m.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(v),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},qe.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var d=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),s=d.redSqr().redISub(o).redISub(o);e=s;var c=a.redIAdd(a);c=(c=c.redIAdd(c)).redIAdd(c),t=d.redMul(o.redISub(s)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),f=this.y.redSqr(),l=this.x.redMul(f),h=this.x.redSub(u).redMul(this.x.redAdd(u));h=h.redAdd(h).redIAdd(h);var p=l.redIAdd(l),m=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(u);var v=f.redSqr();v=(v=(v=v.redIAdd(v)).redIAdd(v)).redIAdd(v),t=h.redMul(p.redISub(e)).redISub(v)}return this.curve.jpoint(e,t,r)},qe.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),a=t.redSqr(),o=r.redSqr(),d=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(i)),s=t.redAdd(t),c=(s=s.redIAdd(s)).redMul(o),u=d.redSqr().redISub(c.redAdd(c)),f=c.redISub(u),l=o.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=d.redMul(f).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(u,h,p)},qe.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),a=i.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(n),d=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(a)).redSqr(),s=n.redIAdd(n);s=(s=(s=s.redIAdd(s)).redIAdd(s)).redIAdd(s);var c=i.redIAdd(o).redSqr().redISub(a).redISub(d).redISub(s),u=t.redMul(c);u=(u=u.redIAdd(u)).redIAdd(u);var f=this.x.redMul(d).redISub(u);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.y.redMul(c.redMul(s.redISub(c)).redISub(o.redMul(d)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=this.z.redAdd(o).redSqr().redISub(r).redISub(d);return this.curve.jpoint(f,l,h)},qe.prototype.mul=function(e,t){return e=new je(e,t),this.curve._wnafMul(this,e)},qe.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},qe.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},qe.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},qe.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var $e=Me.exports,Je=e.inherits_browser.exports,Xe=Fe,Ze=Ae;function Ve(e){Xe.call(this,"mont",e),this.a=new $e(e.a,16).toRed(this.red),this.b=new $e(e.b,16).toRed(this.red),this.i4=new $e(4).toRed(this.red).redInvm(),this.two=new $e(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Je(Ve,Xe);var We=Ve;function Ye(e,t,r){Xe.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new $e(t,16),this.z=new $e(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Ve.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},Je(Ye,Xe.BasePoint),Ve.prototype.decodePoint=function(e,t){return this.point(Ze.toArray(e,t),1)},Ve.prototype.point=function(e,t){return new Ye(this,e,t)},Ve.prototype.pointFromJSON=function(e){return Ye.fromJSON(this,e)},Ye.prototype.precompute=function(){},Ye.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},Ye.fromJSON=function(e,t){return new Ye(e,t[0],t[1]||e.one)},Ye.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},Ye.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Ye.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},Ye.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},Ye.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),o=i.redMul(n),d=t.z.redMul(a.redAdd(o).redSqr()),s=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(d,s)},Ye.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},Ye.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},Ye.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},Ye.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},Ye.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},Ye.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var Qe=Ae,et=Me.exports,tt=e.inherits_browser.exports,rt=Fe,nt=Qe.assert;function it(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,rt.call(this,"edwards",e),this.a=new et(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new et(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new et(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),nt(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}tt(it,rt);var at=it;function ot(e,t,r,n,i){rt.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new et(t,16),this.y=new et(r,16),this.z=n?new et(n,16):this.curve.one,this.t=i&&new et(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}it.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},it.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},it.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},it.prototype.pointFromX=function(e,t){(e=new et(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(i.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var d=o.fromRed().isOdd();return(t&&!d||!t&&d)&&(o=o.redNeg()),this.point(e,o)},it.prototype.pointFromY=function(e,t){(e=new et(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(i.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},it.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},tt(ot,rt.BasePoint),it.prototype.pointFromJSON=function(e){return ot.fromJSON(this,e)},it.prototype.point=function(e,t,r,n){return new ot(this,e,t,r,n)},ot.fromJSON=function(e,t){return new ot(e,t[0],t[1],t[2])},ot.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},ot.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},ot.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),d=n.redSub(t),s=i.redMul(o),c=a.redMul(d),u=i.redMul(d),f=o.redMul(a);return this.curve.point(s,c,f,u)},ot.prototype._projDbl=function(){var e,t,r,n,i,a,o=this.x.redAdd(this.y).redSqr(),d=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(d)).redAdd(s);this.zOne?(e=o.redSub(d).redSub(s).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(s)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),a=c.redSub(i).redISub(i),e=o.redSub(d).redISub(s).redMul(a),t=c.redMul(n.redSub(s)),r=c.redMul(a))}else n=d.redAdd(s),i=this.curve._mulC(this.z).redSqr(),a=n.redSub(i).redSub(i),e=this.curve._mulC(o.redISub(n)).redMul(a),t=this.curve._mulC(n).redMul(d.redISub(s)),r=n.redMul(a);return this.curve.point(e,t,r)},ot.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},ot.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),d=i.redAdd(n),s=r.redAdd(t),c=a.redMul(o),u=d.redMul(s),f=a.redMul(s),l=o.redMul(d);return this.curve.point(c,u,l,f)},ot.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),d=this.curve.d.redMul(a).redMul(o),s=i.redSub(d),c=i.redAdd(d),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),f=n.redMul(s).redMul(u);return this.curve.twisted?(t=n.redMul(c).redMul(o.redSub(this.curve._mulA(a))),r=s.redMul(c)):(t=n.redMul(c).redMul(o.redSub(a)),r=this.curve._mulC(s).redMul(c)),this.curve.point(f,t,r)},ot.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},ot.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},ot.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},ot.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},ot.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},ot.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},ot.prototype.getX=function(){return this.normalize(),this.x.fromRed()},ot.prototype.getY=function(){return this.normalize(),this.y.fromRed()},ot.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},ot.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},ot.prototype.toP=ot.prototype.normalize,ot.prototype.mixedAdd=ot.prototype.add,function(e){var t=e;t.base=Fe,t.short=He,t.mont=We,t.edwards=at}(_e);var dt,st,ct={};!function(t){var r,n=ct,i=e.hash,a=_e,o=Ae.assert;function d(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new d(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=d,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:i.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:i.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=st?dt:(st=1,dt={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}();var ut=e.hash,ft=Re,lt=e.minimalisticAssert;function ht(e){if(!(this instanceof ht))return new ht(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=ft.toArray(e.entropy,e.entropyEnc||"hex"),r=ft.toArray(e.nonce,e.nonceEnc||"hex"),n=ft.toArray(e.pers,e.persEnc||"hex");lt(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var pt=ht;ht.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},ht.prototype._hmac=function(){return new ut.hmac(this.hash,this.K)},ht.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},ht.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=ft.toArray(e,t),r=ft.toArray(r,n),lt(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},ht.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=ft.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var a=i.slice(0,e);return this._update(r),this._reseed++,ft.encode(a,t)};var mt=Me.exports,vt=Ae.assert;function yt(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var bt=yt;yt.fromPublic=function(e,t,r){return t instanceof yt?t:new yt(e,{pub:t,pubEnc:r})},yt.fromPrivate=function(e,t,r){return t instanceof yt?t:new yt(e,{priv:t,privEnc:r})},yt.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},yt.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},yt.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},yt.prototype._importPrivate=function(e,t){this.priv=new mt(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},yt.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?vt(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||vt(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},yt.prototype.derive=function(e){return e.validate()||vt(e.validate(),"public point not validated"),e.mul(this.priv).getX()},yt.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},yt.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},yt.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var gt=Me.exports,wt=Ae,At=wt.assert;function Mt(e,t){if(e instanceof Mt)return e;this._importDER(e,t)||(At(e.r&&e.s,"Signature without r or s"),this.r=new gt(e.r,16),this.s=new gt(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var Rt=Mt;function xt(){this.place=0}function St(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,a=0,o=t.place;a<n;a++,o++)i<<=8,i|=e[o],i>>>=0;return!(i<=127)&&(t.place=o,i)}function Nt(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function Et(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}Mt.prototype._importDER=function(e,t){e=wt.toArray(e,t);var r=new xt;if(48!==e[r.place++])return!1;var n=St(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=St(e,r);if(!1===i)return!1;var a=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var o=St(e,r);if(!1===o)return!1;if(e.length!==o+r.place)return!1;var d=e.slice(r.place,o+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new gt(a),this.s=new gt(d),this.recoveryParam=null,!0},Mt.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=Nt(t),r=Nt(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];Et(n,t.length),(n=n.concat(t)).push(2),Et(n,r.length);var i=n.concat(r),a=[48];return Et(a,i.length),a=a.concat(i),wt.encode(a,e)};var _t=Me.exports,Ct=pt,Tt=Ae,Pt=ct,kt=Se.exports,Kt=Tt.assert,Dt=bt,Ft=Rt;function It(e){if(!(this instanceof It))return new It(e);"string"==typeof e&&(Kt(Object.prototype.hasOwnProperty.call(Pt,e),"Unknown curve "+e),e=Pt[e]),e instanceof Pt.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Bt=It;It.prototype.keyPair=function(e){return new Dt(this,e)},It.prototype.keyFromPrivate=function(e,t){return Dt.fromPrivate(this,e,t)},It.prototype.keyFromPublic=function(e,t){return Dt.fromPublic(this,e,t)},It.prototype.genKeyPair=function(e){e||(e={});for(var t=new Ct({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||kt(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new _t(2));;){var i=new _t(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},It.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},It.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new _t(e,16));for(var i=this.n.byteLength(),a=t.getPrivate().toArray("be",i),o=e.toArray("be",i),d=new Ct({hash:this.hash,entropy:a,nonce:o,pers:n.pers,persEnc:n.persEnc||"utf8"}),s=this.n.sub(new _t(1)),c=0;;c++){var u=n.k?n.k(c):new _t(d.generate(this.n.byteLength()));if(!((u=this._truncateToN(u,!0)).cmpn(1)<=0||u.cmp(s)>=0)){var f=this.g.mul(u);if(!f.isInfinity()){var l=f.getX(),h=l.umod(this.n);if(0!==h.cmpn(0)){var p=u.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var m=(f.getY().isOdd()?1:0)|(0!==l.cmp(h)?2:0);return n.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),m^=1),new Ft({r:h,s:p,recoveryParam:m})}}}}}},It.prototype.verify=function(e,t,r,n){e=this._truncateToN(new _t(e,16)),r=this.keyFromPublic(r,n);var i=(t=new Ft(t,"hex")).r,a=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var o,d=a.invm(this.n),s=d.mul(e).umod(this.n),c=d.mul(i).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(s,r.getPublic(),c)).isInfinity()&&o.eqXToP(i):!(o=this.g.mulAdd(s,r.getPublic(),c)).isInfinity()&&0===o.getX().umod(this.n).cmp(i)},It.prototype.recoverPubKey=function(e,t,r,n){Kt((3&r)===r,"The recovery param is more than two bits"),t=new Ft(t,n);var i=this.n,a=new _t(e),o=t.r,d=t.s,s=1&r,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");o=c?this.curve.pointFromX(o.add(this.curve.n),s):this.curve.pointFromX(o,s);var u=t.r.invm(i),f=i.sub(a).mul(u).umod(i),l=d.mul(u).umod(i);return this.g.mulAdd(f,o,l)},It.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new Ft(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var jt=Ae,Ot=jt.assert,Ut=jt.parseBytes,Lt=jt.cachedProperty;function zt(e,t){this.eddsa=e,this._secret=Ut(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=Ut(t.pub)}zt.fromPublic=function(e,t){return t instanceof zt?t:new zt(e,{pub:t})},zt.fromSecret=function(e,t){return t instanceof zt?t:new zt(e,{secret:t})},zt.prototype.secret=function(){return this._secret},Lt(zt,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Lt(zt,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Lt(zt,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),Lt(zt,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Lt(zt,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Lt(zt,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),zt.prototype.sign=function(e){return Ot(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},zt.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},zt.prototype.getSecret=function(e){return Ot(this._secret,"KeyPair is public only"),jt.encode(this.secret(),e)},zt.prototype.getPublic=function(e){return jt.encode(this.pubBytes(),e)};var Ht=zt,Gt=Me.exports,qt=Ae,$t=qt.assert,Jt=qt.cachedProperty,Xt=qt.parseBytes;function Zt(e,t){this.eddsa=e,"object"!=typeof t&&(t=Xt(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),$t(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof Gt&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}Jt(Zt,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Jt(Zt,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Jt(Zt,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Jt(Zt,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Zt.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Zt.prototype.toHex=function(){return qt.encode(this.toBytes(),"hex").toUpperCase()};var Vt=Zt,Wt=e.hash,Yt=ct,Qt=Ae,er=Qt.assert,tr=Qt.parseBytes,rr=Ht,nr=Vt;function ir(e){if(er("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof ir))return new ir(e);e=Yt[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=Wt.sha512}var ar=ir;ir.prototype.sign=function(e,t){e=tr(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),d=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:d,Rencoded:a})},ir.prototype.verify=function(e,t,r){e=tr(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(a)},ir.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return Qt.intFromLE(e.digest()).umod(this.curve.n)},ir.prototype.keyFromPublic=function(e){return rr.fromPublic(this,e)},ir.prototype.keyFromSecret=function(e){return rr.fromSecret(this,e)},ir.prototype.makeSignature=function(e){return e instanceof nr?e:new nr(this,e)},ir.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},ir.prototype.decodePoint=function(e){var t=(e=Qt.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=Qt.intFromLE(r);return this.curve.pointFromY(i,n)},ir.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},ir.prototype.decodeInt=function(e){return Qt.intFromLE(e)},ir.prototype.isPoint=function(e){return e instanceof this.pointClass},function(e){var t=e;t.version=we,t.utils=Ae,t.rand=Se.exports,t.curve=_e,t.curves=ct,t.ec=Bt,t.eddsa=ar}(ge),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.recover=t.hashMessage=void 0;var r=e.sha3.exports,n=b,i=new ge.ec("secp256k1"),a=function(e){return(e.length-2)/2},o=function(e,t,r){return"0x"+r.slice(2*e+2,2*t+2)},d=function(e){return parseInt(e.slice(2),16)};t.hashMessage=function(e){var t=(0,n.hexToBytes)(Buffer.from(e,"utf8").toString("hex")),i=Buffer.from(t),a="Ethereum Signed Message:\n"+t.length,o=Buffer.from(a),d=Buffer.concat([o,i]);return"0x"+(0,r.keccak256)(d.toString())};t.recover=function(e,s){var c,u=(0,t.hashMessage)(e),f=[o(64,a(c=s),c),o(0,32,c),o(32,64,c)],l={v:d(f[0]),r:f[1].slice(2),s:f[2].slice(2)},h="0x"+i.recoverPubKey(Buffer.from(u.slice(2),"hex"),l,l.v<2?l.v:1-l.v%2).encode("hex",!1).slice(2);return function(e){for(var t=(0,r.keccak256)(e.slice(2)),n="0x",i=0;i<40;i++)n+=parseInt(t[i+2],16)>7?e[i+2].toUpperCase():e[i+2];return n}("0x"+("0x"+(0,r.keccak256)((0,n.hexToBytes)(h))).slice(-40))}}(be),Object.defineProperty(ye,"__esModule",{value:!0}),ye.isValidTwitterSignature=void 0;var or=b,dr=e.sha3.exports,sr=be,cr=j;ye.isValidTwitterSignature=function(e){var t=e.tokenId,r=e.owner,n=e.twitterHandle,i=e.validationSignature,a=[(0,cr.fromHexStringToDecimals)(t),r,"social.twitter.username",n].map((function(e){return"0x"+(0,dr.keccak256)(e.startsWith("0x")?(0,or.hexToBytes)(e):e)})).reduce((function(e,t){return e+t}),"");return"0x12cfb13522F13a78b650a8bCbFCf50b7CB899d82"===(0,sr.recover)(a,i)};var ur={},fr={},lr=e.getAugmentedNamespace(i),hr=e.commonjsGlobal&&e.commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function d(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,d)}s((n=n.apply(e,t||[])).next())}))},pr=e.commonjsGlobal&&e.commonjsGlobal.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(a){return function(d){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}};Object.defineProperty(fr,"__esModule",{value:!0});var mr=lr,vr=function(){function e(e,t,r){this.abi=e,this.address=t,this.provider=r,this.coder=new mr.Interface(this.abi)}return e.prototype.call=function(e,t){return hr(this,void 0,void 0,(function(){var r,n;return pr(this,(function(i){switch(i.label){case 0:return r=this.coder.encodeFunctionData(e,t),[4,this.callEth(r)];case 1:return(n=i.sent())&&"0x"!==n?[2,this.coder.decodeFunctionResult(e,n)]:[2,[]]}}))}))},e.prototype.multicall=function(e){return hr(this,void 0,void 0,(function(){var t,r,n,i,a,o,d,s,c;return pr(this,(function(u){switch(u.label){case 0:for(t=[],r=0,n=e;r<n.length;r++)i=n[r],t.push(this.coder.encodeFunctionData(i.method,i.args));return a=this.coder.encodeFunctionData("multicall",[t]),[4,this.callEth(a)];case 1:if(!(o=u.sent())||"0x"===o)return[2,[]];for(d=this.coder.decodeFunctionResult("multicall",o),s=[],c=0;c<d.results.length;c++)s.push(this.coder.decodeFunctionResult(e[c].method,d.results[c]));return[2,s]}}))}))},e.prototype.fetchLogs=function(e,t,r){return void 0===r&&(r="earliest"),hr(this,void 0,void 0,(function(){var n,i,a;return pr(this,(function(o){switch(o.label){case 0:return n=this.coder.getEventTopic(e),i=[{fromBlock:r,toBlock:"latest",address:this.address,topics:[n,t]}],a={method:"eth_getLogs",params:i},[4,this.provider.request(a)];case 1:return[2,o.sent()]}}))}))},e.prototype.callEth=function(e){return hr(this,void 0,void 0,(function(){var t,r;return pr(this,(function(n){switch(n.label){case 0:return t=[{data:e,to:this.address},"latest"],r={method:"eth_call",params:t},[4,this.provider.request(r)];case 1:return[2,n.sent()]}}))}))},e}();fr.default=vr;var yr={};Object.defineProperty(yr,"__esModule",{value:!0}),yr.default=[{inputs:[{internalType:"contract IUNSRegistry",name:"unsRegistry",type:"address"},{internalType:"contract ICNSRegistry",name:"cnsRegistry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"NAME",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"label",type:"string"}],name:"childIdOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"exists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"key",type:"string"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"get",outputs:[{internalType:"string",name:"value",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"keyHash",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getByHash",outputs:[{internalType:"string",name:"key",type:"string"},{internalType:"string",name:"value",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string[]",name:"keys",type:"string[]"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getData",outputs:[{internalType:"address",name:"resolver",type:"address"},{internalType:"address",name:"owner",type:"address"},{internalType:"string[]",name:"values",type:"string[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256[]",name:"keyHashes",type:"uint256[]"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getDataByHash",outputs:[{internalType:"address",name:"resolver",type:"address"},{internalType:"address",name:"owner",type:"address"},{internalType:"string[]",name:"keys",type:"string[]"},{internalType:"string[]",name:"values",type:"string[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256[]",name:"keyHashes",type:"uint256[]"},{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"}],name:"getDataByHashForMany",outputs:[{internalType:"address[]",name:"resolvers",type:"address[]"},{internalType:"address[]",name:"owners",type:"address[]"},{internalType:"string[][]",name:"keys",type:"string[][]"},{internalType:"string[][]",name:"values",type:"string[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string[]",name:"keys",type:"string[]"},{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"}],name:"getDataForMany",outputs:[{internalType:"address[]",name:"resolvers",type:"address[]"},{internalType:"address[]",name:"owners",type:"address[]"},{internalType:"string[][]",name:"values",type:"string[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string[]",name:"keys",type:"string[]"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getMany",outputs:[{internalType:"string[]",name:"values",type:"string[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256[]",name:"keyHashes",type:"uint256[]"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getManyByHash",outputs:[{internalType:"string[]",name:"keys",type:"string[]"},{internalType:"string[]",name:"values",type:"string[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"isApprovedOrOwner",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"}],name:"ownerOfForMany",outputs:[{internalType:"address[]",name:"owners",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"registryOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"resolverOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],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:"addr",type:"address"}],name:"reverseOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}];var br={version:"0.4.0",networks:{1:{contracts:{UNSRegistry:{address:"0x049aba7510f45BA5b64ea9E658E342F904DB358D",implementation:"0xa715562307AA8AEDCba976b3793b3337F371c14a",legacyAddresses:[],deploymentBlock:"0xd62e9d",forwarder:"0x049aba7510f45BA5b64ea9E658E342F904DB358D"},CNSRegistry:{address:"0xD1E5b0FF1287aA9f9A268759062E4Ab08b9Dacbe",legacyAddresses:[],deploymentBlock:"0x8a958b",forwarder:"0x97B0E89fC1B7eD4A8B237D9d8Fcce9b234f25A37"},MintingManager:{address:"0x2a7084870bB724175a3C96Da8FaA55128fa3E19D",implementation:"0x8caAeaD19aab5f54C94BB9F4be32e200E54AC8D7",legacyAddresses:[],deploymentBlock:"0xc2fee0",forwarder:"0xb970fbCF52cd8111c76c379D4f2FE12E7f8AE7fb"},ProxyAdmin:{address:"0xAA16DA78110D9A9742c760a1a064F28654Ab93de",legacyAddresses:[],deploymentBlock:"0xc2fedc"},SignatureController:{address:"0x82EF94294C95aD0930055f31e53A34509227c5f7",legacyAddresses:[],deploymentBlock:"0x8a95a6"},MintingController:{address:"0xb0EE56339C3253361730F50c08d3d7817ecD60Ca",legacyAddresses:[],deploymentBlock:"0x8a95aa",deprecated:!0},WhitelistedMinter:{address:"0xd3fF3377b0ceade1303dAF9Db04068ef8a650757",legacyAddresses:[],deploymentBlock:"0xa76ad3",deprecated:!0},URIPrefixController:{address:"0x09B091492759737C03da9dB7eDF1CD6BCC3A9d91",legacyAddresses:[],deploymentBlock:"0x8a95ae",deprecated:!0},DomainZoneController:{address:"0xeA70777e28E00E81f58b8921fC47F78B8a72eFE7",legacyAddresses:[],deploymentBlock:"0x98ca20",deprecated:!0},Resolver:{address:"0xb66DcE2DA6afAAa98F2013446dBCB0f4B0ab2842",legacyAddresses:["0xa1cac442be6673c49f8e74ffc7c4fd746f3cbd0d","0x878bc2f3f717766ab69c0a5f9a6144931e61aed3"],deploymentBlock:"0x960844",forwarder:"0x486eb10E4F48C038513ECAf11585Ca2779768CF2"},ProxyReader:{address:"0x1BDc0fD4fbABeed3E611fd6195fCd5d41dcEF393",legacyAddresses:["0x58034A288D2E56B661c9056A0C27273E5460B63c","0xc3C2BAB5e3e52DBF311b2aAcEf2e40344f19494E","0xfEe4D4F0aDFF8D84c12170306507554bC7045878","0xa6E7cEf2EDDEA66352Fd68E5915b60BDbb7309f5","0x7ea9Ee21077F84339eDa9C80048ec6db678642B1"],deploymentBlock:"0xde71cd"},TwitterValidationOperator:{address:"0x2F659766E3D08561CA3408FbAba7C0749ab2c402",legacyAddresses:["0xbb486C6E9cF1faA86a6E3eAAFE2e5665C0507855"],deploymentBlock:"0xc300b5"},FreeMinter:{address:"0x1fC985cAc641ED5846b631f96F35d9b48Bc3b834",legacyAddresses:[],deploymentBlock:"0xacc390",deprecated:!0},MintableERC721Predicate:{address:"0x932532aA4c0174b8453839A6E44eE09Cc615F2b7",legacyAddresses:[],deploymentBlock:"0xa3cf69"},RootChainManager:{address:"0xA0c68C638235ee32657e8f720a23ceC1bFc77C77",legacyAddresses:[],deploymentBlock:"0xa3cf4d"}}},4:{contracts:{UNSRegistry:{address:"0x7fb83000B8eD59D3eAD22f0D584Df3a85fBC0086",implementation:"0xc479D7A65243f7Eb1641F06a6C04E5F06cb5c4F7",legacyAddresses:[],deploymentBlock:"0x85e628",forwarder:"0x7fb83000B8eD59D3eAD22f0D584Df3a85fBC0086"},CNSRegistry:{address:"0xAad76bea7CFEc82927239415BB18D2e93518ecBB",legacyAddresses:[],deploymentBlock:"0x7232bc",forwarder:"0xdf5CC97216785398D5C77348e68fc9461108f85d"},MintingManager:{address:"0xdAAf99A920D31F4f5720e4667b12b24e54A03070",implementation:"0x38Fa95a0AC0E59D6e2845eFADBc17aF0FF9c7089",legacyAddresses:[],deploymentBlock:"0x85e629",forwarder:"0xfB13e29C4D31a48B4Cd61131Cf3b681416e11681"},ProxyAdmin:{address:"0xaf9815005A208d1460b6fC60B4f90B9f2185E88c",legacyAddresses:[],deploymentBlock:"0x85e627"},SignatureController:{address:"0x66a5e3e2C27B4ce4F46BBd975270BE154748D164",legacyAddresses:[],deploymentBlock:"0x7232be"},MintingController:{address:"0x51765307AeB3Df2E647014a2C501d5324212467c",legacyAddresses:[],deploymentBlock:"0x7232bf",deprecated:!0},WhitelistedMinter:{address:"0xbcB32f13f90978a9e059E8Cb40FaA9e6619d98e7",legacyAddresses:[],deploymentBlock:"0x7232c6",deprecated:!0},URIPrefixController:{address:"0xe1d2e4B9f0518CA5c803073C3dFa886470627237",legacyAddresses:[],deploymentBlock:"0x7232c0",deprecated:!0},DomainZoneController:{address:"0x6f8F96A566663C1d4fEe70edD37E9b62Fe39dE5D",legacyAddresses:[],deploymentBlock:"0x7232c2",deprecated:!0},Resolver:{address:"0x95AE1515367aa64C462c71e87157771165B1287A",legacyAddresses:[],deploymentBlock:"0x7232cf",forwarder:"0xE172D8557d6F342b1b2976dE784F6Dff6ABC0a37"},ProxyReader:{address:"0xE6729D224D00b3dd4FC731C4Ee3274E35Da06578",legacyAddresses:["0x299974AeD8911bcbd2C61262605b89F591a53E83","0x9F19473F6a98a715176291c930558E1954fd3D1e","0x3A2e74CF832cbA3d77E72708d55370119E4323a6"],deploymentBlock:"0x8dc79a"},TwitterValidationOperator:{address:"0x9ea4A63184ebE9CBA55CD1af473D98075Aa02b4C",legacyAddresses:["0x1CB337b3b208dc29a6AcE8d11Bb591b66c5Dd83d"],deploymentBlock:"0x86935e"},FreeMinter:{address:"0x84214215904cDEbA9044ECf95F3eBF009185AAf4",legacyAddresses:[],deploymentBlock:"0x740d93",deprecated:!0}}},5:{contracts:{UNSRegistry:{address:"0x070e83FCed225184E67c86302493ffFCDB953f71",implementation:"0x4473e84898E3F58feEFb7529dfF9E83Ff26CCae9",legacyAddresses:[],deploymentBlock:"0x5b57ea",forwarder:"0x070e83FCed225184E67c86302493ffFCDB953f71"},CNSRegistry:{address:"0x801452cFAC27e79a11c6b185986fdE09e8637589",legacyAddresses:[],deploymentBlock:"0x5b57d7",forwarder:"0x00443017FFaa4C840Caf5Dc7d3CB59147f363080"},MintingManager:{address:"0x9ee42D3EB042e06F8Cd241890C4fA0d51e4DA345",implementation:"0xFB11410f3067BB6Db61bC335f0de23bE87A1767e",legacyAddresses:[],deploymentBlock:"0x5b57ec",forwarder:"0x7F9F48cF94C69ce91D4b442DA186F31118ac0185"},ProxyAdmin:{address:"0xf4906E210523F9dA79E33811A44EE000441F4E04",legacyAddresses:[],deploymentBlock:"0x5b57e8"},SignatureController:{address:"0x5199dAE4B24B987ba18FcE1b64664D1B798d372B",legacyAddresses:[],deploymentBlock:"0x5b57d8"},MintingController:{address:"0xCEC41677be322049cC885c0DAe2fE0D52CA195ca",legacyAddresses:[],deploymentBlock:"0x5b57d9",deprecated:!0},WhitelistedMinter:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},URIPrefixController:{address:"0x29465e3d2daA588E62375977bCe9b3f51406a794",legacyAddresses:[],deploymentBlock:"0x5b57da",deprecated:!0},DomainZoneController:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},Resolver:{address:"0x0555344A5F440Bd1d8cb6B42db46c5e5D4070437",legacyAddresses:[],deploymentBlock:"0x5b57dc",forwarder:"0xFCc1A95B7287Ae7a8B7cA813F12991dF5714d4C7"},ProxyReader:{address:"0xE3b961856C417d081a02cBa0161a051268F52677",legacyAddresses:["0x9A70ff906D422C2FD0F7B94244D6b36DB62Ee982","0xFc5f608149f4D9e2Ed0733efFe9DD57ee24BCF68"],deploymentBlock:"0x65bdfe"},TwitterValidationOperator:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0"},FreeMinter:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},MintableERC721Predicate:{address:"0x56E14C4C1748a818a5564D33cF774c59EB3eDF59",legacyAddresses:[],deploymentBlock:"0x2fc240"},RootChainManager:{address:"0xBbD7cBFA79faee899Eaf900F13C9065bF03B1A74",legacyAddresses:[],deploymentBlock:"0x2dc9b9"}}},137:{contracts:{UNSRegistry:{address:"0xa9a6A3626993D487d2Dbda3173cf58cA1a9D9e9f",legacyAddresses:[],deploymentBlock:"0x019d6188",implementation:"0x5442953b0BFFf69FC945f5f1387cbFD2e2673447",forwarder:"0xa9a6A3626993D487d2Dbda3173cf58cA1a9D9e9f"},CNSRegistry:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",forwarder:"0x0000000000000000000000000000000000000000"},MintingManager:{address:"0x7be83293BeeDc9Eba1bd76c66A65F10F3efaeC26",legacyAddresses:[],deploymentBlock:"0x01272f41",implementation:"0xBb45a6E10224Aa36EAcd812205F3763D353e9783",forwarder:"0xC37d3c4326ab0E1D2b9D8b916bBdf5715f780fcF"},ProxyAdmin:{address:"0xe1D668052D52388F52b90f4d1798DB2b04bC3b88",legacyAddresses:[],deploymentBlock:"0x01272d15"},SignatureController:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0"},MintingController:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},WhitelistedMinter:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},URIPrefixController:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},DomainZoneController:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},Resolver:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",forwarder:"0x0000000000000000000000000000000000000000"},ProxyReader:{address:"0x3E67b8c702a1292d1CEb025494C84367fcb12b45",legacyAddresses:["0x423F2531bd5d3C3D4EF7C318c2D1d9BEDE67c680","0xA3f32c8cd786dc089Bd1fC175F2707223aeE5d00"],deploymentBlock:"0x019d61a9"},TwitterValidationOperator:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0"},FreeMinter:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},MintableERC721Predicate:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0"},RootChainManager:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0"}}},1337:{contracts:{UNSRegistry:{address:"0x58a175BEbc8ec21A94ea63Aa5a28743945940EE6",legacyAddresses:[],deploymentBlock:"0x0d",implementation:"0xe0aFC4e9E03e4aa67257Df7A2Eca77454309789D",forwarder:"0x58a175BEbc8ec21A94ea63Aa5a28743945940EE6"},CNSRegistry:{address:"0xC58206842E4030a3B2CaBC78780Ae7635173C533",legacyAddresses:[],deploymentBlock:"0x01",forwarder:"0xAc52F68f31577E44aE0C7E95A42dC9eb574B9383"},MintingManager:{address:"0x27935e7e85db3c4e7885eB828B9e889BA69a4e7f",legacyAddresses:[],deploymentBlock:"0x0f",implementation:"0xa1A2114B0C4bDF9AEe05fdd80801e6267639FAd9",forwarder:"0xC20631145b77a58018E2b10f2282Dd048E12fC81"},ProxyAdmin:{address:"0xbE5dEAC45dd1ca4ee18Dc2D585D84D3d3CB82B0D",legacyAddresses:[],deploymentBlock:"0x01"},SignatureController:{address:"0x7bB6Cd9be29fab783c0b494A06FED8b2E2596B7a",legacyAddresses:[],deploymentBlock:"0x02"},MintingController:{address:"0x4a3C194eB88966178bfDD81744ddDafED611B830",legacyAddresses:[],deploymentBlock:"0x03",deprecated:!0},WhitelistedMinter:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},URIPrefixController:{address:"0x4872CC1be60A9DB9c880A0A437Da7a6AF134F08f",legacyAddresses:[],deploymentBlock:"0x04",deprecated:!0},DomainZoneController:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},Resolver:{address:"0xF8C26340C1eAeA6c7fF1760B25005e1306953572",legacyAddresses:[],deploymentBlock:"0x08",forwarder:"0x11dD97b7Ca847DfB6504e61B7B9Eb30F55E554a0"},ProxyReader:{address:"0x4e44E79e0cEc05D9e62e952B2088c02A3C450aeC",legacyAddresses:[],deploymentBlock:"0x14"},TwitterValidationOperator:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0"},FreeMinter:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},MintableERC721Predicate:{address:"0x7c3c91245769c8B7450aD522792deC4bd4bf797f",legacyAddresses:[],deploymentBlock:"0x1b"},RootChainManager:{address:"0x2f5e6eed50C839835BD2873d428E1683793Ad09D",legacyAddresses:[],deploymentBlock:"0x1d"}}},80001:{contracts:{UNSRegistry:{address:"0x2a93C52E7B6E7054870758e15A1446E769EdfB93",legacyAddresses:[],deploymentBlock:"0x0189f713",implementation:"0xAc1a1F2136BfDe3a353a95C0676Cd0d55f311ee3",forwarder:"0x2a93C52E7B6E7054870758e15A1446E769EdfB93"},CNSRegistry:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",forwarder:"0x0000000000000000000000000000000000000000"},MintingManager:{address:"0x428189346bb3CC52f031A1092fd47C919AC30A9f",legacyAddresses:[],deploymentBlock:"0x01213f4a",implementation:"0xCC17E698bA21bae4277579F22cA51135AaF00777",forwarder:"0xEf3a491A8750BEC2Dff5339CF6Df94436d432C4d"},ProxyAdmin:{address:"0x460d63117c7Ab1624b7474C45BF46eC6702f57ce",legacyAddresses:[],deploymentBlock:"0x01213b22"},SignatureController:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0"},MintingController:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},WhitelistedMinter:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},URIPrefixController:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},DomainZoneController:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},Resolver:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",forwarder:"0x0000000000000000000000000000000000000000"},ProxyReader:{address:"0x6fe7c857C1B0E54492C8762f27e0a45CA7ff264B",legacyAddresses:["0xbd9e01F6513E7C05f71Bf21d419a3bDF1EA9104b","0x332A8191905fA8E6eeA7350B5799F225B8ed30a9"],deploymentBlock:"0x0189f72d"},TwitterValidationOperator:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0"},FreeMinter:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0",deprecated:!0},MintableERC721Predicate:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0"},RootChainManager:{address:"0x0000000000000000000000000000000000000000",legacyAddresses:[],deploymentBlock:"0x0"}}}}},gr=e.commonjsGlobal&&e.commonjsGlobal.__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]}),wr=e.commonjsGlobal&&e.commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ar=e.commonjsGlobal&&e.commonjsGlobal.__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)&&gr(t,e,r);return wr(t,e),t},Mr=e.commonjsGlobal&&e.commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function d(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,d)}s((n=n.apply(e,t||[])).next())}))},Rr=e.commonjsGlobal&&e.commonjsGlobal.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(a){return function(d){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}},xr=e.commonjsGlobal&&e.commonjsGlobal.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},Sr=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ur,"__esModule",{value:!0});var Nr=w,Er=Sr(V),_r=V,Cr=b,Tr=Sr(M),Pr=Sr(fr),kr=Sr(yr),Kr=Sr(br),Dr=Ar(A),Fr=j,Ir=function(){function e(t,r,n){this.unsLocation=t,this.checkNetworkConfig(t,r),this.network=r.network,this.blockchain=n,this.url=r.url||e.UrlMap[this.network],this.provider=r.provider||new Tr.default(this.unsLocation,this.url),this.readerContract=new Pr.default(kr.default,r.proxyReaderAddress||e.ProxyReaderMap[Cr.EthereumNetworks[this.network]],this.provider)}return e.prototype.exists=function(e){return Mr(this,void 0,void 0,(function(){return Rr(this,(function(t){switch(t.label){case 0:return[4,this.readerContract.call("exists",[this.namehash(e)])];case 1:return[2,t.sent()[0]]}}))}))},e.prototype.reverseOf=function(e){return Mr(this,void 0,void 0,(function(){return Rr(this,(function(t){switch(t.label){case 0:return[4,this.readerContract.call("reverseOf",[e])];case 1:return[2,t.sent()[0]]}}))}))},e.prototype.getTokenUri=function(e){return Mr(this,void 0,void 0,(function(){return Rr(this,(function(t){switch(t.label){case 0:return[4,this.readerContract.call("tokenURI",[e])];case 1:return[2,t.sent()[0]]}}))}))},e.prototype.registryAddress=function(e){return Mr(this,void 0,void 0,(function(){var t,r,n;return Rr(this,(function(i){switch(i.label){case 0:if(t=!e.includes("."),!this.checkDomain(e,t))throw new Dr.default(Dr.ResolutionErrorCode.UnsupportedDomain,{domain:e});return r=t?e:this.namehash(e),[4,this.readerContract.call("registryOf",[r])];case 1:if(n=i.sent()[0],(0,Cr.isNullAddress)(n))throw new Dr.default(Dr.ResolutionErrorCode.UnregisteredDomain,{domain:e});return[2,n]}}))}))},e.prototype.resolver=function(e){return Mr(this,void 0,void 0,(function(){return Rr(this,(function(t){switch(t.label){case 0:return[4,this.getVerifiedData(e)];case 1:return[2,t.sent().resolver]}}))}))},e.prototype.get=function(e,t){return void 0===t&&(t=[]),Mr(this,void 0,void 0,(function(){var r,n,i,a;return Rr(this,(function(o){switch(o.label){case 0:return[4,this.readerContract.call("getData",[t,e])];case 1:return r=o.sent(),n=r[0],i=r[1],a=r[2],[2,{owner:i,resolver:n,records:(0,Cr.constructRecords)(t,a),location:this.unsLocation}]}}))}))},e.prototype.locations=function(e){return Mr(this,void 0,void 0,(function(){var t,r,n,i,a,o,d,s=this;return Rr(this,(function(c){switch(c.label){case 0:return t=e.map((function(e){return s.namehash(e)})),[4,this.readerContract.multicall(xr([{method:"getDataForMany",args:[[],t]}],t.map((function(e){return{method:"registryOf",args:[e]}})),!0))];case 1:return r=c.sent(),n=r[0],i=n[0],a=n[1],o=r.slice(1),d=e.reduce((function(e,t,r){return e[t]=null,a&&a[r]!==Nr.NullAddress&&(e[t]={resolverAddress:i[r],registryAddress:o[r][0],ownerAddress:a[r],networkId:Cr.EthereumNetworks[s.network],blockchain:s.blockchain,blockchainProviderUrl:s.url}),e}),{}),[2,d]}}))}))},e.prototype.namehash=function(e){if(!this.checkDomain(e))throw new Dr.default(Dr.ResolutionErrorCode.UnsupportedDomain,{domain:e});return(0,Fr.eip137Namehash)(e)},e.prototype.checkDomain=function(e,t){if(void 0===t&&(t=!1),t)return!0;var r=e.split(".");return!!r.length&&!("eth"===e||/^[^-]*[^-]*\.(eth|luxe|xyz|kred|addr\.reverse)$/.test(e))&&r.every((function(e){return!!e.length}))},e.prototype.getVerifiedData=function(e,t){return Mr(this,void 0,void 0,(function(){var r,n;return Rr(this,(function(i){switch(i.label){case 0:return r=this.namehash(e),[4,this.get(r,t)];case 1:if(n=i.sent(),(0,Cr.isNullAddress)(n.resolver)){if((0,Cr.isNullAddress)(n.owner))throw new Dr.default(Dr.ResolutionErrorCode.UnregisteredDomain,{domain:e});throw new Dr.default(Dr.ResolutionErrorCode.UnspecifiedResolver,{location:this.unsLocation,domain:e})}return[2,n]}}))}))},e.prototype.checkNetworkConfig=function(e,t){if(!t.network)throw new Er.default(_r.ConfigurationErrorCode.UnsupportedNetwork,{method:e});if(t.proxyReaderAddress&&!this.isValidProxyReader(t.proxyReaderAddress))throw new Er.default(_r.ConfigurationErrorCode.InvalidConfigurationField,{method:this.unsLocation,field:"proxyReaderAddress"});Nr.UnsSupportedNetwork.guard(t.network)||this.checkCustomNetworkConfig(t)},e.prototype.checkCustomNetworkConfig=function(e){if(!this.isValidProxyReader(e.proxyReaderAddress))throw new Er.default(_r.ConfigurationErrorCode.InvalidConfigurationField,{method:this.unsLocation,field:"proxyReaderAddress"});if(!e.url&&!e.provider)throw new Er.default(_r.ConfigurationErrorCode.CustomNetworkConfigMissing,{method:this.unsLocation,config:"url or provider"})},e.prototype.isValidProxyReader=function(e){if(!e)throw new Er.default(_r.ConfigurationErrorCode.CustomNetworkConfigMissing,{method:this.unsLocation,config:"proxyReaderAddress"});return new RegExp("^0x[a-fA-F0-9]{40}$").test(e)},e.ProxyReaderMap=function(){for(var e={},t=0,r=Object.keys(Kr.default.networks);t<r.length;t++){var n=r[t];e[n]=Kr.default.networks[n].contracts.ProxyReader.address.toLowerCase()}return e}(),e.UrlMap={mainnet:"https://mainnet.infura.io/v3/c4bb906ed6904c42b19c95825fe55f39",rinkeby:"https://eth-rinkeby.alchemyapi.io/v2/ZDERxOLIj120dh2-Io2Q9RTh9RfWEssT",goerli:"https://goerli.infura.io/v3/c4bb906ed6904c42b19c95825fe55f39","polygon-mainnet":"https://polygon-mainnet.infura.io/v3/c4bb906ed6904c42b19c95825fe55f39","polygon-mumbai":"https://polygon-mumbai.infura.io/v3/c4bb906ed6904c42b19c95825fe55f39"},e}();ur.default=Ir;var Br={version:"2.1.1",information:{description:"This file desribes all resolver keys with a defined meaning and related metadata used by Unstoppable Domains UNS Registry",documentation:"https://docs.unstoppabledomains.com/domain-registry-essentials/records-reference",contribution:"https://github.com/unstoppabledomains/uns/blob/main/resolver-keys.json"},keys:{"crypto.BTC.address":{deprecatedKeyName:"BTC",deprecated:!1,validationRegex:"^bc1[ac-hj-np-z02-9]{6,87}$|^[13][a-km-zA-HJ-NP-Z1-9]{25,39}$"},"crypto.ETH.address":{deprecatedKeyName:"ETH",deprecated:!1,validationRegex:"^0x[a-fA-F0-9]{40}$"},"crypto.ZIL.address":{deprecatedKeyName:"ZIL",deprecated:!1,validationRegex:"^zil1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}$"},"crypto.LTC.address":{deprecatedKeyName:"LTC",deprecated:!1,validationRegex:"^[LM3][a-km-zA-HJ-NP-Z1-9]{26,33}$|^ltc1[a-zA-HJ-NP-Z0-9]{25,39}$"},"crypto.ETC.address":{deprecatedKeyName:"ETC",deprecated:!1,validationRegex:"^0x[a-fA-F0-9]{40}$"},"crypto.EQL.address":{deprecatedKeyName:"EQL",deprecated:!1,validationRegex:"^bnb[0-9a-z]{39}$"},"crypto.LINK.address":{deprecatedKeyName:"LINK",deprecated:!1,validationRegex:"^0x[a-fA-F0-9]{40}$"},"crypto.USDC.address":{deprecatedKeyName:"USDC",deprecated:!1,validationRegex:"^0x[a-fA-F0-9]{40}$"},"crypto.BAT.address":{deprecatedKeyName:"BAT",deprecated:!1,validationRegex:"^0x[a-fA-F0-9]{40}$"},"crypto.REP.address":{deprecatedKeyName:"REP",deprecated:!1,validationRegex:"^0x[a-fA-F0-9]{40}$"},"crypto.ZRX.address":{deprecatedKeyName:"ZRX",deprecated:!1,validationRegex:"^0x[a-fA-F0-9]{40}$"},"crypto.DAI.address":{deprecatedKeyName:"DAI",deprecated:!1,validationRegex:"^0x[a-fA-F0-9]{40}$"},"crypto.BCH.address":{deprecatedKeyName:"BCH",deprecated:!1,validationRegex:"^[13][a-km-zA-HJ-NP-Z1-9]{33}$|^((bitcoincash|bchreg|bchtest):)?(q|p)[a-z0-9]{41}$|^((BITCOINCASH:)?(Q|P)[A-Z0-9]{41})$"},"crypto.XMR.address":{deprecatedKeyName:"XMR",deprecated:!1,validationRegex:"^[48]{1}[0-9AB][1-9A-HJ-NP-Za-km-z]{93}$"},"crypto.DASH.address":{deprecatedKeyName:"DASH",deprecated:!1,validationRegex:"^X[1-9A-HJ-NP-Za-km-z]{33}$"},"crypto.NEO.address":{deprecatedKeyName:"NEO",deprecated:!1,validationRegex:"^A[0-9a-zA-Z]{33}$"},"crypto.SWTH.address":{deprecatedKeyName:"SWTH",deprecated:!1,validationRegex:"^A[0-9a-zA-Z]{33}$"},"crypto.DOGE.address":{deprecatedKeyName:"DOGE",deprecated:!1,validationRegex:"^D[5-9A-HJ-NP-U]{1}[1-9A-HJ-NP-Za-km-z]{32}$"},"crypto.XRP.address":{deprecatedKeyName:"XRP",deprecated:!1,validationRegex:"^r[1-9a-km-zA-HJ-NP-Z]{24,34}$"},"crypto.ZEC.address":{deprecatedKeyName:"ZEC",deprecated:!1,validationRegex:"^z([a-zA-Z0-9]){94}$|^zs1([a-zA-Z0-9]){75}$|^t([a-zA-Z0-9]){34}$"},"crypto.YEC.address":{deprecatedKeyName:"YEC",deprecated:!1,validationRegex:"^y([a-zA-Z0-9]){94}$|^ys1([a-zA-Z0-9]){75}$|^s([a-zA-Z0-9]){34}$"},"crypto.ADA.address":{deprecatedKeyName:"ADA",deprecated:!1,validationRegex:"^[1-9a-km-zA-HJ-NP-Z]{104}$|^A[1-9A-HJ-NP-Za-km-z]{58}$|^addr[0-9a-zA-Z]{99}$"},"crypto.EOS.address":{deprecatedKeyName:"EOS",deprecated:!1,validationRegex:"^[a-z][a-z1-5.]{10}[a-z1-5]$"},"crypto.XLM.address":{deprecatedKeyName:"XLM",deprecated:!1,validationRegex:"^G[A-Z2-7]{55}$"},"crypto.BNB.address":{deprecatedKeyName:"BNB",deprecated:!1,validationRegex:"^bnb[0-9a-z]{39}$"},"crypto.BTG.address":{deprecatedKeyName:"BTG",deprecated:!1,validationRegex:"^[GA][a-km-zA-HJ-NP-Z1-9]{33}$"},"crypto.NANO.address":{deprecatedKeyName:"NANO",deprecated:!1,validationRegex:"^nano_[1-9a-z]{60}$"},"crypto.WAVES.address":{deprecatedKeyName:"WAVES",deprecated:!1,validationRegex:"^3[a-km-zA-HJ-NP-Z1-9]{34}$"},"crypto.KMD.address":{deprecatedKeyName:"KMD",deprecated:!1,validationRegex:"^R[a-km-zA-Z1-9]{33}$"},"crypto.AE.address":{deprecatedKeyName:"AE",deprecated:!1,validationRegex:"^ak_[a-km-zA-Z1-9]{48,52}$"},"crypto.RSK.address":{deprecatedKeyName:"RSK",deprecated:!1,validationRegex:"^0x[a-fA-F0-9]{40}$"},"crypto.WAN.address":{deprecatedKeyName:"WAN",deprecated:!1,validationRegex:"^0x[a-fA-F0-9]{40}$"},"crypto.STRAT.address":{deprecatedKeyName:"STRAT",deprecated:!1,validationRegex:"^S[a-km-zA-HJ-NP-Z1-9]{33}$"},"crypto.UBQ.address":{deprecatedKeyName:"UBQ",deprecated:!1,validationRegex:"^0x[a-km-zA-HJ-NP-Z0-9]{40}$"},"crypto.XTZ.address":{deprecatedKeyName:"XTZ",deprecated:!1,validationRegex:"^(tz|KT)[a-km-zA-HJ-NP-Z1-9]{34}$"},"crypto.IOTA.address":{deprecatedKeyName:"IOTA",deprecated:!1,validationRegex:"^[A-Z0-9]{90}$|^iota1[a-z0-9]{59}$"},"crypto.VET.address":{deprecatedKeyName:"VET",deprecated:!1,validationRegex:"^0x[a-km-zA-HJ-NP-Z0-9]{40}$"},"crypto.QTUM.address":{deprecatedKeyName:"QTUM",deprecated:!1,validationRegex:"^Q[a-km-zA-HJ-NP-Z1-9]{33}$"},"crypto.ICX.address":{deprecatedKeyName:"ICX",deprecated:!1,validationRegex:"^[a-km-zA-HJ-NP-Z0-9]{42}$"},"crypto.DGB.address":{deprecatedKeyName:"DGB",deprecated:!1,validationRegex:"(^[a-km-zA-HJ-NP-Z1-9]{34}$)|(^[a-zA-Z1-9]{42}$)|(^dgb1[a-zA-Z0-9]{39}$)"},"crypto.XZC.address":{deprecatedKeyName:"XZC",deprecated:!1,validationRegex:"^[a-km-zA-HJ-NP-Z1-9]{34}$"},"crypto.BURST.address":{deprecatedKeyName:"BURST",deprecated:!1,validationRegex:"^BURST-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{5}"},"crypto.DCR.address":{deprecatedKeyName:"DCR",deprecated:!1,validationRegex:null},"crypto.XEM.address":{deprecatedKeyName:"XEM",deprecated:!1,validationRegex:"^N[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]{39}$"},"crypto.LSK.address":{deprecatedKeyName:"LSK",deprecated:!1,validationRegex:"^\\d{1,21}[L]$"},"crypto.ATOM.address":{deprecatedKeyName:"ATOM",deprecated:!1,validationRegex:"^(cosmos)1([qpzry9x8gf2tvdw0s3jn54khce6mua7l]+)$"},"crypto.ONG.address":{deprecatedKeyName:"ONG",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.ONT.address":{deprecatedKeyName:"ONT",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.SMART.address":{deprecatedKeyName:"SMART",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.TPAY.address":{deprecatedKeyName:"TPAY",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.GRS.address":{deprecatedKeyName:"GRS",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.BSV.address":{deprecatedKeyName:"BSV",deprecated:!1,validationRegex:"^bitcoincash:[a-zA-Z0-9]{42}$"},"crypto.GAS.address":{deprecatedKeyName:"GAS",deprecated:!1,validationRegex:null},"crypto.TRX.address":{deprecatedKeyName:"TRX",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.VTHO.address":{deprecatedKeyName:"VTHO",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{42}$"},"crypto.BCD.address":{deprecatedKeyName:"BCD",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.BTT.address":{deprecatedKeyName:"BTT",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.KIN.address":{deprecatedKeyName:"KIN",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{56}$"},"crypto.RVN.address":{deprecatedKeyName:"RVN",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.ARK.address":{deprecatedKeyName:"ARK",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.XVG.address":{deprecatedKeyName:"XVG",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.ALGO.address":{deprecatedKeyName:"ALGO",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{58}$"},"crypto.NEBL.address":{deprecatedKeyName:"NEBL",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.XPM.address":{deprecatedKeyName:"XPM",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.ONE.address":{deprecatedKeyName:"ONE",deprecated:!1,validationRegex:"^one[a-zA-Z0-9]{39}$"},"crypto.BNTY.address":{deprecatedKeyName:"BNTY",deprecated:!1,validationRegex:"^0x[a-fA-F0-9]{40}$"},"crypto.CRO.address":{deprecatedKeyName:"CRO",deprecated:!1,validationRegex:"^0x[a-fA-F0-9]{40}$"},"crypto.TWT.address":{deprecatedKeyName:"TWT",deprecated:!1,validationRegex:"^bnb[0-9a-z]{39}$"},"crypto.SIERRA.address":{deprecatedKeyName:"SIERRA",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{34}$"},"crypto.VSYS.address":{deprecatedKeyName:"VSYS",deprecated:!1,validationRegex:"^[a-zA-Z0-9]{35}$"},"crypto.HIVE.address":{deprecatedKeyName:"HIVE",validationRegex:"^(?!s*$).+",deprecated:!1},"crypto.HT.address":{deprecatedKeyName:"HT",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.ENJ.address":{deprecatedKeyName:"ENJ",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.YFI.address":{deprecatedKeyName:"YFI",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.MTA.address":{deprecatedKeyName:"MTA",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.COMP.address":{deprecatedKeyName:"COMP",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.BAL.address":{deprecatedKeyName:"BAL",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.AMPL.address":{deprecatedKeyName:"AMPL",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.LEND.address":{deprecatedKeyName:"LEND",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.TLOS.address":{deprecatedKeyName:"TLOS",validationRegex:"^[a-z][a-z1-5.]{10}[a-z1-5]$",deprecated:!1},"crypto.XDC.address":{deprecatedKeyName:"XDC",validationRegex:"^xdc[a-fA-F0-9]{40}$",deprecated:!1},"crypto.XST.address":{deprecatedKeyName:"XST",validationRegex:"(?:RwxQ3jUs2BjKhseNX1em4msn2GyV5XAec[PQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]|RwxQ3jUs2BjKhseNX1em4msn2GyV5XAe[defghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]|RwxQ3jUs2BjKhseNX1em4msn2GyV5XA[fghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{2}|RwxQ3jUs2BjKhseNX1em4msn2GyV5X[BCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{3}|RwxQ3jUs2BjKhseNX1em4msn2GyV5[YZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{4}|RwxQ3jUs2BjKhseNX1em4msn2GyV[6789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{5}|RwxQ3jUs2BjKhseNX1em4msn2Gy[WXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{6}|RwxQ3jUs2BjKhseNX1em4msn2G[z][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{7}|RwxQ3jUs2BjKhseNX1em4msn2[HJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{8}|RwxQ3jUs2BjKhseNX1em4msn[3456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{9}|RwxQ3jUs2BjKhseNX1em4ms[opqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{10}|RwxQ3jUs2BjKhseNX1em4m[tuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{11}|RwxQ3jUs2BjKhseNX1em4[nopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{12}|RwxQ3jUs2BjKhseNX1em[56789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{13}|RwxQ3jUs2BjKhseNX1e[nopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{14}|RwxQ3jUs2BjKhseNX1[fghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{15}|RwxQ3jUs2BjKhseNX[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{16}|RwxQ3jUs2BjKhseN[YZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{17}|RwxQ3jUs2BjKhse[PQRSTUVWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{18}|RwxQ3jUs2BjKhs[fghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{19}|RwxQ3jUs2BjKh[tuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{20}|RwxQ3jUs2BjK[ijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21}|RwxQ3jUs2Bj[LMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}|RwxQ3jUs2B[kmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{23}|RwxQ3jUs2[CDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{24}|RwxQ3jUs[3456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{25}|RwxQ3jU[tuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{26}|RwxQ3j[VWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{27}|RwxQ3[kmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{28}|RwxQ[456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{29}|Rwx[RSTUVWXYZabcdefghijkmnopqrstuvwxyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{30}|Rw[yz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{31}|R[xyz][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{32}|S[123456789ABCDEFGHJKL][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{32}|SM[123456789ABCDEFGH][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{31}|SMJ11[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{29}|SMJ11[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{29}|SMJ12[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnop][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{28}|SMJ12q[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkm][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{27}|SMJ12qn[12345678][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{26}|SMJ12qn9[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghi][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{25}|SMJ12qn9j[123456789ABCDEFGHJKLM][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{24}|SMJ12qn9jN[123456789AB][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{23}|SMJ12qn9jNC[123456789AB][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}|SMJ12qn9jNCC[123456789ABCDEFGHJKLMNPQRSTUVW][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21}|SMJ12qn9jNCCX[123456789ABCDEFGH][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{20}|SMJ12qn9jNCCXJ[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkm][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{19}|SMJ12qn9jNCCXJn[123456789ABCDEFGHJKLMNPQRS][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{18}|SMJ12qn9jNCCXJnT[123456789ABCDEFGHJKLMNPQRSTUVWX][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{17}|SMJ12qn9jNCCXJnTY[123456789ABCDEFGHJKLMNPQ][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{16}|SMJ12qn9jNCCXJnTYR[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxy][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{15}|SMJ12qn9jNCCXJnTYRz[1234][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{14}|SMJ12qn9jNCCXJnTYRz5[123456789ABCDEFGHJKLMNPQRSTUVWX][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{13}|SMJ12qn9jNCCXJnTYRz5Y[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrst][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{12}|SMJ12qn9jNCCXJnTYRz5Yu[12345678][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{11}|SMJ12qn9jNCCXJnTYRz5Yu9[123456789ABCDEFGHJKLMNPQRSTUVWXY][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{10}|SMJ12qn9jNCCXJnTYRz5Yu9Z[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcd][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{9}|SMJ12qn9jNCCXJnTYRz5Yu9Ze[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkm][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{8}|SMJ12qn9jNCCXJnTYRz5Yu9Zen[123456789ABCD][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{7}|SMJ12qn9jNCCXJnTYRz5Yu9ZenE[123456789ABCDEFGHJKLMNPQ][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{6}|SMJ12qn9jNCCXJnTYRz5Yu9ZenER[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkm][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{5}|SMJ12qn9jNCCXJnTYRz5Yu9ZenERn[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghij][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{4}|SMJ12qn9jNCCXJnTYRz5Yu9ZenERnk[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghij][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{3}|SMJ12qn9jNCCXJnTYRz5Yu9ZenERnkk[123456789ABCDEFGHJKLMNPQRST][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{2}|SMJ12qn9jNCCXJnTYRz5Yu9ZenERnkkU[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstu][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]|SMJ12qn9jNCCXJnTYRz5Yu9ZenERnkkUv[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghi])",deprecated:!1},"crypto.STRAX.address":{deprecatedKeyName:"STRAX",validationRegex:"^X[a-km-zA-HJ-NP-Z1-9]{33}$",deprecated:!1},"crypto.SIGNA.address":{deprecatedKeyName:"SIGNA",validationRegex:"^S-((?=[A-Z2-9]{4})(?:[^IO]{4})-){3}(?=[A-Z2-9]{5})(?:[^IO]{5})$",deprecated:!1},"crypto.NIM.address":{deprecatedKeyName:"NIM",validationRegex:"^NQ[0-9]{2} ([A-Z0-9]{4} ){7}[A-Z0-9]{4}$",deprecated:!1},"crypto.GUAP.address":{deprecatedKeyName:"GUAP",validationRegex:"^(G|P)[a-zA-HJ-NP-Z0-9]{25,39}$",deprecated:!1},"crypto.ELA.version.ELA.address":{deprecatedKeyName:"ELA_ELA",validationRegex:"E[a-zA-HJ-NP-Z0-9]{33}",deprecated:!1},"crypto.ELA.version.ESC.address":{deprecatedKeyName:"ELA_ESC",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.USDT.version.ERC20.address":{deprecatedKeyName:"USDT_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.USDT.version.TRON.address":{deprecatedKeyName:"USDT_TRON",validationRegex:"^[T][a-zA-HJ-NP-Z0-9]{33}$",deprecated:!1},"crypto.USDT.version.EOS.address":{deprecatedKeyName:"USDT_EOS",validationRegex:"^[a-z][a-z1-5.]{10}[a-z1-5]$",deprecated:!1},"crypto.USDT.version.OMNI.address":{deprecatedKeyName:"USDT_OMNI",validationRegex:"^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$",deprecated:!1},"crypto.FTM.version.ERC20.address":{deprecatedKeyName:"FTM_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.FTM.version.BEP2.address":{deprecatedKeyName:"FTM_BEP2",validationRegex:"^(bnb|tbnb)[a-zA-HJ-NP-Z0-9]{39}$",deprecated:!1},"crypto.FTM.version.OPERA.address":{deprecatedKeyName:"FTM_OPERA",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.FUSE.version.ERC20.address":{deprecatedKeyName:"FUSE_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.FUSE.version.FUSE.address":{deprecatedKeyName:"FUSE_FUSE",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.MATIC.version.MATIC.address":{deprecatedKeyName:"MATIC_MATIC",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.MATIC.version.BEP20.address":{deprecatedKeyName:"MATIC_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.MATIC.version.ERC20.address":{deprecatedKeyName:"MATIC_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"social.payid.name":{deprecatedKeyName:"payid",validationRegex:"^[0-9a-zA-Z]+\\$[0-9a-zA-Z]+\\.[0-9a-zA-Z]+$",deprecated:!1},"social.picture.value":{deprecatedKeyName:"picture",validationRegex:null,deprecated:!1},"whois.email.value":{deprecatedKeyName:"email",validationRegex:"^[^@]+@[^\\.]+\\..+$",deprecated:!1},"whois.for_sale.value":{deprecatedKeyName:"for_sale",validationRegex:"(true)|(false)",deprecated:!1},"ipfs.html.value":{deprecatedKeyName:"html",validationRegex:".{0,100}",deprecated:!1},"ipfs.redirect_domain.value":{deprecatedKeyName:"redirect_domain",validationRegex:".{0,253}",deprecated:!1},"dweb.ipfs.hash":{deprecatedKeyName:"dweb_hash",validationRegex:".{0,100}",deprecated:!1},"browser.redirect_url":{deprecatedKeyName:"browser_redirect",validationRegex:".{0,253}",deprecated:!1},"browser.preferred_protocols":{deprecatedKeyName:"browser_preferred_protocols",validationRegex:null,deprecated:!1},"gundb.username.value":{deprecatedKeyName:"gundb_username",validationRegex:null,deprecated:!1},"gundb.public_key.value":{deprecatedKeyName:"gundb_public_key",validationRegex:null,deprecated:!1},"social.image.value":{deprecatedKeyName:"image",validationRegex:null,deprecated:!1},"social.twitter.username":{deprecatedKeyName:"twitter_username",validationRegex:null,deprecated:!1},"validation.social.twitter.username":{deprecatedKeyName:"validation_twitter_username",validationRegex:null,deprecated:!1},"forwarding.url":{deprecatedKeyName:"forwarding_url",validationRegex:"^(https?)://[^\\s/$.?#].[^\\s]*$",deprecated:!1},"dns.ttl":{deprecatedKeyName:"dns_ttl",validationRegex:null,deprecated:!1},"dns.A":{deprecatedKeyName:"dns_A",validationRegex:null,deprecated:!1},"dns.A.ttl":{deprecatedKeyName:"dns_A_ttl",validationRegex:null,deprecated:!1},"dns.AAAA":{deprecatedKeyName:"dns_AAAA",validationRegex:null,deprecated:!1},"dns.AAAA.ttl":{deprecatedKeyName:"dns_AAAA_ttl",validationRegex:null,deprecated:!1},"dns.AFSDB":{deprecatedKeyName:"dns_AFSDB",validationRegex:null,deprecated:!1},"dns.AFSDB.ttl":{deprecatedKeyName:"dns_AFSDB_ttl",validationRegex:null,deprecated:!1},"dns.APL":{deprecatedKeyName:"dns_APL",validationRegex:null,deprecated:!1},"dns.APL.ttl":{deprecatedKeyName:"dns_APL_ttl",validationRegex:null,deprecated:!1},"dns.CAA":{deprecatedKeyName:"dns_CAA",validationRegex:null,deprecated:!1},"dns.CAA.ttl":{deprecatedKeyName:"dns_CAA_ttl",validationRegex:null,deprecated:!1},"dns.CDNSKEY":{deprecatedKeyName:"dns_CDNSKEY",validationRegex:null,deprecated:!1},"dns.CDNSKEY.ttl":{deprecatedKeyName:"dns_CDNSKEY_ttl",validationRegex:null,deprecated:!1},"dns.CDS":{deprecatedKeyName:"dns_CDS",validationRegex:null,deprecated:!1},"dns.CDS.ttl":{deprecatedKeyName:"dns_CDS_ttl",validationRegex:null,deprecated:!1},"dns.CERT":{deprecatedKeyName:"dns_CERT",validationRegex:null,deprecated:!1},"dns.CERT.ttl":{deprecatedKeyName:"dns_CERT_ttl",validationRegex:null,deprecated:!1},"dns.CNAME":{deprecatedKeyName:"dns_CNAME",validationRegex:null,deprecated:!1},"dns.CNAME.ttl":{deprecatedKeyName:"dns_CNAME_ttl",validationRegex:null,deprecated:!1},"dns.CSYNC":{deprecatedKeyName:"dns_CSYNC",validationRegex:null,deprecated:!1},"dns.CSYNC.ttl":{deprecatedKeyName:"dns_CSYNC_ttl",validationRegex:null,deprecated:!1},"dns.DHCID":{deprecatedKeyName:"dns_DHCID",validationRegex:null,deprecated:!1},"dns.DHCID.ttl":{deprecatedKeyName:"dns_DHCID_ttl",validationRegex:null,deprecated:!1},"dns.DLV":{deprecatedKeyName:"dns_DLV",validationRegex:null,deprecated:!1},"dns.DLV.ttl":{deprecatedKeyName:"dns_DLV_ttl",validationRegex:null,deprecated:!1},"dns.DNAME":{deprecatedKeyName:"dns_DNAME",validationRegex:null,deprecated:!1},"dns.DNAME.ttl":{deprecatedKeyName:"dns_DNAME_ttl",validationRegex:null,deprecated:!1},"dns.DNSKEY":{deprecatedKeyName:"dns_DNSKEY",validationRegex:null,deprecated:!1},"dns.DNSKEY.ttl":{deprecatedKeyName:"dns_DNSKEY_ttl",validationRegex:null,deprecated:!1},"dns.DS":{deprecatedKeyName:"dns_DS",validationRegex:null,deprecated:!1},"dns.DS.ttl":{deprecatedKeyName:"dns_DS_ttl",validationRegex:null,deprecated:!1},"dns.EUI48":{deprecatedKeyName:"dns_EUI48",validationRegex:null,deprecated:!1},"dns.EUI48.ttl":{deprecatedKeyName:"dns_EUI48_ttl",validationRegex:null,deprecated:!1},"dns.EUI64":{deprecatedKeyName:"dns_EUI64",validationRegex:null,deprecated:!1},"dns.EUI64.ttl":{deprecatedKeyName:"dns_EUI64_ttl",validationRegex:null,deprecated:!1},"dns.HINFO":{deprecatedKeyName:"dns_HINFO",validationRegex:null,deprecated:!1},"dns.HINFO.ttl":{deprecatedKeyName:"dns_HINFO_ttl",validationRegex:null,deprecated:!1},"dns.HIP":{deprecatedKeyName:"dns_HIP",validationRegex:null,deprecated:!1},"dns.HIP.ttl":{deprecatedKeyName:"dns_HIP_ttl",validationRegex:null,deprecated:!1},"dns.HTTPS":{deprecatedKeyName:"dns_HTTPS",validationRegex:null,deprecated:!1},"dns.HTTPS.ttl":{deprecatedKeyName:"dns_HTTPS_ttl",validationRegex:null,deprecated:!1},"dns.IPSECKEY":{deprecatedKeyName:"dns_IPSECKEY",validationRegex:null,deprecated:!1},"dns.IPSECKEY.ttl":{deprecatedKeyName:"dns_IPSECKEY_ttl",validationRegex:null,deprecated:!1},"dns.KEY":{deprecatedKeyName:"dns_KEY",validationRegex:null,deprecated:!1},"dns.KEY.ttl":{deprecatedKeyName:"dns_KEY_ttl",validationRegex:null,deprecated:!1},"dns.KX":{deprecatedKeyName:"dns_KX",validationRegex:null,deprecated:!1},"dns.KX.ttl":{deprecatedKeyName:"dns_KX_ttl",validationRegex:null,deprecated:!1},"dns.LOC":{deprecatedKeyName:"dns_LOC",validationRegex:null,deprecated:!1},"dns.LOC.ttl":{deprecatedKeyName:"dns_LOC_ttl",validationRegex:null,deprecated:!1},"dns.MX":{deprecatedKeyName:"dns_MX",validationRegex:null,deprecated:!1},"dns.MX.ttl":{deprecatedKeyName:"dns_MX_ttl",validationRegex:null,deprecated:!1},"dns.NAPTR":{deprecatedKeyName:"dns_NAPTR",validationRegex:null,deprecated:!1},"dns.NAPTR.ttl":{deprecatedKeyName:"dns_NAPTR_ttl",validationRegex:null,deprecated:!1},"dns.NS":{deprecatedKeyName:"dns_NS",validationRegex:null,deprecated:!1},"dns.NS.ttl":{deprecatedKeyName:"dns_NS_ttl",validationRegex:null,deprecated:!1},"dns.NSEC":{deprecatedKeyName:"dns_NSEC",validationRegex:null,deprecated:!1},"dns.NSEC.ttl":{deprecatedKeyName:"dns_NSEC_ttl",validationRegex:null,deprecated:!1},"dns.NSEC3":{deprecatedKeyName:"dns_NSEC3",validationRegex:null,deprecated:!1},"dns.NSEC3.ttl":{deprecatedKeyName:"dns_NSEC3_ttl",validationRegex:null,deprecated:!1},"dns.NSEC3PARAM":{deprecatedKeyName:"dns_NSEC3PARAM",validationRegex:null,deprecated:!1},"dns.NSEC3PARAM.ttl":{deprecatedKeyName:"dns_NSEC3PARAM_ttl",validationRegex:null,deprecated:!1},"dns.OPENPGPKEY":{deprecatedKeyName:"dns_OPENPGPKEY",validationRegex:null,deprecated:!1},"dns.OPENPGPKEY.ttl":{deprecatedKeyName:"dns_OPENPGPKEY_ttl",validationRegex:null,deprecated:!1},"dns.PTR":{deprecatedKeyName:"dns_PTR",validationRegex:null,deprecated:!1},"dns.PTR.ttl":{deprecatedKeyName:"dns_PTR_ttl",validationRegex:null,deprecated:!1},"dns.RP":{deprecatedKeyName:"dns_RP",validationRegex:null,deprecated:!1},"dns.RP.ttl":{deprecatedKeyName:"dns_RP_ttl",validationRegex:null,deprecated:!1},"dns.RRSIG":{deprecatedKeyName:"dns_RRSIG",validationRegex:null,deprecated:!1},"dns.RRSIG.ttl":{deprecatedKeyName:"dns_RRSIG_ttl",validationRegex:null,deprecated:!1},"dns.SIG":{deprecatedKeyName:"dns_SIG",validationRegex:null,deprecated:!1},"dns.SIG.ttl":{deprecatedKeyName:"dns_SIG_ttl",validationRegex:null,deprecated:!1},"dns.SMIMEA":{deprecatedKeyName:"dns_SMIMEA",validationRegex:null,deprecated:!1},"dns.SMIMEA.ttl":{deprecatedKeyName:"dns_SMIMEA_ttl",validationRegex:null,deprecated:!1},"dns.SOA":{deprecatedKeyName:"dns_SOA",validationRegex:null,deprecated:!1},"dns.SOA.ttl":{deprecatedKeyName:"dns_SOA_ttl",validationRegex:null,deprecated:!1},"dns.SRV":{deprecatedKeyName:"dns_SRV",validationRegex:null,deprecated:!1},"dns.SRV.ttl":{deprecatedKeyName:"dns_SRV_ttl",validationRegex:null,deprecated:!1},"dns.SSHFP":{deprecatedKeyName:"dns_SSHFP",validationRegex:null,deprecated:!1},"dns.SSHFP.ttl":{deprecatedKeyName:"dns_SSHFP_ttl",validationRegex:null,deprecated:!1},"dns.SVCB":{deprecatedKeyName:"dns_SVCB",validationRegex:null,deprecated:!1},"dns.SVCB.ttl":{deprecatedKeyName:"dns_SVCB_ttl",validationRegex:null,deprecated:!1},"dns.TA":{deprecatedKeyName:"dns_TA",validationRegex:null,deprecated:!1},"dns.TA.ttl":{deprecatedKeyName:"dns_TA_ttl",validationRegex:null,deprecated:!1},"dns.TKEY":{deprecatedKeyName:"dns_TKEY",validationRegex:null,deprecated:!1},"dns.TKEY.ttl":{deprecatedKeyName:"dns_TKEY_ttl",validationRegex:null,deprecated:!1},"dns.TLSA":{deprecatedKeyName:"dns_TLSA",validationRegex:null,deprecated:!1},"dns.TLSA.ttl":{deprecatedKeyName:"dns_TLSA_ttl",validationRegex:null,deprecated:!1},"dns.TSIG":{deprecatedKeyName:"dns_TSIG",validationRegex:null,deprecated:!1},"dns.TSIG.ttl":{deprecatedKeyName:"dns_TSIG_ttl",validationRegex:null,deprecated:!1},"dns.TXT":{deprecatedKeyName:"dns_TXT",validationRegex:null,deprecated:!1},"dns.TXT.ttl":{deprecatedKeyName:"dns_TXT_ttl",validationRegex:null,deprecated:!1},"dns.URI":{deprecatedKeyName:"dns_URI",validationRegex:null,deprecated:!1},"dns.URI.ttl":{deprecatedKeyName:"dns_URI_ttl",validationRegex:null,deprecated:!1},"dns.ZONEMD":{deprecatedKeyName:"dns_ZONEMD",validationRegex:null,deprecated:!1},"dns.ZONEMD.ttl":{deprecatedKeyName:"dns_ZONEMD_ttl",validationRegex:null,deprecated:!1},"crypto.DOT.address":{deprecatedKeyName:"DOT",validationRegex:null,deprecated:!1},"crypto.UNI.version.ERC20.address":{deprecatedKeyName:"UNI_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.UNI.version.BEP20.address":{deprecatedKeyName:"UNI_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.UNI.version.MATIC.address":{deprecatedKeyName:"UNI_MATIC",validationRegex:null,deprecated:!1},"crypto.UNI.version.HRC20.address":{deprecatedKeyName:"UNI_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.UNI.version.XDAI.address":{deprecatedKeyName:"UNI_XDAI",validationRegex:null,deprecated:!1},"crypto.SOL.address":{deprecatedKeyName:"SOL",validationRegex:null,deprecated:!1},"crypto.BUSD.version.ERC20.address":{deprecatedKeyName:"BUSD_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.BUSD.version.BEP20.address":{deprecatedKeyName:"BUSD_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.BUSD.version.HRC20.address":{deprecatedKeyName:"BUSD_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.ICP.address":{deprecatedKeyName:"ICP",validationRegex:null,deprecated:!1},"crypto.THETA.address":{deprecatedKeyName:"THETA",validationRegex:null,deprecated:!1},"crypto.WBTC.version.ERC20.address":{deprecatedKeyName:"WBTC_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.WBTC.version.MATIC.address":{deprecatedKeyName:"WBTC_MATIC",validationRegex:null,deprecated:!1},"crypto.WBTC.version.FANTOM.address":{deprecatedKeyName:"WBTC_FANTOM",validationRegex:null,deprecated:!1},"crypto.WBTC.version.HRC20.address":{deprecatedKeyName:"WBTC_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.WBTC.version.XDAI.address":{deprecatedKeyName:"WBTC_XDAI",validationRegex:null,deprecated:!1},"crypto.FIL.address":{deprecatedKeyName:"FIL",validationRegex:null,deprecated:!1},"crypto.CDAI.address":{deprecatedKeyName:"CDAI",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.KSM.address":{deprecatedKeyName:"KSM",validationRegex:null,deprecated:!1},"crypto.OKB.address":{deprecatedKeyName:"OKB",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.AAVE.version.ERC20.address":{deprecatedKeyName:"AAVE_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.AAVE.version.MATIC.address":{deprecatedKeyName:"AAVE_MATIC",validationRegex:null,deprecated:!1},"crypto.AAVE.version.FANTOM.address":{deprecatedKeyName:"AAVE_FANTOM",validationRegex:null,deprecated:!1},"crypto.AAVE.version.HRC20.address":{deprecatedKeyName:"AAVE_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SHIB.version.ERC20.address":{deprecatedKeyName:"SHIB_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SHIB.version.MATIC.address":{deprecatedKeyName:"SHIB_MATIC",validationRegex:null,deprecated:!1},"crypto.SHIB.version.FANTOM.address":{deprecatedKeyName:"SHIB_FANTOM",validationRegex:null,deprecated:!1},"crypto.CEL.version.ERC20.address":{deprecatedKeyName:"CEL_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CEL.version.MATIC.address":{deprecatedKeyName:"CEL_MATIC",validationRegex:null,deprecated:!1},"crypto.CEL.version.FANTOM.address":{deprecatedKeyName:"CEL_FANTOM",validationRegex:null,deprecated:!1},"crypto.CEL.version.HRC20.address":{deprecatedKeyName:"CEL_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CUSDC.address":{deprecatedKeyName:"CUSDC",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CETH.address":{deprecatedKeyName:"CETH",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.AMP.address":{deprecatedKeyName:"AMP",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CAKE.version.BEP20.address":{deprecatedKeyName:"CAKE_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CAKE.version.HRC20.address":{deprecatedKeyName:"CAKE_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.MIOTA.address":{deprecatedKeyName:"MIOTA",validationRegex:null,deprecated:!1},"crypto.FTT.address":{deprecatedKeyName:"FTT",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.MKR.address":{deprecatedKeyName:"MKR",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.TFUEL.address":{deprecatedKeyName:"TFUEL",validationRegex:null,deprecated:!1},"crypto.KLAY.address":{deprecatedKeyName:"KLAY",validationRegex:null,deprecated:!1},"crypto.LUNA.address":{deprecatedKeyName:"LUNA",validationRegex:null,deprecated:!1},"crypto.AVAX.address":{deprecatedKeyName:"AVAX",validationRegex:null,deprecated:!1},"crypto.LEO.address":{deprecatedKeyName:"LEO",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SAFEMOON.version.BEP20.address":{deprecatedKeyName:"SAFEMOON_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SAFEMOON.version.HRC20.address":{deprecatedKeyName:"SAFEMOON_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.UST.address":{deprecatedKeyName:"UST",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.RUNE.address":{deprecatedKeyName:"RUNE",validationRegex:"^(bnb|tbnb)[a-zA-HJ-NP-Z0-9]{39}$",deprecated:!1},"crypto.HBAR.address":{deprecatedKeyName:"HBAR",validationRegex:null,deprecated:!1},"crypto.TEL.version.ERC20.address":{deprecatedKeyName:"TEL_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.TEL.version.MATIC.address":{deprecatedKeyName:"TEL_MATIC",validationRegex:null,deprecated:!1},"crypto.CHZ.address":{deprecatedKeyName:"CHZ",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SUSHI.version.ERC20.address":{deprecatedKeyName:"SUSHI_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SUSHI.version.BEP20.address":{deprecatedKeyName:"SUSHI_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SUSHI.version.MATIC.address":{deprecatedKeyName:"SUSHI_MATIC",validationRegex:null,deprecated:!1},"crypto.SUSHI.version.FANTOM.address":{deprecatedKeyName:"SUSHI_FANTOM",validationRegex:null,deprecated:!1},"crypto.SUSHI.version.HRC20.address":{deprecatedKeyName:"SUSHI_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.EGLD.address":{deprecatedKeyName:"EGLD",validationRegex:null,deprecated:!1},"crypto.TUSD.version.ERC20.address":{deprecatedKeyName:"TUSD_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.TUSD.version.BEP20.address":{deprecatedKeyName:"TUSD_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.TUSD.version.AVAX.address":{deprecatedKeyName:"TUSD_AVAX",validationRegex:null,deprecated:!1},"crypto.TUSD.version.HRC20.address":{deprecatedKeyName:"TUSD_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.TUSD.version.BEP2.address":{deprecatedKeyName:"TUSD_BEP2",validationRegex:"^(bnb|tbnb)[a-zA-HJ-NP-Z0-9]{39}$",deprecated:!1},"crypto.TUSD.version.TRON.address":{deprecatedKeyName:"TUSD_TRON",validationRegex:"^[T][a-zA-HJ-NP-Z0-9]{33}$",deprecated:!1},"crypto.HBTC.version.ERC20.address":{deprecatedKeyName:"HBTC_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.HBTC.version.HRC20.address":{deprecatedKeyName:"HBTC_HRC20",validationRegex:null,deprecated:!1},"crypto.SNX.version.ERC20.address":{deprecatedKeyName:"SNX_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SNX.version.MATIC.address":{deprecatedKeyName:"SNX_MATIC",validationRegex:null,deprecated:!1},"crypto.SNX.version.FANTOM.address":{deprecatedKeyName:"SNX_FANTOM",validationRegex:null,deprecated:!1},"crypto.SNX.version.HRC20.address":{deprecatedKeyName:"SNX_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.HOT.version.ERC20.address":{deprecatedKeyName:"HOT_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.HOT.version.HRC20.address":{deprecatedKeyName:"HOT_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.NEAR.address":{deprecatedKeyName:"NEAR",validationRegex:null,deprecated:!1},"crypto.HNT.address":{deprecatedKeyName:"HNT",validationRegex:null,deprecated:!1},"crypto.STETH.address":{deprecatedKeyName:"STETH",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.NEXO.version.ERC20.address":{deprecatedKeyName:"NEXO_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.NEXO.version.FANTOM.address":{deprecatedKeyName:"NEXO_FANTOM",validationRegex:null,deprecated:!1},"crypto.PAX.address":{deprecatedKeyName:"PAX",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.STX.address":{deprecatedKeyName:"STX",validationRegex:null,deprecated:!1},"crypto.MANA.version.ERC20.address":{deprecatedKeyName:"MANA_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.MANA.version.MATIC.address":{deprecatedKeyName:"MANA_MATIC",validationRegex:null,deprecated:!1},"crypto.MDX.version.HRC20.address":{deprecatedKeyName:"MDX_HRC20",validationRegex:null,deprecated:!1},"crypto.MDX.version.BEP20.address":{deprecatedKeyName:"MDX_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.ZEN.address":{deprecatedKeyName:"ZEN",validationRegex:null,deprecated:!1},"crypto.ARRR.address":{deprecatedKeyName:"ARRR",validationRegex:null,deprecated:!1},"crypto.BNT.address":{deprecatedKeyName:"BNT",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.LUSD.version.ERC20.address":{deprecatedKeyName:"LUSD_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.LUSD.version.MATIC.address":{deprecatedKeyName:"LUSD_MATIC",validationRegex:null,deprecated:!1},"crypto.GRT.version.ERC20.address":{deprecatedKeyName:"GRT_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.GRT.version.MATIC.address":{deprecatedKeyName:"GRT_MATIC",validationRegex:null,deprecated:!1},"crypto.GRT.version.HRC20.address":{deprecatedKeyName:"GRT_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SC.address":{deprecatedKeyName:"SC",validationRegex:null,deprecated:!1},"crypto.HUSD.version.ERC20.address":{deprecatedKeyName:"HUSD_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.HUSD.version.HRC20.address":{deprecatedKeyName:"HUSD_HRC20",validationRegex:null,deprecated:!1},"crypto.CRV.version.ERC20.address":{deprecatedKeyName:"CRV_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CRV.version.MATIC.address":{deprecatedKeyName:"CRV_MATIC",validationRegex:null,deprecated:!1},"crypto.CRV.version.FANTOM.address":{deprecatedKeyName:"CRV_FANTOM",validationRegex:null,deprecated:!1},"crypto.UMA.address":{deprecatedKeyName:"UMA",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.WRX.version.BEP2.address":{deprecatedKeyName:"WRX_BEP2",validationRegex:"^(bnb|tbnb)[a-zA-HJ-NP-Z0-9]{39}$",deprecated:!1},"crypto.WRX.version.MATIC.address":{deprecatedKeyName:"WRX_MATIC",validationRegex:null,deprecated:!1},"crypto.AR.address":{deprecatedKeyName:"AR",validationRegex:null,deprecated:!1},"crypto.OMG.address":{deprecatedKeyName:"OMG",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.GT.address":{deprecatedKeyName:"GT",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.QNT.address":{deprecatedKeyName:"QNT",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CHSB.address":{deprecatedKeyName:"CHSB",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.IOST.address":{deprecatedKeyName:"IOST",validationRegex:null,deprecated:!1},"crypto.NXM.address":{deprecatedKeyName:"NXM",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.KCS.address":{deprecatedKeyName:"KCS",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.LPT.version.ERC20.address":{deprecatedKeyName:"LPT_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.LPT.version.HRC20.address":{deprecatedKeyName:"LPT_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.XSUSHI.address":{deprecatedKeyName:"XSUSHI",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CUSDT.address":{deprecatedKeyName:"CUSDT",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.FLOW.address":{deprecatedKeyName:"FLOW",validationRegex:null,deprecated:!1},"crypto.ANKR.address":{deprecatedKeyName:"ANKR",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.HBC.address":{deprecatedKeyName:"HBC",validationRegex:null,deprecated:!1},"crypto.VGX.address":{deprecatedKeyName:"VGX",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.FEI.address":{deprecatedKeyName:"FEI",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.BAKE.version.BEP20.address":{deprecatedKeyName:"BAKE_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.BAKE.version.HRC20.address":{deprecatedKeyName:"BAKE_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.1INCH.version.ERC20.address":{deprecatedKeyName:"1INCH_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.1INCH.version.BEP20.address":{deprecatedKeyName:"1INCH_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.1INCH.version.MATIC.address":{deprecatedKeyName:"1INCH_MATIC",validationRegex:null,deprecated:!1},"crypto.1INCH.version.HRC20.address":{deprecatedKeyName:"1INCH_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CKB.address":{deprecatedKeyName:"CKB",validationRegex:null,deprecated:!1},"crypto.WOO.version.ERC20.address":{deprecatedKeyName:"WOO_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.WOO.version.HRC20.address":{deprecatedKeyName:"WOO_HRC20",validationRegex:null,deprecated:!1},"crypto.TITAN.address":{deprecatedKeyName:"TITAN",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.OMI.address":{deprecatedKeyName:"OMI",validationRegex:null,deprecated:!1},"crypto.MINA.address":{deprecatedKeyName:"MINA",validationRegex:null,deprecated:!1},"crypto.SETH.address":{deprecatedKeyName:"SETH",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.RSR.address":{deprecatedKeyName:"RSR",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.OXY.version.SOLANA.address":{deprecatedKeyName:"OXY_SOLANA",validationRegex:null,deprecated:!1},"crypto.OXY.version.ERC20.address":{deprecatedKeyName:"OXY_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.REN.version.ERC20.address":{deprecatedKeyName:"REN_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.REN.version.HRC20.address":{deprecatedKeyName:"REN_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.XCH.address":{deprecatedKeyName:"XCH",validationRegex:null,deprecated:!1},"crypto.RENBTC.version.ERC20.address":{deprecatedKeyName:"RENBTC_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.RENBTC.version.BEP20.address":{deprecatedKeyName:"RENBTC_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.RENBTC.version.HRC20.address":{deprecatedKeyName:"RENBTC_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.USDN.address":{deprecatedKeyName:"USDN",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.BCHA.address":{deprecatedKeyName:"BCHA",validationRegex:null,deprecated:!1},"crypto.LRC.address":{deprecatedKeyName:"LRC",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.PUNDIX.address":{deprecatedKeyName:"PUNDIX",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.ERG.address":{deprecatedKeyName:"ERG",validationRegex:null,deprecated:!1},"crypto.WIN.address":{deprecatedKeyName:"WIN",validationRegex:"^[T][a-zA-HJ-NP-Z0-9]{33}$",deprecated:!1},"crypto.NPXS.address":{deprecatedKeyName:"NPXS",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.TRIBE.address":{deprecatedKeyName:"TRIBE",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.MAID.address":{deprecatedKeyName:"MAID",validationRegex:"^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$",deprecated:!1},"crypto.ASD.address":{deprecatedKeyName:"ASD",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CUNI.address":{deprecatedKeyName:"CUNI",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CELO.address":{deprecatedKeyName:"CELO",validationRegex:null,deprecated:!1},"crypto.DENT.address":{deprecatedKeyName:"DENT",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SNT.address":{deprecatedKeyName:"SNT",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.FEG.version.ERC20.address":{deprecatedKeyName:"FEG_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.FEG.version.HRC20.address":{deprecatedKeyName:"FEG_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SKL.address":{deprecatedKeyName:"SKL",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.ALUSD.address":{deprecatedKeyName:"ALUSD",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.MIR.version.ERC20.address":{deprecatedKeyName:"MIR_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.MIR.version.BEP20.address":{deprecatedKeyName:"MIR_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.GLM.address":{deprecatedKeyName:"GLM",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.PAXG.version.ERC20.address":{deprecatedKeyName:"PAXG_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.PAXG.version.HRC20.address":{deprecatedKeyName:"PAXG_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CFX.address":{deprecatedKeyName:"CFX",validationRegex:null,deprecated:!1},"crypto.UOS.address":{deprecatedKeyName:"UOS",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SVCS.address":{deprecatedKeyName:"SVCS",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.REEF.version.ERC20.address":{deprecatedKeyName:"REEF_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.REEF.version.BEP20.address":{deprecatedKeyName:"REEF_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.REEF.version.HRC20.address":{deprecatedKeyName:"REEF_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.GNO.address":{deprecatedKeyName:"GNO",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.USDP.address":{deprecatedKeyName:"USDP",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.KAVA.address":{deprecatedKeyName:"KAVA",validationRegex:null,deprecated:!1},"crypto.ALCX.address":{deprecatedKeyName:"ALCX",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.EWT.address":{deprecatedKeyName:"EWT",validationRegex:null,deprecated:!1},"crypto.TON.address":{deprecatedKeyName:"TON",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.RLC.address":{deprecatedKeyName:"RLC",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.AXS.address":{deprecatedKeyName:"AXS",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.AUDIO.address":{deprecatedKeyName:"AUDIO",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.XVS.address":{deprecatedKeyName:"XVS",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.BAND.version.ERC20.address":{deprecatedKeyName:"BAND_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.BAND.version.FANTOM.address":{deprecatedKeyName:"BAND_FANTOM",validationRegex:null,deprecated:!1},"crypto.NMR.address":{deprecatedKeyName:"NMR",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.INJ.version.ERC20.address":{deprecatedKeyName:"INJ_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.INJ.version.BEP20.address":{deprecatedKeyName:"INJ_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.WAXP.address":{deprecatedKeyName:"WAXP",validationRegex:null,deprecated:!1},"crypto.UQC.address":{deprecatedKeyName:"UQC",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.IOTX.address":{deprecatedKeyName:"IOTX",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.FUN.address":{deprecatedKeyName:"FUN",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.OCEAN.address":{deprecatedKeyName:"OCEAN",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SAND.version.ERC20.address":{deprecatedKeyName:"SAND_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SAND.version.HRC20.address":{deprecatedKeyName:"SAND_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CTSI.version.ERC20.address":{deprecatedKeyName:"CTSI_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CTSI.version.BEP20.address":{deprecatedKeyName:"CTSI_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CTSI.version.MATIC.address":{deprecatedKeyName:"CTSI_MATIC",validationRegex:null,deprecated:!1},"crypto.RAY.address":{deprecatedKeyName:"RAY",validationRegex:null,deprecated:!1},"crypto.ANC.version.TERRA.address":{deprecatedKeyName:"ANC_TERRA",validationRegex:null,deprecated:!1},"crypto.ANC.version.ERC20.address":{deprecatedKeyName:"ANC_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.IQ.version.ERC20.address":{deprecatedKeyName:"IQ_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.IQ.version.BEP20.address":{deprecatedKeyName:"IQ_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.IQ.version.MATIC.address":{deprecatedKeyName:"IQ_MATIC",validationRegex:null,deprecated:!1},"crypto.SUSD.version.ERC20.address":{deprecatedKeyName:"SUSD_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SUSD.version.FANTOM.address":{deprecatedKeyName:"SUSD_FANTOM",validationRegex:null,deprecated:!1},"crypto.KLV.address":{deprecatedKeyName:"KLV",validationRegex:"^[T][a-zA-HJ-NP-Z0-9]{33}$",deprecated:!1},"crypto.BTCST.address":{deprecatedKeyName:"BTCST",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.TLM.address":{deprecatedKeyName:"TLM",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.AKT.address":{deprecatedKeyName:"AKT",validationRegex:null,deprecated:!1},"crypto.STMX.address":{deprecatedKeyName:"STMX",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.PROM.address":{deprecatedKeyName:"PROM",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.XPRT.address":{deprecatedKeyName:"XPRT",validationRegex:null,deprecated:!1},"crypto.SRM.version.ERC20.address":{deprecatedKeyName:"SRM_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SRM.version.SOLANA.address":{deprecatedKeyName:"SRM_SOLANA",validationRegex:null,deprecated:!1},"crypto.RPL.address":{deprecatedKeyName:"RPL",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.AGIX.address":{deprecatedKeyName:"AGIX",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CELR.address":{deprecatedKeyName:"CELR",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.FET.address":{deprecatedKeyName:"FET",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.OXT.address":{deprecatedKeyName:"OXT",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.ARDR.address":{deprecatedKeyName:"ARDR",validationRegex:null,deprecated:!1},"crypto.MATH.address":{deprecatedKeyName:"MATH",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.10SET.address":{deprecatedKeyName:"10SET",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.POLY.address":{deprecatedKeyName:"POLY",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.GUSD.address":{deprecatedKeyName:"GUSD",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.NKN.address":{deprecatedKeyName:"NKN",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CVC.address":{deprecatedKeyName:"CVC",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.GTC.address":{deprecatedKeyName:"GTC",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.STEEM.address":{deprecatedKeyName:"STEEM",validationRegex:null,deprecated:!1},"crypto.ORN.address":{deprecatedKeyName:"ORN",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.KEEP.version.ERC20.address":{deprecatedKeyName:"KEEP_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.KEEP.version.HRC20.address":{deprecatedKeyName:"KEEP_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.HXRO.address":{deprecatedKeyName:"HXRO",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.ORBS.address":{deprecatedKeyName:"ORBS",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.ALPHA.version.ERC20.address":{deprecatedKeyName:"ALPHA_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.ALPHA.version.BEP20.address":{deprecatedKeyName:"ALPHA_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.DODO.version.ERC20.address":{deprecatedKeyName:"DODO_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.DODO.version.BEP20.address":{deprecatedKeyName:"DODO_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.OGN.address":{deprecatedKeyName:"OGN",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.KNCL.version.ERC20.address":{deprecatedKeyName:"KNCL_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.KNCL.version.FANTOM.address":{deprecatedKeyName:"KNCL_FANTOM",validationRegex:null,deprecated:!1},"crypto.KNCL.version.HRC20.address":{deprecatedKeyName:"KNCL_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.MED.address":{deprecatedKeyName:"MED",validationRegex:null,deprecated:!1},"crypto.XAUT.address":{deprecatedKeyName:"XAUT",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.VLX.address":{deprecatedKeyName:"VLX",validationRegex:null,deprecated:!1},"crypto.PHA.address":{deprecatedKeyName:"PHA",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.KOBE.address":{deprecatedKeyName:"KOBE",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.PERP.address":{deprecatedKeyName:"PERP",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.XHV.address":{deprecatedKeyName:"XHV",validationRegex:null,deprecated:!1},"crypto.META.address":{deprecatedKeyName:"META",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SEUR.address":{deprecatedKeyName:"SEUR",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.MONA.address":{deprecatedKeyName:"MONA",validationRegex:null,deprecated:!1},"crypto.ANT.address":{deprecatedKeyName:"ANT",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.HYDRA.address":{deprecatedKeyName:"HYDRA",validationRegex:null,deprecated:!1},"crypto.ZKS.address":{deprecatedKeyName:"ZKS",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SXP.version.ERC20.address":{deprecatedKeyName:"SXP_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SXP.version.BEP20.address":{deprecatedKeyName:"SXP_BEP20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.SXP.version.HRC20.address":{deprecatedKeyName:"SXP_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.CSPR.address":{deprecatedKeyName:"CSPR",validationRegex:null,deprecated:!1},"crypto.MTL.address":{deprecatedKeyName:"MTL",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.NU.address":{deprecatedKeyName:"NU",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.ZMT.address":{deprecatedKeyName:"ZMT",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.LOC.address":{deprecatedKeyName:"LOC",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.TKO.address":{deprecatedKeyName:"TKO",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.ETN.address":{deprecatedKeyName:"ETN",validationRegex:null,deprecated:!1},"crypto.UBT.version.ERC20.address":{deprecatedKeyName:"UBT_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.UBT.version.MATIC.address":{deprecatedKeyName:"UBT_MATIC",validationRegex:null,deprecated:!1},"crypto.EXRD.address":{deprecatedKeyName:"EXRD",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.NMX.address":{deprecatedKeyName:"NMX",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.RIF.address":{deprecatedKeyName:"RIF",validationRegex:null,deprecated:!1},"crypto.STORJ.version.ERC20.address":{deprecatedKeyName:"STORJ_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.STORJ.version.HRC20.address":{deprecatedKeyName:"STORJ_HRC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.AVA.address":{deprecatedKeyName:"AVA",validationRegex:"^(bnb|tbnb)[a-zA-HJ-NP-Z0-9]{39}$",deprecated:!1},"crypto.DPI.version.ERC20.address":{deprecatedKeyName:"DPI_ERC20",validationRegex:"^0x[a-fA-F0-9]{40}$",deprecated:!1},"crypto.DPI.version.MATIC.address":{deprecatedKeyName:"DPI_MATIC",validationRegex:null,deprecated:!1}}},jr=e.commonjsGlobal&&e.commonjsGlobal.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Or=e.commonjsGlobal&&e.commonjsGlobal.__assign||function(){return Or=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Or.apply(this,arguments)},Ur=e.commonjsGlobal&&e.commonjsGlobal.__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]}),Lr=e.commonjsGlobal&&e.commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),zr=e.commonjsGlobal&&e.commonjsGlobal.__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)&&Ur(t,e,r);return Lr(t,e),t},Hr=e.commonjsGlobal&&e.commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function d(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,d)}s((n=n.apply(e,t||[])).next())}))},Gr=e.commonjsGlobal&&e.commonjsGlobal.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(a){return function(d){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}},qr=e.commonjsGlobal&&e.commonjsGlobal.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}},$r=e.commonjsGlobal&&e.commonjsGlobal.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},Jr=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ve,"__esModule",{value:!0});var Xr=w,Zr=zr(A),Vr=b,Wr=g,Yr=ye,Qr=Jr(M),en=j,tn=X,rn=zr(V),nn=Jr(ur),an=Jr(R),on=Jr(Br),dn=function(e){function t(t){var r=e.call(this)||this;if(r.name=Wr.NamingServiceName.UNS,t&&t.locations&&(!t.locations.Layer1||!t.locations.Layer2))throw new rn.default(rn.ConfigurationErrorCode.NetworkConfigMissing,{method:Wr.NamingServiceName.UNS,config:t.locations.Layer1?"Layer2":"Layer1"});return t||(t={locations:{Layer1:{url:nn.default.UrlMap.mainnet,network:"mainnet"},Layer2:{url:nn.default.UrlMap["polygon-mainnet"],network:"polygon-mainnet"}}}),r.unsl1=new nn.default(Wr.UnsLocation.Layer1,t.locations.Layer1,Wr.BlockchainType.ETH),r.unsl2=new nn.default(Wr.UnsLocation.Layer2,t.locations.Layer2,Wr.BlockchainType.MATIC),r}return jr(t,e),t.autoNetwork=function(e){return Hr(this,void 0,void 0,(function(){var t,r,n,i,a,o;return Gr(this,(function(d){switch(d.label){case 0:if((0,Xr.hasProvider)(e.locations.Layer1)&&(0,Xr.hasProvider)(e.locations.Layer2))t=e.locations.Layer1.provider,r=e.locations.Layer2.provider;else{if(!e.locations.Layer1.url||!e.locations.Layer2.url)throw new rn.default(rn.ConfigurationErrorCode.UnspecifiedUrl,{method:Wr.NamingServiceName.UNS});t=Qr.default.factory(Wr.NamingServiceName.UNS,e.locations.Layer1.url),r=Qr.default.factory(Wr.NamingServiceName.UNS,e.locations.Layer2.url)}return[4,t.request({method:"net_version"})];case 1:return n=d.sent(),[4,r.request({method:"net_version"})];case 2:if(i=d.sent(),a=Vr.EthereumNetworksInverted[n],o=Vr.EthereumNetworksInverted[i],!(a&&Xr.UnsSupportedNetwork.guard(a)&&o&&Xr.UnsSupportedNetwork.guard(o)))throw new rn.default(rn.ConfigurationErrorCode.UnsupportedNetwork,{method:Wr.NamingServiceName.UNS});return[2,new this({locations:{Layer1:{network:a,provider:t},Layer2:{network:o,provider:r}}})]}}))}))},t.prototype.namehash=function(e){if(!this.checkDomain(e))throw new Zr.default(Zr.ResolutionErrorCode.UnsupportedDomain,{domain:e});return(0,en.eip137Namehash)(e)},t.prototype.childhash=function(e,t){return(0,en.eip137Childhash)(e,t)},t.prototype.isSupportedDomain=function(e){return Hr(this,void 0,void 0,(function(){var t,r,n,i;return Gr(this,(function(a){switch(a.label){case 0:return this.checkDomain(e)&&(t=e.split(".").pop())?[4,Promise.all([this.unsl1.exists(t),this.unsl2.exists(t)])]:[2,!1];case 1:return r=a.sent(),n=r[0],i=r[1],[2,n||i]}}))}))},t.prototype.owner=function(e){return Hr(this,void 0,void 0,(function(){var t,r;return Gr(this,(function(n){switch(n.label){case 0:return t=this.namehash(e),[4,this.get(t,[])];case 1:if(r=n.sent(),(0,Vr.isNullAddress)(r.owner))throw new Zr.default(Zr.ResolutionErrorCode.UnregisteredDomain,{domain:e});return[2,r.owner]}}))}))},t.prototype.resolver=function(e){return Hr(this,void 0,void 0,(function(){return Gr(this,(function(t){switch(t.label){case 0:return[4,this.getVerifiedData(e)];case 1:return[2,t.sent().resolver]}}))}))},t.prototype.record=function(e,t){return Hr(this,void 0,void 0,(function(){var r;return Gr(this,(function(n){switch(n.label){case 0:return[4,this.records(e,[t])];case 1:if(!(r=n.sent()[t]))throw new Zr.default(Zr.ResolutionErrorCode.RecordNotFound,{recordName:t,domain:e});return[2,r]}}))}))},t.prototype.records=function(e,t){return Hr(this,void 0,void 0,(function(){return Gr(this,(function(r){switch(r.label){case 0:return[4,this.getVerifiedData(e,t)];case 1:return[2,r.sent().records]}}))}))},t.prototype.allRecords=function(e){return Hr(this,void 0,void 0,(function(){return Gr(this,(function(t){return[2,this.records(e,$r([],Object.keys(on.default.keys),!0))]}))}))},t.prototype.twitter=function(e){return Hr(this,void 0,void 0,(function(){var t,r,n,i,a,o,d,s;return Gr(this,(function(c){switch(c.label){case 0:return t=this.namehash(e),r=["validation.social.twitter.username","social.twitter.username"],[4,this.getVerifiedData(e,r)];case 1:if(n=c.sent(),i=n.records,a=n.location,o=i["validation.social.twitter.username"],d=i["social.twitter.username"],(0,Vr.isNullAddress)(o))throw new Zr.default(Zr.ResolutionErrorCode.RecordNotFound,{domain:e,location:a,recordName:"validation.social.twitter.username"});if(!d)throw new Zr.default(Zr.ResolutionErrorCode.RecordNotFound,{domain:e,location:a,recordName:"social.twitter.username"});if(s=n.owner,!(0,Yr.isValidTwitterSignature)({tokenId:t,owner:s,twitterHandle:d,validationSignature:o}))throw new Zr.default(Zr.ResolutionErrorCode.InvalidTwitterVerification,{domain:e});return[2,d]}}))}))},t.prototype.reverse=function(e,t){return Hr(this,void 0,void 0,(function(){return Gr(this,(function(e){throw new Zr.default(Zr.ResolutionErrorCode.UnsupportedMethod,{methodName:"reverse"})}))}))},t.prototype.isRegistered=function(e){return Hr(this,void 0,void 0,(function(){var t,r;return Gr(this,(function(n){switch(n.label){case 0:return t=this.namehash(e),[4,this.get(t,[])];case 1:return r=n.sent(),[2,!(0,Vr.isNullAddress)(r.owner)]}}))}))},t.prototype.getTokenUri=function(e){var t,r;return Hr(this,void 0,void 0,(function(){var n,i,a,o,d,s=this;return Gr(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=qr([(0,Vr.wrapResult)((function(){return s.unsl2.getTokenUri(e)})),(0,Vr.wrapResult)((function(){return s.unsl1.getTokenUri(e)}))]),c.label=1;case 1:return[4,n.next()];case 2:if((i=c.sent()).done)return[3,4];if(a=i.value,o=(0,Vr.unwrapResult)(a))return[2,o];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return d=c.sent(),t={error:d},[3,11];case 6:return c.trys.push([6,,9,10]),i&&!i.done&&(r=n.return)?[4,r.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(t)throw t.error;return[7];case 10:return[7];case 11:throw new Zr.default(Zr.ResolutionErrorCode.UnregisteredDomain,{domain:"with tokenId ".concat(e)})}}))}))},t.prototype.isAvailable=function(e){return Hr(this,void 0,void 0,(function(){return Gr(this,(function(t){switch(t.label){case 0:return[4,this.isRegistered(e)];case 1:return[2,!t.sent()]}}))}))},t.prototype.registryAddress=function(e){return Hr(this,void 0,void 0,(function(){var t,r,n;return Gr(this,(function(i){switch(i.label){case 0:return[4,Promise.all([this.unsl1.registryAddress(e).catch((function(e){return e})),this.unsl2.registryAddress(e).catch((function(e){return e}))])];case 1:if(t=i.sent(),r=t[0],(n=t[1])instanceof Error)!function(e,t){if(!(e instanceof Zr.default))throw e;if(e.code===t)return!0;throw e}(n,Zr.ResolutionErrorCode.UnregisteredDomain);else if(!(0,Vr.isNullAddress)(n))return[2,n];return[2,sn(r)]}}))}))},t.prototype.locations=function(e){return Hr(this,void 0,void 0,(function(){var t,r,n,i;return Gr(this,(function(a){switch(a.label){case 0:return[4,Promise.all([this.unsl1.locations(e),this.unsl2.locations(e)])];case 1:return t=a.sent(),r=t[0],n=t[1],i=Object.keys(n).filter((function(e){return null!=n[e]})).reduce((function(e,t){var r;return Or(Or({},e),((r={})[t]=n[t],r))}),{}),[2,Or(Or({},r),i)]}}))}))},t.prototype.reverseOf=function(e,t){return Hr(this,void 0,void 0,(function(){var r,n,i,a,o,d,s;return Gr(this,(function(c){switch(c.label){case 0:return[4,Promise.all([this.unsl1.reverseOf(e).catch((function(e){return e})),this.unsl2.reverseOf(e).catch((function(e){return e}))])];case 1:return r=c.sent(),n=r[0],i=r[1],a=function(){return sn(n),"0x00"!==n._hex?(0,en.fromHexStringToDecimals)(n._hex):null},o=function(){return sn(i),"0x00"!==i._hex?(0,en.fromHexStringToDecimals)(i._hex):null},t===Wr.UnsLocation.Layer1?[2,a()]:t===Wr.UnsLocation.Layer2?[2,o()]:(d=a())?[2,d]:(s=o())?[2,s]:[2,null]}}))}))},t.prototype.getDomainFromTokenId=function(e){return Hr(this,void 0,void 0,(function(){var t;return Gr(this,(function(r){switch(r.label){case 0:return[4,this.getMetadata(e)];case 1:if(t=r.sent(),this.namehash(t.name)!==e)throw new Zr.default(Zr.ResolutionErrorCode.ServiceProviderError,{methodName:"unhash",domain:t.name,providerMessage:"Service provider returned an invalid domain name"});return[2,t.name]}}))}))},t.prototype.getMetadata=function(e){return Hr(this,void 0,void 0,(function(){var t,r,n;return Gr(this,(function(i){switch(i.label){case 0:return[4,this.getTokenUri(e)];case 1:return t=i.sent(),[4,an.default.fetch(t,{}).catch((function(e){throw new Zr.default(Zr.ResolutionErrorCode.MetadataEndpointError,{tokenUri:t||"undefined",errorMessage:e.message})}))];case 2:if(!(r=i.sent()).ok)throw new Zr.default(Zr.ResolutionErrorCode.MetadataEndpointError,{tokenUri:t||"undefined"});return[4,r.json()];case 3:if(!(n=i.sent()).name)throw new Zr.default(Zr.ResolutionErrorCode.UnregisteredDomain,{domain:"with tokenId ".concat(e)});if(this.namehash(n.name)!==e)throw new Zr.default(Zr.ResolutionErrorCode.ServiceProviderError,{methodName:"unhash",domain:n.name,providerMessage:"Service provider returned an invalid domain name"});return[2,n]}}))}))},t.prototype.getVerifiedData=function(e,t){return Hr(this,void 0,void 0,(function(){var r,n;return Gr(this,(function(i){switch(i.label){case 0:return r=this.namehash(e),[4,this.get(r,t)];case 1:if(n=i.sent(),(0,Vr.isNullAddress)(n.resolver)){if((0,Vr.isNullAddress)(n.owner))throw new Zr.default(Zr.ResolutionErrorCode.UnregisteredDomain,{domain:e});throw new Zr.default(Zr.ResolutionErrorCode.UnspecifiedResolver,{location:n.location,domain:e})}return[2,n]}}))}))},t.prototype.get=function(e,t){return void 0===t&&(t=[]),Hr(this,void 0,void 0,(function(){var r,n,i,a,o,d,s,c,u;return Gr(this,(function(f){switch(f.label){case 0:return[4,Promise.all([this.unsl1.get(e,t).catch((function(e){return e})),this.unsl2.get(e,t).catch((function(e){return e}))])];case 1:return r=f.sent(),n=r[0],sn(i=r[1]),a=i.resolver,o=i.owner,d=i.records,(0,Vr.isNullAddress)(o)?(sn(n),s=n.resolver,c=n.owner,u=n.records,[2,{resolver:s,owner:c,records:(0,Vr.constructRecords)(t,u),location:Wr.UnsLocation.Layer1}]):[2,{resolver:a,owner:o,records:(0,Vr.constructRecords)(t,d),location:Wr.UnsLocation.Layer2}]}}))}))},t.prototype.checkDomain=function(e,t){if(void 0===t&&(t=!1),t)return!0;var r=e.split(".");return!!r.length&&!("eth"===e||/^[^-]*[^-]*\.(eth|luxe|xyz|kred|addr\.reverse)$/.test(e))&&r.every((function(e){return!!e.length}))},t}(tn.NamingService);function sn(e){if(e instanceof Error)throw e;return e}ve.default=dn;var cn={},un=e.commonjsGlobal&&e.commonjsGlobal.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fn=e.commonjsGlobal&&e.commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function d(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,d)}s((n=n.apply(e,t||[])).next())}))},ln=e.commonjsGlobal&&e.commonjsGlobal.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(a){return function(d){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}},hn=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cn,"__esModule",{value:!0});var pn=v,mn=A,vn=ye,yn=g,bn=hn(R),gn=b,wn=j,An=function(e){function t(t){var r=e.call(this)||this;r.url=(null==t?void 0:t.url)||"https://unstoppabledomains.com/api/v1";var n="".concat("cross-fetch/3.1.4 (+https://github.com/lquixada/cross-fetch)"," Resolution");return r.headers={"X-user-agent":n},r}return un(t,e),t.prototype.isSupportedDomain=function(e){return fn(this,void 0,void 0,(function(){return ln(this,(function(e){throw new mn.ResolutionError(mn.ResolutionErrorCode.UnsupportedMethod,{methodName:"isSupportedDomain"})}))}))},t.prototype.namehash=function(e){throw new Error("Unsupported method when using UD Resolution API")},t.prototype.childhash=function(e,t){throw new Error("Unsupported method when using UD Resolution API")},t.prototype.record=function(e,t){return fn(this,void 0,void 0,(function(){return ln(this,(function(r){switch(r.label){case 0:return[4,this.records(e,[t])];case 1:return[2,r.sent()[t]]}}))}))},t.prototype.records=function(e,t){return fn(this,void 0,void 0,(function(){var r;return ln(this,(function(n){switch(n.label){case 0:return[4,this.allRecords(e)];case 1:return r=n.sent(),[2,(0,gn.constructRecords)(t,r)]}}))}))},t.prototype.owner=function(e){return fn(this,void 0,void 0,(function(){var t,r,n,i;return ln(this,(function(a){switch(a.label){case 0:return[4,this.resolve(e)];case 1:if(t=a.sent(),r=t.meta,n=r.owner,i=r.blockchain,!n)throw new mn.ResolutionError(mn.ResolutionErrorCode.UnregisteredDomain,{domain:e});return i!==yn.BlockchainType.ZIL||n.startsWith("zil1")?[2,n]:[2,(0,pn.toBech32Address)(n)]}}))}))},t.prototype.twitter=function(e){return fn(this,void 0,void 0,(function(){var t,r,n,i,a;return ln(this,(function(o){switch(o.label){case 0:if((0,gn.findNamingServiceName)(e)!==yn.NamingServiceName.UNS)throw new mn.ResolutionError(mn.ResolutionErrorCode.UnsupportedMethod,{domain:e,methodName:"twitter"});return[4,this.resolve(e)];case 1:if(!(t=o.sent()).meta.owner)throw new mn.ResolutionError(mn.ResolutionErrorCode.UnregisteredDomain,{domain:e});if(r=t.meta.owner,n=t.records||{},i=n["validation.social.twitter.username"],a=n["social.twitter.username"],!i)throw new mn.ResolutionError(mn.ResolutionErrorCode.RecordNotFound,{recordName:"validation.social.twitter.username",domain:e});if(!a)throw new mn.ResolutionError(mn.ResolutionErrorCode.RecordNotFound,{recordName:"social.twitter.username",domain:e});if(!(0,vn.isValidTwitterSignature)({tokenId:t.meta.namehash,owner:r,twitterHandle:a,validationSignature:i}))throw new mn.ResolutionError(mn.ResolutionErrorCode.InvalidTwitterVerification,{domain:e});return[2,a]}}))}))},t.prototype.allRecords=function(e){return fn(this,void 0,void 0,(function(){return ln(this,(function(t){switch(t.label){case 0:return[4,this.resolve(e)];case 1:return[2,t.sent().records||{}]}}))}))},t.prototype.getDomainFromTokenId=function(e){return fn(this,void 0,void 0,(function(){return ln(this,(function(t){switch(t.label){case 0:return e=(0,wn.fromDecStringToHex)(e),[4,this.getMetadata(e)];case 1:return[2,t.sent().meta.domain]}}))}))},t.prototype.getMetadata=function(e){return fn(this,void 0,void 0,(function(){var t,r;return ln(this,(function(n){switch(n.label){case 0:return t="".concat(this.url,"/").concat(e),[4,bn.default.fetch(t,{}).catch((function(e){throw new mn.ResolutionError(mn.ResolutionErrorCode.MetadataEndpointError,{tokenUri:t||"undefined",errorMessage:e.message})}))];case 1:return[4,n.sent().json()];case 2:if(!(r=n.sent()).meta||!r.meta.domain)throw new mn.ResolutionError(mn.ResolutionErrorCode.UnregisteredDomain,{domain:"with tokenId ".concat(e)});if((r.meta.blockchain===yn.BlockchainType.ZIL?(0,wn.znsNamehash)(r.meta.domain):(0,wn.eip137Namehash)(r.meta.domain))!==e)throw new mn.ResolutionError(mn.ResolutionErrorCode.ServiceProviderError,{methodName:"unhash",domain:r.meta.domain,providerMessage:"Service provider returned an invalid domain name"});return[2,r]}}))}))},t.prototype.resolve=function(e){return fn(this,void 0,void 0,(function(){return ln(this,(function(t){switch(t.label){case 0:return[4,bn.default.fetch("".concat(this.url,"/").concat(e),{method:"GET",headers:this.headers})];case 1:return[2,t.sent().json()]}}))}))},t.prototype.resolver=function(e){return fn(this,void 0,void 0,(function(){return ln(this,(function(t){switch(t.label){case 0:return[4,this.resolve(e)];case 1:return[2,t.sent().meta.resolver]}}))}))},t.prototype.reverse=function(e,t){return fn(this,void 0,void 0,(function(){return ln(this,(function(e){throw new mn.ResolutionError(mn.ResolutionErrorCode.UnsupportedMethod,{methodName:"reverse"})}))}))},t.prototype.reverseOf=function(e,t){return fn(this,void 0,void 0,(function(){return ln(this,(function(e){throw new mn.ResolutionError(mn.ResolutionErrorCode.UnsupportedMethod,{methodName:"reverseOf"})}))}))},t.prototype.isRegistered=function(e){return fn(this,void 0,void 0,(function(){var t;return ln(this,(function(r){switch(r.label){case 0:return[4,this.resolve(e)];case 1:return t=r.sent(),[2,!(0,gn.isNullAddress)(t.meta.owner)]}}))}))},t.prototype.getTokenUri=function(e){return fn(this,void 0,void 0,(function(){return ln(this,(function(e){throw new mn.ResolutionError(mn.ResolutionErrorCode.UnsupportedMethod,{methodName:"getTokenUri"})}))}))},t.prototype.isAvailable=function(e){return fn(this,void 0,void 0,(function(){return ln(this,(function(t){switch(t.label){case 0:return[4,this.isRegistered(e)];case 1:return[2,!t.sent()]}}))}))},t.prototype.registryAddress=function(e){return fn(this,void 0,void 0,(function(){return ln(this,(function(t){throw new mn.ResolutionError(mn.ResolutionErrorCode.UnsupportedMethod,{domain:e,methodName:"registryAddress"})}))}))},t.prototype.locations=function(e){return fn(this,void 0,void 0,(function(){return ln(this,(function(e){throw new mn.ResolutionError(mn.ResolutionErrorCode.UnsupportedMethod,{methodName:"locations"})}))}))},t}(X.NamingService);cn.default=An;var Mn={},Rn={};!function(t){var r,n,i=e.commonjsGlobal&&e.commonjsGlobal.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.DnsRecordsError=t.DnsRecordsErrorCode=void 0,function(e){e.InconsistentTtl="InconsistentTtl",e.DnsRecordCorrupted="DnsRecordCorrupted"}(n=t.DnsRecordsErrorCode||(t.DnsRecordsErrorCode={}));var a=((r={})[n.InconsistentTtl]=function(e){return"ttl for record ".concat(e.recordType," is different for other records of the same type")},r[n.DnsRecordCorrupted]=function(e){return"dns record ".concat(e.recordType," is invalid json-string")},r),o=function(e){function t(r,n){void 0===n&&(n={});var i=this,o=a[r];return(i=e.call(this,o(n))||this).code=r,i.name="DnsRecordsError",Object.setPrototypeOf(i,t.prototype),i}return i(t,e),t}(Error);t.DnsRecordsError=o,t.default=o}(Rn);var xn=e.commonjsGlobal&&e.commonjsGlobal.__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]}),Sn=e.commonjsGlobal&&e.commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Nn=e.commonjsGlobal&&e.commonjsGlobal.__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)&&xn(t,e,r);return Sn(t,e),t};Object.defineProperty(Mn,"__esModule",{value:!0});var En=Nn(Rn),_n=g,Cn=function(){function e(){}return e.prototype.toList=function(e){var t,r=this,n=this.getAllDnsTypes(e);return(t=[]).concat.apply(t,n.map((function(t){return r.constructDnsRecords(e,t)})))},e.prototype.toCrypto=function(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r],a=i.type,o=i.TTL,d=i.data,s=this.getJsonNumber(t["dns.".concat(a,".ttl")]),c=this.getJsonArray(t,"dns.".concat(a));if(c?(c.push(d),t["dns.".concat(a)]=JSON.stringify(c)):(t["dns.".concat(a)]=JSON.stringify([d]),t["dns.".concat(a,".ttl")]=o.toString(10)),s&&s!==o)throw new En.default(En.DnsRecordsErrorCode.InconsistentTtl,{recordType:a})}return t},e.prototype.protectFromCorruptRecord=function(e,t){try{return e?JSON.parse(e):void 0}catch(e){if(e instanceof SyntaxError)throw new En.default(En.DnsRecordsErrorCode.DnsRecordCorrupted,{recordType:t});throw e}},e.prototype.getJsonArray=function(e,t){var r=e[t],n=t.split(".")[1];return this.protectFromCorruptRecord(r,n)},e.prototype.getJsonNumber=function(e){return e?parseInt(e,10):void 0},e.prototype.getAllDnsTypes=function(e){var t=new Set;return Object.keys(e).forEach((function(e){var r=e.split(".");r[1]&&"ttl"!==r[1]&&t.add(_n.DnsRecordType[r[1]])})),Array.from(t)},e.prototype.constructDnsRecords=function(e,t){var r=this.parseTtl(e,t),n=e["dns.".concat(t)];if(!n)return[];var i=this.protectFromCorruptRecord(n,t);return this.isStringArray(i)?i.map((function(e){return{TTL:r,data:e,type:t}})):[]},e.prototype.parseTtl=function(t,r){var n,i=t["dns.ttl"],a=t["dns.".concat(r,".ttl")];if(a&&(n=this.parseIfNumber(a)))return n;if(i&&(n=this.parseIfNumber(i)))return n;return e.DefaultTtl},e.prototype.parseIfNumber=function(e){var t=parseInt(e,10);if(!isNaN(t))return t},e.prototype.isStringArray=function(e){return e instanceof Array&&e.every((function(e){return"string"==typeof e}))},e.DefaultTtl=300,e}();Mn.default=Cn;var Tn={},Pn=e.commonjsGlobal&&e.commonjsGlobal.__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]}),kn=e.commonjsGlobal&&e.commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Kn=e.commonjsGlobal&&e.commonjsGlobal.__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)&&Pn(t,e,r);return kn(t,e),t},Dn=e.commonjsGlobal&&e.commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function d(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,d)}s((n=n.apply(e,t||[])).next())}))},Fn=e.commonjsGlobal&&e.commonjsGlobal.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(a){return function(d){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}},In=e.commonjsGlobal&&e.commonjsGlobal.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.Eip1993Factories=void 0;var Bn=V,jn=Kn(A);function On(e){return void 0===e&&(e=[]),e instanceof Array?e:[e]}Tn.Eip1993Factories={fromWeb3Version0Provider:function(e){if(void 0===e.sendAsync)throw new Bn.ConfigurationError(Bn.ConfigurationErrorCode.IncorrectProvider);return{request:function(t){return new Promise((function(r,n){e.sendAsync({jsonrpc:"2.0",method:t.method,params:On(t.params),id:1},(function(e,t){e&&n(e),t.error&&n(new jn.default(jn.ResolutionErrorCode.ServiceProviderError,{providerMessage:t.error})),r(t.result)}))}))}}},fromWeb3Version1Provider:function(e){if(void 0===e.send)throw new Bn.ConfigurationError(Bn.ConfigurationErrorCode.IncorrectProvider);return{request:function(t){return new Promise((function(r,n){e.send({jsonrpc:"2.0",method:t.method,params:On(t.params),id:1},(function(e,t){e&&n(e),t.error&&n(new jn.default(jn.ResolutionErrorCode.ServiceProviderError,{providerMessage:t.error})),r(t.result)}))}))}}},fromEthersProvider:function(e){var t=this;if(void 0===e.call)throw new Bn.ConfigurationError(Bn.ConfigurationErrorCode.IncorrectProvider);return{request:function(r){return Dn(t,void 0,void 0,(function(){var t;return Fn(this,(function(n){switch(n.label){case 0:switch(n.trys.push([0,7,,8]),r.method){case"eth_call":return[3,1];case"eth_getLogs":return[3,3]}return[3,5];case 1:return[4,e.call(r.params[0])];case 2:case 4:return[2,n.sent()];case 3:return[4,e.getLogs(r.params[0])];case 5:throw new jn.default(jn.ResolutionErrorCode.ServiceProviderError,{providerMessage:"Unsupported provider method ".concat(r.method)});case 6:return[3,8];case 7:throw t=n.sent(),new jn.default(jn.ResolutionErrorCode.ServiceProviderError,{providerMessage:t.message});case 8:return[2]}}))}))}}},fromZilliqaProvider:function(e){var t=this;if(void 0===e.middleware||void 0===e.send)throw new Bn.ConfigurationError(Bn.ConfigurationErrorCode.IncorrectProvider);return{request:function(r){return Dn(t,void 0,void 0,(function(){var t,n;return Fn(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,e.send.apply(e,In([r.method],r.params||[],!1))];case 1:if((t=i.sent()).error)throw new Error(t.error.message);return[2,t.result];case 2:throw n=i.sent(),new jn.default(jn.ResolutionErrorCode.ServiceProviderError,{providerMessage:n.message});case 3:return[2]}}))}))}}}};var Un={},Ln=e.commonjsGlobal&&e.commonjsGlobal.__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]}),zn=e.commonjsGlobal&&e.commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Hn=e.commonjsGlobal&&e.commonjsGlobal.__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)&&Ln(t,e,r);return zn(t,e),t};Object.defineProperty(Un,"__esModule",{value:!0}),Un.prepareAndValidateDomain=void 0;var Gn=Hn(A),qn=RegExp("^[.a-z0-9-]+$");Un.prepareAndValidateDomain=function(e){var t=e?e.trim().toLowerCase():"";if(!qn.test(t))throw new Gn.default(Gn.ResolutionErrorCode.InvalidDomainAddress,{domain:e});return t};var $n=e.commonjsGlobal&&e.commonjsGlobal.__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]}),Jn=e.commonjsGlobal&&e.commonjsGlobal.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Xn=e.commonjsGlobal&&e.commonjsGlobal.__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 Jn(t,e),t},Zn=e.commonjsGlobal&&e.commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function d(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,d)}s((n=n.apply(e,t||[])).next())}))},Vn=e.commonjsGlobal&&e.commonjsGlobal.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(a){return function(d){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}},Wn=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l,"__esModule",{value:!0}),l.Resolution=void 0;var Yn=Wn(h.exports),Qn=Wn(m),ei=Wn(ve),ti=Wn(cn),ri=g,ni=Xn(A),ii=Wn(Mn),ai=b,oi=Tn,di=Wn(R),si=Un,ci=j,ui=function(){function e(e){var t,r=(void 0===e?{}:e).sourceConfig,n=void 0===r?void 0:r,i=fi(null==n?void 0:n.uns)?new ti.default(null==n?void 0:n.uns):new ei.default(null==n?void 0:n.uns),a=fi(null==n?void 0:n.zns)?new ti.default(null==n?void 0:n.zns):new Qn.default(null==n?void 0:n.zns),o=i instanceof ti.default&&a instanceof ti.default&&i.url===a.url;this.serviceMap=((t={})[ri.NamingServiceName.UNS]={usedServices:[i],native:fi(null==n?void 0:n.uns)?new ei.default:i},t[ri.NamingServiceName.ZNS]={usedServices:o?[i]:[i,a],native:fi(null==n?void 0:n.zns)?new Qn.default:a},t)}return e.autoNetwork=function(e){return Zn(this,void 0,void 0,(function(){var t,r;return Vn(this,(function(n){switch(n.label){case 0:return t=new this,e.uns?[4,ei.default.autoNetwork(e.uns)]:[3,2];case 1:r=n.sent(),t.serviceMap[ri.NamingServiceName.UNS]={usedServices:[r],native:r},n.label=2;case 2:return[2,t]}}))}))},e.infura=function(e,t){var r,n,i,a;return new this({sourceConfig:{uns:{locations:{Layer1:{url:(0,ai.signedLink)(e,(null===(r=null==t?void 0:t.uns)||void 0===r?void 0:r.locations.Layer1.network)||"mainnet","infura"),network:(null===(n=null==t?void 0:t.uns)||void 0===n?void 0:n.locations.Layer1.network)||"mainnet"},Layer2:{url:(0,ai.signedLink)(e,(null===(i=null==t?void 0:t.uns)||void 0===i?void 0:i.locations.Layer2.network)||"polygon-mainnet","infura"),network:(null===(a=null==t?void 0:t.uns)||void 0===a?void 0:a.locations.Layer2.network)||"polygon-mainnet"}}}}})},e.alchemy=function(e,t){var r,n,i,a;return new this({sourceConfig:{uns:{locations:{Layer1:{url:(0,ai.signedLink)(e,(null===(r=null==t?void 0:t.uns)||void 0===r?void 0:r.locations.Layer1.network)||"mainnet"),network:(null===(n=null==t?void 0:t.uns)||void 0===n?void 0:n.locations.Layer1.network)||"mainnet"},Layer2:{url:(0,ai.signedLink)(e,(null===(i=null==t?void 0:t.uns)||void 0===i?void 0:i.locations.Layer2.network)||"polygon-mainnet"),network:(null===(a=null==t?void 0:t.uns)||void 0===a?void 0:a.locations.Layer2.network)||"polygon-mainnet"}}}}})},e.fromResolutionProvider=function(e){if(e.uns)return this.fromEthereumEip1193Provider({uns:e.uns});if(e.zns)return this.fromZilliqaProvider(e.zns.provider,e);throw new ni.default(ni.ResolutionErrorCode.ServiceProviderError,{providerMessage:"Must specify network for uns or zns"})},e.fromEthereumEip1193Provider=function(e){var t={};return e.uns&&(t.uns={locations:{Layer1:{provider:e.uns.locations.Layer1.provider,network:e.uns.locations.Layer1.network||"mainnet"},Layer2:{provider:e.uns.locations.Layer2.provider,network:e.uns.locations.Layer2.network||"polygon-mainnet"}}}),new this({sourceConfig:t})},e.fromZilliqaProvider=function(e,t){var r;return new this({sourceConfig:{zns:{provider:e,network:(null===(r=null==t?void 0:t.zns)||void 0===r?void 0:r.network)||"mainnet"}}})},e.fromWeb3Version0Provider=function(e){return this.fromEthereumEip1193Provider({uns:e.uns?{locations:{Layer1:{network:e.uns.locations.Layer1.network,provider:oi.Eip1993Factories.fromWeb3Version0Provider(e.uns.locations.Layer1.provider)},Layer2:{network:e.uns.locations.Layer2.network,provider:oi.Eip1993Factories.fromWeb3Version0Provider(e.uns.locations.Layer2.provider)}}}:void 0})},e.fromWeb3Version1Provider=function(e){return this.fromEthereumEip1193Provider({uns:e.uns?{locations:{Layer1:{network:e.uns.locations.Layer1.network,provider:oi.Eip1993Factories.fromWeb3Version1Provider(e.uns.locations.Layer1.provider)},Layer2:{network:e.uns.locations.Layer2.network,provider:oi.Eip1993Factories.fromWeb3Version1Provider(e.uns.locations.Layer2.provider)}}}:void 0})},e.fromEthersProvider=function(e){return this.fromEthereumEip1193Provider({uns:e.uns?{locations:{Layer1:{network:e.uns.locations.Layer1.network,provider:oi.Eip1993Factories.fromEthersProvider(e.uns.locations.Layer1.provider)},Layer2:{network:e.uns.locations.Layer2.network,provider:oi.Eip1993Factories.fromEthersProvider(e.uns.locations.Layer2.provider)}}}:void 0})},e.prototype.addr=function(e,t){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(r){return[2,this.record(e,"crypto.".concat(t.toUpperCase(),".address"))]}))}))},e.prototype.multiChainAddr=function(e,t,r){return Zn(this,void 0,void 0,(function(){var n;return Vn(this,(function(i){return e=(0,si.prepareAndValidateDomain)(e),n="crypto.".concat(t.toUpperCase(),".version.").concat(r.toUpperCase(),".address"),[2,this.callServiceForDomain(e,(function(t){return t.record(e,n)}))]}))}))},e.prototype.twitter=function(e){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(t){return e=(0,si.prepareAndValidateDomain)(e),[2,this.callServiceForDomain(e,(function(t){return t.twitter(e)}))]}))}))},e.prototype.chatId=function(e){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(t){return[2,this.record(e,"gundb.username.value")]}))}))},e.prototype.chatPk=function(e){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(t){return[2,this.record(e,"gundb.public_key.value")]}))}))},e.prototype.ipfsHash=function(e){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(t){return e=(0,si.prepareAndValidateDomain)(e),[2,this.getPreferableNewRecord(e,"dweb.ipfs.hash","ipfs.html.value")]}))}))},e.prototype.httpUrl=function(e){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(t){return e=(0,si.prepareAndValidateDomain)(e),[2,this.getPreferableNewRecord(e,"browser.redirect_url","ipfs.redirect_domain.value")]}))}))},e.prototype.email=function(e){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(t){return[2,this.record(e,"whois.email.value")]}))}))},e.prototype.resolver=function(e){return Zn(this,void 0,void 0,(function(){var t;return Vn(this,(function(r){switch(r.label){case 0:return e=(0,si.prepareAndValidateDomain)(e),[4,this.callServiceForDomain(e,(function(t){return t.resolver(e)}))];case 1:if(!(t=r.sent()))throw new ni.default(ni.ResolutionErrorCode.UnspecifiedResolver,{domain:e});return[2,t]}}))}))},e.prototype.owner=function(e){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(t){return e=(0,si.prepareAndValidateDomain)(e),[2,this.callServiceForDomain(e,(function(t){return t.owner(e)}))]}))}))},e.prototype.record=function(e,t){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(r){return e=(0,si.prepareAndValidateDomain)(e),[2,this.callServiceForDomain(e,(function(r){return r.record(e,t)}))]}))}))},e.prototype.records=function(e,t){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(r){return e=(0,si.prepareAndValidateDomain)(e),[2,this.callServiceForDomain(e,(function(r){return r.records(e,t)}))]}))}))},e.prototype.isRegistered=function(e){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(t){return e=(0,si.prepareAndValidateDomain)(e),[2,this.callServiceForDomainBoolean(e,(function(t){return t.isRegistered(e)}),{throwIfUnsupportedDomain:!0,expectedValue:!0})]}))}))},e.prototype.isAvailable=function(e){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(t){return e=(0,si.prepareAndValidateDomain)(e),[2,this.callServiceForDomainBoolean(e,(function(t){return t.isAvailable(e)}),{throwIfUnsupportedDomain:!0,expectedValue:!1})]}))}))},e.prototype.namehash=function(e,t,r){void 0===r&&(r=ri.NamehashOptionsDefault);var n=this.serviceMap[t];if(!n)throw new ni.default(ni.ResolutionErrorCode.UnsupportedService,{namingService:t});return e=(0,si.prepareAndValidateDomain)(e),this.formatNamehash(n.native.namehash(e),r)},e.prototype.childhash=function(e,t,r,n){void 0===n&&(n=ri.NamehashOptionsDefault);var i=this.serviceMap[r];if(!i)throw new ni.default(ni.ResolutionErrorCode.UnsupportedService,{namingService:r});return this.formatNamehash(i.native.childhash(e,t),n)},e.prototype.formatNamehash=function(e,t){return e=e.replace("0x",""),"dec"===t.format?new Yn.default(e,"hex").toString(10):t.prefix?"0x"+e:e},e.prototype.isValidHash=function(e,t,r){var n=this.serviceMap[r];if(!n)throw new ni.default(ni.ResolutionErrorCode.UnsupportedService,{namingService:r});return e=(0,si.prepareAndValidateDomain)(e),n.native.namehash(e)===t},e.prototype.isSupportedDomain=function(e){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(t){return e=(0,si.prepareAndValidateDomain)(e),[2,this.callServiceForDomainBoolean(e,(function(t){return t.isSupportedDomain(e)}),{throwIfUnsupportedDomain:!1,expectedValue:!0})]}))}))},e.prototype.allRecords=function(e){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(t){return e=(0,si.prepareAndValidateDomain)(e),[2,this.callServiceForDomain(e,(function(t){return t.allRecords(e)}))]}))}))},e.prototype.dns=function(e,t){return Zn(this,void 0,void 0,(function(){var r,n,i;return Vn(this,(function(a){switch(a.label){case 0:return r=new ii.default,e=(0,si.prepareAndValidateDomain)(e),n=this.getDnsRecordKeys(t),[4,this.callServiceForDomain(e,(function(t){return t.records(e,n)}))];case 1:return i=a.sent(),[2,r.toList(i)]}}))}))},e.prototype.tokenURI=function(e){return Zn(this,void 0,void 0,(function(){var t;return Vn(this,(function(r){return t=this.namehash(e,ri.NamingServiceName.UNS),[2,this.callServiceForDomain(e,(function(e){return e.getTokenUri(t)}))]}))}))},e.prototype.tokenURIMetadata=function(e){return Zn(this,void 0,void 0,(function(){var t;return Vn(this,(function(r){switch(r.label){case 0:return[4,this.tokenURI(e)];case 1:return t=r.sent(),[2,this.getMetadataFromTokenURI(t)]}}))}))},e.prototype.registryAddress=function(e){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(t){return[2,this.callServiceForDomain(e,(function(t){return t.registryAddress(e)}))]}))}))},e.prototype.unhash=function(e,t){return Zn(this,void 0,void 0,(function(){var r;return Vn(this,(function(n){return e=(0,ci.fromDecStringToHex)(e),r=this.serviceMap[t].usedServices,[2,r[r.length-1].getDomainFromTokenId(e)]}))}))},e.prototype.locations=function(e){return Zn(this,void 0,void 0,(function(){var t,r,n,i,a,o,d,s,c,u,f;return Vn(this,(function(l){switch(l.label){case 0:return t=e.filter((function(e){return e.endsWith(".zil")})),r=this.serviceMap.UNS.usedServices[0].locations(e),t.length?(n=this.serviceMap.ZNS.usedServices,i=n[n.length-1],a=(0,ai.wrapResult)((function(){return i.locations(t)})),[4,r]):[2,r];case 1:return o=l.sent(),d=Object.entries(o).filter((function(e){var t=e[0],r=e[1];return t.endsWith(".zil")&&!r})),d.length?[4,a.then(ai.unwrapResult)]:[2,o];case 2:for(s=l.sent(),c=0,u=d;c<u.length;c++)f=u[c][0],o[f]=s[f];return[2,o]}}))}))},e.prototype.reverseTokenId=function(e,t){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(r){return[2,this.reverseGetTokenId(e,null==t?void 0:t.location)]}))}))},e.prototype.reverse=function(e,t){return Zn(this,void 0,void 0,(function(){var r;return Vn(this,(function(n){switch(n.label){case 0:return[4,this.reverseGetTokenId(e,null==t?void 0:t.location)];case 1:return(r=n.sent())?[2,this.unhash(r,ri.NamingServiceName.UNS)]:[2,null]}}))}))},e.prototype.getMetadataFromTokenURI=function(e){return Zn(this,void 0,void 0,(function(){var t,r,n,i;return Vn(this,(function(a){switch(a.label){case 0:return[4,di.default.fetch(e,{})];case 1:return(t=a.sent()).ok?[2,t.json()]:(r=ni.default.bind,n=[void 0,ni.ResolutionErrorCode.ServiceProviderError],i={},[4,t.text()]);case 2:throw new(r.apply(ni.default,n.concat([(i.providerMessage=a.sent(),i.method="UDAPI",i.methodName="tokenURIMetadata",i)])))}}))}))},e.prototype.getDnsRecordKeys=function(e){var t=["dns.ttl"];return e.forEach((function(e){t.push("dns.".concat(e)),t.push("dns.".concat(e,".ttl"))})),t},e.prototype.getPreferableNewRecord=function(e,t,r){return Zn(this,void 0,void 0,(function(){var n;return Vn(this,(function(i){switch(i.label){case 0:return[4,this.records(e,[t,r])];case 1:if(!(n=i.sent())[t]&&!n[r])throw new ni.default(ni.ResolutionErrorCode.RecordNotFound,{recordName:t,domain:e});return[2,n[t]||n[r]]}}))}))},e.prototype.callServiceForDomain=function(e,t){return Zn(this,void 0,void 0,(function(){var r,n,i,a,o;return Vn(this,(function(d){switch(d.label){case 0:if(!(r=(0,ai.findNamingServiceName)(e)))throw new ni.default(ni.ResolutionErrorCode.UnsupportedDomain,{domain:e});n=this.serviceMap[r].usedServices.map((function(e){return(0,ai.wrapResult)((function(){return t(e)}))})),i=0,a=n,d.label=1;case 1:return i<a.length?[4,a[i]]:[3,4];case 2:if(null===(o=d.sent()).error)return[2,o.result];if(!(o.error instanceof ni.default&&o.error.code===ni.ResolutionErrorCode.UnregisteredDomain))throw o.error;d.label=3;case 3:return i++,[3,1];case 4:throw new ni.default(ni.ResolutionErrorCode.UnregisteredDomain,{domain:e})}}))}))},e.prototype.callServiceForDomainBoolean=function(e,t,r){return Zn(this,void 0,void 0,(function(){var n,i,a,o,d,s,c;return Vn(this,(function(u){switch(u.label){case 0:if(!(n=(0,ai.findNamingServiceName)(e))){if(!r.throwIfUnsupportedDomain)return[2,!r.expectedValue];throw new ni.default(ni.ResolutionErrorCode.UnsupportedDomain,{domain:e})}i=this.serviceMap[n].usedServices.map((function(e){return(0,ai.wrapResult)((function(){return t(e)}))})),a=0,o=i,u.label=1;case 1:return a<o.length?[4,o[a]]:[3,4];case 2:if(d=u.sent(),s=d.result,c=d.error){if(!(c instanceof ni.default&&c.code===ni.ResolutionErrorCode.UnregisteredDomain))throw c}else if(s===r.expectedValue)return[2,s];u.label=3;case 3:return a++,[3,1];case 4:return[2,!r.expectedValue]}}))}))},e.prototype.reverseGetTokenId=function(e,t){return Zn(this,void 0,void 0,(function(){return Vn(this,(function(r){switch(r.label){case 0:return[4,this.serviceMap.UNS.native.reverseOf(e,t)];case 1:return[2,r.sent()]}}))}))},e}();function fi(e){return e&&e.api}l.Resolution=ui,l.default=ui,function(t){var r=e.commonjsGlobal&&e.commonjsGlobal.__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]}),n=e.commonjsGlobal&&e.commonjsGlobal.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},i=e.commonjsGlobal&&e.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderFactories=t.Eip1193Factories=t.Eip1993Factories=t.DnsRecordsErrorCode=t.DnsRecordsError=t.ConfigurationErrorCode=t.ConfigurationError=t.ResolutionErrorCode=t.ResolutionError=t.DnsUtils=t.default=t.Resolution=void 0;var a=l;Object.defineProperty(t,"Resolution",{enumerable:!0,get:function(){return a.Resolution}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a.Resolution}}),n(g,t);var o=Mn;Object.defineProperty(t,"DnsUtils",{enumerable:!0,get:function(){return i(o).default}});var d=A;Object.defineProperty(t,"ResolutionError",{enumerable:!0,get:function(){return d.ResolutionError}}),Object.defineProperty(t,"ResolutionErrorCode",{enumerable:!0,get:function(){return d.ResolutionErrorCode}});var s=V;Object.defineProperty(t,"ConfigurationError",{enumerable:!0,get:function(){return s.ConfigurationError}}),Object.defineProperty(t,"ConfigurationErrorCode",{enumerable:!0,get:function(){return s.ConfigurationErrorCode}});var c=Rn;Object.defineProperty(t,"DnsRecordsError",{enumerable:!0,get:function(){return c.DnsRecordsError}}),Object.defineProperty(t,"DnsRecordsErrorCode",{enumerable:!0,get:function(){return c.DnsRecordsErrorCode}});var u=Tn;Object.defineProperty(t,"Eip1993Factories",{enumerable:!0,get:function(){return u.Eip1993Factories}});var f=Tn;Object.defineProperty(t,"Eip1193Factories",{enumerable:!0,get:function(){return f.Eip1993Factories}});var h=Tn;Object.defineProperty(t,"ProviderFactories",{enumerable:!0,get:function(){return h.Eip1993Factories}})}(f);var li="undefined"!=typeof window?window:void 0!==e.commonjsGlobal?e.commonjsGlobal:"undefined"!=typeof self?self:{},hi=crypto;const pi=e=>e instanceof CryptoKey,mi=new TextEncoder,vi=new TextDecoder;const yi=e=>{let t=e;t instanceof Uint8Array&&(t=vi.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r})(t)}catch(e){throw new TypeError("The input to be decoded is not correctly encoded.")}};class bi extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}}class gi extends bi{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=t,this.reason=r}}class wi extends bi{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=t,this.reason=r}}class Ai extends bi{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}class Mi extends bi{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class Ri extends bi{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class xi extends bi{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}class Si extends bi{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}class Ni extends bi{constructor(){super(...arguments),this.code="ERR_JWKS_NO_MATCHING_KEY",this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}class Ei extends bi{constructor(){super(...arguments),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS",this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}class _i extends bi{constructor(){super(...arguments),this.code="ERR_JWKS_TIMEOUT",this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}class Ci extends bi{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}function Ti(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function Pi(e,t){return e.name===t}function ki(e){return parseInt(e.name.slice(4),10)}function Ki(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!Pi(e.algorithm,"HMAC"))throw Ti("HMAC");const r=parseInt(t.slice(2),10);if(ki(e.algorithm.hash)!==r)throw Ti(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Pi(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Ti("RSASSA-PKCS1-v1_5");const r=parseInt(t.slice(2),10);if(ki(e.algorithm.hash)!==r)throw Ti(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Pi(e.algorithm,"RSA-PSS"))throw Ti("RSA-PSS");const r=parseInt(t.slice(2),10);if(ki(e.algorithm.hash)!==r)throw Ti(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw Ti("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!Pi(e.algorithm,"ECDSA"))throw Ti("ECDSA");const r=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==r)throw Ti(r,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}!function(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}(e,r)}function Di(e,t,...r){if(r.length>2){const t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var Fi=(e,...t)=>Di("Key must be ",e,...t);function Ii(e,t,...r){return Di(`Key for the ${e} algorithm must be `,t,...r)}var Bi=e=>pi(e);const ji=["CryptoKey"],Oi=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let r;for(const e of t){const t=Object.keys(e);if(r&&0!==r.size)for(const e of t){if(r.has(e))return!1;r.add(e)}else r=new Set(t)}return!0};function Ui(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}const Li=async e=>{var t,r;if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:n,keyUsages:i}=function(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new Mi(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new Mi('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new Mi('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new Mi('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new Mi('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new Mi('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),a=[n,null!==(t=e.ext)&&void 0!==t&&t,null!==(r=e.key_ops)&&void 0!==r?r:i];if("PBKDF2"===n.name)return hi.subtle.importKey("raw",yi(e.k),...a);const o={...e};return delete o.alg,delete o.use,hi.subtle.importKey("jwk",o,...a)};const zi=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?((e,t)=>{if(!(t instanceof Uint8Array)){if(!Bi(t))throw new TypeError(Ii(e,t,...ji,"Uint8Array"));if("secret"!==t.type)throw new TypeError(`${ji.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}})(e,t):((e,t,r)=>{if(!Bi(t))throw new TypeError(Ii(e,t,...ji));if("secret"===t.type)throw new TypeError(`${ji.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${ji.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${ji.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${ji.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${ji.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)})(e,t,r)};const Hi=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!=typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};const Gi=async(e,t,r,n)=>{const i=await function(e,t,r){if(pi(t))return Ki(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(Fi(t,...ji));return hi.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(Fi(t,...ji,"Uint8Array"))}(e,t,"verify");((e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}})(e,i);const a=function(e,t){const r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new Mi(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}(e,i.algorithm);try{return await hi.subtle.verify(a,i,r,n)}catch(e){return!1}};async function qi(e,t,r){var n;if(!Ui(e))throw new Ri("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new Ri('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Ri("JWS Protected Header incorrect type");if(void 0===e.payload)throw new Ri("JWS Payload missing");if("string"!=typeof e.signature)throw new Ri("JWS Signature missing or incorrect type");if(void 0!==e.header&&!Ui(e.header))throw new Ri("JWS Unprotected Header incorrect type");let i={};if(e.protected)try{const t=yi(e.protected);i=JSON.parse(vi.decode(t))}catch(e){throw new Ri("JWS Protected Header is invalid")}if(!Oi(i,e.header))throw new Ri("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const a={...i,...e.header},o=function(e,t,r,n,i){if(void 0!==i.crit&&void 0===n.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let a;a=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const t of n.crit){if(!a.has(t))throw new Mi(`Extension Header Parameter "${t}" is not recognized`);if(void 0===i[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(a.get(t)&&void 0===n[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(n.crit)}(Ri,new Map([["b64",!0]]),null==r?void 0:r.crit,i,a);let d=!0;if(o.has("b64")&&(d=i.b64,"boolean"!=typeof d))throw new Ri('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=a;if("string"!=typeof s||!s)throw new Ri('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=r&&Hi("algorithms",r.algorithms);if(c&&!c.has(s))throw new Ai('"alg" (Algorithm) Header Parameter not allowed');if(d){if("string"!=typeof e.payload)throw new Ri("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new Ri("JWS Payload must be a string or an Uint8Array instance");let u=!1;"function"==typeof t&&(t=await t(i,e),u=!0),zi(s,t,"verify");const f=function(...e){const t=e.reduce(((e,{length:t})=>e+t),0),r=new Uint8Array(t);let n=0;return e.forEach((e=>{r.set(e,n),n+=e.length})),r}(mi.encode(null!==(n=e.protected)&&void 0!==n?n:""),mi.encode("."),"string"==typeof e.payload?mi.encode(e.payload):e.payload),l=yi(e.signature);if(!await Gi(s,t,l,f))throw new Ci;let h;h=d?yi(e.payload):"string"==typeof e.payload?mi.encode(e.payload):e.payload;const p={payload:h};return void 0!==e.protected&&(p.protectedHeader=i),void 0!==e.header&&(p.unprotectedHeader=e.header),u?{...p,key:t}:p}const $i=86400,Ji=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i;var Xi=e=>{const t=Ji.exec(e);if(!t)throw new TypeError("Invalid time period format");const r=parseFloat(t[1]);switch(t[2].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(r);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(60*r);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(3600*r);case"day":case"days":case"d":return Math.round(r*$i);case"week":case"weeks":case"w":return Math.round(604800*r);default:return Math.round(31557600*r)}};const Zi=e=>e.toLowerCase().replace(/^application\//,"");var Vi=(e,t,r={})=>{const{typ:n}=r;if(n&&("string"!=typeof e.typ||Zi(e.typ)!==Zi(n)))throw new gi('unexpected "typ" JWT header value',"typ","check_failed");let i;try{i=JSON.parse(vi.decode(t))}catch(e){}if(!Ui(i))throw new xi("JWT Claims Set must be a top-level JSON object");const{requiredClaims:a=[],issuer:o,subject:d,audience:s,maxTokenAge:c}=r;void 0!==c&&a.push("iat"),void 0!==s&&a.push("aud"),void 0!==d&&a.push("sub"),void 0!==o&&a.push("iss");for(const e of new Set(a.reverse()))if(!(e in i))throw new gi(`missing required "${e}" claim`,e,"missing");if(o&&!(Array.isArray(o)?o:[o]).includes(i.iss))throw new gi('unexpected "iss" claim value',"iss","check_failed");if(d&&i.sub!==d)throw new gi('unexpected "sub" claim value',"sub","check_failed");if(s&&(u=i.aud,f="string"==typeof s?[s]:s,!("string"==typeof u?f.includes(u):Array.isArray(u)&&f.some(Set.prototype.has.bind(new Set(u))))))throw new gi('unexpected "aud" claim value',"aud","check_failed");var u,f;let l;switch(typeof r.clockTolerance){case"string":l=Xi(r.clockTolerance);break;case"number":l=r.clockTolerance;break;case"undefined":l=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:h}=r,p=(m=h||new Date,Math.floor(m.getTime()/1e3));var m;if((void 0!==i.iat||c)&&"number"!=typeof i.iat)throw new gi('"iat" claim must be a number',"iat","invalid");if(void 0!==i.nbf){if("number"!=typeof i.nbf)throw new gi('"nbf" claim must be a number',"nbf","invalid");if(i.nbf>p+l)throw new gi('"nbf" claim timestamp check failed',"nbf","check_failed")}if(void 0!==i.exp){if("number"!=typeof i.exp)throw new gi('"exp" claim must be a number',"exp","invalid");if(i.exp<=p-l)throw new wi('"exp" claim timestamp check failed',"exp","check_failed")}if(c){const e=p-i.iat;if(e-l>("number"==typeof c?c:Xi(c)))throw new wi('"iat" claim timestamp check failed (too far in the past)',"iat","check_failed");if(e<0-l)throw new gi('"iat" claim timestamp check failed (it should be in the past)',"iat","check_failed")}return i};async function Wi(e,t,r){var n;const i=await async function(e,t,r){if(e instanceof Uint8Array&&(e=vi.decode(e)),"string"!=typeof e)throw new Ri("Compact JWS must be a string or Uint8Array");const{0:n,1:i,2:a,length:o}=e.split(".");if(3!==o)throw new Ri("Invalid Compact JWS");const d=await qi({payload:i,protected:n,signature:a},t,r),s={payload:d.payload,protectedHeader:d.protectedHeader};return"function"==typeof t?{...s,key:d.key}:s}(e,t,r);if((null===(n=i.protectedHeader.crit)||void 0===n?void 0:n.includes("b64"))&&!1===i.protectedHeader.b64)throw new xi("JWTs MUST NOT use unencoded payload");const a={payload:Vi(i.protectedHeader,i.payload,r),protectedHeader:i.protectedHeader};return"function"==typeof t?{...a,key:i.key}:a}function Yi(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(Qi)}function Qi(e){return Ui(e)}class ea{constructor(e){if(this._cached=new WeakMap,!Yi(e))throw new Si("JSON Web Key Set malformed");var t;this._jwks=(t=e,"function"==typeof structuredClone?structuredClone(t):JSON.parse(JSON.stringify(t)))}async getKey(e,t){const{alg:r,kid:n}={...e,...null==t?void 0:t.header},i=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new Mi('Unsupported "alg" value for a JSON Web Key Set')}}(r),a=this._jwks.keys.filter((e=>{let t=i===e.kty;if(t&&"string"==typeof n&&(t=n===e.kid),t&&"string"==typeof e.alg&&(t=r===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t&&"EdDSA"===r&&(t="Ed25519"===e.crv||"Ed448"===e.crv),t)switch(r){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv}return t})),{0:o,length:d}=a;if(0===d)throw new Ni;if(1!==d){const e=new Ei,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(const e of a)try{yield await ta(t,e,r)}catch(e){continue}},e}return ta(this._cached,o,r)}}async function ta(e,t,r){const n=e.get(t)||e.set(t,{}).get(t);if(void 0===n[r]){const e=await async function(e,t,r){var n;if(!Ui(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return null!=r||(r=!0!==e.ext),r?Li({...e,alg:t,ext:null!==(n=e.ext)&&void 0!==n&&n}):yi(e.k);case"RSA":if(void 0!==e.oth)throw new Mi('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return Li({...e,alg:t});default:throw new Mi('Unsupported "kty" (Key Type) Parameter value')}}({...t,ext:!0},r);if(e instanceof Uint8Array||"public"!==e.type)throw new Si("JSON Web Key Set members must be public keys");n[r]=e}return n[r]}class ra extends ea{constructor(e,t){if(super({keys:[]}),this._jwks=void 0,!(e instanceof URL))throw new TypeError("url must be an instance of URL");this._url=new URL(e.href),this._options={agent:null==t?void 0:t.agent,headers:null==t?void 0:t.headers},this._timeoutDuration="number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3,this._cooldownDuration="number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._jwks&&this.fresh()||await this.reload();try{return await super.getKey(e,t)}catch(r){if(r instanceof Ni&&!1===this.coolingDown())return await this.reload(),super.getKey(e,t);throw r}}async reload(){this._pendingFetch&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(this._pendingFetch=void 0),this._pendingFetch||(this._pendingFetch=(async(e,t,r)=>{let n,i,a=!1;"function"==typeof AbortController&&(n=new AbortController,i=setTimeout((()=>{a=!0,n.abort()}),t));const o=await fetch(e.href,{signal:n?n.signal:void 0,redirect:"manual",headers:r.headers}).catch((e=>{if(a)throw new _i;throw e}));if(void 0!==i&&clearTimeout(i),200!==o.status)throw new bi("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await o.json()}catch(e){throw new bi("Failed to parse the JSON Web Key Set HTTP response as JSON")}})(this._url,this._timeoutDuration,this._options).then((e=>{if(!Yi(e))throw new Si("JSON Web Key Set malformed");this._jwks={keys:e.keys},this._jwksTimestamp=Date.now(),this._pendingFetch=void 0})).catch((e=>{throw this._pendingFetch=void 0,e}))),await this._pendingFetch}}function na(){return na=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},na.apply(this,arguments)}function ia(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,oa(e,t)}function aa(e){return aa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},aa(e)}function oa(e,t){return oa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},oa(e,t)}function da(e,t,r){return da=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&oa(i,r.prototype),i},da.apply(null,arguments)}function sa(e){var t="function"==typeof Map?new Map:void 0;return sa=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return da(e,arguments,aa(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),oa(r,e)},sa(e)}function ca(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)t.indexOf(r=a[n])>=0||(i[r]=e[r]);return i}function ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fa(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ua(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)?ua(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function la(e,t){return function(r){function n(){var n;return(n=r.call(this,t)||this).name=e,n}return ia(n,r),n}(sa(Error))}var ha=la("PopupTimeoutError","The popup has timed out."),pa=la("PopupClosedError","The popup was closed."),ma=function(e){return String.fromCharCode.apply(null,Array.from(new Uint8Array(e)))},va=new TextEncoder,ya=function(){return li},ba=function(e){return ya().btoa(e)},ga=function(e){return ba(e).replace(/=+$/g,"").replace(/\+/g,"-").replace(/\//g,"_")},wa=function(){var e;return null!=(e=ya().crypto)?e:ya().msCrypto},Aa=function(e){return wa().getRandomValues(new Uint8Array(e))},Ma=function(){var e;return null!=(e=wa().subtle)?e:wa().webkitSubtle},Ra=function(e){try{var t=Ma().digest({name:"SHA-256"},e);return ya().msCrypto?Promise.resolve(new Promise((function(e,r){t.oncomplete=function(t){return e(t.target.result)},t.onerror=function(e){return r(e.error)},t.onabort=function(){return r("The digest operation was aborted")}}))):Promise.resolve(t)}catch(e){return Promise.reject(e)}},xa="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.",Sa=function(e){return ya().atob(e)},Na=new TextDecoder;function Ea(e){return Array.from(new Set(e))}var _a=function(e){return Ea(e.trim().split(/\s+/)).sort().join(" ")};function Ca(e){var t={};return e.forEach((function(r,n){t[n]=e.getAll(n).length>1?e.getAll(n):e.get(n)})),t}function Ta(e){var t=new URLSearchParams([].concat(Object.entries(e)).filter((function(e){return null!=e[0]&&null!=e[1]})));return t.sort(),t.toString()}var Pa={createCodeChallengeAndVerifier:function(e,t){void 0===e&&(e=43),void 0===t&&(t="S256");try{var r=function(e){return Array.from(Aa(e)).map((function(e){return xa[e%66]})).join("")}(e);switch(t){case"plain":return Promise.resolve({verifier:r,challenge:r});case"S256":return Promise.resolve(Ra(va.encode(r).buffer)).then((function(e){return{verifier:r,challenge:ga(ma(e))}}));default:throw new Error("bad challenge method")}}catch(e){return Promise.reject(e)}},getCrypto:wa,getCryptoSubtle:Ma,getRandomBytes:Aa,sha256:Ra,verifyIdToken:function(e,t,r,n){try{return Promise.resolve(Wi(t,function(e,t){const r=new ra(e,t);return async function(e,t){return r.getKey(e,t)}}(new URL(e)),{audience:n})).then((function(e){var n=e.payload;if(n.__raw=t,r!==n.nonce)throw new Error("nonces don't match");return n}))}catch(e){return Promise.reject(e)}}},ka={decodeState:function(e){var t=e.split("."),r=t[1];if(t.slice(2).length>0)throw new Error("failed to decode state");return(null==r?void 0:r.length)>0?JSON.parse(decodeURIComponent(Sa(r))):void 0},encodeState:function(e){return ga(ma(Aa(32)))+"."+(null==e?"":ga(encodeURIComponent(JSON.stringify(e))))},fromBase64:Sa,textDecoder:Na,textEncoder:va,toBase64:ba,toUrlEncodedBase64:ga,stringFromBuffer:ma},Ka={__proto__:null,crypto:Pa,encoding:ka,getSortedScope:_a,getWindow:ya,objectFromEntries:function(e){for(var t,r={},n=fa(e);!(t=n()).done;){var i=t.value;r[i[0]]=i[1]}return r},objectFromURLSearchParams:Ca,objectToKey:Ta,retry:function e(t,r,n,i,a){return void 0===r&&(r=4),void 0===n&&(n=250),void 0===i&&(i=2),void 0===a&&(a=null),r<=0?Promise.reject(a):t().catch((function(a){try{return Promise.resolve(new Promise((function(e){return setTimeout(e,n)}))).then((function(){return e(t,r-1,n*i,i,a)}))}catch(e){return Promise.reject(e)}}))},uniqueElementsFromArray:Ea},Da=function(e){function t(t,r,n){var i;return(i=e.call(this,t+": "+r+(n?"\nSee more at "+n+".":""))||this).code=void 0,i.description=void 0,i.uri=void 0,i.code=t,i.description=r,i.uri=n,i}return ia(t,e),t.fromResponse=function(e){return new t(e.error,e.error_description,e.error_uri)},t}(sa(Error)),Fa=["url"],Ia=["url","client_id","client_secret","client_auth_method"],Ba=function(){function e(e){this.options=void 0,this.options=e}var t=e.prototype;return t.buildAuthorizeUrl=function(e){return this._buildUrl(e)},t.buildLogoutUrl=function(e){return this._buildUrl(e)},t.parseAuthorizeResponseFromFragment=function(e){return this._validateResponse(Ca(new URLSearchParams(new URL(e).hash.substring(1))))},t.parseAuthorizeResponseFromQuery=function(e){return this._validateResponse(Ca(new URL(e).searchParams))},t.authorizeWithPopup=function(e,t){void 0===t&&(t={});try{var r,n=this;if(!window)throw new Error("no window in options");var i=n.buildAuthorizeUrl(e),a=t.popup,o=null!=(r=t.timeout)?r:36e5;if(a)a.location.href=i;else{var d,s,c=null!=(d=t.width)?d:600,u=null!=(s=t.height)?s:800;if(!(a=window.open(i,"uauth:authorize:popup","left="+(window.screenX+(window.innerWidth-c)/2)+",top="+(window.screenY+(window.innerHeight-u)/2)+",width="+c+",height="+u+",resizable,scrollbars=yes,status=1")))throw new Error("popup failed to be constructed")}var f=!1;return Promise.resolve(new Promise((function(t,r){var i=setTimeout((function(){f||(clearInterval(d),a.close(),r(new ha))}),o),d=setInterval((function(){var o,s,c,u;!f&&null!=(o=a)&&o.closed&&(clearInterval(d),clearTimeout(i),r(new pa));try{s=a.location.href,c=new URL(s),u=new URL(e.redirect_uri)}catch(e){return}if(c.hash="",c.href===u.href){f=!0,clearInterval(d),clearTimeout(i),a.close();try{t(n.parseAuthorizeResponseFromFragment(s))}catch(e){r(e)}}}),10)})))}catch(e){return Promise.reject(e)}},t.authorizeWithDevice=function(e){return Promise.resolve({})},t.getToken=function(e){try{var t=this._buildRequest(e,{method:"POST"});return Promise.resolve(this._fetchJSON(t[0],t[1]))}catch(e){return Promise.reject(e)}},t.introspect=function(e){var t=this._buildRequest(e,{method:"POST"});return this._fetchJSON(t[0],t[1])},t.revoke=function(e){try{var t=this._buildRequest(e,{method:"POST"});return Promise.resolve(this._fetchJSON(t[0],t[1])).then((function(){}))}catch(e){return Promise.reject(e)}},t.userinfo=function(e){var t=this._buildRequest(e,{method:"GET",headers:{Authorization:"Basic "+e.access_token}});return this._fetchJSON(t[0],t[1])},t.jwks=function(e){var t=this._buildRequest(e,{method:"GET"});return this._fetchJSON(t[0],t[1])},t.getTokenWithAuthorizationCode=function(e){return this.getToken(e)},t.getTokenWithRefreshToken=function(e){return this.getToken(e)},t.getTokenWithDeviceCode=function(e){return this.getToken(e)},t.getTokenWithPassword=function(e){return this.getToken(e)},t.getTokenWithSAML=function(e){return this.getToken(e)},t.getTokenWithClientCredentials=function(e){return this.getToken(e)},t._buildUrl=function(e){for(var t=e.url,r=ca(e,Fa),n=new URL(t),i=new URLSearchParams,a=0,o=Object.entries(r);a<o.length;a++){var d=o[a],s=d[0],c=d[1];null!=s&&null!=c&&i.append(s,c)}return n.search=i.toString(),n.toString()},t._buildRequest=function(e,t){var r,n=e.url,i=e.client_id,a=e.client_secret,o=e.client_auth_method,d=ca(e,Ia),s=t.headers,c=t.method,u=new Headers(null!=(r=this.options.headers)?r:[]);new Headers(null!=s?s:[]).forEach((function(e,t){u.set(t,e)})),"POST"===t.method&&u.set("Content-Type","application/x-www-form-urlencoded");var f=na({client_id:i},d);switch(o){case"client_secret_basic":if(null==a)throw new Error("Client secret not present!");u.set("Authorization","Basic "+ba(i+":"+a));break;case"client_secret_post":if(null==a)throw new Error("Client secret not present!");f.client_secret=a;break;case"none":case void 0:case null:break;default:throw new Error("Bad client_auth_method")}return[n,{method:c,headers:u,body:"POST"===c?new URLSearchParams(Object.entries(f)):void 0}]},t._validateResponse=function(t){if(t.error)throw e.Error.fromResponse(t);return t},t._fetchJSON=function(e,t){try{var r,n=this;if(t.headers){var i=new Headers(t.headers);i.set("Accept","application/json"),t.headers=i}else t.headers={Accept:"application/json"};return Promise.resolve(null==(r=window)?void 0:r.fetch(e,t)).then((function(e){return Promise.resolve(e.json()).then((function(t){if(n._validateResponse(t),!e.ok)throw new Error(e.status+" "+e.statusText+": "+JSON.stringify(t));return t}))}))}catch(e){return Promise.reject(e)}},e}();Ba.Error=Da;var ja=function(){function e(e){this.client=void 0,this.client=e}var t=e.prototype;return t.get=function(e,t){var r=void 0===t?{}:t,n=r.mustExist,i=void 0!==n&&n,a=r.deleteAfter,o=void 0!==a&&a;try{var d=this;return Promise.resolve(d.client.getStore().get(e)).then((function(t){var r;function n(t){if(r)return t;var n=function(){if(o)return Promise.resolve(d.client.getStore().delete(e)).then((function(){}))}();return n&&n.then?n.then((function(){return a})):a}if(null!=t){var a=t.value,s=t.expiresAt,c=function(){if(0!==s&&s<Date.now())return Promise.resolve(d.client.getStore().delete(e)).then((function(){if(i)throw new Error(e+" does not exist in store");r=1}))}();return c&&c.then?c.then(n):n(c)}if(i)throw new Error(e+" does not exist in store")}))}catch(e){return Promise.reject(e)}},t.set=function(e,t,r){void 0===r&&(r=0);try{return Promise.resolve(this.client.getStore().set(e,{expiresAt:0===r?0:Date.now()+r,value:t})).then((function(){}))}catch(e){return Promise.reject(e)}},t.setAuthorizeRequest=function(e){try{return Promise.resolve(this.set("request",e,3e5)).then((function(){}))}catch(e){return Promise.reject(e)}},t.getAuthorizeRequest=function(){return this.get("request",{mustExist:!0,deleteAfter:!0})},t.setLogoutRequest=function(e){try{return Promise.resolve(this.set("logout-request",e,3e5)).then((function(){}))}catch(e){return Promise.reject(e)}},t.getLogoutRequest=function(){return this.get("logout-request",{mustExist:!0,deleteAfter:!0})},t.setVerifier=function(e,t){try{return Promise.resolve(this.set("verifier:"+e,t,3e5)).then((function(){}))}catch(e){return Promise.reject(e)}},t.getVerifier=function(e){return this.get("verifier:"+e,{mustExist:!0,deleteAfter:!0})},t.setOpenIdConfiguration=function(e,t,r){try{return Promise.resolve(this.set("openidConfiguration:"+e,t,r)).then((function(){}))}catch(e){return Promise.reject(e)}},t.getOpenIdConfiguration=function(e){return this.get("openidConfiguration:"+e)},t.setAuthorization=function(e){try{var t=this,r={clientID:e.idToken.aud,resource:e.resource,scope:e.scope,username:e.idToken.sub},n=e.expiresAt-Date.now();return Promise.resolve(t.set("username",r.username,n)).then((function(){var i=t.set;return Promise.resolve(t._getAuthorizationKey(r)).then((function(r){return Promise.resolve(i.call(t,r,e,n)).then((function(){}))}))}))}catch(e){return Promise.reject(e)}},t.deleteAuthorization=function(e){try{var t=this;return Promise.resolve(t.get("username")).then((function(r){return Promise.resolve(t._getUsername(e.username,r)).then((function(n){function i(){var r=t.client.getStore(),n=r.delete;return Promise.resolve(t._getAuthorizationKey(e)).then((function(e){return n.call(r,e)}))}e.username=n;var a=function(){if(e.username===r)return Promise.resolve(t.client.getStore().delete("username")).then((function(){}))}();return a&&a.then?a.then(i):i()}))}))}catch(e){return Promise.reject(e)}},t.getAuthorization=function(e){try{var t=this,r=t.get;return Promise.resolve(t._getAuthorizationKey(e)).then((function(e){return r.call(t,e,{mustExist:!0})}))}catch(e){return Promise.reject(e)}},t._getAuthorizationKey=function(e){try{var t=this,r=Ta,n=t._getUsername,i=e.username;return Promise.resolve(t.get("username")).then((function(a){return Promise.resolve(n.call(t,i,a)).then((function(n){var i,a,o;return"authorization?"+r.call(Ka,{username:n,clientID:null!=(i=e.clientID)?i:t.client.fallbackLoginOptions.clientID,scope:_a(null!=(a=e.scope)?a:t.client.fallbackLoginOptions.scope),resource:null!=(o=e.resource)?o:t.client.fallbackLoginOptions.resource})}))}))}catch(e){return Promise.reject(e)}},t._getUsername=function(e,t){try{if(null==e&&null==t)throw new Error("no username given");return Promise.resolve(null!=e?e:t)}catch(e){return Promise.reject(e)}},e}(),Oa=function(){function e(e){this.storage=void 0,this.storage=e}var t=e.prototype;return t.get=function(e){var t=this.storage.getItem(e);return null!=t?JSON.parse(t):null},t.delete=function(e){return this.storage.removeItem(e),!0},t.set=function(e,t){return this.storage.setItem(e,JSON.stringify(t)),this},e}(),Ua=["clientID","username","scope","resource"];if("undefined"!=typeof window){var La=window;La.UAUTH_VERSION=La.UAUTH_VERSION||{},La.UAUTH_VERSION.JS="2.7.0"}var za=function(){var e=t.prototype;function t(e){var t,r,n,i,d,s,c,l,h,p;this.util=Ka,this._clientStore=new ja(this),this.api=void 0,this.fallbackIssuer=void 0,this.fallbackLoginOptions=void 0,this.fallbackLogoutOptions=void 0,this.cacheOptions=void 0,this.issuerResolver=void 0,this.resolution=void 0,this.store=void 0,this.storeOptions=void 0,this.fallbackIssuer=null!=(t=e.fallbackIssuer)?t:"https://auth.unstoppabledomains.com",this.resolution=null!=(r=e.resolution)?r:new f.Resolution,this.storeOptions={store:e.store,storeType:null!=(n=e.storeType)?n:"localstore"},this.cacheOptions=na({issuer:!1,userinfo:!0},null!=(i=e.cacheOptions)?i:{}),this.api=new Ba({headers:{}}),this.fallbackLoginOptions={clientID:e.clientID,clientSecret:e.clientSecret,clientAuthMethod:null!=(d=e.clientAuthMethod)?d:e.clientSecret?"client_secret_post":"none",maxAge:null!=(s=e.maxAge)?s:3e5,prompt:null!=(c=e.prompt)?c:"login",resource:e.resource,redirectUri:e.redirectUri,responseMode:null!=(l=e.responseMode)?l:"fragment",scope:null!=(h=e.scope)?h:"openid wallet"},this.fallbackLogoutOptions={rpInitiatedLogout:null!=(p=e.rpInitiatedLogout)?p:"string"==typeof e.postLogoutRedirectUri,postLogoutRedirectUri:e.postLogoutRedirectUri};var m=this;this.issuerResolver=new o({webfingerResolver:new u({ipfsResolver:new a((function(){return(e.createIpfsUrl||a.defaultCreateUrl).apply(void 0,[].slice.call(arguments))})),domainResolver:{records:function(e,t){try{return Promise.resolve(function(r,n){try{var i=Promise.resolve(m.resolution.records(e,t))}catch(e){return n(e)}return i&&i.then?i.then(void 0,n):i}(0,(function(e){if(e instanceof f.ResolutionError&&e.code===f.ResolutionErrorCode.UnspecifiedResolver)return{};throw e})))}catch(e){return Promise.reject(e)}}}})})}return e.getStore=function(){if(this.store)return this.store;if(this.storeOptions.store)this.store=this.storeOptions.store;else switch(this.storeOptions.storeType){case"localstore":this.store=new Oa(window.localStorage);break;case"sessionstore":this.store=new Oa(window.sessionStorage);break;case"memory":this.store=new Map;break;default:throw new Error("Bad storeType provided")}return this.store},e.buildAuthorizeRequest=function(e){try{var t=this,r=na({},t.fallbackLoginOptions,e),n=e.username;return Promise.resolve(t.getOpenIdConfiguration(n)).then((function(e){return Promise.resolve(Pa.createCodeChallengeAndVerifier(43,"S256")).then((function(i){var a,o=i.verifier,d=i.challenge,s=ka.toBase64(ka.stringFromBuffer(Pa.getRandomBytes(32))),c=ka.encodeState(r.state),u={url:e.authorization_endpoint,code_challenge:d,nonce:s,state:c,flow_id:null!=(a=r.flowId)?a:"login",login_hint:n,client_id:r.clientID,client_secret:r.clientSecret,client_auth_method:r.clientAuthMethod,max_age:r.maxAge,prompt:r.prompt,resource:r.resource,redirect_uri:r.redirectUri,response_mode:r.responseMode,scope:r.scope,code_challenge_method:"S256",response_type:"code",package_name:(null==r?void 0:r.packageName)||"@uauth/js",package_version:(null==r?void 0:r.packageVersion)||"2.7.0",signup_suggestion:r.signupSuggestion};return Promise.resolve(t._clientStore.setAuthorizeRequest(u)).then((function(){return Promise.resolve(t._clientStore.setVerifier(d,o)).then((function(){return u}))}))}))}))}catch(e){return Promise.reject(e)}},e.loginWithPopup=function(e,t){void 0===e&&(e={});try{var r=this;return e.responseMode="fragment",Promise.resolve(r.buildAuthorizeRequest(e)).then((function(e){return Promise.resolve(r.api.authorizeWithPopup(e,t)).then((function(t){return Promise.resolve(r.verifyAuthorizeResponse(e,t))}))}))}catch(e){return Promise.reject(e)}},e.login=function(e){void 0===e&&(e={});try{var t=this;return Promise.resolve(t.buildAuthorizeRequest(e)).then((function(r){function n(){window.location.href=i}var i=t.api.buildAuthorizeUrl(r),a=function(){if("function"==typeof e.beforeRedirect)return Promise.resolve(e.beforeRedirect(i)).then((function(){}))}();return a&&a.then?a.then(n):n()}))}catch(e){return Promise.reject(e)}},e.loginCallback=function(e){try{var t,r=this,n=null!=(t=null==e?void 0:e.url)?t:window.location.href;return Promise.resolve(r._clientStore.getAuthorizeRequest()).then((function(e){var t;if("fragment"===e.response_mode)t=r.api.parseAuthorizeResponseFromFragment(n);else{if("query"!==e.response_mode)throw new Error("Unsupported response_mode");t=r.api.parseAuthorizeResponseFromQuery(n)}return Promise.resolve(r.verifyAuthorizeResponse(e,t)).then((function(t){return{authorization:t,state:ka.decodeState(e.state)}}))}))}catch(e){return Promise.reject(e)}},e.verifyAuthorizeResponse=function(e,t){try{var r=this;if(e.state!==t.state)throw new Error("states don't match");return Promise.resolve(r.getOpenIdConfiguration(e.login_hint)).then((function(n){var i=t.code,a=e.client_auth_method,o=e.client_secret,d=e.client_id,s=n.token_endpoint;return Promise.resolve(r._clientStore.getVerifier(e.code_challenge)).then((function(t){return Promise.resolve(r.api.getTokenWithAuthorizationCode({url:s,client_id:d,client_secret:o,client_auth_method:a,grant_type:"authorization_code",code:i,code_verifier:t,redirect_uri:e.redirect_uri})).then((function(t){return Promise.resolve(Pa.verifyIdToken(n.jwks_uri,t.id_token,e.nonce,e.client_id)).then((function(n){var i={accessToken:t.access_token,expiresAt:Date.now()+1e3*t.expires_in,idToken:n,scope:_a(e.scope),resource:e.resource};return Promise.resolve(r._clientStore.setAuthorization(i)).then((function(){return i}))}))}))}))}))}catch(e){return Promise.reject(e)}},e.getVerifiedAccounts=function(e,t){void 0===t&&(t=[]);var r=[];return e.idToken.verified_addresses?(e.idToken.verified_addresses.forEach((function(e){t.length>0&&!t.includes(e.symbol)||r.push({address:e.address,message:e.proof.message,signature:e.proof.signature,symbol:e.symbol})})),r):r},e.getAuthorizationAccount=function(e,t,r){var n;void 0===t&&(t="sig"),void 0===r&&(r="v1");var i=null==(n=e.idToken.amr)?void 0:n.filter((function(e){return e.startsWith(r+"."+t)}));if(i&&0!=i.length){var a=i[0].split(".")[3],o=this.getVerifiedAccounts(e);if(o)for(var d,s=fa(o);!(d=s()).done;){var c=d.value;if(c.address===a)return c}}},e.getOpenIdConfiguration=function(e){try{var t,r=function(r){return t?r:Promise.resolve(e?n.issuerResolver.resolve(e,n.fallbackIssuer):fetch(n.fallbackIssuer+"/.well-known/openid-configuration").then((function(e){return e.ok?e.json():Promise.reject(new Error("bad openid-configuration response"))}))).then((function(t){return Promise.resolve(n._clientStore.setOpenIdConfiguration(null!=e?e:"",t,"number"==typeof n.cacheOptions.issuer?n.cacheOptions.issuer:36e5)).then((function(){return t}))}))},n=this,i=function(){if(n.cacheOptions.issuer)return Promise.resolve(n._clientStore.getOpenIdConfiguration(null!=e?e:"")).then((function(e){if(e)return t=1,e}))}();return Promise.resolve(i&&i.then?i.then(r):r(i))}catch(e){return Promise.reject(e)}},e.authorization=function(e){void 0===e&&(e={});try{return Promise.resolve(this._clientStore.getAuthorization(e))}catch(e){return Promise.reject(e)}},e.user=function(e){void 0===e&&(e={});try{var t,r=this,n=null!=(t=e.claims)?t:["name","given_name","family_name","middle_name","nickname","preferred_username","profile","picture","website","email","email_verified","gender","birthdate","zoneinfo","locale","phone_number","phone_number_verified","address","updated_at","wallet_address","wallet_type_hint","eip4361_message","eip4361_signature","humanity_check_id"];return Promise.resolve(r.authorization(e)).then((function(e){var t={sub:e.idToken.sub};if(r.cacheOptions.userinfo){for(var i,a=fa(n);!(i=a()).done;){var o=i.value;e.idToken[o]&&(t[o]=e.idToken[o])}return t}return Promise.resolve(r.getOpenIdConfiguration(e.idToken.sub)).then((function(i){return Promise.resolve(r.api.userinfo({client_id:r.fallbackLoginOptions.clientID,client_secret:r.fallbackLoginOptions.clientSecret,client_auth_method:r.fallbackLoginOptions.clientAuthMethod,access_token:e.accessToken,url:i.userinfo_endpoint})).then((function(e){for(var r,i=fa(n);!(r=i()).done;){var a=r.value;e[a]&&(t[a]=e[a])}return t}))}))}))}catch(e){return Promise.reject(e)}},e.buildLogoutRequest=function(e){try{var t=this;return Promise.resolve(t.authorization(e)).then((function(r){return Promise.resolve(t.getOpenIdConfiguration(r.idToken.sub)).then((function(n){var i;if(null==n.end_session_endpoint)throw new Error("end_session_endpoint must exist");var a=null!=(i=e.postLogoutRedirectUri)?i:t.fallbackLogoutOptions.postLogoutRedirectUri;if(null==a)throw new Error("postLogoutRedirectUri must be supplied");var o={client_id:t.fallbackLoginOptions.clientID,client_secret:t.fallbackLoginOptions.clientSecret,client_auth_method:t.fallbackLoginOptions.clientAuthMethod,url:n.end_session_endpoint,id_token_hint:r.idToken.__raw,post_logout_redirect_uri:a,state:ka.encodeState(e.state)};return Promise.resolve(t._clientStore.setLogoutRequest(o)).then((function(){return o}))}))}))}catch(e){return Promise.reject(e)}},e.logout=function(e){var t=void 0===e?{}:e,r=t.clientID,n=t.username,i=t.scope,a=t.resource,o=ca(t,Ua);try{var d,s=function(e){return d?e:Promise.resolve(c.buildLogoutRequest(u)).then((function(e){function t(){return Promise.resolve(c._clientStore.deleteAuthorization(f)).then((function(){window.location.href=r}))}var r=c.api.buildLogoutUrl(e),n=function(){if("function"==typeof u.beforeRedirect)return Promise.resolve(u.beforeRedirect(r)).then((function(){}))}();return n&&n.then?n.then(t):t()}))},c=this,u=na({},c.fallbackLogoutOptions,o),f={clientID:r,username:n,scope:i,resource:a},l=function(){if(!u.rpInitiatedLogout)return Promise.resolve(c._clientStore.deleteAuthorization(f)).then((function(){d=1}))}();return Promise.resolve(l&&l.then?l.then(s):s(l))}catch(e){return Promise.reject(e)}},e.logoutCallback=function(e){void 0===e&&(e={});try{var t,r,n=this,i=null!=(t=null==(r=e)?void 0:r.url)?t:window.location.href;return Promise.resolve(n._clientStore.getLogoutRequest()).then((function(e){var t=n.api.parseAuthorizeResponseFromQuery(i);return Promise.resolve(n.verifyLogoutResponse(e,t)).then((function(){return ka.decodeState(e.state)}))}))}catch(e){return Promise.reject(e)}},e.verifyLogoutResponse=function(e,t){try{if(e.state!==t.state)throw new Error("states don't match");return Promise.resolve()}catch(e){return Promise.reject(e)}},t}();let Ha,Ga=!1;exports.default=function(t,r){return e.__awaiter(this,void 0,void 0,(function*(){if(Ga)return;const{uAuthParams:n}=t;if(!(null==n?void 0:n.clientID))throw new Error("uAuthParams is not valid.");Ga=!0;try{const t=Object.assign(Object.assign({},n),{redirectUri:n.redirectUri||window.location.origin});let i,a;Ha=new za(t);try{i=yield Ha.user()}catch(e){if(!Ha.fallbackLoginOptions.scope.includes("wallet"))throw new Error('Must request the "wallet" scope for connector to work.');if(t.shouldLoginWithRedirect)throw yield Ha.login(),yield new Promise((()=>{})),new Error("Should never get here.");yield Ha.loginWithPopup(),i=yield Ha.user()}if(null==i.wallet_type_hint)throw new Error("no wallet type present");if(["web3","injected"].includes(i.wallet_type_hint))a=e.injectedConnect(void 0,r);else{if("walletconnect"!==i.wallet_type_hint||!t.walletConnect)throw new Error("Connector not supported");a=t.walletConnect()}return Ga=!1,a}catch(e){Ga=!1}}))},exports.disconnectWallet=function(){return null==Ha?void 0:Ha.logout()};
|